import { g as kp, a as x3, n as w3 } from "./main-CZEa_tPp.js";
import { I as nh, g as Wv, A as ho, n as xd, t as Zw, a as Gv, c as Si, s as Fi, q as aE, r as Bt, e as ji, b as tf, d as $3, f as Kw, h as k3, i as A3, j as Pd, k as Qw, l as Hb, m as oE, o as O3, p as Pi, u as Nu, v as Hv, S as Yb, M as Xb, H as Jb, D as Zb, W as Kb, w as Qb, Q as ey, Y as ty, x as rE, y as sE, z as Yv, B as Xv, C as E3, E as D3, F as lE, G as Ap, J as dE, K as Jv, L as fE, T as uE, N as cE, O as hE, P as pE, R as gE, U as mE, V as bE, X as yE, Z as Op, _ as vE, $ as _E, a0 as xE, a1 as wE, a2 as S3, a3 as F3, a4 as Nd, a5 as po, a6 as T3, a7 as nf, a8 as $E, a9 as Zv, aa as C3, ab as R3, ac as I3, ad as xm, ae as j3, af as z3, ag as P3, ah as kE, ai as N3, aj as af, ak as $c, al as iy, am as Kv, an as q3, ao as L3, ap as AE, aq as B3, ar as U3, as as OE, at as EE, au as M3, av as V3, aw as DE, ax as SE, ay as Qv, az as FE, aA as W3, aB as G3, aC as H3, aD as e$, aE as TE, aF as CE, aG as Y3, aH as X3, aI as J3, aJ as RE, aK as IE, aL as Z3, aM as jE, aN as ah, aO as t$, aP as zE, aQ as PE, aR as NE, aS as qE, aT as LE, aU as BE, aV as UE, aW as ME, aX as VE, aY as WE, aZ as K3, a_ as Q3, a$ as GE, b0 as HE, b1 as YE, b2 as XE, b3 as JE, b4 as ZE, b5 as KE, b6 as QE, b7 as eD, b8 as tD, b9 as iD, ba as nD, bb as eN, bc as tN, bd as iN, be as aD, bf as oD, bg as rD, bh as sD, bi as lD, bj as dD, bk as fD, bl as uD, bm as cD, bn as nN, bo as aN, bp as hD, bq as i$, br as oN, bs as rN, bt as sN, bu as lN } from "./vega-projection.module-D1UAjX-b.js";
import { d as dN } from "./debounce-BezZ7Sd5.js";
function fN(e, t) {
  return Array.from(t, (i) => e[i]);
}
function uN(e, t) {
  let i = 0, n = 0;
  if (t === void 0)
    for (let a of e)
      a != null && (a = +a) >= a && (++i, n += a);
  else {
    let a = -1;
    for (let o of e)
      (o = t(o, ++a, e)) != null && (o = +o) >= o && (++i, n += o);
  }
  if (i) return n / i;
}
function pD(e, t) {
  let i = 0;
  for (let n of e)
    (n = +n) && (i += n);
  return i;
}
function cN(e, ...t) {
  e = new nh(e), t = t.map(hN);
  e: for (const i of e)
    for (const n of t)
      if (!n.has(i)) {
        e.delete(i);
        continue e;
      }
  return e;
}
function hN(e) {
  return e instanceof nh ? e : new nh(e);
}
function pN(...e) {
  const t = new nh();
  for (const i of e)
    for (const n of i)
      t.add(n);
  return t;
}
var oh = new ho(), rh = new ho(), gD, mD, ny, ay, oy, qn = {
  point: xd,
  lineStart: xd,
  lineEnd: xd,
  polygonStart: function() {
    oh = new ho(), qn.lineStart = gN, qn.lineEnd = mN;
  },
  polygonEnd: function() {
    var e = +oh;
    rh.add(e < 0 ? Zw + e : e), this.lineStart = this.lineEnd = this.point = xd;
  },
  sphere: function() {
    rh.add(Zw);
  }
};
function gN() {
  qn.point = bN;
}
function mN() {
  bD(gD, mD);
}
function bN(e, t) {
  qn.point = bD, gD = e, mD = t, e *= Bt, t *= Bt, ny = e, ay = Si(t = t / 2 + aE), oy = Fi(t);
}
function bD(e, t) {
  e *= Bt, t *= Bt, t = t / 2 + aE;
  var i = e - ny, n = i >= 0 ? 1 : -1, a = n * i, o = Si(t), r = Fi(t), s = oy * r, l = ay * o + s * Si(a), d = s * n * Fi(a);
  oh.add(Gv(d, l)), ny = e, ay = o, oy = r;
}
function yN(e) {
  return rh = new ho(), Wv(e, qn), rh * 2;
}
var Be, fi, Ge, xi, cr, yD, vD, Ns, qd, Ka, Ta, ga = {
  point: ry,
  lineStart: n$,
  lineEnd: a$,
  polygonStart: function() {
    ga.point = xD, ga.lineStart = vN, ga.lineEnd = _N, qd = new ho(), qn.polygonStart();
  },
  polygonEnd: function() {
    qn.polygonEnd(), ga.point = ry, ga.lineStart = n$, ga.lineEnd = a$, oh < 0 ? (Be = -(Ge = 180), fi = -(xi = 90)) : qd > ji ? xi = 90 : qd < -ji && (fi = -90), Ta[0] = Be, Ta[1] = Ge;
  },
  sphere: function() {
    Be = -(Ge = 180), fi = -(xi = 90);
  }
};
function ry(e, t) {
  Ka.push(Ta = [Be = e, Ge = e]), t < fi && (fi = t), t > xi && (xi = t);
}
function _D(e, t) {
  var i = $3([e * Bt, t * Bt]);
  if (Ns) {
    var n = Kw(Ns, i), a = [n[1], -n[0], 0], o = Kw(a, n);
    k3(o), o = A3(o);
    var r = e - cr, s = r > 0 ? 1 : -1, l = o[0] * Pd * s, d, f = tf(r) > 180;
    f ^ (s * cr < l && l < s * e) ? (d = o[1] * Pd, d > xi && (xi = d)) : (l = (l + 360) % 360 - 180, f ^ (s * cr < l && l < s * e) ? (d = -o[1] * Pd, d < fi && (fi = d)) : (t < fi && (fi = t), t > xi && (xi = t))), f ? e < cr ? _i(Be, e) > _i(Be, Ge) && (Ge = e) : _i(e, Ge) > _i(Be, Ge) && (Be = e) : Ge >= Be ? (e < Be && (Be = e), e > Ge && (Ge = e)) : e > cr ? _i(Be, e) > _i(Be, Ge) && (Ge = e) : _i(e, Ge) > _i(Be, Ge) && (Be = e);
  } else
    Ka.push(Ta = [Be = e, Ge = e]);
  t < fi && (fi = t), t > xi && (xi = t), Ns = i, cr = e;
}
function n$() {
  ga.point = _D;
}
function a$() {
  Ta[0] = Be, Ta[1] = Ge, ga.point = ry, Ns = null;
}
function xD(e, t) {
  if (Ns) {
    var i = e - cr;
    qd.add(tf(i) > 180 ? i + (i > 0 ? 360 : -360) : i);
  } else
    yD = e, vD = t;
  qn.point(e, t), _D(e, t);
}
function vN() {
  qn.lineStart();
}
function _N() {
  xD(yD, vD), qn.lineEnd(), tf(qd) > ji && (Be = -(Ge = 180)), Ta[0] = Be, Ta[1] = Ge, Ns = null;
}
function _i(e, t) {
  return (t -= e) < 0 ? t + 360 : t;
}
function xN(e, t) {
  return e[0] - t[0];
}
function o$(e, t) {
  return e[0] <= e[1] ? e[0] <= t && t <= e[1] : t < e[0] || e[1] < t;
}
function wN(e) {
  var t, i, n, a, o, r, s;
  if (xi = Ge = -(Be = fi = 1 / 0), Ka = [], Wv(e, ga), i = Ka.length) {
    for (Ka.sort(xN), t = 1, n = Ka[0], o = [n]; t < i; ++t)
      a = Ka[t], o$(n, a[0]) || o$(n, a[1]) ? (_i(n[0], a[1]) > _i(n[0], n[1]) && (n[1] = a[1]), _i(a[0], n[1]) > _i(n[0], n[1]) && (n[0] = a[0])) : o.push(n = a);
    for (r = -1 / 0, i = o.length - 1, t = 0, n = o[i]; t <= i; n = a, ++t)
      a = o[t], (s = _i(n[1], a[0])) > r && (r = s, Be = a[0], Ge = n[1]);
  }
  return Ka = Ta = null, Be === 1 / 0 || fi === 1 / 0 ? [[NaN, NaN], [NaN, NaN]] : [[Be, fi], [Ge, xi]];
}
var wd, sh, lh, dh, fh, uh, ch, hh, sy, ly, dy, wD, $D, Ht, Yt, Xt, on = {
  sphere: xd,
  point: e0,
  lineStart: r$,
  lineEnd: s$,
  polygonStart: function() {
    on.lineStart = AN, on.lineEnd = ON;
  },
  polygonEnd: function() {
    on.lineStart = r$, on.lineEnd = s$;
  }
};
function e0(e, t) {
  e *= Bt, t *= Bt;
  var i = Si(t);
  Hf(i * Si(e), i * Fi(e), Fi(t));
}
function Hf(e, t, i) {
  ++wd, lh += (e - lh) / wd, dh += (t - dh) / wd, fh += (i - fh) / wd;
}
function r$() {
  on.point = $N;
}
function $N(e, t) {
  e *= Bt, t *= Bt;
  var i = Si(t);
  Ht = i * Si(e), Yt = i * Fi(e), Xt = Fi(t), on.point = kN, Hf(Ht, Yt, Xt);
}
function kN(e, t) {
  e *= Bt, t *= Bt;
  var i = Si(t), n = i * Si(e), a = i * Fi(e), o = Fi(t), r = Gv(O3((r = Yt * o - Xt * a) * r + (r = Xt * n - Ht * o) * r + (r = Ht * a - Yt * n) * r), Ht * n + Yt * a + Xt * o);
  sh += r, uh += r * (Ht + (Ht = n)), ch += r * (Yt + (Yt = a)), hh += r * (Xt + (Xt = o)), Hf(Ht, Yt, Xt);
}
function s$() {
  on.point = e0;
}
function AN() {
  on.point = EN;
}
function ON() {
  kD(wD, $D), on.point = e0;
}
function EN(e, t) {
  wD = e, $D = t, e *= Bt, t *= Bt, on.point = kD;
  var i = Si(t);
  Ht = i * Si(e), Yt = i * Fi(e), Xt = Fi(t), Hf(Ht, Yt, Xt);
}
function kD(e, t) {
  e *= Bt, t *= Bt;
  var i = Si(t), n = i * Si(e), a = i * Fi(e), o = Fi(t), r = Yt * o - Xt * a, s = Xt * n - Ht * o, l = Ht * a - Yt * n, d = Hb(r, s, l), f = oE(d), u = d && -f / d;
  sy.add(u * r), ly.add(u * s), dy.add(u * l), sh += f, uh += f * (Ht + (Ht = n)), ch += f * (Yt + (Yt = a)), hh += f * (Xt + (Xt = o)), Hf(Ht, Yt, Xt);
}
function DN(e) {
  wd = sh = lh = dh = fh = uh = ch = hh = 0, sy = new ho(), ly = new ho(), dy = new ho(), Wv(e, on);
  var t = +sy, i = +ly, n = +dy, a = Hb(t, i, n);
  return a < Qw && (t = uh, i = ch, n = hh, sh < ji && (t = lh, i = dh, n = fh), a = Hb(t, i, n), a < Qw) ? [NaN, NaN] : [Gv(i, t) * Pd, oE(n / a) * Pd];
}
function l$(e, t, i) {
  var n = Pi(e, t - ji, i).concat(t);
  return function(a) {
    return n.map(function(o) {
      return [a, o];
    });
  };
}
function d$(e, t, i) {
  var n = Pi(e, t - ji, i).concat(t);
  return function(a) {
    return n.map(function(o) {
      return [o, a];
    });
  };
}
function SN() {
  var e, t, i, n, a, o, r, s, l = 10, d = l, f = 90, u = 360, c, h, p, g, m = 2.5;
  function b() {
    return { type: "MultiLineString", coordinates: y() };
  }
  function y() {
    return Pi(Nu(n / f) * f, i, f).map(p).concat(Pi(Nu(s / u) * u, r, u).map(g)).concat(Pi(Nu(t / l) * l, e, l).filter(function(v) {
      return tf(v % f) > ji;
    }).map(c)).concat(Pi(Nu(o / d) * d, a, d).filter(function(v) {
      return tf(v % u) > ji;
    }).map(h));
  }
  return b.lines = function() {
    return y().map(function(v) {
      return { type: "LineString", coordinates: v };
    });
  }, b.outline = function() {
    return {
      type: "Polygon",
      coordinates: [
        p(n).concat(
          g(r).slice(1),
          p(i).reverse().slice(1),
          g(s).reverse().slice(1)
        )
      ]
    };
  }, b.extent = function(v) {
    return arguments.length ? b.extentMajor(v).extentMinor(v) : b.extentMinor();
  }, b.extentMajor = function(v) {
    return arguments.length ? (n = +v[0][0], i = +v[1][0], s = +v[0][1], r = +v[1][1], n > i && (v = n, n = i, i = v), s > r && (v = s, s = r, r = v), b.precision(m)) : [[n, s], [i, r]];
  }, b.extentMinor = function(v) {
    return arguments.length ? (t = +v[0][0], e = +v[1][0], o = +v[0][1], a = +v[1][1], t > e && (v = t, t = e, e = v), o > a && (v = o, o = a, a = v), b.precision(m)) : [[t, o], [e, a]];
  }, b.step = function(v) {
    return arguments.length ? b.stepMajor(v).stepMinor(v) : b.stepMinor();
  }, b.stepMajor = function(v) {
    return arguments.length ? (f = +v[0], u = +v[1], b) : [f, u];
  }, b.stepMinor = function(v) {
    return arguments.length ? (l = +v[0], d = +v[1], b) : [l, d];
  }, b.precision = function(v) {
    return arguments.length ? (m = +v, c = l$(o, a, 90), h = d$(t, e, m), p = l$(s, r, 90), g = d$(n, i, m), b) : m;
  }, b.extentMajor([[-180, -90 + ji], [180, 90 - ji]]).extentMinor([[-180, -80 - ji], [180, 80 + ji]]);
}
const FN = "#/definitions/TopLevelSpec", TN = "http://json-schema.org/draft-07/schema#", CN = {
  Aggregate: {
    anyOf: [
      {
        $ref: "#/definitions/NonArgAggregateOp"
      },
      {
        $ref: "#/definitions/ArgmaxDef"
      },
      {
        $ref: "#/definitions/ArgminDef"
      }
    ]
  },
  AggregateOp: {
    enum: [
      "argmax",
      "argmin",
      "average",
      "count",
      "distinct",
      "max",
      "mean",
      "median",
      "min",
      "missing",
      "product",
      "q1",
      "q3",
      "ci0",
      "ci1",
      "stderr",
      "stdev",
      "stdevp",
      "sum",
      "valid",
      "values",
      "variance",
      "variancep"
    ],
    type: "string"
  },
  AggregateTransform: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        description: "Array of objects that define fields to aggregate.",
        items: {
          $ref: "#/definitions/AggregatedFieldDef"
        },
        type: "array"
      },
      groupby: {
        description: "The data fields to group by. If not specified, a single group containing all data objects will be used.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      }
    },
    required: [
      "aggregate"
    ],
    type: "object"
  },
  AggregatedFieldDef: {
    additionalProperties: !1,
    properties: {
      as: {
        $ref: "#/definitions/FieldName",
        description: "The output field names to use for each aggregated field."
      },
      field: {
        $ref: "#/definitions/FieldName",
        description: 'The data field for which to compute aggregate function. This is required for all aggregation operations except `"count"`.'
      },
      op: {
        $ref: "#/definitions/AggregateOp",
        description: 'The aggregation operation to apply to the fields (e.g., `"sum"`, `"average"`, or `"count"`). See the [full list of supported aggregation operations](https://vega.github.io/vega-lite/docs/aggregate.html#ops) for more information.'
      }
    },
    required: [
      "op",
      "as"
    ],
    type: "object"
  },
  Align: {
    enum: [
      "left",
      "center",
      "right"
    ],
    type: "string"
  },
  AllSortString: {
    anyOf: [
      {
        $ref: "#/definitions/SortOrder"
      },
      {
        $ref: "#/definitions/SortByChannel"
      },
      {
        $ref: "#/definitions/SortByChannelDesc"
      }
    ]
  },
  AnyMark: {
    anyOf: [
      {
        $ref: "#/definitions/CompositeMark"
      },
      {
        $ref: "#/definitions/CompositeMarkDef"
      },
      {
        $ref: "#/definitions/Mark"
      },
      {
        $ref: "#/definitions/MarkDef"
      }
    ]
  },
  AnyMarkConfig: {
    anyOf: [
      {
        $ref: "#/definitions/MarkConfig<>"
      },
      {
        $ref: "#/definitions/AreaConfig"
      },
      {
        $ref: "#/definitions/BarConfig"
      },
      {
        $ref: "#/definitions/RectConfig"
      },
      {
        $ref: "#/definitions/LineConfig"
      },
      {
        $ref: "#/definitions/TickConfig"
      }
    ]
  },
  AreaConfig: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      line: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/OverlayMarkDef"
          }
        ],
        description: "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`."
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      point: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/OverlayMarkDef"
          },
          {
            const: "transparent",
            type: "string"
          }
        ],
        description: 'A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `"transparent"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`.'
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  ArgmaxDef: {
    additionalProperties: !1,
    properties: {
      argmax: {
        type: "string"
      }
    },
    required: [
      "argmax"
    ],
    type: "object"
  },
  ArgminDef: {
    additionalProperties: !1,
    properties: {
      argmin: {
        type: "string"
      }
    },
    required: [
      "argmin"
    ],
    type: "object"
  },
  AutoSizeParams: {
    additionalProperties: !1,
    properties: {
      contains: {
        description: 'Determines how size calculation should be performed, one of `"content"` or `"padding"`. The default setting (`"content"`) interprets the width and height settings as the data rectangle (plotting) dimensions, to which padding is then added. In contrast, the `"padding"` setting includes the padding within the view size calculations, such that the width and height settings indicate the **total** intended size of the view.\n\n__Default value__: `"content"`',
        enum: [
          "content",
          "padding"
        ],
        type: "string"
      },
      resize: {
        description: "A boolean flag indicating if autosize layout should be re-calculated on every view update.\n\n__Default value__: `false`",
        type: "boolean"
      },
      type: {
        $ref: "#/definitions/AutosizeType",
        description: 'The sizing format type. One of `"pad"`, `"fit"`, `"fit-x"`, `"fit-y"`,  or `"none"`. See the [autosize type](https://vega.github.io/vega-lite/docs/size.html#autosize) documentation for descriptions of each.\n\n__Default value__: `"pad"`'
      }
    },
    type: "object"
  },
  AutosizeType: {
    enum: [
      "pad",
      "none",
      "fit",
      "fit-x",
      "fit-y"
    ],
    type: "string"
  },
  Axis: {
    additionalProperties: !1,
    properties: {
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG group, removing the axis from the ARIA accessibility tree.\n\n__Default value:__ `true`',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      bandPosition: {
        anyOf: [
          {
            description: "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n  __Default value:__ `0.5`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domain: {
        anyOf: [
          {
            description: "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for the domain line\'s ending style. One of `"butt"`, `"round"` or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'Color of axis domain line.\n\n__Default value:__ `"gray"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed domain lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the domain dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainOpacity: {
        anyOf: [
          {
            description: "Opacity of the axis domain line.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainWidth: {
        anyOf: [
          {
            description: "Stroke width of axis domain line\n\n__Default value:__ `1`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      grid: {
        description: "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.",
        type: "boolean"
      },
      gridCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for grid lines\' ending style. One of `"butt"`, `"round"` or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gridColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'Color of gridlines.\n\n__Default value:__ `"lightGray"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisColor"
          }
        ]
      },
      gridDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed grid lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumberArray"
          }
        ]
      },
      gridDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the grid dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      gridOpacity: {
        anyOf: [
          {
            description: "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      gridWidth: {
        anyOf: [
          {
            description: "The grid width, in pixels.\n\n__Default value:__ `1`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelAlign"
          }
        ]
      },
      labelAngle: {
        anyOf: [
          {
            description: "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
            maximum: 360,
            minimum: -360,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.'
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelBaseline"
          }
        ]
      },
      labelBound: {
        anyOf: [
          {
            description: "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
            type: [
              "number",
              "boolean"
            ]
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the tick label, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisColor"
          }
        ]
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      labelFlush: {
        description: "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
        type: [
          "boolean",
          "number"
        ]
      },
      labelFlushOffset: {
        anyOf: [
          {
            description: "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFont: {
        anyOf: [
          {
            description: "The font of the tick label.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisString"
          }
        ]
      },
      labelFontSize: {
        anyOf: [
          {
            description: "The font size of the label, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style of the title."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelFontStyle"
          }
        ]
      },
      labelFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: "Font weight of axis tick labels."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelFontWeight"
          }
        ]
      },
      labelLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelLineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line label text or label text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOffset: {
        anyOf: [
          {
            description: "Position offset in pixels to apply to labels, in addition to tickOffset.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelOpacity: {
        anyOf: [
          {
            description: "The opacity of the labels.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelOverlap: {
        anyOf: [
          {
            $ref: "#/definitions/LabelOverlap"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log scales; otherwise `false`.'
      },
      labelPadding: {
        anyOf: [
          {
            description: "The padding in pixels between labels and ticks.\n\n__Default value:__ `2`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelSeparation: {
        anyOf: [
          {
            description: "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labels: {
        anyOf: [
          {
            description: "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      maxExtent: {
        anyOf: [
          {
            description: "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      minExtent: {
        anyOf: [
          {
            description: "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      offset: {
        description: "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)",
        type: "number"
      },
      orient: {
        anyOf: [
          {
            $ref: "#/definitions/AxisOrient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `"bottom"` for x-axes and `"left"` for y-axes.'
      },
      position: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`"
      },
      style: {
        anyOf: [
          {
            type: "string"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          }
        ],
        description: 'A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles.\n\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `"style": "foo"` will use `config.axisX` and `config.style.foo` (the specified style `"foo"` has higher precedence).'
      },
      tickBand: {
        anyOf: [
          {
            description: 'For band scales, indicates if ticks and grid lines should be placed at the `"center"` of a band (default) or at the band `"extent"`s to indicate intervals',
            enum: [
              "center",
              "extent"
            ],
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for the tick lines\' ending style. One of `"butt"`, `"round"` or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: `The color of the axis's tick.

__Default value:__ \`"gray"\``
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisColor"
          }
        ]
      },
      tickCount: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/TimeInterval"
          },
          {
            $ref: "#/definitions/TimeIntervalStep"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale\'s range.\n\nFor scales of type `"time"` or `"utc"`, the tick count can instead be a time interval specifier. Legal string values are `"millisecond"`, `"second"`, `"minute"`, `"hour"`, `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, an object-valued interval specifier of the form `{"interval": "month", "step": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.',
        minimum: 0
      },
      tickDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed tick mark lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumberArray"
          }
        ]
      },
      tickDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the tick mark dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      tickExtra: {
        anyOf: [
          {
            description: 'Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `"bandPosition": 1` and an axis `"padding"` value of `0`.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickMinStep: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value."
      },
      tickOffset: {
        anyOf: [
          {
            description: "Position offset in pixels to apply to ticks, labels, and gridlines.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickOpacity: {
        anyOf: [
          {
            description: "Opacity of the ticks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      tickRound: {
        anyOf: [
          {
            description: "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickSize: {
        anyOf: [
          {
            description: "The size in pixels of axis ticks.\n\n__Default value:__ `5`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      tickWidth: {
        anyOf: [
          {
            description: "The width, in pixels, of ticks.\n\n__Default value:__ `1`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      ticks: {
        anyOf: [
          {
            description: "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      titleAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: "Horizontal text alignment of axis titles."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleAnchor: {
        anyOf: [
          {
            $ref: "#/definitions/TitleAnchor",
            description: "Text anchor position for placing axis titles."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleAngle: {
        anyOf: [
          {
            description: "Angle in degrees of axis titles.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'Vertical text baseline for axis titles. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Color of the title, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFont: {
        anyOf: [
          {
            description: 'Font of the title. (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontSize: {
        anyOf: [
          {
            description: "Font size of the title.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style of the title."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'Font weight of the title. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of axis titles.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line title text or title text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleOpacity: {
        anyOf: [
          {
            description: "Opacity of the axis title.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titlePadding: {
        anyOf: [
          {
            description: "The padding, in pixels, between title and axis.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleX: {
        anyOf: [
          {
            description: "X-coordinate of the axis title relative to the axis group.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleY: {
        anyOf: [
          {
            description: "Y-coordinate of the axis title relative to the axis group.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      translate: {
        anyOf: [
          {
            description: "Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\n\n__Default value:__ `0.5`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      values: {
        anyOf: [
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          },
          {
            items: {
              type: "boolean"
            },
            type: "array"
          },
          {
            items: {
              $ref: "#/definitions/DateTime"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Explicitly set the visible axis tick values."
      },
      zindex: {
        description: "A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\n\n__Default value:__ `0` (behind the marks).",
        minimum: 0,
        type: "number"
      }
    },
    type: "object"
  },
  AxisConfig: {
    additionalProperties: !1,
    properties: {
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG group, removing the axis from the ARIA accessibility tree.\n\n__Default value:__ `true`',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      bandPosition: {
        anyOf: [
          {
            description: "An interpolation fraction indicating where, for `band` scales, axis ticks should be positioned. A value of `0` places ticks at the left edge of their bands. A value of `0.5` places ticks in the middle of their bands.\n\n  __Default value:__ `0.5`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of this axis for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      disable: {
        description: "Disable axis by default.",
        type: "boolean"
      },
      domain: {
        anyOf: [
          {
            description: "A boolean flag indicating if the domain (the axis baseline) should be included as part of the axis.\n\n__Default value:__ `true`",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for the domain line\'s ending style. One of `"butt"`, `"round"` or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'Color of axis domain line.\n\n__Default value:__ `"gray"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed domain lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the domain dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainOpacity: {
        anyOf: [
          {
            description: "Opacity of the axis domain line.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      domainWidth: {
        anyOf: [
          {
            description: "Stroke width of axis domain line\n\n__Default value:__ `1`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      grid: {
        description: "A boolean flag indicating if grid lines should be included as part of the axis\n\n__Default value:__ `true` for [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous) that are not binned; otherwise, `false`.",
        type: "boolean"
      },
      gridCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for grid lines\' ending style. One of `"butt"`, `"round"` or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gridColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'Color of gridlines.\n\n__Default value:__ `"lightGray"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisColor"
          }
        ]
      },
      gridDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed grid lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumberArray"
          }
        ]
      },
      gridDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the grid dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      gridOpacity: {
        anyOf: [
          {
            description: "The stroke opacity of grid (value between [0,1])\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      gridWidth: {
        anyOf: [
          {
            description: "The grid width, in pixels.\n\n__Default value:__ `1`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: "Horizontal text alignment of axis tick labels, overriding the default setting for the current axis orientation."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelAlign"
          }
        ]
      },
      labelAngle: {
        anyOf: [
          {
            description: "The rotation angle of the axis labels.\n\n__Default value:__ `-90` for nominal and ordinal fields; `0` otherwise.",
            maximum: 360,
            minimum: -360,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'Vertical text baseline of axis tick labels, overriding the default setting for the current axis orientation. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.'
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelBaseline"
          }
        ]
      },
      labelBound: {
        anyOf: [
          {
            description: "Indicates if labels should be hidden if they exceed the axis range. If `false` (the default) no bounds overlap analysis is performed. If `true`, labels will be hidden if they exceed the axis range by more than 1 pixel. If this property is a number, it specifies the pixel tolerance: the maximum amount by which a label bounding box may exceed the axis range.\n\n__Default value:__ `false`.",
            type: [
              "number",
              "boolean"
            ]
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the tick label, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisColor"
          }
        ]
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      labelFlush: {
        description: "Indicates if the first and last axis labels should be aligned flush with the scale range. Flush alignment for a horizontal axis will left-align the first label and right-align the last label. For vertical axes, bottom and top text baselines are applied instead. If this property is a number, it also indicates the number of pixels by which to offset the first and last labels; for example, a value of 2 will flush-align the first and last labels and also push them 2 pixels outward from the center of the axis. The additional adjustment can sometimes help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `true` for axis of a continuous x-scale. Otherwise, `false`.",
        type: [
          "boolean",
          "number"
        ]
      },
      labelFlushOffset: {
        anyOf: [
          {
            description: "Indicates the number of pixels by which to offset flush-adjusted labels. For example, a value of `2` will push flush-adjusted labels 2 pixels outward from the center of the axis. Offsets can help the labels better visually group with corresponding axis ticks.\n\n__Default value:__ `0`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFont: {
        anyOf: [
          {
            description: "The font of the tick label.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisString"
          }
        ]
      },
      labelFontSize: {
        anyOf: [
          {
            description: "The font size of the label, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style of the title."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelFontStyle"
          }
        ]
      },
      labelFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: "Font weight of axis tick labels."
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisLabelFontWeight"
          }
        ]
      },
      labelLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of axis tick labels.\n\n__Default value:__ `180`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelLineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line label text or label text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOffset: {
        anyOf: [
          {
            description: "Position offset in pixels to apply to labels, in addition to tickOffset.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelOpacity: {
        anyOf: [
          {
            description: "The opacity of the labels.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelOverlap: {
        anyOf: [
          {
            $ref: "#/definitions/LabelOverlap"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The strategy to use for resolving overlap of axis labels. If `false` (the default), no overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing every other label is used (this works well for standard linear axes). If set to `"greedy"`, a linear scan of the labels is performed, removing any labels that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true` for non-nominal fields with non-log scales; `"greedy"` for log scales; otherwise `false`.'
      },
      labelPadding: {
        anyOf: [
          {
            description: "The padding in pixels between labels and ticks.\n\n__Default value:__ `2`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      labelSeparation: {
        anyOf: [
          {
            description: "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labels: {
        anyOf: [
          {
            description: "A boolean flag indicating if labels should be included as part of the axis.\n\n__Default value:__ `true`.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      maxExtent: {
        anyOf: [
          {
            description: "The maximum extent in pixels that axis ticks and labels should use. This determines a maximum offset value for axis titles.\n\n__Default value:__ `undefined`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      minExtent: {
        anyOf: [
          {
            description: "The minimum extent in pixels that axis ticks and labels should use. This determines a minimum offset value for axis titles.\n\n__Default value:__ `30` for y-axis; `undefined` for x-axis.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      offset: {
        description: "The offset, in pixels, by which to displace the axis from the edge of the enclosing group or data rectangle.\n\n__Default value:__ derived from the [axis config](https://vega.github.io/vega-lite/docs/config.html#facet-scale-config)'s `offset` (`0` by default)",
        type: "number"
      },
      orient: {
        anyOf: [
          {
            $ref: "#/definitions/AxisOrient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The orientation of the axis. One of `"top"`, `"bottom"`, `"left"` or `"right"`. The orientation can be used to further specialize the axis type (e.g., a y-axis oriented towards the right edge of the chart).\n\n__Default value:__ `"bottom"` for x-axes and `"left"` for y-axes.'
      },
      position: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The anchor position of the axis in pixels. For x-axes with top or bottom orientation, this sets the axis group x coordinate. For y-axes with left or right orientation, this sets the axis group y coordinate.\n\n__Default value__: `0`"
      },
      style: {
        anyOf: [
          {
            type: "string"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          }
        ],
        description: 'A string or array of strings indicating the name of custom styles to apply to the axis. A style is a named collection of axis property defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles.\n\n__Default value:__ (none) __Note:__ Any specified style will augment the default style. For example, an x-axis mark with `"style": "foo"` will use `config.axisX` and `config.style.foo` (the specified style `"foo"` has higher precedence).'
      },
      tickBand: {
        anyOf: [
          {
            description: 'For band scales, indicates if ticks and grid lines should be placed at the `"center"` of a band (default) or at the band `"extent"`s to indicate intervals',
            enum: [
              "center",
              "extent"
            ],
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for the tick lines\' ending style. One of `"butt"`, `"round"` or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: `The color of the axis's tick.

__Default value:__ \`"gray"\``
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisColor"
          }
        ]
      },
      tickCount: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/TimeInterval"
          },
          {
            $ref: "#/definitions/TimeIntervalStep"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A desired number of ticks, for axes visualizing quantitative scales. The resulting number may be different so that values are "nice" (multiples of 2, 5, 10) and lie within the underlying scale\'s range.\n\nFor scales of type `"time"` or `"utc"`, the tick count can instead be a time interval specifier. Legal string values are `"millisecond"`, `"second"`, `"minute"`, `"hour"`, `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, an object-valued interval specifier of the form `{"interval": "month", "step": 3}` includes a desired number of interval steps. Here, ticks are generated for each quarter (Jan, Apr, Jul, Oct) boundary.\n\n__Default value__: Determine using a formula `ceil(width/40)` for x and `ceil(height/40)` for y.',
        minimum: 0
      },
      tickDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed tick mark lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumberArray"
          }
        ]
      },
      tickDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the tick mark dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      tickExtra: {
        anyOf: [
          {
            description: 'Boolean flag indicating if an extra axis tick should be added for the initial position of the axis. This flag is useful for styling axes for `band` scales such that ticks are placed on band boundaries rather in the middle of a band. Use in conjunction with `"bandPosition": 1` and an axis `"padding"` value of `0`.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickMinStep: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The minimum desired step between axis ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value."
      },
      tickOffset: {
        anyOf: [
          {
            description: "Position offset in pixels to apply to ticks, labels, and gridlines.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickOpacity: {
        anyOf: [
          {
            description: "Opacity of the ticks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      tickRound: {
        anyOf: [
          {
            description: "Boolean flag indicating if pixel position values should be rounded to the nearest integer.\n\n__Default value:__ `true`",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickSize: {
        anyOf: [
          {
            description: "The size in pixels of axis ticks.\n\n__Default value:__ `5`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      tickWidth: {
        anyOf: [
          {
            description: "The width, in pixels, of ticks.\n\n__Default value:__ `1`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ConditionalAxisNumber"
          }
        ]
      },
      ticks: {
        anyOf: [
          {
            description: "Boolean value that determines whether the axis should include ticks.\n\n__Default value:__ `true`",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      titleAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: "Horizontal text alignment of axis titles."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleAnchor: {
        anyOf: [
          {
            $ref: "#/definitions/TitleAnchor",
            description: "Text anchor position for placing axis titles."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleAngle: {
        anyOf: [
          {
            description: "Angle in degrees of axis titles.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'Vertical text baseline for axis titles. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Color of the title, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFont: {
        anyOf: [
          {
            description: 'Font of the title. (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontSize: {
        anyOf: [
          {
            description: "Font size of the title.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style of the title."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'Font weight of the title. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of axis titles.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line title text or title text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleOpacity: {
        anyOf: [
          {
            description: "Opacity of the axis title.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titlePadding: {
        anyOf: [
          {
            description: "The padding, in pixels, between title and axis.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleX: {
        anyOf: [
          {
            description: "X-coordinate of the axis title relative to the axis group.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleY: {
        anyOf: [
          {
            description: "Y-coordinate of the axis title relative to the axis group.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      translate: {
        anyOf: [
          {
            description: "Coordinate space translation offset for axis layout. By default, axes are translated by a 0.5 pixel offset for both the x and y coordinates in order to align stroked lines with the pixel grid. However, for vector graphics output these pixel-specific adjustments may be undesirable, in which case translate can be changed (for example, to zero).\n\n__Default value:__ `0.5`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      values: {
        anyOf: [
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          },
          {
            items: {
              type: "boolean"
            },
            type: "array"
          },
          {
            items: {
              $ref: "#/definitions/DateTime"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Explicitly set the visible axis tick values."
      },
      zindex: {
        description: "A non-negative integer indicating the z-index of the axis. If zindex is 0, axes should be drawn behind all chart elements. To put them in front, set `zindex` to `1` or more.\n\n__Default value:__ `0` (behind the marks).",
        minimum: 0,
        type: "number"
      }
    },
    type: "object"
  },
  AxisOrient: {
    enum: [
      "top",
      "bottom",
      "left",
      "right"
    ],
    type: "string"
  },
  AxisResolveMap: {
    additionalProperties: !1,
    properties: {
      x: {
        $ref: "#/definitions/ResolveMode"
      },
      y: {
        $ref: "#/definitions/ResolveMode"
      }
    },
    type: "object"
  },
  BarConfig: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      binSpacing: {
        description: "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`",
        minimum: 0,
        type: "number"
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      continuousBandSize: {
        description: "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
        minimum: 0,
        type: "number"
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusEnd: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "- For vertical bars, top-left and top-right corner radius. - For horizontal bars, top-right and bottom-right corner radius."
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      discreteBandSize: {
        description: "The default size of the bars with discrete dimensions. If unspecified, the default size is  `step-2`, which provides 2 pixel offset between bars.",
        minimum: 0,
        type: "number"
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  BaseTitleNoValueRefs: {
    additionalProperties: !1,
    properties: {
      align: {
        $ref: "#/definitions/Align",
        description: 'Horizontal text alignment for title text. One of `"left"`, `"center"`, or `"right"`.'
      },
      anchor: {
        anyOf: [
          {
            $ref: "#/definitions/TitleAnchor",
            description: 'The anchor position for placing the title and subtitle text. One of `"start"`, `"middle"`, or `"end"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      angle: {
        anyOf: [
          {
            description: "Angle in degrees of title and subtitle text.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG group, removing the title from the ARIA accessibility tree.\n\n__Default value:__ `true`',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        $ref: "#/definitions/TextBaseline",
        description: 'Vertical text baseline for title and subtitle text. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.'
      },
      color: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Text color for title text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "Delta offset for title and subtitle text x-coordinate.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "Delta offset for title and subtitle text y-coordinate.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      font: {
        anyOf: [
          {
            description: "Font name for title text.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "Font size in pixels for title text.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style for title text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'Font weight for title text. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      frame: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/TitleFrame"
              },
              {
                type: "string"
              }
            ],
            description: 'The reference frame for the anchor position, one of `"bounds"` (to anchor relative to the full bounding box) or `"group"` (to anchor relative to the group width or height).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum allowed length in pixels of title and subtitle text.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line title text or title text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      offset: {
        anyOf: [
          {
            description: "The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      orient: {
        anyOf: [
          {
            $ref: "#/definitions/TitleOrient",
            description: 'Default title orientation (`"top"`, `"bottom"`, `"left"`, or `"right"`)'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Text color for subtitle text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFont: {
        anyOf: [
          {
            description: "Font name for subtitle text.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFontSize: {
        anyOf: [
          {
            description: "Font size in pixels for subtitle text.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style for subtitle text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'Font weight for subtitle text. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleLineHeight: {
        anyOf: [
          {
            description: "Line height in pixels for multi-line subtitle text.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitlePadding: {
        anyOf: [
          {
            description: "The padding in pixels between title and subtitle text.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      zindex: {
        anyOf: [
          {
            description: "The integer z-index indicating the layering of the title group relative to other axis, mark, and legend groups.\n\n__Default value:__ `0`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      }
    },
    type: "object"
  },
  Baseline: {
    enum: [
      "top",
      "middle",
      "bottom"
    ],
    type: "string"
  },
  BinExtent: {
    anyOf: [
      {
        items: [
          {
            type: "number"
          },
          {
            type: "number"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      {
        $ref: "#/definitions/SelectionExtent"
      }
    ]
  },
  BinParams: {
    additionalProperties: !1,
    description: "Binning properties or boolean flag for determining whether to bin data or not.",
    properties: {
      anchor: {
        description: `A value in the binned domain at which to anchor the bins, shifting the bin boundaries if necessary to ensure that a boundary aligns with the anchor value.

__Default value:__ the minimum bin extent value`,
        type: "number"
      },
      base: {
        description: "The number base to use for automatic bin determination (default is base 10).\n\n__Default value:__ `10`",
        type: "number"
      },
      binned: {
        description: "When set to `true`, Vega-Lite treats the input data as already binned.",
        type: "boolean"
      },
      divide: {
        description: "Scale factors indicating allowable subdivisions. The default value is [5, 2], which indicates that for base 10 numbers (the default base), the method may consider dividing bin sizes by 5 and/or 2. For example, for an initial step size of 10, the method can check if bin sizes of 2 (= 10/5), 5 (= 10/2), or 1 (= 10/(5*2)) might also satisfy the given constraints.\n\n__Default value:__ `[5, 2]`",
        items: [
          {
            type: "number"
          },
          {
            type: "number"
          }
        ],
        maxItems: 2,
        minItems: 1,
        type: "array"
      },
      extent: {
        $ref: "#/definitions/BinExtent",
        description: "A two-element (`[min, max]`) array indicating the range of desired bin values."
      },
      maxbins: {
        description: "Maximum number of bins.\n\n__Default value:__ `6` for `row`, `column` and `shape` channels; `10` for other channels",
        minimum: 2,
        type: "number"
      },
      minstep: {
        description: "A minimum allowable step size (particularly useful for integer values).",
        type: "number"
      },
      nice: {
        description: "If true, attempts to make the bin boundaries use human-friendly boundaries, such as multiples of ten.\n\n__Default value:__ `true`",
        type: "boolean"
      },
      step: {
        description: `An exact step size to use between bins.

__Note:__ If provided, options such as maxbins will be ignored.`,
        type: "number"
      },
      steps: {
        description: "An array of allowable step sizes to choose from.",
        items: {
          type: "number"
        },
        minItems: 1,
        type: "array"
      }
    },
    type: "object"
  },
  BinTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        anyOf: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            items: {
              $ref: "#/definitions/FieldName"
            },
            type: "array"
          }
        ],
        description: 'The output fields at which to write the start and end bin values. This can be either a string or an array of strings with two elements denoting the name for the fields for bin start and bin end respectively. If a single string (e.g., `"val"`) is provided, the end field will be `"val_end"`.'
      },
      bin: {
        anyOf: [
          {
            const: !0,
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          }
        ],
        description: "An object indicating bin properties, or simply `true` for using default bin parameters."
      },
      field: {
        $ref: "#/definitions/FieldName",
        description: "The data field to bin."
      }
    },
    required: [
      "bin",
      "field",
      "as"
    ],
    type: "object"
  },
  BindCheckbox: {
    additionalProperties: !1,
    properties: {
      debounce: {
        type: "number"
      },
      element: {
        $ref: "#/definitions/Element"
      },
      input: {
        const: "checkbox",
        type: "string"
      },
      name: {
        type: "string"
      },
      type: {
        type: "string"
      }
    },
    required: [
      "input"
    ],
    type: "object"
  },
  BindRadioSelect: {
    additionalProperties: !1,
    properties: {
      debounce: {
        type: "number"
      },
      element: {
        $ref: "#/definitions/Element"
      },
      input: {
        enum: [
          "radio",
          "select"
        ],
        type: "string"
      },
      labels: {
        items: {
          type: "string"
        },
        type: "array"
      },
      name: {
        type: "string"
      },
      options: {
        items: {},
        type: "array"
      },
      type: {
        type: "string"
      }
    },
    required: [
      "input",
      "options"
    ],
    type: "object"
  },
  BindRange: {
    additionalProperties: !1,
    properties: {
      debounce: {
        type: "number"
      },
      element: {
        $ref: "#/definitions/Element"
      },
      input: {
        const: "range",
        type: "string"
      },
      max: {
        type: "number"
      },
      min: {
        type: "number"
      },
      name: {
        type: "string"
      },
      step: {
        type: "number"
      },
      type: {
        type: "string"
      }
    },
    required: [
      "input"
    ],
    type: "object"
  },
  Binding: {
    anyOf: [
      {
        $ref: "#/definitions/BindCheckbox"
      },
      {
        $ref: "#/definitions/BindRadioSelect"
      },
      {
        $ref: "#/definitions/BindRange"
      },
      {
        $ref: "#/definitions/InputBinding"
      }
    ]
  },
  Blend: {
    enum: [
      null,
      "multiply",
      "screen",
      "overlay",
      "darken",
      "lighten",
      "color-dodge",
      "color-burn",
      "hard-light",
      "soft-light",
      "difference",
      "exclusion",
      "hue",
      "saturation",
      "color",
      "luminosity"
    ],
    type: [
      "null",
      "string"
    ]
  },
  BoxPlot: {
    const: "boxplot",
    type: "string"
  },
  BoxPlotConfig: {
    additionalProperties: !1,
    properties: {
      box: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      extent: {
        anyOf: [
          {
            const: "min-max",
            type: "string"
          },
          {
            type: "number"
          }
        ],
        description: 'The extent of the whiskers. Available options include: - `"min-max"`: min and max are the lower and upper whiskers respectively. - A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`.'
      },
      median: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      outliers: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      rule: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      size: {
        description: "Size of the box and median tick of a box plot",
        type: "number"
      },
      ticks: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      }
    },
    type: "object"
  },
  BoxPlotDef: {
    additionalProperties: !1,
    properties: {
      box: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      clip: {
        description: "Whether a composite mark be clipped to the enclosing group’s width and height.",
        type: "boolean"
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      extent: {
        anyOf: [
          {
            const: "min-max",
            type: "string"
          },
          {
            type: "number"
          }
        ],
        description: 'The extent of the whiskers. Available options include: - `"min-max"`: min and max are the lower and upper whiskers respectively. - A number representing multiple of the interquartile range. This number will be multiplied by the IQR to determine whisker boundary, which spans from the smallest data to the largest data within the range _[Q1 - k * IQR, Q3 + k * IQR]_ where _Q1_ and _Q3_ are the first and third quartiles while _IQR_ is the interquartile range (_Q3-Q1_).\n\n__Default value:__ `1.5`.'
      },
      median: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      opacity: {
        description: "The opacity (value between [0,1]) of the mark.",
        type: "number"
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: 'Orientation of the box plot. This is normally automatically determined based on types of fields on x and y channels. However, an explicit `orient` be specified when the orientation is ambiguous.\n\n__Default value:__ `"vertical"`.'
      },
      outliers: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      rule: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      size: {
        description: "Size of the box and median tick of a box plot",
        type: "number"
      },
      ticks: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      type: {
        $ref: "#/definitions/BoxPlot",
        description: 'The mark type. This could a primitive mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"geoshape"`, `"rule"`, and `"text"`) or a composite mark type (`"boxplot"`, `"errorband"`, `"errorbar"`).'
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  BrushConfig: {
    additionalProperties: !1,
    properties: {
      cursor: {
        $ref: "#/definitions/Cursor",
        description: "The mouse cursor used over the interval mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
      },
      fill: {
        $ref: "#/definitions/Color",
        description: 'The fill color of the interval mark.\n\n__Default value:__ `"#333333"`'
      },
      fillOpacity: {
        description: "The fill opacity of the interval mark (a value between `0` and `1`).\n\n__Default value:__ `0.125`",
        type: "number"
      },
      stroke: {
        $ref: "#/definitions/Color",
        description: 'The stroke color of the interval mark.\n\n__Default value:__ `"#ffffff"`'
      },
      strokeDash: {
        description: "An array of alternating stroke and space lengths, for creating dashed or dotted lines.",
        items: {
          type: "number"
        },
        type: "array"
      },
      strokeDashOffset: {
        description: "The offset (in pixels) with which to begin drawing the stroke dash array.",
        type: "number"
      },
      strokeOpacity: {
        description: "The stroke opacity of the interval mark (a value between `0` and `1`).",
        type: "number"
      },
      strokeWidth: {
        description: "The stroke width of the interval mark.",
        type: "number"
      }
    },
    type: "object"
  },
  CalculateTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        $ref: "#/definitions/FieldName",
        description: "The field for storing the computed formula value."
      },
      calculate: {
        description: "A [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string. Use the variable `datum` to refer to the current data object.",
        type: "string"
      }
    },
    required: [
      "calculate",
      "as"
    ],
    type: "object"
  },
  Categorical: {
    enum: [
      "accent",
      "category10",
      "category20",
      "category20b",
      "category20c",
      "dark2",
      "paired",
      "pastel1",
      "pastel2",
      "set1",
      "set2",
      "set3",
      "tableau10",
      "tableau20"
    ],
    type: "string"
  },
  Color: {
    anyOf: [
      {
        $ref: "#/definitions/ColorName"
      },
      {
        $ref: "#/definitions/HexColor"
      },
      {
        type: "string"
      }
    ]
  },
  ColorDef: {
    $ref: "#/definitions/MarkPropDef<(Gradient|string|null)>"
  },
  ColorName: {
    enum: [
      "black",
      "silver",
      "gray",
      "white",
      "maroon",
      "red",
      "purple",
      "fuchsia",
      "green",
      "lime",
      "olive",
      "yellow",
      "navy",
      "blue",
      "teal",
      "aqua",
      "orange",
      "aliceblue",
      "antiquewhite",
      "aquamarine",
      "azure",
      "beige",
      "bisque",
      "blanchedalmond",
      "blueviolet",
      "brown",
      "burlywood",
      "cadetblue",
      "chartreuse",
      "chocolate",
      "coral",
      "cornflowerblue",
      "cornsilk",
      "crimson",
      "cyan",
      "darkblue",
      "darkcyan",
      "darkgoldenrod",
      "darkgray",
      "darkgreen",
      "darkgrey",
      "darkkhaki",
      "darkmagenta",
      "darkolivegreen",
      "darkorange",
      "darkorchid",
      "darkred",
      "darksalmon",
      "darkseagreen",
      "darkslateblue",
      "darkslategray",
      "darkslategrey",
      "darkturquoise",
      "darkviolet",
      "deeppink",
      "deepskyblue",
      "dimgray",
      "dimgrey",
      "dodgerblue",
      "firebrick",
      "floralwhite",
      "forestgreen",
      "gainsboro",
      "ghostwhite",
      "gold",
      "goldenrod",
      "greenyellow",
      "grey",
      "honeydew",
      "hotpink",
      "indianred",
      "indigo",
      "ivory",
      "khaki",
      "lavender",
      "lavenderblush",
      "lawngreen",
      "lemonchiffon",
      "lightblue",
      "lightcoral",
      "lightcyan",
      "lightgoldenrodyellow",
      "lightgray",
      "lightgreen",
      "lightgrey",
      "lightpink",
      "lightsalmon",
      "lightseagreen",
      "lightskyblue",
      "lightslategray",
      "lightslategrey",
      "lightsteelblue",
      "lightyellow",
      "limegreen",
      "linen",
      "magenta",
      "mediumaquamarine",
      "mediumblue",
      "mediumorchid",
      "mediumpurple",
      "mediumseagreen",
      "mediumslateblue",
      "mediumspringgreen",
      "mediumturquoise",
      "mediumvioletred",
      "midnightblue",
      "mintcream",
      "mistyrose",
      "moccasin",
      "navajowhite",
      "oldlace",
      "olivedrab",
      "orangered",
      "orchid",
      "palegoldenrod",
      "palegreen",
      "paleturquoise",
      "palevioletred",
      "papayawhip",
      "peachpuff",
      "peru",
      "pink",
      "plum",
      "powderblue",
      "rosybrown",
      "royalblue",
      "saddlebrown",
      "salmon",
      "sandybrown",
      "seagreen",
      "seashell",
      "sienna",
      "skyblue",
      "slateblue",
      "slategray",
      "slategrey",
      "snow",
      "springgreen",
      "steelblue",
      "tan",
      "thistle",
      "tomato",
      "turquoise",
      "violet",
      "wheat",
      "whitesmoke",
      "yellowgreen",
      "rebeccapurple"
    ],
    type: "string"
  },
  ColorScheme: {
    anyOf: [
      {
        $ref: "#/definitions/Categorical"
      },
      {
        $ref: "#/definitions/SequentialSingleHue"
      },
      {
        $ref: "#/definitions/SequentialMultiHue"
      },
      {
        $ref: "#/definitions/Diverging"
      },
      {
        $ref: "#/definitions/Cyclical"
      }
    ]
  },
  Encoding: {
    additionalProperties: !1,
    properties: {
      angle: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Rotation angle of point and text marks."
      },
      color: {
        $ref: "#/definitions/ColorDef",
        description: 'Color of the marks – either fill or stroke color based on  the `filled` property of mark definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`, `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and `"point"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)\'s `color` property.\n\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).'
      },
      description: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          }
        ],
        description: 'A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `"aria-label"` attribute will be set to this description.'
      },
      detail: {
        anyOf: [
          {
            $ref: "#/definitions/FieldDefWithoutScale"
          },
          {
            items: {
              $ref: "#/definitions/FieldDefWithoutScale"
            },
            type: "array"
          }
        ],
        description: "Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel."
      },
      fill: {
        $ref: "#/definitions/ColorDef",
        description: "Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
      },
      fillOpacity: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property."
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          }
        ],
        description: "A URL to load upon mouse click."
      },
      key: {
        $ref: "#/definitions/FieldDefWithoutScale",
        description: "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data."
      },
      latitude: {
        $ref: "#/definitions/LatLongDef",
        description: "Latitude position of geographically projected marks."
      },
      latitude2: {
        $ref: "#/definitions/Position2Def",
        description: 'Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.'
      },
      longitude: {
        $ref: "#/definitions/LatLongDef",
        description: "Longitude position of geographically projected marks."
      },
      longitude2: {
        $ref: "#/definitions/Position2Def",
        description: 'Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.'
      },
      opacity: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property."
      },
      order: {
        anyOf: [
          {
            $ref: "#/definitions/OrderFieldDef"
          },
          {
            items: {
              $ref: "#/definitions/OrderFieldDef"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/OrderValueDef"
          }
        ],
        description: 'Order of the marks. - For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order). - For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{"value": null}` makes the line marks use the original order in the data sources. - Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping.'
      },
      radius: {
        $ref: "#/definitions/PolarDef",
        description: "The outer radius in pixels of arc marks."
      },
      radius2: {
        $ref: "#/definitions/Position2Def",
        description: "The inner radius in pixels of arc marks."
      },
      shape: {
        $ref: "#/definitions/ShapeDef",
        description: 'Shape of the mark.\n\n1. For `point` marks the supported values include:    - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`.    - the line symbol `"stroke"`    - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"`    - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)\'s `shape` property. (`"circle"` if unset.)'
      },
      size: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: 'Size of the mark. - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark. - For `"bar"` and `"tick"` – the bar and tick\'s size. - For `"text"` – the text\'s font size. - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of line with varying size)'
      },
      stroke: {
        $ref: "#/definitions/ColorDef",
        description: "Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
      },
      strokeDash: {
        $ref: "#/definitions/NumericArrayMarkPropDef",
        description: "Stroke dash of the marks.\n\n__Default value:__ `[1,0]` (No dash)."
      },
      strokeOpacity: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property."
      },
      strokeWidth: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property."
      },
      text: {
        $ref: "#/definitions/TextDef",
        description: "Text of the `text` mark."
      },
      theta: {
        $ref: "#/definitions/PolarDef",
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`
      },
      theta2: {
        $ref: "#/definitions/Position2Def",
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      tooltip: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          },
          {
            items: {
              $ref: "#/definitions/StringFieldDef"
            },
            type: "array"
          },
          {
            type: "null"
          }
        ],
        description: "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite."
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          }
        ],
        description: "The URL of an image mark."
      },
      x: {
        $ref: "#/definitions/PositionDef",
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        $ref: "#/definitions/Position2Def",
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      xError: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.'
      },
      xError2: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Secondary error value of x coordinates for error specified `"errorbar"` and `"errorband"`.'
      },
      y: {
        $ref: "#/definitions/PositionDef",
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        $ref: "#/definitions/Position2Def",
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      yError: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.'
      },
      yError2: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Secondary error value of y coordinates for error specified `"errorbar"` and `"errorband"`.'
      }
    },
    type: "object"
  },
  CompositeMark: {
    anyOf: [
      {
        $ref: "#/definitions/BoxPlot"
      },
      {
        $ref: "#/definitions/ErrorBar"
      },
      {
        $ref: "#/definitions/ErrorBand"
      }
    ]
  },
  CompositeMarkDef: {
    anyOf: [
      {
        $ref: "#/definitions/BoxPlotDef"
      },
      {
        $ref: "#/definitions/ErrorBarDef"
      },
      {
        $ref: "#/definitions/ErrorBandDef"
      }
    ]
  },
  CompositionConfig: {
    additionalProperties: !1,
    properties: {
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      spacing: {
        description: "The default spacing in pixels between composed sub-views.\n\n__Default value__: `20`",
        type: "number"
      }
    },
    type: "object"
  },
  ConditionalMarkPropFieldOrDatumDef: {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<MarkPropFieldOrDatumDef>"
      }
    ]
  },
  "ConditionalMarkPropFieldOrDatumDef<TypeForShape>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<MarkPropFieldOrDatumDef<TypeForShape>>"
      }
    ]
  },
  ConditionalStringFieldDef: {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<StringFieldDef>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<StringFieldDef>"
      }
    ]
  },
  "ConditionalValueDef<(Gradient|string|null|ExprRef)>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<ValueDef<(Gradient|string|null|ExprRef)>>"
      }
    ]
  },
  "ConditionalValueDef<(Text|ExprRef)>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<ValueDef<(Text|ExprRef)>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<ValueDef<(Text|ExprRef)>>"
      }
    ]
  },
  "ConditionalValueDef<(number[]|ExprRef)>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<ValueDef<(number[]|ExprRef)>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<ValueDef<(number[]|ExprRef)>>"
      }
    ]
  },
  "ConditionalValueDef<(number|ExprRef)>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<ValueDef<(number|ExprRef)>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<ValueDef<(number|ExprRef)>>"
      }
    ]
  },
  "ConditionalValueDef<(string|ExprRef)>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<ValueDef<(string|ExprRef)>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<ValueDef<(string|ExprRef)>>"
      }
    ]
  },
  "ConditionalValueDef<(string|null|ExprRef)>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<ValueDef<(string|null|ExprRef)>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<ValueDef<(string|null|ExprRef)>>"
      }
    ]
  },
  "ConditionalValueDef<number>": {
    anyOf: [
      {
        $ref: "#/definitions/ConditionalPredicate<ValueDef<number>>"
      },
      {
        $ref: "#/definitions/ConditionalSelection<ValueDef<number>>"
      }
    ]
  },
  ConditionalAxisColor: {
    $ref: "#/definitions/ConditionalAxisProperty<(Color|null)>"
  },
  ConditionalAxisLabelAlign: {
    $ref: "#/definitions/ConditionalAxisProperty<(Align|null)>"
  },
  ConditionalAxisLabelBaseline: {
    $ref: "#/definitions/ConditionalAxisProperty<(TextBaseline|null)>"
  },
  ConditionalAxisLabelFontStyle: {
    $ref: "#/definitions/ConditionalAxisProperty<(FontStyle|null)>"
  },
  ConditionalAxisLabelFontWeight: {
    $ref: "#/definitions/ConditionalAxisProperty<(FontWeight|null)>"
  },
  ConditionalAxisNumber: {
    $ref: "#/definitions/ConditionalAxisProperty<(number|null)>"
  },
  ConditionalAxisNumberArray: {
    $ref: "#/definitions/ConditionalAxisProperty<(number[]|null)>"
  },
  "ConditionalAxisProperty<(Align|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Align"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalAxisProperty<(Color|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Color"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalAxisProperty<(FontStyle|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/FontStyle"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalAxisProperty<(FontWeight|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/FontWeight"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalAxisProperty<(TextBaseline|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/TextBaseline"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalAxisProperty<(number[]|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            anyOf: [
              {
                items: {
                  type: "number"
                },
                type: "array"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalAxisProperty<(number|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: [
              "number",
              "null"
            ]
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalAxisProperty<(string|null)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: [
              "string",
              "null"
            ]
          }
        },
        required: [
          "condition",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          condition: {
            anyOf: [
              {
                $ref: "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
              },
              {
                items: {
                  $ref: "#/definitions/ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>"
                },
                type: "array"
              }
            ]
          },
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          }
        },
        required: [
          "condition",
          "expr"
        ],
        type: "object"
      }
    ]
  },
  ConditionalAxisString: {
    $ref: "#/definitions/ConditionalAxisProperty<(string|null)>"
  },
  "ConditionalPredicate<(ValueDef<(Align|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Align"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<(ValueDef<(Color|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Color"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<(ValueDef<(FontStyle|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/FontStyle"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<(ValueDef<(FontWeight|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/FontWeight"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<(ValueDef<(TextBaseline|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/TextBaseline"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<(ValueDef<(number[]|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            anyOf: [
              {
                items: {
                  type: "number"
                },
                type: "array"
              },
              {
                type: "null"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<(ValueDef<(number|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: [
              "number",
              "null"
            ]
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<(ValueDef<(string|null)>|ExprRef)>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: [
              "string",
              "null"
            ]
          }
        },
        required: [
          "test",
          "value"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          expr: {
            description: "Vega expression (which can refer to Vega-Lite parameters).",
            type: "string"
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          }
        },
        required: [
          "expr",
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<MarkPropFieldOrDatumDef>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/StandardType",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "test"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<MarkPropFieldOrDatumDef<TypeForShape>>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/TypeForShape",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "test"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          test: {
            $ref: "#/definitions/PredicateComposition",
            description: "Predicate for triggering the condition"
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "test"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalPredicate<StringFieldDef>": {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    required: [
      "test"
    ],
    type: "object"
  },
  "ConditionalPredicate<ValueDef<(Gradient|string|null|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      value: {
        anyOf: [
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "string"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "test",
      "value"
    ],
    type: "object"
  },
  "ConditionalPredicate<ValueDef<(Text|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      value: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "test",
      "value"
    ],
    type: "object"
  },
  "ConditionalPredicate<ValueDef<(number[]|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      value: {
        anyOf: [
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "test",
      "value"
    ],
    type: "object"
  },
  "ConditionalPredicate<ValueDef<(number|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      value: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "test",
      "value"
    ],
    type: "object"
  },
  "ConditionalPredicate<ValueDef<(string|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      value: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "test",
      "value"
    ],
    type: "object"
  },
  "ConditionalPredicate<ValueDef<(string|null|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      value: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "test",
      "value"
    ],
    type: "object"
  },
  "ConditionalPredicate<ValueDef<number>>": {
    additionalProperties: !1,
    properties: {
      test: {
        $ref: "#/definitions/PredicateComposition",
        description: "Predicate for triggering the condition"
      },
      value: {
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
        type: "number"
      }
    },
    required: [
      "test",
      "value"
    ],
    type: "object"
  },
  "ConditionalSelection<MarkPropFieldOrDatumDef>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          selection: {
            $ref: "#/definitions/SelectionComposition",
            description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/StandardType",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "selection"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          selection: {
            $ref: "#/definitions/SelectionComposition",
            description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "selection"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalSelection<MarkPropFieldOrDatumDef<TypeForShape>>": {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          selection: {
            $ref: "#/definitions/SelectionComposition",
            description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/TypeForShape",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "selection"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          selection: {
            $ref: "#/definitions/SelectionComposition",
            description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        required: [
          "selection"
        ],
        type: "object"
      }
    ]
  },
  "ConditionalSelection<StringFieldDef>": {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    required: [
      "selection"
    ],
    type: "object"
  },
  "ConditionalSelection<ValueDef<(Gradient|string|null|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      value: {
        anyOf: [
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "string"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "selection",
      "value"
    ],
    type: "object"
  },
  "ConditionalSelection<ValueDef<(Text|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      value: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "selection",
      "value"
    ],
    type: "object"
  },
  "ConditionalSelection<ValueDef<(number[]|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      value: {
        anyOf: [
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "selection",
      "value"
    ],
    type: "object"
  },
  "ConditionalSelection<ValueDef<(number|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      value: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "selection",
      "value"
    ],
    type: "object"
  },
  "ConditionalSelection<ValueDef<(string|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      value: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "selection",
      "value"
    ],
    type: "object"
  },
  "ConditionalSelection<ValueDef<(string|null|ExprRef)>>": {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      value: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "selection",
      "value"
    ],
    type: "object"
  },
  "ConditionalSelection<ValueDef<number>>": {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "A [selection name](https://vega.github.io/vega-lite/docs/selection.html), or a series of [composed selections](https://vega.github.io/vega-lite/docs/selection.html#compose)."
      },
      value: {
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
        type: "number"
      }
    },
    required: [
      "selection",
      "value"
    ],
    type: "object"
  },
  Config: {
    additionalProperties: !1,
    properties: {
      arc: {
        $ref: "#/definitions/RectConfig",
        description: "Arc-specific Config"
      },
      area: {
        $ref: "#/definitions/AreaConfig",
        description: "Area-Specific Config"
      },
      aria: {
        description: 'A boolean flag indicating if ARIA default attributes should be included for marks and guides (SVG output only). If false, the `"aria-hidden"` attribute will be set for all guides, removing them from the ARIA accessibility tree and Vega-Lite will not generate default descriptions for marks.\n\n__Default value:__ `true`.',
        type: "boolean"
      },
      autosize: {
        anyOf: [
          {
            $ref: "#/definitions/AutosizeType"
          },
          {
            $ref: "#/definitions/AutoSizeParams"
          }
        ],
        description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
      },
      axis: {
        $ref: "#/definitions/AxisConfig",
        description: "Axis configuration, which determines default properties for all `x` and `y` [axes](https://vega.github.io/vega-lite/docs/axis.html). For a full list of axis configuration options, please see the [corresponding section of the axis documentation](https://vega.github.io/vega-lite/docs/axis.html#config)."
      },
      axisBand: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for axes with "band" scales.'
      },
      axisBottom: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for x-axis along the bottom edge of the chart."
      },
      axisDiscrete: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for axes with "point" or "band" scales.'
      },
      axisLeft: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for y-axis along the left edge of the chart."
      },
      axisPoint: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for axes with "point" scales.'
      },
      axisQuantitative: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for quantitative axes."
      },
      axisRight: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for y-axis along the right edge of the chart."
      },
      axisTemporal: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for temporal axes."
      },
      axisTop: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for x-axis along the top edge of the chart."
      },
      axisX: {
        $ref: "#/definitions/AxisConfig",
        description: "X-axis specific config."
      },
      axisXBand: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for x-axes with "band" scales.'
      },
      axisXDiscrete: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for x-axes with "point" or "band" scales.'
      },
      axisXPoint: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for x-axes with "point" scales.'
      },
      axisXQuantitative: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for x-quantitative axes."
      },
      axisXTemporal: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for x-temporal axes."
      },
      axisY: {
        $ref: "#/definitions/AxisConfig",
        description: "Y-axis specific config."
      },
      axisYBand: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for y-axes with "band" scales.'
      },
      axisYDiscrete: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for y-axes with "point" or "band" scales.'
      },
      axisYPoint: {
        $ref: "#/definitions/AxisConfig",
        description: 'Config for y-axes with "point" scales.'
      },
      axisYQuantitative: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for y-quantitative axes."
      },
      axisYTemporal: {
        $ref: "#/definitions/AxisConfig",
        description: "Config for y-temporal axes."
      },
      background: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
      },
      bar: {
        $ref: "#/definitions/BarConfig",
        description: "Bar-Specific Config"
      },
      boxplot: {
        $ref: "#/definitions/BoxPlotConfig",
        description: "Box Config"
      },
      circle: {
        $ref: "#/definitions/MarkConfig",
        description: "Circle-Specific Config"
      },
      concat: {
        $ref: "#/definitions/CompositionConfig",
        description: "Default configuration for all concatenation and repeat view composition operators (`concat`, `hconcat`, `vconcat`, and `repeat`)"
      },
      countTitle: {
        description: "Default axis and legend title for count fields.\n\n__Default value:__ `'Count of Records`.",
        type: "string"
      },
      customFormatTypes: {
        description: "Allow the `formatType` property for text marks and guides to accept a custom formatter function [registered as a Vega expression](https://vega.github.io/vega-lite/usage/compile.html#format-type).",
        type: "boolean"
      },
      errorband: {
        $ref: "#/definitions/ErrorBandConfig",
        description: "ErrorBand Config"
      },
      errorbar: {
        $ref: "#/definitions/ErrorBarConfig",
        description: "ErrorBar Config"
      },
      facet: {
        $ref: "#/definitions/CompositionConfig",
        description: "Default configuration for the `facet` view composition operator"
      },
      fieldTitle: {
        description: 'Defines how Vega-Lite generates title for fields. There are three possible styles: - `"verbal"` (Default) - displays function in a verbal style (e.g., "Sum of field", "Year-month of date", "field (binned)"). - `"function"` - displays function using parentheses and capitalized texts (e.g., "SUM(field)", "YEARMONTH(date)", "BIN(field)"). - `"plain"` - displays only the field name without functions (e.g., "field", "date", "field").',
        enum: [
          "verbal",
          "functional",
          "plain"
        ],
        type: "string"
      },
      font: {
        description: "Default font for all text marks, titles, and labels.",
        type: "string"
      },
      geoshape: {
        $ref: "#/definitions/MarkConfig",
        description: "Geoshape-Specific Config"
      },
      header: {
        $ref: "#/definitions/HeaderConfig",
        description: `Header configuration, which determines default properties for all [headers](https://vega.github.io/vega-lite/docs/header.html).

For a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).`
      },
      headerColumn: {
        $ref: "#/definitions/HeaderConfig",
        description: `Header configuration, which determines default properties for column [headers](https://vega.github.io/vega-lite/docs/header.html).

For a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).`
      },
      headerFacet: {
        $ref: "#/definitions/HeaderConfig",
        description: `Header configuration, which determines default properties for non-row/column facet [headers](https://vega.github.io/vega-lite/docs/header.html).

For a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).`
      },
      headerRow: {
        $ref: "#/definitions/HeaderConfig",
        description: `Header configuration, which determines default properties for row [headers](https://vega.github.io/vega-lite/docs/header.html).

For a full list of header configuration options, please see the [corresponding section of in the header documentation](https://vega.github.io/vega-lite/docs/header.html#config).`
      },
      image: {
        $ref: "#/definitions/RectConfig",
        description: "Image-specific Config"
      },
      legend: {
        $ref: "#/definitions/LegendConfig",
        description: "Legend configuration, which determines default properties for all [legends](https://vega.github.io/vega-lite/docs/legend.html). For a full list of legend configuration options, please see the [corresponding section of in the legend documentation](https://vega.github.io/vega-lite/docs/legend.html#config)."
      },
      line: {
        $ref: "#/definitions/LineConfig",
        description: "Line-Specific Config"
      },
      lineBreak: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property provides a global default for text marks, which is overridden by mark or style config settings, and by the lineBreak mark encoding channel. If signal-valued, either string or regular expression (regexp) values are valid."
      },
      mark: {
        $ref: "#/definitions/MarkConfig",
        description: "Mark Config"
      },
      numberFormat: {
        description: 'D3 Number format for guide labels and text marks. For example `"s"` for SI units. Use [D3\'s number format pattern](https://github.com/d3/d3-format#locale_format).',
        type: "string"
      },
      padding: {
        anyOf: [
          {
            $ref: "#/definitions/Padding"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
      },
      params: {
        description: "Dynamic variables that parameterize a visualization.",
        items: {
          $ref: "#/definitions/Parameter"
        },
        type: "array"
      },
      point: {
        $ref: "#/definitions/MarkConfig",
        description: "Point-Specific Config"
      },
      projection: {
        $ref: "#/definitions/ProjectionConfig",
        description: "Projection configuration, which determines default properties for all [projections](https://vega.github.io/vega-lite/docs/projection.html). For a full list of projection configuration options, please see the [corresponding section of the projection documentation](https://vega.github.io/vega-lite/docs/projection.html#config)."
      },
      range: {
        $ref: "#/definitions/RangeConfig",
        description: "An object hash that defines default range arrays or schemes for using with scales. For a full list of scale range configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)."
      },
      rect: {
        $ref: "#/definitions/RectConfig",
        description: "Rect-Specific Config"
      },
      rule: {
        $ref: "#/definitions/MarkConfig",
        description: "Rule-Specific Config"
      },
      scale: {
        $ref: "#/definitions/ScaleConfig",
        description: "Scale configuration determines default properties for all [scales](https://vega.github.io/vega-lite/docs/scale.html). For a full list of scale configuration options, please see the [corresponding section of the scale documentation](https://vega.github.io/vega-lite/docs/scale.html#config)."
      },
      selection: {
        $ref: "#/definitions/SelectionConfig",
        description: "An object hash for defining default properties for each type of selections."
      },
      square: {
        $ref: "#/definitions/MarkConfig",
        description: "Square-Specific Config"
      },
      style: {
        $ref: "#/definitions/StyleConfigIndex",
        description: "An object hash that defines key-value mappings to determine default properties for marks with a given [style](https://vega.github.io/vega-lite/docs/mark.html#mark-def). The keys represent styles names; the values have to be valid [mark configuration objects](https://vega.github.io/vega-lite/docs/mark.html#config)."
      },
      text: {
        $ref: "#/definitions/MarkConfig",
        description: "Text-Specific Config"
      },
      tick: {
        $ref: "#/definitions/TickConfig",
        description: "Tick-Specific Config"
      },
      timeFormat: {
        description: 'Default time format for raw time values (without time units) in text marks, legend labels and header labels.\n\n__Default value:__ `"%b %d, %Y"` __Note:__ Axes automatically determine the format for each label automatically so this config does not affect axes.',
        type: "string"
      },
      title: {
        $ref: "#/definitions/TitleConfig",
        description: "Title configuration, which determines default properties for all [titles](https://vega.github.io/vega-lite/docs/title.html). For a full list of title configuration options, please see the [corresponding section of the title documentation](https://vega.github.io/vega-lite/docs/title.html#config)."
      },
      trail: {
        $ref: "#/definitions/LineConfig",
        description: "Trail-Specific Config"
      },
      view: {
        $ref: "#/definitions/ViewConfig",
        description: "Default properties for [single view plots](https://vega.github.io/vega-lite/docs/spec.html#single)."
      }
    },
    type: "object"
  },
  CsvDataFormat: {
    additionalProperties: !1,
    properties: {
      parse: {
        anyOf: [
          {
            $ref: "#/definitions/Parse"
          },
          {
            type: "null"
          }
        ],
        description: 'If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `"number"`, `"boolean"`, `"date"`, or null (do not parse the field)). For example, `"parse": {"modified_on": "date"}` parses the `modified_on` field in each input record a Date value.\n\nFor `"date"`, we parse data based using Javascript\'s [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: "date:\'%m%d%Y\'"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: "utc:\'%m%d%Y\'"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)'
      },
      type: {
        description: 'Type of input data: `"json"`, `"csv"`, `"tsv"`, `"dsv"`.\n\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `"json"` will be used by default.',
        enum: [
          "csv",
          "tsv"
        ],
        type: "string"
      }
    },
    type: "object"
  },
  Cursor: {
    enum: [
      "auto",
      "default",
      "none",
      "context-menu",
      "help",
      "pointer",
      "progress",
      "wait",
      "cell",
      "crosshair",
      "text",
      "vertical-text",
      "alias",
      "copy",
      "move",
      "no-drop",
      "not-allowed",
      "e-resize",
      "n-resize",
      "ne-resize",
      "nw-resize",
      "s-resize",
      "se-resize",
      "sw-resize",
      "w-resize",
      "ew-resize",
      "ns-resize",
      "nesw-resize",
      "nwse-resize",
      "col-resize",
      "row-resize",
      "all-scroll",
      "zoom-in",
      "zoom-out",
      "grab",
      "grabbing"
    ],
    type: "string"
  },
  Cyclical: {
    enum: [
      "rainbow",
      "sinebow"
    ],
    type: "string"
  },
  Data: {
    anyOf: [
      {
        $ref: "#/definitions/DataSource"
      },
      {
        $ref: "#/definitions/Generator"
      }
    ]
  },
  DataFormat: {
    anyOf: [
      {
        $ref: "#/definitions/CsvDataFormat"
      },
      {
        $ref: "#/definitions/DsvDataFormat"
      },
      {
        $ref: "#/definitions/JsonDataFormat"
      },
      {
        $ref: "#/definitions/TopoDataFormat"
      }
    ]
  },
  DataSource: {
    anyOf: [
      {
        $ref: "#/definitions/UrlData"
      },
      {
        $ref: "#/definitions/InlineData"
      },
      {
        $ref: "#/definitions/NamedData"
      }
    ]
  },
  Datasets: {
    $ref: "#/definitions/Dict<InlineDataset>"
  },
  DateTime: {
    additionalProperties: !1,
    description: "Object for defining datetime in Vega-Lite Filter. If both month and quarter are provided, month has higher precedence. `day` cannot be combined with other date. We accept string for month and day names.",
    properties: {
      date: {
        description: "Integer value representing the date (day of the month) from 1-31.",
        maximum: 31,
        minimum: 1,
        type: "number"
      },
      day: {
        anyOf: [
          {
            $ref: "#/definitions/Day"
          },
          {
            type: "string"
          }
        ],
        description: 'Value representing the day of a week. This can be one of: (1) integer value -- `1` represents Monday; (2) case-insensitive day name (e.g., `"Monday"`); (3) case-insensitive, 3-character short day name (e.g., `"Mon"`).\n\n**Warning:** A DateTime definition object with `day`** should not be combined with `year`, `quarter`, `month`, or `date`.'
      },
      hours: {
        description: "Integer value representing the hour of a day from 0-23.",
        maximum: 24,
        minimum: 0,
        type: "number"
      },
      milliseconds: {
        description: "Integer value representing the millisecond segment of time.",
        maximum: 1e3,
        minimum: 0,
        type: "number"
      },
      minutes: {
        description: "Integer value representing the minute segment of time from 0-59.",
        maximum: 60,
        minimum: 0,
        type: "number"
      },
      month: {
        anyOf: [
          {
            $ref: "#/definitions/Month"
          },
          {
            type: "string"
          }
        ],
        description: 'One of: (1) integer value representing the month from `1`-`12`. `1` represents January; (2) case-insensitive month name (e.g., `"January"`); (3) case-insensitive, 3-character short month name (e.g., `"Jan"`).'
      },
      quarter: {
        description: "Integer value representing the quarter of the year (from 1-4).",
        maximum: 4,
        minimum: 1,
        type: "number"
      },
      seconds: {
        description: "Integer value representing the second segment (0-59) of a time value",
        maximum: 60,
        minimum: 0,
        type: "number"
      },
      utc: {
        description: "A boolean flag indicating if date time is in utc time. If false, the date time is in local time",
        type: "boolean"
      },
      year: {
        description: "Integer value representing the year.",
        type: "number"
      }
    },
    type: "object"
  },
  DatumDef: {
    additionalProperties: !1,
    properties: {
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  Day: {
    maximum: 7,
    minimum: 1,
    type: "number"
  },
  DensityTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        description: 'The output fields for the sample value and corresponding density estimate.\n\n__Default value:__ `["value", "density"]`',
        items: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            $ref: "#/definitions/FieldName"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      bandwidth: {
        description: "The bandwidth (standard deviation) of the Gaussian kernel. If unspecified or set to zero, the bandwidth value is automatically estimated from the input data using Scott’s rule.",
        type: "number"
      },
      counts: {
        description: "A boolean flag indicating if the output values should be probability estimates (false) or smoothed counts (true).\n\n__Default value:__ `false`",
        type: "boolean"
      },
      cumulative: {
        description: "A boolean flag indicating whether to produce density estimates (false) or cumulative density estimates (true).\n\n__Default value:__ `false`",
        type: "boolean"
      },
      density: {
        $ref: "#/definitions/FieldName",
        description: "The data field for which to perform density estimation."
      },
      extent: {
        description: "A [min, max] domain from which to sample the distribution. If unspecified, the extent will be determined by the observed minimum and maximum values of the density value field.",
        items: [
          {
            type: "number"
          },
          {
            type: "number"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      groupby: {
        description: "The data fields to group by. If not specified, a single group containing all data objects will be used.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      maxsteps: {
        description: "The maximum number of samples to take along the extent domain for plotting the density.\n\n__Default value:__ `200`",
        type: "number"
      },
      minsteps: {
        description: "The minimum number of samples to take along the extent domain for plotting the density.\n\n__Default value:__ `25`",
        type: "number"
      },
      steps: {
        description: "The exact number of samples to take along the extent domain for plotting the density. If specified, overrides both minsteps and maxsteps to set an exact number of uniform samples. Potentially useful in conjunction with a fixed extent to ensure consistent sample points for stacked densities.",
        type: "number"
      }
    },
    required: [
      "density"
    ],
    type: "object"
  },
  DerivedStream: {
    additionalProperties: !1,
    properties: {
      between: {
        items: {
          $ref: "#/definitions/Stream"
        },
        type: "array"
      },
      consume: {
        type: "boolean"
      },
      debounce: {
        type: "number"
      },
      filter: {
        anyOf: [
          {
            $ref: "#/definitions/Expr"
          },
          {
            items: {
              $ref: "#/definitions/Expr"
            },
            type: "array"
          }
        ]
      },
      markname: {
        type: "string"
      },
      marktype: {
        $ref: "#/definitions/MarkType"
      },
      stream: {
        $ref: "#/definitions/Stream"
      },
      throttle: {
        type: "number"
      }
    },
    required: [
      "stream"
    ],
    type: "object"
  },
  "Dict<InlineDataset>": {
    additionalProperties: {
      $ref: "#/definitions/InlineDataset"
    },
    type: "object"
  },
  "Dict<SelectionInit>": {
    additionalProperties: {
      $ref: "#/definitions/SelectionInit"
    },
    type: "object"
  },
  "Dict<SelectionInitInterval>": {
    additionalProperties: {
      $ref: "#/definitions/SelectionInitInterval"
    },
    type: "object"
  },
  "Dict<unknown>": {
    additionalProperties: {},
    type: "object"
  },
  Diverging: {
    enum: [
      "blueorange",
      "blueorange-3",
      "blueorange-4",
      "blueorange-5",
      "blueorange-6",
      "blueorange-7",
      "blueorange-8",
      "blueorange-9",
      "blueorange-10",
      "blueorange-11",
      "brownbluegreen",
      "brownbluegreen-3",
      "brownbluegreen-4",
      "brownbluegreen-5",
      "brownbluegreen-6",
      "brownbluegreen-7",
      "brownbluegreen-8",
      "brownbluegreen-9",
      "brownbluegreen-10",
      "brownbluegreen-11",
      "purplegreen",
      "purplegreen-3",
      "purplegreen-4",
      "purplegreen-5",
      "purplegreen-6",
      "purplegreen-7",
      "purplegreen-8",
      "purplegreen-9",
      "purplegreen-10",
      "purplegreen-11",
      "pinkyellowgreen",
      "pinkyellowgreen-3",
      "pinkyellowgreen-4",
      "pinkyellowgreen-5",
      "pinkyellowgreen-6",
      "pinkyellowgreen-7",
      "pinkyellowgreen-8",
      "pinkyellowgreen-9",
      "pinkyellowgreen-10",
      "pinkyellowgreen-11",
      "purpleorange",
      "purpleorange-3",
      "purpleorange-4",
      "purpleorange-5",
      "purpleorange-6",
      "purpleorange-7",
      "purpleorange-8",
      "purpleorange-9",
      "purpleorange-10",
      "purpleorange-11",
      "redblue",
      "redblue-3",
      "redblue-4",
      "redblue-5",
      "redblue-6",
      "redblue-7",
      "redblue-8",
      "redblue-9",
      "redblue-10",
      "redblue-11",
      "redgrey",
      "redgrey-3",
      "redgrey-4",
      "redgrey-5",
      "redgrey-6",
      "redgrey-7",
      "redgrey-8",
      "redgrey-9",
      "redgrey-10",
      "redgrey-11",
      "redyellowblue",
      "redyellowblue-3",
      "redyellowblue-4",
      "redyellowblue-5",
      "redyellowblue-6",
      "redyellowblue-7",
      "redyellowblue-8",
      "redyellowblue-9",
      "redyellowblue-10",
      "redyellowblue-11",
      "redyellowgreen",
      "redyellowgreen-3",
      "redyellowgreen-4",
      "redyellowgreen-5",
      "redyellowgreen-6",
      "redyellowgreen-7",
      "redyellowgreen-8",
      "redyellowgreen-9",
      "redyellowgreen-10",
      "redyellowgreen-11",
      "spectral",
      "spectral-3",
      "spectral-4",
      "spectral-5",
      "spectral-6",
      "spectral-7",
      "spectral-8",
      "spectral-9",
      "spectral-10",
      "spectral-11"
    ],
    type: "string"
  },
  DomainUnionWith: {
    additionalProperties: !1,
    properties: {
      unionWith: {
        anyOf: [
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          },
          {
            items: {
              type: "boolean"
            },
            type: "array"
          },
          {
            items: {
              $ref: "#/definitions/DateTime"
            },
            type: "array"
          }
        ],
        description: 'Customized domain values to be union with the field\'s values.\n\n1) `domain` for _quantitative_ fields can take one of the following forms:\n\n- a two-element array with minimum and maximum values. - an array with more than two entries, for [Piecewise  quantitative scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). (Alternatively, the `domainMid` property can be set for a diverging scale.) - a string value `"unaggregated"`, if the input field is aggregated, to indicate that the domain should include the raw data values prior to the aggregation.\n\n2) `domain` for _temporal_ fields can be a two-element array minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\n3) `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid input values.'
      }
    },
    required: [
      "unionWith"
    ],
    type: "object"
  },
  DsvDataFormat: {
    additionalProperties: !1,
    properties: {
      delimiter: {
        description: "The delimiter between records. The delimiter must be a single character (i.e., a single 16-bit code unit); so, ASCII delimiters are fine, but emoji delimiters are not.",
        maxLength: 1,
        minLength: 1,
        type: "string"
      },
      parse: {
        anyOf: [
          {
            $ref: "#/definitions/Parse"
          },
          {
            type: "null"
          }
        ],
        description: 'If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `"number"`, `"boolean"`, `"date"`, or null (do not parse the field)). For example, `"parse": {"modified_on": "date"}` parses the `modified_on` field in each input record a Date value.\n\nFor `"date"`, we parse data based using Javascript\'s [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: "date:\'%m%d%Y\'"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: "utc:\'%m%d%Y\'"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)'
      },
      type: {
        const: "dsv",
        description: 'Type of input data: `"json"`, `"csv"`, `"tsv"`, `"dsv"`.\n\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `"json"` will be used by default.',
        type: "string"
      }
    },
    required: [
      "delimiter"
    ],
    type: "object"
  },
  Element: {
    type: "string"
  },
  EncodingSortField: {
    additionalProperties: !1,
    description: "A sort definition for sorting a discrete scale in an encoding field definition.",
    properties: {
      field: {
        $ref: "#/definitions/Field",
        description: `The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.

__Default value:__ If unspecified, defaults to the field specified in the outer data reference.`
      },
      op: {
        $ref: "#/definitions/NonArgAggregateOp",
        description: 'An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to perform on the field prior to sorting (e.g., `"count"`, `"mean"` and `"median"`). An aggregation is required when there are multiple values of the sort field for each encoded data field. The input data objects will be aggregated, grouped by the encoded data field.\n\nFor a full list of operations, please see the documentation for [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).\n\n__Default value:__ `"sum"` for stacked plots. Otherwise, `"min"`.'
      },
      order: {
        anyOf: [
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            type: "null"
          }
        ],
        description: 'The sort order. One of `"ascending"` (default), `"descending"`, or `null` (no not sort).'
      }
    },
    type: "object"
  },
  "EncodingSortField<FieldName>": {
    additionalProperties: !1,
    description: "A sort definition for sorting a discrete scale in an encoding field definition.",
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: `The data [field](https://vega.github.io/vega-lite/docs/field.html) to sort by.

__Default value:__ If unspecified, defaults to the field specified in the outer data reference.`
      },
      op: {
        $ref: "#/definitions/NonArgAggregateOp",
        description: 'An [aggregate operation](https://vega.github.io/vega-lite/docs/aggregate.html#ops) to perform on the field prior to sorting (e.g., `"count"`, `"mean"` and `"median"`). An aggregation is required when there are multiple values of the sort field for each encoded data field. The input data objects will be aggregated, grouped by the encoded data field.\n\nFor a full list of operations, please see the documentation for [aggregate](https://vega.github.io/vega-lite/docs/aggregate.html#ops).\n\n__Default value:__ `"sum"` for stacked plots. Otherwise, `"min"`.'
      },
      order: {
        anyOf: [
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            type: "null"
          }
        ],
        description: 'The sort order. One of `"ascending"` (default), `"descending"`, or `null` (no not sort).'
      }
    },
    type: "object"
  },
  ErrorBand: {
    const: "errorband",
    type: "string"
  },
  ErrorBandConfig: {
    additionalProperties: !1,
    properties: {
      band: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      borders: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      extent: {
        $ref: "#/definitions/ErrorBarExtent",
        description: 'The extent of the band. Available options include: - `"ci"`: Extend the band to the confidence interval of the mean. - `"stderr"`: The size of band are set to the value of standard error, extending from the mean. - `"stdev"`: The size of band are set to the value of standard deviation, extending from the mean. - `"iqr"`: Extend the band to the q1 and q3.\n\n__Default value:__ `"stderr"`.'
      },
      interpolate: {
        $ref: "#/definitions/Interpolate",
        description: 'The line interpolation method for the error band. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values. - `"step-before"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value. - `"step-after"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
      },
      tension: {
        description: "The tension parameter for the interpolation type of the error band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      }
    },
    type: "object"
  },
  ErrorBandDef: {
    additionalProperties: !1,
    properties: {
      band: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      borders: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      clip: {
        description: "Whether a composite mark be clipped to the enclosing group’s width and height.",
        type: "boolean"
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      extent: {
        $ref: "#/definitions/ErrorBarExtent",
        description: 'The extent of the band. Available options include: - `"ci"`: Extend the band to the confidence interval of the mean. - `"stderr"`: The size of band are set to the value of standard error, extending from the mean. - `"stdev"`: The size of band are set to the value of standard deviation, extending from the mean. - `"iqr"`: Extend the band to the q1 and q3.\n\n__Default value:__ `"stderr"`.'
      },
      interpolate: {
        $ref: "#/definitions/Interpolate",
        description: 'The line interpolation method for the error band. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes at the midpoint of each pair of adjacent x-values. - `"step-before"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes before the x-value. - `"step-after"`: a piecewise constant function (a step function) consisting of alternating horizontal and vertical lines. The y-value changes after the x-value. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
      },
      opacity: {
        description: "The opacity (value between [0,1]) of the mark.",
        type: "number"
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "Orientation of the error band. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined."
      },
      tension: {
        description: "The tension parameter for the interpolation type of the error band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      type: {
        $ref: "#/definitions/ErrorBand",
        description: 'The mark type. This could a primitive mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"geoshape"`, `"rule"`, and `"text"`) or a composite mark type (`"boxplot"`, `"errorband"`, `"errorbar"`).'
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  ErrorBar: {
    const: "errorbar",
    type: "string"
  },
  ErrorBarConfig: {
    additionalProperties: !1,
    properties: {
      extent: {
        $ref: "#/definitions/ErrorBarExtent",
        description: 'The extent of the rule. Available options include: - `"ci"`: Extend the rule to the confidence interval of the mean. - `"stderr"`: The size of rule are set to the value of standard error, extending from the mean. - `"stdev"`: The size of rule are set to the value of standard deviation, extending from the mean. - `"iqr"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `"stderr"`.'
      },
      rule: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      size: {
        description: "Size of the ticks of an error bar",
        type: "number"
      },
      thickness: {
        description: "Thickness of the ticks and the bar of an error bar",
        type: "number"
      },
      ticks: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      }
    },
    type: "object"
  },
  ErrorBarDef: {
    additionalProperties: !1,
    properties: {
      clip: {
        description: "Whether a composite mark be clipped to the enclosing group’s width and height.",
        type: "boolean"
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      extent: {
        $ref: "#/definitions/ErrorBarExtent",
        description: 'The extent of the rule. Available options include: - `"ci"`: Extend the rule to the confidence interval of the mean. - `"stderr"`: The size of rule are set to the value of standard error, extending from the mean. - `"stdev"`: The size of rule are set to the value of standard deviation, extending from the mean. - `"iqr"`: Extend the rule to the q1 and q3.\n\n__Default value:__ `"stderr"`.'
      },
      opacity: {
        description: "The opacity (value between [0,1]) of the mark.",
        type: "number"
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "Orientation of the error bar. This is normally automatically determined, but can be specified when the orientation is ambiguous and cannot be automatically determined."
      },
      rule: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      size: {
        description: "Size of the ticks of an error bar",
        type: "number"
      },
      thickness: {
        description: "Thickness of the ticks and the bar of an error bar",
        type: "number"
      },
      ticks: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/MarkConfig<ExprOrSignalRef>"
          }
        ]
      },
      type: {
        $ref: "#/definitions/ErrorBar",
        description: 'The mark type. This could a primitive mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"geoshape"`, `"rule"`, and `"text"`) or a composite mark type (`"boxplot"`, `"errorband"`, `"errorbar"`).'
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  ErrorBarExtent: {
    enum: [
      "ci",
      "iqr",
      "stderr",
      "stdev"
    ],
    type: "string"
  },
  EventStream: {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          between: {
            items: {
              $ref: "#/definitions/Stream"
            },
            type: "array"
          },
          consume: {
            type: "boolean"
          },
          debounce: {
            type: "number"
          },
          filter: {
            anyOf: [
              {
                $ref: "#/definitions/Expr"
              },
              {
                items: {
                  $ref: "#/definitions/Expr"
                },
                type: "array"
              }
            ]
          },
          markname: {
            type: "string"
          },
          marktype: {
            $ref: "#/definitions/MarkType"
          },
          source: {
            enum: [
              "view",
              "scope"
            ],
            type: "string"
          },
          throttle: {
            type: "number"
          },
          type: {
            $ref: "#/definitions/EventType"
          }
        },
        required: [
          "type"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          between: {
            items: {
              $ref: "#/definitions/Stream"
            },
            type: "array"
          },
          consume: {
            type: "boolean"
          },
          debounce: {
            type: "number"
          },
          filter: {
            anyOf: [
              {
                $ref: "#/definitions/Expr"
              },
              {
                items: {
                  $ref: "#/definitions/Expr"
                },
                type: "array"
              }
            ]
          },
          markname: {
            type: "string"
          },
          marktype: {
            $ref: "#/definitions/MarkType"
          },
          source: {
            const: "window",
            type: "string"
          },
          throttle: {
            type: "number"
          },
          type: {
            $ref: "#/definitions/WindowEventType"
          }
        },
        required: [
          "source",
          "type"
        ],
        type: "object"
      }
    ]
  },
  EventType: {
    enum: [
      "click",
      "dblclick",
      "dragenter",
      "dragleave",
      "dragover",
      "keydown",
      "keypress",
      "keyup",
      "mousedown",
      "mousemove",
      "mouseout",
      "mouseover",
      "mouseup",
      "mousewheel",
      "timer",
      "touchend",
      "touchmove",
      "touchstart",
      "wheel"
    ],
    type: "string"
  },
  Expr: {
    type: "string"
  },
  ExprOrSignalRef: {
    $ref: "#/definitions/ExprRef"
  },
  ExprRef: {
    additionalProperties: !1,
    properties: {
      expr: {
        description: "Vega expression (which can refer to Vega-Lite parameters).",
        type: "string"
      }
    },
    required: [
      "expr"
    ],
    type: "object"
  },
  FacetEncodingFieldDef: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      header: {
        $ref: "#/definitions/Header",
        description: "An object defining properties of a facet's header."
      },
      sort: {
        anyOf: [
          {
            $ref: "#/definitions/SortArray"
          },
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            $ref: "#/definitions/EncodingSortField"
          },
          {
            type: "null"
          }
        ],
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` is not supported for `row` and `column`.'
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  FacetFieldDef: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      header: {
        $ref: "#/definitions/Header",
        description: "An object defining properties of a facet's header."
      },
      sort: {
        anyOf: [
          {
            $ref: "#/definitions/SortArray"
          },
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            $ref: "#/definitions/EncodingSortField"
          },
          {
            type: "null"
          }
        ],
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` is not supported for `row` and `column`.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FacetFieldDef<FieldName>": {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/FieldName",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      header: {
        $ref: "#/definitions/Header",
        description: "An object defining properties of a facet's header."
      },
      sort: {
        anyOf: [
          {
            $ref: "#/definitions/SortArray"
          },
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            $ref: "#/definitions/EncodingSortField<FieldName>"
          },
          {
            type: "null"
          }
        ],
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` is not supported for `row` and `column`.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  FacetMapping: {
    additionalProperties: !1,
    properties: {
      column: {
        $ref: "#/definitions/FacetFieldDef",
        description: "A field definition for the horizontal facet of trellis plots."
      },
      row: {
        $ref: "#/definitions/FacetFieldDef",
        description: "A field definition for the vertical facet of trellis plots."
      }
    },
    type: "object"
  },
  "FacetMapping<FieldName>": {
    additionalProperties: !1,
    properties: {
      column: {
        $ref: "#/definitions/FacetFieldDef<FieldName>",
        description: "A field definition for the horizontal facet of trellis plots."
      },
      row: {
        $ref: "#/definitions/FacetFieldDef<FieldName>",
        description: "A field definition for the vertical facet of trellis plots."
      }
    },
    type: "object"
  },
  FacetedEncoding: {
    additionalProperties: !1,
    properties: {
      angle: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Rotation angle of point and text marks."
      },
      color: {
        $ref: "#/definitions/ColorDef",
        description: 'Color of the marks – either fill or stroke color based on  the `filled` property of mark definition. By default, `color` represents fill color for `"area"`, `"bar"`, `"tick"`, `"text"`, `"trail"`, `"circle"`, and `"square"` / stroke color for `"line"` and `"point"`.\n\n__Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)\'s `color` property.\n\n_Note:_ 1) For fine-grained control over both fill and stroke colors of the marks, please use the `fill` and `stroke` channels. The `fill` or `stroke` encodings have higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified. 2) See the scale documentation for more information about customizing [color scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme).'
      },
      column: {
        $ref: "#/definitions/RowColumnEncodingFieldDef",
        description: "A field definition for the horizontal facet of trellis plots."
      },
      description: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          }
        ],
        description: 'A text description of this mark for ARIA accessibility (SVG output only). For SVG output the `"aria-label"` attribute will be set to this description.'
      },
      detail: {
        anyOf: [
          {
            $ref: "#/definitions/FieldDefWithoutScale"
          },
          {
            items: {
              $ref: "#/definitions/FieldDefWithoutScale"
            },
            type: "array"
          }
        ],
        description: "Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel."
      },
      facet: {
        $ref: "#/definitions/FacetEncodingFieldDef",
        description: "A field definition for the (flexible) facet of trellis plots.\n\nIf either `row` or `column` is specified, this channel will be ignored."
      },
      fill: {
        $ref: "#/definitions/ColorDef",
        description: "Fill color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `fill` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
      },
      fillOpacity: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Fill opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `fillOpacity` property."
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          }
        ],
        description: "A URL to load upon mouse click."
      },
      key: {
        $ref: "#/definitions/FieldDefWithoutScale",
        description: "A data field to use as a unique key for data binding. When a visualization’s data is updated, the key value will be used to match data elements to existing mark instances. Use a key channel to enable object constancy for transitions over dynamic data."
      },
      latitude: {
        $ref: "#/definitions/LatLongDef",
        description: "Latitude position of geographically projected marks."
      },
      latitude2: {
        $ref: "#/definitions/Position2Def",
        description: 'Latitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.'
      },
      longitude: {
        $ref: "#/definitions/LatLongDef",
        description: "Longitude position of geographically projected marks."
      },
      longitude2: {
        $ref: "#/definitions/Position2Def",
        description: 'Longitude-2 position for geographically projected ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.'
      },
      opacity: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `opacity` property."
      },
      order: {
        anyOf: [
          {
            $ref: "#/definitions/OrderFieldDef"
          },
          {
            items: {
              $ref: "#/definitions/OrderFieldDef"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/OrderValueDef"
          }
        ],
        description: 'Order of the marks. - For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order). - For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{"value": null}` makes the line marks use the original order in the data sources. - Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping.'
      },
      radius: {
        $ref: "#/definitions/PolarDef",
        description: "The outer radius in pixels of arc marks."
      },
      radius2: {
        $ref: "#/definitions/Position2Def",
        description: "The inner radius in pixels of arc marks."
      },
      row: {
        $ref: "#/definitions/RowColumnEncodingFieldDef",
        description: "A field definition for the vertical facet of trellis plots."
      },
      shape: {
        $ref: "#/definitions/ShapeDef",
        description: 'Shape of the mark.\n\n1. For `point` marks the supported values include:    - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`.    - the line symbol `"stroke"`    - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"`    - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n2. For `geoshape` marks it should be a field definition of the geojson data\n\n__Default value:__ If undefined, the default shape depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#point-config)\'s `shape` property. (`"circle"` if unset.)'
      },
      size: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: 'Size of the mark. - For `"point"`, `"square"` and `"circle"`, – the symbol size, or pixel area of the mark. - For `"bar"` and `"tick"` – the bar and tick\'s size. - For `"text"` – the text\'s font size. - Size is unsupported for `"line"`, `"area"`, and `"rect"`. (Use `"trail"` instead of line with varying size)'
      },
      stroke: {
        $ref: "#/definitions/ColorDef",
        description: "Stroke color of the marks. __Default value:__ If undefined, the default color depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `color` property.\n\n_Note:_ The `stroke` encoding has higher precedence than `color`, thus may override the `color` encoding if conflicting encodings are specified."
      },
      strokeDash: {
        $ref: "#/definitions/NumericArrayMarkPropDef",
        description: "Stroke dash of the marks.\n\n__Default value:__ `[1,0]` (No dash)."
      },
      strokeOpacity: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Stroke opacity of the marks.\n\n__Default value:__ If undefined, the default opacity depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeOpacity` property."
      },
      strokeWidth: {
        $ref: "#/definitions/NumericMarkPropDef",
        description: "Stroke width of the marks.\n\n__Default value:__ If undefined, the default stroke width depends on [mark config](https://vega.github.io/vega-lite/docs/config.html#mark-config)'s `strokeWidth` property."
      },
      text: {
        $ref: "#/definitions/TextDef",
        description: "Text of the `text` mark."
      },
      theta: {
        $ref: "#/definitions/PolarDef",
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`
      },
      theta2: {
        $ref: "#/definitions/Position2Def",
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      tooltip: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          },
          {
            items: {
              $ref: "#/definitions/StringFieldDef"
            },
            type: "array"
          },
          {
            type: "null"
          }
        ],
        description: "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite."
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          }
        ],
        description: "The URL of an image mark."
      },
      x: {
        $ref: "#/definitions/PositionDef",
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        $ref: "#/definitions/Position2Def",
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      xError: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Error value of x coordinates for error specified `"errorbar"` and `"errorband"`.'
      },
      xError2: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Secondary error value of x coordinates for error specified `"errorbar"` and `"errorband"`.'
      },
      y: {
        $ref: "#/definitions/PositionDef",
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        $ref: "#/definitions/Position2Def",
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      yError: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Error value of y coordinates for error specified `"errorbar"` and `"errorband"`.'
      },
      yError2: {
        anyOf: [
          {
            $ref: "#/definitions/SecondaryFieldDef"
          },
          {
            $ref: "#/definitions/ValueDef<number>"
          }
        ],
        description: 'Secondary error value of y coordinates for error specified `"errorbar"` and `"errorband"`.'
      }
    },
    type: "object"
  },
  FacetedUnitSpec: {
    additionalProperties: !1,
    description: "Unit spec that can have a composite mark and row or column channels (shorthand for a facet spec).",
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      encoding: {
        $ref: "#/definitions/FacetedEncoding",
        description: "A key-value mapping between encoding channels and definition of fields."
      },
      height: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      },
      mark: {
        $ref: "#/definitions/AnyMark",
        description: 'A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).'
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      projection: {
        $ref: "#/definitions/Projection",
        description: 'An object defining properties of geographic projection, which will be applied to `shape` path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other marks.'
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      selection: {
        additionalProperties: {
          $ref: "#/definitions/SelectionDef"
        },
        description: "A key-value mapping between selection names and definitions.",
        type: "object"
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      view: {
        $ref: "#/definitions/ViewBackground",
        description: `An object defining the view background's fill and stroke.

__Default value:__ none (transparent)`
      },
      width: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      }
    },
    required: [
      "mark"
    ],
    type: "object"
  },
  Field: {
    anyOf: [
      {
        $ref: "#/definitions/FieldName"
      },
      {
        $ref: "#/definitions/RepeatRef"
      }
    ]
  },
  FieldDefWithoutScale: {
    $ref: "#/definitions/TypedFieldDef",
    description: 'Field Def without scale (and without bin: "binned" support).'
  },
  FieldEqualPredicate: {
    additionalProperties: !1,
    properties: {
      equal: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "number"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The value that the field should be equal to."
      },
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      }
    },
    required: [
      "equal",
      "field"
    ],
    type: "object"
  },
  FieldGTEPredicate: {
    additionalProperties: !1,
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      gte: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "number"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The value that the field should be greater than or equals to."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      }
    },
    required: [
      "field",
      "gte"
    ],
    type: "object"
  },
  FieldGTPredicate: {
    additionalProperties: !1,
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      gt: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "number"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The value that the field should be greater than."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      }
    },
    required: [
      "field",
      "gt"
    ],
    type: "object"
  },
  FieldLTEPredicate: {
    additionalProperties: !1,
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      lte: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "number"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The value that the field should be less than or equals to."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      }
    },
    required: [
      "field",
      "lte"
    ],
    type: "object"
  },
  FieldLTPredicate: {
    additionalProperties: !1,
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      lt: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "number"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The value that the field should be less than."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      }
    },
    required: [
      "field",
      "lt"
    ],
    type: "object"
  },
  FieldName: {
    type: "string"
  },
  FieldOneOfPredicate: {
    additionalProperties: !1,
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      oneOf: {
        anyOf: [
          {
            items: {
              type: "string"
            },
            type: "array"
          },
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            items: {
              type: "boolean"
            },
            type: "array"
          },
          {
            items: {
              $ref: "#/definitions/DateTime"
            },
            type: "array"
          }
        ],
        description: "A set of values that the `field`'s value should be a member of, for a data item included in the filtered data."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      }
    },
    required: [
      "field",
      "oneOf"
    ],
    type: "object"
  },
  "FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<DatumDef,(string|null)>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<DatumDef,number>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<DatumDef,number[]>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      legend: {
        anyOf: [
          {
            $ref: "#/definitions/Legend"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      sort: {
        $ref: "#/definitions/Sort",
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<MarkPropFieldDef,number>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      legend: {
        anyOf: [
          {
            $ref: "#/definitions/Legend"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      sort: {
        $ref: "#/definitions/Sort",
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      legend: {
        anyOf: [
          {
            $ref: "#/definitions/Legend"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      sort: {
        $ref: "#/definitions/Sort",
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      legend: {
        anyOf: [
          {
            $ref: "#/definitions/Legend"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      sort: {
        $ref: "#/definitions/Sort",
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/TypeForShape",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<StringDatumDef,Text>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<StringFieldDef,Text>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  "FieldOrDatumDefWithCondition<StringFieldDef,string>": {
    additionalProperties: !1,
    description: "A FieldDef with Condition<ValueDef> {    condition: {value: ...},    field: ...,    ... }",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  FieldRangePredicate: {
    additionalProperties: !1,
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      range: {
        anyOf: [
          {
            items: {
              anyOf: [
                {
                  type: "number"
                },
                {
                  $ref: "#/definitions/DateTime"
                },
                {
                  type: "null"
                },
                {
                  $ref: "#/definitions/ExprRef"
                }
              ]
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "An array of inclusive minimum and maximum values for a field value of a data item to be included in the filtered data.",
        maxItems: 2,
        minItems: 2
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      }
    },
    required: [
      "field",
      "range"
    ],
    type: "object"
  },
  FieldValidPredicate: {
    additionalProperties: !1,
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "Field to be tested."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit for the field to be tested."
      },
      valid: {
        description: "If set to true the field's value has to be valid, meaning both not `null` and not [`NaN`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN).",
        type: "boolean"
      }
    },
    required: [
      "field",
      "valid"
    ],
    type: "object"
  },
  FilterTransform: {
    additionalProperties: !1,
    properties: {
      filter: {
        $ref: "#/definitions/PredicateComposition",
        description: 'The `filter` property must be a predication definition, which can take one of the following forms:\n\n1) an [expression](https://vega.github.io/vega-lite/docs/types.html#expression) string, where `datum` can be used to refer to the current data object. For example, `{filter: "datum.b2 > 60"}` would make the output data includes only items that have values in the field `b2` over 60.\n\n2) one of the [field predicates](https://vega.github.io/vega-lite/docs/predicate.html#field-predicate):  [`equal`](https://vega.github.io/vega-lite/docs/predicate.html#field-equal-predicate), [`lt`](https://vega.github.io/vega-lite/docs/predicate.html#lt-predicate), [`lte`](https://vega.github.io/vega-lite/docs/predicate.html#lte-predicate), [`gt`](https://vega.github.io/vega-lite/docs/predicate.html#gt-predicate), [`gte`](https://vega.github.io/vega-lite/docs/predicate.html#gte-predicate), [`range`](https://vega.github.io/vega-lite/docs/predicate.html#range-predicate), [`oneOf`](https://vega.github.io/vega-lite/docs/predicate.html#one-of-predicate), or [`valid`](https://vega.github.io/vega-lite/docs/predicate.html#valid-predicate),\n\n3) a [selection predicate](https://vega.github.io/vega-lite/docs/predicate.html#selection-predicate), which define the names of a selection that the data point should belong to (or a logical composition of selections).\n\n4) a [logical composition](https://vega.github.io/vega-lite/docs/predicate.html#composition) of (1), (2), or (3).'
      }
    },
    required: [
      "filter"
    ],
    type: "object"
  },
  Fit: {
    anyOf: [
      {
        $ref: "#/definitions/GeoJsonFeature"
      },
      {
        $ref: "#/definitions/GeoJsonFeatureCollection"
      },
      {
        items: {
          $ref: "#/definitions/GeoJsonFeature"
        },
        type: "array"
      }
    ]
  },
  FlattenTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        description: `The output field names for extracted array values.

__Default value:__ The field name of the corresponding array field`,
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      flatten: {
        description: "An array of one or more data fields containing arrays to flatten. If multiple fields are specified, their array values should have a parallel structure, ideally with the same length. If the lengths of parallel arrays do not match, the longest array will be used with `null` values added for missing entries.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      }
    },
    required: [
      "flatten"
    ],
    type: "object"
  },
  FoldTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        description: 'The output field names for the key and value properties produced by the fold transform. __Default value:__ `["key", "value"]`',
        items: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            $ref: "#/definitions/FieldName"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      fold: {
        description: "An array of data fields indicating the properties to fold.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      }
    },
    required: [
      "fold"
    ],
    type: "object"
  },
  FontStyle: {
    type: "string"
  },
  FontWeight: {
    enum: [
      "normal",
      "bold",
      "lighter",
      "bolder",
      100,
      200,
      300,
      400,
      500,
      600,
      700,
      800,
      900
    ],
    type: [
      "string",
      "number"
    ]
  },
  Generator: {
    anyOf: [
      {
        $ref: "#/definitions/SequenceGenerator"
      },
      {
        $ref: "#/definitions/SphereGenerator"
      },
      {
        $ref: "#/definitions/GraticuleGenerator"
      }
    ]
  },
  "NormalizedConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    description: "Base interface for a generalized concatenation specification.",
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      concat: {
        description: "A list of views to be concatenated.",
        items: {
          $ref: "#/definitions/NormalizedSpec"
        },
        type: "array"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "concat"
    ],
    type: "object"
  },
  "ConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    description: "Base interface for a generalized concatenation specification.",
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      concat: {
        description: "A list of views to be concatenated.",
        items: {
          $ref: "#/definitions/Spec"
        },
        type: "array"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "concat"
    ],
    type: "object"
  },
  NormalizedFacetSpec: {
    additionalProperties: !1,
    description: "Base interface for a facet specification.",
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      facet: {
        anyOf: [
          {
            $ref: "#/definitions/FacetFieldDef"
          },
          {
            $ref: "#/definitions/FacetMapping"
          }
        ],
        description: "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      spec: {
        anyOf: [
          {
            $ref: "#/definitions/LayerSpec"
          },
          {
            $ref: "#/definitions/FacetedUnitSpec"
          }
        ],
        description: "A specification of the view that gets faceted."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "facet",
      "spec"
    ],
    type: "object"
  },
  FacetSpec: {
    additionalProperties: !1,
    description: "Base interface for a facet specification.",
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      facet: {
        anyOf: [
          {
            $ref: "#/definitions/FacetFieldDef<FieldName>"
          },
          {
            $ref: "#/definitions/FacetMapping<FieldName>"
          }
        ],
        description: "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      spec: {
        anyOf: [
          {
            $ref: "#/definitions/LayerSpec"
          },
          {
            $ref: "#/definitions/FacetedUnitSpec"
          }
        ],
        description: "A specification of the view that gets faceted."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "facet",
      "spec"
    ],
    type: "object"
  },
  "NormalizedHConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    description: "Base interface for a horizontal concatenation specification.",
    properties: {
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        description: "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      hconcat: {
        description: "A list of views to be concatenated and put into a row.",
        items: {
          $ref: "#/definitions/NormalizedSpec"
        },
        type: "array"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        description: "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
        type: "number"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "hconcat"
    ],
    type: "object"
  },
  "HConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    description: "Base interface for a horizontal concatenation specification.",
    properties: {
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        description: "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      hconcat: {
        description: "A list of views to be concatenated and put into a row.",
        items: {
          $ref: "#/definitions/Spec"
        },
        type: "array"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        description: "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
        type: "number"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "hconcat"
    ],
    type: "object"
  },
  NormalizedSpec: {
    anyOf: [
      {
        $ref: "#/definitions/FacetedUnitSpec"
      },
      {
        $ref: "#/definitions/LayerSpec"
      },
      {
        $ref: "#/definitions/RepeatSpec"
      },
      {
        $ref: "#/definitions/NormalizedFacetSpec"
      },
      {
        $ref: "#/definitions/NormalizedConcatSpec<GenericSpec>"
      },
      {
        $ref: "#/definitions/NormalizedVConcatSpec<GenericSpec>"
      },
      {
        $ref: "#/definitions/NormalizedHConcatSpec<GenericSpec>"
      }
    ],
    description: "Any specification in Vega-Lite."
  },
  Spec: {
    anyOf: [
      {
        $ref: "#/definitions/FacetedUnitSpec"
      },
      {
        $ref: "#/definitions/LayerSpec"
      },
      {
        $ref: "#/definitions/RepeatSpec"
      },
      {
        $ref: "#/definitions/FacetSpec"
      },
      {
        $ref: "#/definitions/ConcatSpec<GenericSpec>"
      },
      {
        $ref: "#/definitions/VConcatSpec<GenericSpec>"
      },
      {
        $ref: "#/definitions/HConcatSpec<GenericSpec>"
      }
    ],
    description: "Any specification in Vega-Lite."
  },
  "NormalizedVConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    description: "Base interface for a vertical concatenation specification.",
    properties: {
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        description: "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        description: "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
        type: "number"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      vconcat: {
        description: "A list of views to be concatenated and put into a column.",
        items: {
          $ref: "#/definitions/NormalizedSpec"
        },
        type: "array"
      }
    },
    required: [
      "vconcat"
    ],
    type: "object"
  },
  "VConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    description: "Base interface for a vertical concatenation specification.",
    properties: {
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        description: "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        description: "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
        type: "number"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      vconcat: {
        description: "A list of views to be concatenated and put into a column.",
        items: {
          $ref: "#/definitions/Spec"
        },
        type: "array"
      }
    },
    required: [
      "vconcat"
    ],
    type: "object"
  },
  GeoJsonFeature: {},
  GeoJsonFeatureCollection: {},
  Gradient: {
    anyOf: [
      {
        $ref: "#/definitions/LinearGradient"
      },
      {
        $ref: "#/definitions/RadialGradient"
      }
    ]
  },
  GradientStop: {
    additionalProperties: !1,
    properties: {
      color: {
        $ref: "#/definitions/Color",
        description: "The color value at this point in the gradient."
      },
      offset: {
        description: "The offset fraction for the color stop, indicating its position within the gradient.",
        type: "number"
      }
    },
    required: [
      "offset",
      "color"
    ],
    type: "object"
  },
  GraticuleGenerator: {
    additionalProperties: !1,
    properties: {
      graticule: {
        anyOf: [
          {
            const: !0,
            type: "boolean"
          },
          {
            $ref: "#/definitions/GraticuleParams"
          }
        ],
        description: "Generate graticule GeoJSON data for geographic reference lines."
      },
      name: {
        description: "Provide a placeholder name and bind data at runtime.",
        type: "string"
      }
    },
    required: [
      "graticule"
    ],
    type: "object"
  },
  GraticuleParams: {
    additionalProperties: !1,
    properties: {
      extent: {
        $ref: "#/definitions/Vector2<Vector2<number>>",
        description: "Sets both the major and minor extents to the same values."
      },
      extentMajor: {
        $ref: "#/definitions/Vector2<Vector2<number>>",
        description: "The major extent of the graticule as a two-element array of coordinates."
      },
      extentMinor: {
        $ref: "#/definitions/Vector2<Vector2<number>>",
        description: "The minor extent of the graticule as a two-element array of coordinates."
      },
      precision: {
        description: "The precision of the graticule in degrees.\n\n__Default value:__ `2.5`",
        type: "number"
      },
      step: {
        $ref: "#/definitions/Vector2<number>",
        description: "Sets both the major and minor step angles to the same values."
      },
      stepMajor: {
        $ref: "#/definitions/Vector2<number>",
        description: `The major step angles of the graticule.


__Default value:__ \`[90, 360]\``
      },
      stepMinor: {
        $ref: "#/definitions/Vector2<number>",
        description: "The minor step angles of the graticule.\n\n__Default value:__ `[10, 10]`"
      }
    },
    type: "object"
  },
  Header: {
    additionalProperties: !1,
    description: "Headers of row / column channels for faceted plots.",
    properties: {
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Horizontal text alignment of header labels. One of `"left"`, `"center"`, or `"right"`.'
      },
      labelAnchor: {
        $ref: "#/definitions/TitleAnchor",
        description: 'The anchor position for placing the labels. One of `"start"`, `"middle"`, or `"end"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.'
      },
      labelAngle: {
        description: "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.",
        maximum: 360,
        minimum: -360,
        type: "number"
      },
      labelBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The vertical text baseline for the header labels. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.'
      },
      labelColor: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The color of the header label, can be in hex color code or regular color name."
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.",
        type: "string"
      },
      labelFont: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font of the header label."
      },
      labelFontSize: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font size of the header label, in pixels.",
        minimum: 0
      },
      labelFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font style of the header label."
      },
      labelFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font weight of the header label."
      },
      labelLimit: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
      },
      labelLineHeight: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Line height in pixels for multi-line header labels or title text with `"line-top"` or `"line-bottom"` baseline.'
      },
      labelOrient: {
        $ref: "#/definitions/Orient",
        description: 'The orientation of the header label. One of `"top"`, `"bottom"`, `"left"` or `"right"`.'
      },
      labelPadding: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`"
      },
      labels: {
        description: "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.",
        type: "boolean"
      },
      orient: {
        $ref: "#/definitions/Orient",
        description: "Shortcut for setting both labelOrient and titleOrient."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      titleAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Horizontal text alignment (to the anchor) of header titles."
      },
      titleAnchor: {
        $ref: "#/definitions/TitleAnchor",
        description: 'The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.'
      },
      titleAngle: {
        description: "The rotation angle of the header title.\n\n__Default value:__ `0`.",
        maximum: 360,
        minimum: -360,
        type: "number"
      },
      titleBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The vertical text baseline for the header title. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\n\n__Default value:__ `"middle"`'
      },
      titleColor: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Color of the header title, can be in hex color code or regular color name."
      },
      titleFont: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Font of the header title. (e.g., `"Helvetica Neue"`).'
      },
      titleFontSize: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Font size of the header title.",
        minimum: 0
      },
      titleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font style of the header title."
      },
      titleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Font weight of the header title. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
      },
      titleLimit: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
      },
      titleLineHeight: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Line height in pixels for multi-line header title text or title text with `"line-top"` or `"line-bottom"` baseline.'
      },
      titleOrient: {
        $ref: "#/definitions/Orient",
        description: 'The orientation of the header title. One of `"top"`, `"bottom"`, `"left"` or `"right"`.'
      },
      titlePadding: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`"
      }
    },
    type: "object"
  },
  HeaderConfig: {
    additionalProperties: !1,
    properties: {
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Horizontal text alignment of header labels. One of `"left"`, `"center"`, or `"right"`.'
      },
      labelAnchor: {
        $ref: "#/definitions/TitleAnchor",
        description: 'The anchor position for placing the labels. One of `"start"`, `"middle"`, or `"end"`. For example, with a label orientation of top these anchor positions map to a left-, center-, or right-aligned label.'
      },
      labelAngle: {
        description: "The rotation angle of the header labels.\n\n__Default value:__ `0` for column header, `-90` for row header.",
        maximum: 360,
        minimum: -360,
        type: "number"
      },
      labelBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The vertical text baseline for the header labels. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.'
      },
      labelColor: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The color of the header label, can be in hex color code or regular color name."
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the header's backing `datum` object.",
        type: "string"
      },
      labelFont: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font of the header label."
      },
      labelFontSize: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font size of the header label, in pixels.",
        minimum: 0
      },
      labelFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font style of the header label."
      },
      labelFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font weight of the header label."
      },
      labelLimit: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The maximum length of the header label in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
      },
      labelLineHeight: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Line height in pixels for multi-line header labels or title text with `"line-top"` or `"line-bottom"` baseline.'
      },
      labelOrient: {
        $ref: "#/definitions/Orient",
        description: 'The orientation of the header label. One of `"top"`, `"bottom"`, `"left"` or `"right"`.'
      },
      labelPadding: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The padding, in pixel, between facet header's label and the plot.\n\n__Default value:__ `10`"
      },
      labels: {
        description: "A boolean flag indicating if labels should be included as part of the header.\n\n__Default value:__ `true`.",
        type: "boolean"
      },
      orient: {
        $ref: "#/definitions/Orient",
        description: "Shortcut for setting both labelOrient and titleOrient."
      },
      title: {
        description: "Set to null to disable title for the axis, legend, or header.",
        type: "null"
      },
      titleAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Horizontal text alignment (to the anchor) of header titles."
      },
      titleAnchor: {
        $ref: "#/definitions/TitleAnchor",
        description: 'The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.'
      },
      titleAngle: {
        description: "The rotation angle of the header title.\n\n__Default value:__ `0`.",
        maximum: 360,
        minimum: -360,
        type: "number"
      },
      titleBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The vertical text baseline for the header title. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `titleLineHeight` rather than `titleFontSize` alone.\n\n__Default value:__ `"middle"`'
      },
      titleColor: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Color of the header title, can be in hex color code or regular color name."
      },
      titleFont: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Font of the header title. (e.g., `"Helvetica Neue"`).'
      },
      titleFontSize: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Font size of the header title.",
        minimum: 0
      },
      titleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The font style of the header title."
      },
      titleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Font weight of the header title. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
      },
      titleLimit: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The maximum length of the header title in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0`, indicating no limit"
      },
      titleLineHeight: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Line height in pixels for multi-line header title text or title text with `"line-top"` or `"line-bottom"` baseline.'
      },
      titleOrient: {
        $ref: "#/definitions/Orient",
        description: 'The orientation of the header title. One of `"top"`, `"bottom"`, `"left"` or `"right"`.'
      },
      titlePadding: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The padding, in pixel, between facet header's title and the label.\n\n__Default value:__ `10`"
      }
    },
    type: "object"
  },
  HexColor: {
    format: "color-hex",
    type: "string"
  },
  ImputeMethod: {
    enum: [
      "value",
      "median",
      "max",
      "min",
      "mean"
    ],
    type: "string"
  },
  ImputeParams: {
    additionalProperties: !1,
    properties: {
      frame: {
        description: "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__:  `[null, null]` indicating that the window includes all objects.",
        items: [
          {
            type: [
              "null",
              "number"
            ]
          },
          {
            type: [
              "null",
              "number"
            ]
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      keyvals: {
        anyOf: [
          {
            items: {},
            type: "array"
          },
          {
            $ref: "#/definitions/ImputeSequence"
          }
        ],
        description: "Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified."
      },
      method: {
        $ref: "#/definitions/ImputeMethod",
        description: 'The imputation method to use for the field value of imputed data objects. One of `"value"`, `"mean"`, `"median"`, `"max"` or `"min"`.\n\n__Default value:__  `"value"`'
      },
      value: {
        description: 'The field value to use when the imputation `method` is `"value"`.'
      }
    },
    type: "object"
  },
  ImputeSequence: {
    additionalProperties: !1,
    properties: {
      start: {
        description: "The starting value of the sequence. __Default value:__ `0`",
        type: "number"
      },
      step: {
        description: "The step value between sequence entries. __Default value:__ `1` or `-1` if `stop < start`",
        type: "number"
      },
      stop: {
        description: "The ending value(exclusive) of the sequence.",
        type: "number"
      }
    },
    required: [
      "stop"
    ],
    type: "object"
  },
  ImputeTransform: {
    additionalProperties: !1,
    properties: {
      frame: {
        description: "A frame specification as a two-element array used to control the window over which the specified method is applied. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. For example, the value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object.\n\n__Default value:__:  `[null, null]` indicating that the window includes all objects.",
        items: [
          {
            type: [
              "null",
              "number"
            ]
          },
          {
            type: [
              "null",
              "number"
            ]
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      groupby: {
        description: "An optional array of fields by which to group the values. Imputation will then be performed on a per-group basis.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      impute: {
        $ref: "#/definitions/FieldName",
        description: "The data field for which the missing values should be imputed."
      },
      key: {
        $ref: "#/definitions/FieldName",
        description: "A key field that uniquely identifies data objects within a group. Missing key values (those occurring in the data but not in the current group) will be imputed."
      },
      keyvals: {
        anyOf: [
          {
            items: {},
            type: "array"
          },
          {
            $ref: "#/definitions/ImputeSequence"
          }
        ],
        description: "Defines the key values that should be considered for imputation. An array of key values or an object defining a [number sequence](https://vega.github.io/vega-lite/docs/impute.html#sequence-def).\n\nIf provided, this will be used in addition to the key values observed within the input data. If not provided, the values will be derived from all unique values of the `key` field. For `impute` in `encoding`, the key field is the x-field if the y-field is imputed, or vice versa.\n\nIf there is no impute grouping, this property _must_ be specified."
      },
      method: {
        $ref: "#/definitions/ImputeMethod",
        description: 'The imputation method to use for the field value of imputed data objects. One of `"value"`, `"mean"`, `"median"`, `"max"` or `"min"`.\n\n__Default value:__  `"value"`'
      },
      value: {
        description: 'The field value to use when the imputation `method` is `"value"`.'
      }
    },
    required: [
      "impute",
      "key"
    ],
    type: "object"
  },
  InlineData: {
    additionalProperties: !1,
    properties: {
      format: {
        $ref: "#/definitions/DataFormat",
        description: "An object that specifies the format for parsing the data."
      },
      name: {
        description: "Provide a placeholder name and bind data at runtime.",
        type: "string"
      },
      values: {
        $ref: "#/definitions/InlineDataset",
        description: "The full data set, included inline. This can be an array of objects or primitive values, an object, or a string. Arrays of primitive values are ingested as objects with a `data` property. Strings are parsed according to the specified format type."
      }
    },
    required: [
      "values"
    ],
    type: "object"
  },
  InlineDataset: {
    anyOf: [
      {
        items: {
          type: "number"
        },
        type: "array"
      },
      {
        items: {
          type: "string"
        },
        type: "array"
      },
      {
        items: {
          type: "boolean"
        },
        type: "array"
      },
      {
        items: {
          type: "object"
        },
        type: "array"
      },
      {
        type: "string"
      },
      {
        type: "object"
      }
    ]
  },
  InputBinding: {
    additionalProperties: !1,
    properties: {
      autocomplete: {
        type: "string"
      },
      debounce: {
        type: "number"
      },
      element: {
        $ref: "#/definitions/Element"
      },
      input: {
        type: "string"
      },
      name: {
        type: "string"
      },
      placeholder: {
        type: "string"
      },
      type: {
        type: "string"
      }
    },
    type: "object"
  },
  Interpolate: {
    enum: [
      "basis",
      "basis-open",
      "basis-closed",
      "bundle",
      "cardinal",
      "cardinal-open",
      "cardinal-closed",
      "catmull-rom",
      "linear",
      "linear-closed",
      "monotone",
      "natural",
      "step",
      "step-before",
      "step-after"
    ],
    maximum: 900,
    minimum: 100,
    type: "string"
  },
  IntervalSelection: {
    additionalProperties: !1,
    properties: {
      bind: {
        const: "scales",
        description: "Establishes a two-way binding between the interval selection and the scales used within the same view. This allows a user to interactively pan and zoom the view.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.",
        type: "string"
      },
      clear: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          }
        ],
        description: "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
      },
      empty: {
        description: "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
        enum: [
          "all",
          "none"
        ],
        type: "string"
      },
      encodings: {
        description: "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/SingleDefUnitChannel"
        },
        type: "array"
      },
      fields: {
        description: "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      init: {
        $ref: "#/definitions/SelectionInitIntervalMapping",
        description: "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
      },
      mark: {
        $ref: "#/definitions/BrushConfig",
        description: "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark`](https://vega.github.io/vega-lite/docs/selection-mark.html) documentation."
      },
      on: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          }
        ],
        description: "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
      },
      resolve: {
        $ref: "#/definitions/SelectionResolution",
        description: "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
      },
      translate: {
        description: "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning.\n\n__Default value:__ `true`, which corresponds to `[mousedown, window:mouseup] > window:mousemove!` which corresponds to clicks and dragging within an interval selection to reposition it.\n\n__See also:__ [`translate`](https://vega.github.io/vega-lite/docs/translate.html) documentation.",
        type: [
          "string",
          "boolean"
        ]
      },
      type: {
        const: "interval",
        description: 'Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `"single"` -- to select a single discrete data value on `click`. - `"multi"` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`. - `"interval"` -- to select a continuous range of data values on `drag`.',
        type: "string"
      },
      zoom: {
        description: "When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported.\n\n__Default value:__ `true`, which corresponds to `wheel!`.\n\n__See also:__ [`zoom`](https://vega.github.io/vega-lite/docs/zoom.html) documentation.",
        type: [
          "string",
          "boolean"
        ]
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  IntervalSelectionConfig: {
    additionalProperties: !1,
    properties: {
      bind: {
        const: "scales",
        description: "Establishes a two-way binding between the interval selection and the scales used within the same view. This allows a user to interactively pan and zoom the view.\n\n__See also:__ [`bind`](https://vega.github.io/vega-lite/docs/bind.html) documentation.",
        type: "string"
      },
      clear: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          }
        ],
        description: "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
      },
      empty: {
        description: "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
        enum: [
          "all",
          "none"
        ],
        type: "string"
      },
      encodings: {
        description: "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/SingleDefUnitChannel"
        },
        type: "array"
      },
      fields: {
        description: "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      init: {
        $ref: "#/definitions/SelectionInitIntervalMapping",
        description: "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and arrays of initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
      },
      mark: {
        $ref: "#/definitions/BrushConfig",
        description: "An interval selection also adds a rectangle mark to depict the extents of the interval. The `mark` property can be used to customize the appearance of the mark.\n\n__See also:__ [`mark`](https://vega.github.io/vega-lite/docs/selection-mark.html) documentation."
      },
      on: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          }
        ],
        description: "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
      },
      resolve: {
        $ref: "#/definitions/SelectionResolution",
        description: "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
      },
      translate: {
        description: "When truthy, allows a user to interactively move an interval selection back-and-forth. Can be `true`, `false` (to disable panning), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/) which must include a start and end event to trigger continuous panning.\n\n__Default value:__ `true`, which corresponds to `[mousedown, window:mouseup] > window:mousemove!` which corresponds to clicks and dragging within an interval selection to reposition it.\n\n__See also:__ [`translate`](https://vega.github.io/vega-lite/docs/translate.html) documentation.",
        type: [
          "string",
          "boolean"
        ]
      },
      zoom: {
        description: "When truthy, allows a user to interactively resize an interval selection. Can be `true`, `false` (to disable zooming), or a [Vega event stream definition](https://vega.github.io/vega/docs/event-streams/). Currently, only `wheel` events are supported.\n\n__Default value:__ `true`, which corresponds to `wheel!`.\n\n__See also:__ [`zoom`](https://vega.github.io/vega-lite/docs/zoom.html) documentation.",
        type: [
          "string",
          "boolean"
        ]
      }
    },
    type: "object"
  },
  JoinAggregateFieldDef: {
    additionalProperties: !1,
    properties: {
      as: {
        $ref: "#/definitions/FieldName",
        description: "The output name for the join aggregate operation."
      },
      field: {
        $ref: "#/definitions/FieldName",
        description: 'The data field for which to compute the aggregate function. This can be omitted for functions that do not operate over a field such as `"count"`.'
      },
      op: {
        $ref: "#/definitions/AggregateOp",
        description: 'The aggregation operation to apply (e.g., `"sum"`, `"average"` or `"count"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/aggregate.html#ops).'
      }
    },
    required: [
      "op",
      "as"
    ],
    type: "object"
  },
  JoinAggregateTransform: {
    additionalProperties: !1,
    properties: {
      groupby: {
        description: "The data fields for partitioning the data objects into separate groups. If unspecified, all data points will be in a single group.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      joinaggregate: {
        description: "The definition of the fields in the join aggregate, and what calculations to use.",
        items: {
          $ref: "#/definitions/JoinAggregateFieldDef"
        },
        type: "array"
      }
    },
    required: [
      "joinaggregate"
    ],
    type: "object"
  },
  JsonDataFormat: {
    additionalProperties: !1,
    properties: {
      parse: {
        anyOf: [
          {
            $ref: "#/definitions/Parse"
          },
          {
            type: "null"
          }
        ],
        description: 'If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `"number"`, `"boolean"`, `"date"`, or null (do not parse the field)). For example, `"parse": {"modified_on": "date"}` parses the `modified_on` field in each input record a Date value.\n\nFor `"date"`, we parse data based using Javascript\'s [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: "date:\'%m%d%Y\'"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: "utc:\'%m%d%Y\'"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)'
      },
      property: {
        description: 'The JSON property containing the desired data. This parameter can be used when the loaded JSON file may have surrounding structure or meta-data. For example `"property": "values.features"` is equivalent to retrieving `json.values.features` from the loaded JSON object.',
        type: "string"
      },
      type: {
        const: "json",
        description: 'Type of input data: `"json"`, `"csv"`, `"tsv"`, `"dsv"`.\n\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `"json"` will be used by default.',
        type: "string"
      }
    },
    type: "object"
  },
  LabelOverlap: {
    anyOf: [
      {
        type: "boolean"
      },
      {
        const: "parity",
        type: "string"
      },
      {
        const: "greedy",
        type: "string"
      }
    ]
  },
  LatLongDef: {
    anyOf: [
      {
        $ref: "#/definitions/LatLongFieldDef"
      },
      {
        $ref: "#/definitions/DatumDef"
      },
      {
        $ref: "#/definitions/NumericValueDef"
      }
    ]
  },
  LatLongFieldDef: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
        type: "null"
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        const: "quantitative",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.',
        type: "string"
      }
    },
    type: "object"
  },
  LayerRepeatMapping: {
    additionalProperties: !1,
    properties: {
      column: {
        description: "An array of fields to be repeated horizontally.",
        items: {
          type: "string"
        },
        type: "array"
      },
      layer: {
        description: "An array of fields to be repeated as layers.",
        items: {
          type: "string"
        },
        type: "array"
      },
      row: {
        description: "An array of fields to be repeated vertically.",
        items: {
          type: "string"
        },
        type: "array"
      }
    },
    required: [
      "layer"
    ],
    type: "object"
  },
  LayerRepeatSpec: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      repeat: {
        $ref: "#/definitions/LayerRepeatMapping",
        description: 'Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed fields to be repeated along the particular orientations. The objects `{"repeat": "row"}` and `{"repeat": "column"}` can be used to refer to the repeated field respectively.'
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      spec: {
        anyOf: [
          {
            $ref: "#/definitions/LayerSpec"
          },
          {
            $ref: "#/definitions/UnitSpec"
          }
        ],
        description: "A specification of the view that gets repeated."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "repeat",
      "spec"
    ],
    type: "object"
  },
  LayerSpec: {
    additionalProperties: !1,
    description: "A full layered plot specification, which may contains `encoding` and `projection` properties that will be applied to underlying unit (single-view) specifications.",
    properties: {
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      encoding: {
        $ref: "#/definitions/SharedEncoding",
        description: "A shared key-value mapping between encoding channels and definition of fields in the underlying layers."
      },
      height: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      },
      layer: {
        description: "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.",
        items: {
          anyOf: [
            {
              $ref: "#/definitions/LayerSpec"
            },
            {
              $ref: "#/definitions/UnitSpec"
            }
          ]
        },
        type: "array"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      projection: {
        $ref: "#/definitions/Projection",
        description: "An object defining properties of the geographic projection shared by underlying layers."
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      view: {
        $ref: "#/definitions/ViewBackground",
        description: `An object defining the view background's fill and stroke.

__Default value:__ none (transparent)`
      },
      width: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      }
    },
    required: [
      "layer"
    ],
    type: "object"
  },
  LayoutAlign: {
    enum: [
      "all",
      "each",
      "none"
    ],
    type: "string"
  },
  Legend: {
    additionalProperties: !1,
    description: "Properties of a legend or boolean flag for determining whether to show it.",
    properties: {
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG group, removing the legend from the ARIA accessibility tree.\n\n__Default value:__ `true`',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      clipHeight: {
        anyOf: [
          {
            description: "The height in pixels to clip symbol legend entries and limit their size.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      columnPadding: {
        anyOf: [
          {
            description: "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      columns: {
        anyOf: [
          {
            description: "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadius: {
        anyOf: [
          {
            description: "Corner radius for the full legend.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      direction: {
        $ref: "#/definitions/Orientation",
        description: 'The direction of the legend, one of `"vertical"` or `"horizontal"`.\n\n__Default value:__ - For top-/bottom-`orient`ed legends, `"horizontal"` - For left-/right-`orient`ed legends, `"vertical"` - For top/bottom-left/right-`orient`ed legends, `"horizontal"` for gradient legends and `"vertical"` for symbol legends.'
      },
      fillColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Background fill color for the full legend."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      gradientLength: {
        anyOf: [
          {
            description: "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientOpacity: {
        anyOf: [
          {
            description: "Opacity of the color gradient.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientStrokeColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `"lightGray"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientStrokeWidth: {
        anyOf: [
          {
            description: "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientThickness: {
        anyOf: [
          {
            description: "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gridAlign: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign",
            description: 'The alignment to apply to symbol legends rows and columns. The supported string values are `"all"`, `"each"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `"each"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: "The alignment of the legend label, can be left, center, or right."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'The position of the baseline of legend label, can be `"top"`, `"middle"`, `"bottom"`, or `"alphabetic"`.\n\n__Default value:__ `"middle"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the legend label, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the legend's backing `datum` object.",
        type: "string"
      },
      labelFont: {
        anyOf: [
          {
            description: "The font of the legend label.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFontSize: {
        anyOf: [
          {
            description: "The font size of legend label.\n\n__Default value:__ `10`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "The font style of legend label."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: "The font weight of legend label."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOffset: {
        anyOf: [
          {
            description: "The offset of the legend label.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOpacity: {
        anyOf: [
          {
            description: "Opacity of labels.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOverlap: {
        anyOf: [
          {
            $ref: "#/definitions/LabelOverlap",
            description: 'The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` (default) or `"parity"`, a strategy of removing every other label is used. If set to `"greedy"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `true`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelPadding: {
        anyOf: [
          {
            description: "Padding in pixels between the legend and legend labels.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelSeparation: {
        anyOf: [
          {
            description: "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      legendX: {
        anyOf: [
          {
            description: 'Custom x-position for legend with orient "none".',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      legendY: {
        anyOf: [
          {
            description: 'Custom y-position for legend with orient "none".',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      offset: {
        anyOf: [
          {
            description: "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      orient: {
        $ref: "#/definitions/LegendOrient",
        description: 'The orientation of the legend, which determines how the legend is positioned within the scene. One of `"left"`, `"right"`, `"top"`, `"bottom"`, `"top-left"`, `"top-right"`, `"bottom-left"`, `"bottom-right"`, `"none"`.\n\n__Default value:__ `"right"`'
      },
      padding: {
        anyOf: [
          {
            description: "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      rowPadding: {
        anyOf: [
          {
            description: "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Border stroke color for the full legend."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed symbol strokes.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the symbol stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolFillColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the legend symbol,"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolLimit: {
        anyOf: [
          {
            description: "The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolOffset: {
        anyOf: [
          {
            description: "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolOpacity: {
        anyOf: [
          {
            description: "Opacity of the legend symbols.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolSize: {
        anyOf: [
          {
            description: "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolStrokeColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Stroke color for legend symbols."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolStrokeWidth: {
        anyOf: [
          {
            description: "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolType: {
        anyOf: [
          {
            $ref: "#/definitions/SymbolShape",
            description: 'The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `"circle"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickCount: {
        anyOf: [
          {
            $ref: "#/definitions/TickCount",
            description: "The desired number of tick values for quantitative legends."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickMinStep: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The minimum desired step between legend ticks, in terms of scale domain values. For example, a value of `1` indicates that ticks should not be less than 1 unit apart. If `tickMinStep` is specified, the `tickCount` value will be adjusted, if necessary, to enforce the minimum step value.\n\n__Default value__: `undefined`"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      titleAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: 'Horizontal text alignment for legend titles.\n\n__Default value:__ `"left"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleAnchor: {
        anyOf: [
          {
            $ref: "#/definitions/TitleAnchor",
            description: "Text anchor position for placing legend titles."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'Vertical text baseline for legend titles.  One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\n\n__Default value:__ `"top"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the legend title, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFont: {
        anyOf: [
          {
            description: "The font of the legend title.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontSize: {
        anyOf: [
          {
            description: "The font size of the legend title.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "The font style of the legend title."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight of the legend title. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line title text or title text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleOpacity: {
        anyOf: [
          {
            description: "Opacity of the legend title.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleOrient: {
        anyOf: [
          {
            $ref: "#/definitions/Orient",
            description: "Orientation of the legend title."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titlePadding: {
        anyOf: [
          {
            description: "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      type: {
        description: 'The type of the legend. Use `"symbol"` to create a discrete legend and `"gradient"` for a continuous color gradient.\n\n__Default value:__ `"gradient"` for non-binned quantitative fields and temporal fields; `"symbol"` otherwise.',
        enum: [
          "symbol",
          "gradient"
        ],
        type: "string"
      },
      values: {
        anyOf: [
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          },
          {
            items: {
              type: "boolean"
            },
            type: "array"
          },
          {
            items: {
              $ref: "#/definitions/DateTime"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Explicitly set the visible legend values."
      },
      zindex: {
        description: "A non-negative integer indicating the z-index of the legend. If zindex is 0, legend should be drawn behind all chart elements. To put them in front, use zindex = 1.",
        minimum: 0,
        type: "number"
      }
    },
    type: "object"
  },
  LegendBinding: {
    anyOf: [
      {
        const: "legend",
        type: "string"
      },
      {
        $ref: "#/definitions/LegendStreamBinding"
      }
    ]
  },
  LegendConfig: {
    additionalProperties: !1,
    properties: {
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG group, removing the legend from the ARIA accessibility tree.\n\n__Default value:__ `true`',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      clipHeight: {
        anyOf: [
          {
            description: "The height in pixels to clip symbol legend entries and limit their size.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      columnPadding: {
        anyOf: [
          {
            description: "The horizontal padding in pixels between symbol legend entries.\n\n__Default value:__ `10`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      columns: {
        anyOf: [
          {
            description: "The number of columns in which to arrange symbol legend entries. A value of `0` or lower indicates a single row with one column per entry.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadius: {
        anyOf: [
          {
            description: "Corner radius for the full legend.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of this legend for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If the `aria` property is true, for SVG output the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute) will be set to this description. If the description is unspecified it will be automatically generated.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      direction: {
        $ref: "#/definitions/Orientation",
        description: 'The direction of the legend, one of `"vertical"` or `"horizontal"`.\n\n__Default value:__ - For top-/bottom-`orient`ed legends, `"horizontal"` - For left-/right-`orient`ed legends, `"vertical"` - For top/bottom-left/right-`orient`ed legends, `"horizontal"` for gradient legends and `"vertical"` for symbol legends.'
      },
      disable: {
        description: "Disable legend by default",
        type: "boolean"
      },
      fillColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Background fill color for the full legend."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientDirection: {
        anyOf: [
          {
            $ref: "#/definitions/Orientation",
            description: 'The default direction (`"horizontal"` or `"vertical"`) for gradient legends.\n\n__Default value:__ `"vertical"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientHorizontalMaxLength: {
        description: "Max legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`",
        type: "number"
      },
      gradientHorizontalMinLength: {
        description: "Min legend length for a horizontal gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`",
        type: "number"
      },
      gradientLabelLimit: {
        anyOf: [
          {
            description: "The maximum allowed length in pixels of color ramp gradient labels.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientLabelOffset: {
        anyOf: [
          {
            description: "Vertical offset in pixels for color ramp gradient labels.\n\n__Default value:__ `2`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientLength: {
        anyOf: [
          {
            description: "The length in pixels of the primary axis of a color gradient. This value corresponds to the height of a vertical gradient or the width of a horizontal gradient.\n\n__Default value:__ `200`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientOpacity: {
        anyOf: [
          {
            description: "Opacity of the color gradient.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientStrokeColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'The color of the gradient stroke, can be in hex color code or regular color name.\n\n__Default value:__ `"lightGray"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientStrokeWidth: {
        anyOf: [
          {
            description: "The width of the gradient stroke, in pixels.\n\n__Default value:__ `0`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientThickness: {
        anyOf: [
          {
            description: "The thickness in pixels of the color gradient. This value corresponds to the width of a vertical gradient or the height of a horizontal gradient.\n\n__Default value:__ `16`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      gradientVerticalMaxLength: {
        description: "Max legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `200`",
        type: "number"
      },
      gradientVerticalMinLength: {
        description: "Min legend length for a vertical gradient when `config.legend.gradientLength` is undefined.\n\n__Default value:__ `100`",
        type: "number"
      },
      gridAlign: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign",
            description: 'The alignment to apply to symbol legends rows and columns. The supported string values are `"all"`, `"each"` (the default), and `none`. For more information, see the [grid layout documentation](https://vega.github.io/vega/docs/layout).\n\n__Default value:__ `"each"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: "The alignment of the legend label, can be left, center, or right."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'The position of the baseline of legend label, can be `"top"`, `"middle"`, `"bottom"`, or `"alphabetic"`.\n\n__Default value:__ `"middle"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the legend label, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFont: {
        anyOf: [
          {
            description: "The font of the legend label.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFontSize: {
        anyOf: [
          {
            description: "The font size of legend label.\n\n__Default value:__ `10`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "The font style of legend label."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: "The font weight of legend label."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of legend tick labels.\n\n__Default value:__ `160`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOffset: {
        anyOf: [
          {
            description: "The offset of the legend label.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOpacity: {
        anyOf: [
          {
            description: "Opacity of labels.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelOverlap: {
        anyOf: [
          {
            $ref: "#/definitions/LabelOverlap"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The strategy to use for resolving overlap of labels in gradient legends. If `false`, no overlap reduction is attempted. If set to `true` or `"parity"`, a strategy of removing every other label is used. If set to `"greedy"`, a linear scan of the labels is performed, removing any label that overlaps with the last visible label (this often works better for log-scaled axes).\n\n__Default value:__ `"greedy"` for `log scales otherwise `true`.'
      },
      labelPadding: {
        anyOf: [
          {
            description: "Padding in pixels between the legend and legend labels.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      labelSeparation: {
        anyOf: [
          {
            description: "The minimum separation that must be between label bounding boxes for them to be considered non-overlapping (default `0`). This property is ignored if *labelOverlap* resolution is not enabled.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      layout: {
        $ref: "#/definitions/ExprRef"
      },
      legendX: {
        anyOf: [
          {
            description: 'Custom x-position for legend with orient "none".',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      legendY: {
        anyOf: [
          {
            description: 'Custom y-position for legend with orient "none".',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      offset: {
        anyOf: [
          {
            description: "The offset in pixels by which to displace the legend from the data rectangle and axes.\n\n__Default value:__ `18`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      orient: {
        $ref: "#/definitions/LegendOrient",
        description: 'The orientation of the legend, which determines how the legend is positioned within the scene. One of `"left"`, `"right"`, `"top"`, `"bottom"`, `"top-left"`, `"top-right"`, `"bottom-left"`, `"bottom-right"`, `"none"`.\n\n__Default value:__ `"right"`'
      },
      padding: {
        anyOf: [
          {
            description: "The padding between the border and content of the legend group.\n\n__Default value:__ `0`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      rowPadding: {
        anyOf: [
          {
            description: "The vertical padding in pixels between symbol legend entries.\n\n__Default value:__ `2`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Border stroke color for the full legend."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "Border stroke dash pattern for the full legend.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "Border stroke width for the full legend.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolBaseFillColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'Default fill color for legend symbols. Only applied if there is no `"fill"` scale color encoding for the legend.\n\n__Default value:__ `"transparent"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolBaseStrokeColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: 'Default stroke color for legend symbols. Only applied if there is no `"fill"` scale color encoding for the legend.\n\n__Default value:__ `"gray"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolDash: {
        anyOf: [
          {
            description: "An array of alternating [stroke, space] lengths for dashed symbol strokes.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolDashOffset: {
        anyOf: [
          {
            description: "The pixel offset at which to start drawing with the symbol stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolDirection: {
        anyOf: [
          {
            $ref: "#/definitions/Orientation",
            description: 'The default direction (`"horizontal"` or `"vertical"`) for symbol legends.\n\n__Default value:__ `"vertical"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolFillColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the legend symbol,"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolLimit: {
        anyOf: [
          {
            description: "The maximum number of allowed entries for a symbol legend. Additional entries will be dropped.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolOffset: {
        anyOf: [
          {
            description: "Horizontal pixel offset for legend symbols.\n\n__Default value:__ `0`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolOpacity: {
        anyOf: [
          {
            description: "Opacity of the legend symbols.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolSize: {
        anyOf: [
          {
            description: "The size of the legend symbol, in pixels.\n\n__Default value:__ `100`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolStrokeColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Stroke color for legend symbols."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolStrokeWidth: {
        anyOf: [
          {
            description: "The width of the symbol's stroke.\n\n__Default value:__ `1.5`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      symbolType: {
        anyOf: [
          {
            $ref: "#/definitions/SymbolShape",
            description: 'The symbol shape. One of the plotting shapes `circle` (default), `square`, `cross`, `diamond`, `triangle-up`, `triangle-down`, `triangle-right`, or `triangle-left`, the line symbol `stroke`, or one of the centered directional shapes `arrow`, `wedge`, or `triangle`. Alternatively, a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) can be provided. For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.\n\n__Default value:__ `"circle"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tickCount: {
        anyOf: [
          {
            $ref: "#/definitions/TickCount",
            description: "The desired number of tick values for quantitative legends."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      title: {
        description: "Set to null to disable title for the axis, legend, or header.",
        type: "null"
      },
      titleAlign: {
        anyOf: [
          {
            $ref: "#/definitions/Align",
            description: 'Horizontal text alignment for legend titles.\n\n__Default value:__ `"left"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleAnchor: {
        anyOf: [
          {
            $ref: "#/definitions/TitleAnchor",
            description: "Text anchor position for placing legend titles."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleBaseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline",
            description: 'Vertical text baseline for legend titles.  One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.\n\n__Default value:__ `"top"`.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "The color of the legend title, can be in hex color code or regular color name."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFont: {
        anyOf: [
          {
            description: "The font of the legend title.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontSize: {
        anyOf: [
          {
            description: "The font size of the legend title.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "The font style of the legend title."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight of the legend title. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLimit: {
        anyOf: [
          {
            description: "Maximum allowed pixel width of legend titles.\n\n__Default value:__ `180`.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleLineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line title text or title text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleOpacity: {
        anyOf: [
          {
            description: "Opacity of the legend title.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titleOrient: {
        anyOf: [
          {
            $ref: "#/definitions/Orient",
            description: "Orientation of the legend title."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      titlePadding: {
        anyOf: [
          {
            description: "The padding, in pixels, between title and legend.\n\n__Default value:__ `5`.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      unselectedOpacity: {
        description: `The opacity of unselected legend entries.

__Default value:__ 0.35.`,
        type: "number"
      },
      zindex: {
        anyOf: [
          {
            description: "The integer z-index indicating the layering of the legend group relative to other axis, mark, and legend groups.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      }
    },
    type: "object"
  },
  LegendOrient: {
    enum: [
      "none",
      "left",
      "right",
      "top",
      "bottom",
      "top-left",
      "top-right",
      "bottom-left",
      "bottom-right"
    ],
    type: "string"
  },
  LegendResolveMap: {
    additionalProperties: !1,
    properties: {
      angle: {
        $ref: "#/definitions/ResolveMode"
      },
      color: {
        $ref: "#/definitions/ResolveMode"
      },
      fill: {
        $ref: "#/definitions/ResolveMode"
      },
      fillOpacity: {
        $ref: "#/definitions/ResolveMode"
      },
      opacity: {
        $ref: "#/definitions/ResolveMode"
      },
      shape: {
        $ref: "#/definitions/ResolveMode"
      },
      size: {
        $ref: "#/definitions/ResolveMode"
      },
      stroke: {
        $ref: "#/definitions/ResolveMode"
      },
      strokeDash: {
        $ref: "#/definitions/ResolveMode"
      },
      strokeOpacity: {
        $ref: "#/definitions/ResolveMode"
      },
      strokeWidth: {
        $ref: "#/definitions/ResolveMode"
      }
    },
    type: "object"
  },
  LegendStreamBinding: {
    additionalProperties: !1,
    properties: {
      legend: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Stream"
          }
        ]
      }
    },
    required: [
      "legend"
    ],
    type: "object"
  },
  LineConfig: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      point: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/OverlayMarkDef"
          },
          {
            const: "transparent",
            type: "string"
          }
        ],
        description: 'A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `"transparent"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`.'
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  LinearGradient: {
    additionalProperties: !1,
    properties: {
      gradient: {
        const: "linear",
        description: 'The type of gradient. Use `"linear"` for a linear gradient.',
        type: "string"
      },
      id: {
        type: "string"
      },
      stops: {
        description: "An array of gradient stops defining the gradient color sequence.",
        items: {
          $ref: "#/definitions/GradientStop"
        },
        type: "array"
      },
      x1: {
        description: "The starting x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`",
        type: "number"
      },
      x2: {
        description: "The ending x-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `1`",
        type: "number"
      },
      y1: {
        description: "The starting y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`",
        type: "number"
      },
      y2: {
        description: "The ending y-coordinate, in normalized [0, 1] coordinates, of the linear gradient.\n\n__Default value:__ `0`",
        type: "number"
      }
    },
    required: [
      "gradient",
      "stops"
    ],
    type: "object"
  },
  LocalMultiTimeUnit: {
    enum: [
      "yearquarter",
      "yearquartermonth",
      "yearmonth",
      "yearmonthdate",
      "yearmonthdatehours",
      "yearmonthdatehoursminutes",
      "yearmonthdatehoursminutesseconds",
      "yearweek",
      "yearweekday",
      "yearweekdayhours",
      "yearweekdayhoursminutes",
      "yearweekdayhoursminutesseconds",
      "yeardayofyear",
      "quartermonth",
      "monthdate",
      "monthdatehours",
      "monthdatehoursminutes",
      "monthdatehoursminutesseconds",
      "weekday",
      "weeksdayhours",
      "weekdayhoursminutes",
      "weekdayhoursminutesseconds",
      "dayhours",
      "dayhoursminutes",
      "dayhoursminutesseconds",
      "hoursminutes",
      "hoursminutesseconds",
      "minutesseconds",
      "secondsmilliseconds"
    ],
    type: "string"
  },
  LocalSingleTimeUnit: {
    enum: [
      "year",
      "quarter",
      "month",
      "week",
      "day",
      "dayofyear",
      "date",
      "hours",
      "minutes",
      "seconds",
      "milliseconds"
    ],
    type: "string"
  },
  LoessTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        description: `The output field names for the smoothed points generated by the loess transform.

__Default value:__ The field names of the input x and y values.`,
        items: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            $ref: "#/definitions/FieldName"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      bandwidth: {
        description: "A bandwidth parameter in the range `[0, 1]` that determines the amount of smoothing.\n\n__Default value:__ `0.3`",
        type: "number"
      },
      groupby: {
        description: "The data fields to group by. If not specified, a single group containing all data objects will be used.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      loess: {
        $ref: "#/definitions/FieldName",
        description: "The data field of the dependent variable to smooth."
      },
      on: {
        $ref: "#/definitions/FieldName",
        description: "The data field of the independent variable to use a predictor."
      }
    },
    required: [
      "loess",
      "on"
    ],
    type: "object"
  },
  "LogicalAnd<Predicate>": {
    additionalProperties: !1,
    properties: {
      and: {
        items: {
          $ref: "#/definitions/PredicateComposition"
        },
        type: "array"
      }
    },
    required: [
      "and"
    ],
    type: "object"
  },
  SelectionAnd: {
    additionalProperties: !1,
    properties: {
      and: {
        items: {
          $ref: "#/definitions/SelectionComposition"
        },
        type: "array"
      }
    },
    required: [
      "and"
    ],
    type: "object"
  },
  PredicateComposition: {
    anyOf: [
      {
        $ref: "#/definitions/LogicalNot<Predicate>"
      },
      {
        $ref: "#/definitions/LogicalAnd<Predicate>"
      },
      {
        $ref: "#/definitions/LogicalOr<Predicate>"
      },
      {
        $ref: "#/definitions/Predicate"
      }
    ]
  },
  SelectionComposition: {
    anyOf: [
      {
        $ref: "#/definitions/SelectionNot"
      },
      {
        $ref: "#/definitions/SelectionAnd"
      },
      {
        $ref: "#/definitions/SelectionOr"
      },
      {
        type: "string"
      }
    ]
  },
  "LogicalNot<Predicate>": {
    additionalProperties: !1,
    properties: {
      not: {
        $ref: "#/definitions/PredicateComposition"
      }
    },
    required: [
      "not"
    ],
    type: "object"
  },
  SelectionNot: {
    additionalProperties: !1,
    properties: {
      not: {
        $ref: "#/definitions/SelectionComposition"
      }
    },
    required: [
      "not"
    ],
    type: "object"
  },
  "LogicalOr<Predicate>": {
    additionalProperties: !1,
    properties: {
      or: {
        items: {
          $ref: "#/definitions/PredicateComposition"
        },
        type: "array"
      }
    },
    required: [
      "or"
    ],
    type: "object"
  },
  SelectionOr: {
    additionalProperties: !1,
    properties: {
      or: {
        items: {
          $ref: "#/definitions/SelectionComposition"
        },
        type: "array"
      }
    },
    required: [
      "or"
    ],
    type: "object"
  },
  LookupData: {
    additionalProperties: !1,
    properties: {
      data: {
        $ref: "#/definitions/Data",
        description: "Secondary data source to lookup in."
      },
      fields: {
        description: "Fields in foreign data or selection to lookup. If not specified, the entire object is queried.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      key: {
        $ref: "#/definitions/FieldName",
        description: "Key in data to lookup."
      }
    },
    required: [
      "data",
      "key"
    ],
    type: "object"
  },
  LookupSelection: {
    additionalProperties: !1,
    properties: {
      fields: {
        description: "Fields in foreign data or selection to lookup. If not specified, the entire object is queried.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      key: {
        $ref: "#/definitions/FieldName",
        description: "Key in data to lookup."
      },
      selection: {
        description: "Selection name to look up.",
        type: "string"
      }
    },
    required: [
      "key",
      "selection"
    ],
    type: "object"
  },
  LookupTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        anyOf: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            items: {
              $ref: "#/definitions/FieldName"
            },
            type: "array"
          }
        ],
        description: "The output fields on which to store the looked up data values.\n\nFor data lookups, this property may be left blank if `from.fields` has been specified (those field names will be used); if `from.fields` has not been specified, `as` must be a string.\n\nFor selection lookups, this property is optional: if unspecified, looked up values will be stored under a property named for the selection; and if specified, it must correspond to `from.fields`."
      },
      default: {
        description: "The default value to use if lookup fails.\n\n__Default value:__ `null`",
        type: "string"
      },
      from: {
        anyOf: [
          {
            $ref: "#/definitions/LookupData"
          },
          {
            $ref: "#/definitions/LookupSelection"
          }
        ],
        description: "Data source or selection for secondary data reference."
      },
      lookup: {
        description: "Key in primary data source.",
        type: "string"
      }
    },
    required: [
      "lookup",
      "from"
    ],
    type: "object"
  },
  Mark: {
    description: "All types of primitive marks.",
    enum: [
      "arc",
      "area",
      "bar",
      "image",
      "line",
      "point",
      "rect",
      "rule",
      "text",
      "tick",
      "trail",
      "circle",
      "square",
      "geoshape"
    ],
    type: "string"
  },
  "MarkConfig<>": {
    additionalProperties: !1,
    properties: {
      align: {
        $ref: "#/definitions/Align",
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        description: "The rotation angle of the text, in degrees.",
        maximum: 360,
        minimum: 0,
        type: "number"
      },
      aria: {
        description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
        type: "boolean"
      },
      ariaRole: {
        description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
        type: "string"
      },
      ariaRoleDescription: {
        description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
        type: "string"
      },
      aspect: {
        description: "Whether to keep aspect ratio of image marks.",
        type: "boolean"
      },
      baseline: {
        $ref: "#/definitions/TextBaseline",
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      blend: {
        $ref: "#/definitions/Blend",
        description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      cornerRadius: {
        description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
        type: "number"
      },
      cornerRadiusBottomLeft: {
        description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
        type: "number"
      },
      cornerRadiusBottomRight: {
        description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
        type: "number"
      },
      cornerRadiusTopLeft: {
        description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
        type: "number"
      },
      cornerRadiusTopRight: {
        description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
        type: "number"
      },
      cursor: {
        $ref: "#/definitions/Cursor",
        description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
      },
      description: {
        description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
        type: "string"
      },
      dir: {
        $ref: "#/definitions/TextDirection",
        description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
      },
      dx: {
        description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
        type: "number"
      },
      dy: {
        description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
        type: "number"
      },
      ellipsis: {
        description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
        type: "string"
      },
      endAngle: {
        description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
        type: "number"
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
        type: "string"
      },
      fontSize: {
        description: "The font size, in pixels.\n\n__Default value:__ `11`",
        minimum: 0,
        type: "number"
      },
      fontStyle: {
        $ref: "#/definitions/FontStyle",
        description: 'The font style (e.g., `"italic"`).'
      },
      fontWeight: {
        $ref: "#/definitions/FontWeight",
        description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
      },
      height: {
        description: "Height of the marks.",
        type: "number"
      },
      href: {
        $ref: "#/definitions/URI",
        description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
      },
      innerRadius: {
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`.",
        type: "number"
      },
      interpolate: {
        $ref: "#/definitions/Interpolate",
        description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
        type: "number"
      },
      lineBreak: {
        description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
        type: "string"
      },
      lineHeight: {
        description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
        type: "number"
      },
      opacity: {
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`.",
        type: "number"
      },
      padAngle: {
        description: "The angular padding applied to sides of the arc, in radians.",
        type: "number"
      },
      radius: {
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties.",
        type: "number"
      },
      radius2: {
        description: "The secondary (inner) radius in pixels of arc marks.",
        type: "number"
      },
      shape: {
        anyOf: [
          {
            $ref: "#/definitions/SymbolShape"
          },
          {
            type: "string"
          }
        ],
        description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
      },
      size: {
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0,
        type: "number"
      },
      smooth: {
        description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
        type: "boolean"
      },
      startAngle: {
        description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
        type: "number"
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        $ref: "#/definitions/StrokeCap",
        description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
      },
      strokeDash: {
        description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
        items: {
          type: "number"
        },
        type: "array"
      },
      strokeDashOffset: {
        description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
        type: "number"
      },
      strokeJoin: {
        $ref: "#/definitions/StrokeJoin",
        description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
      },
      strokeMiterLimit: {
        description: "The miter limit at which to bevel a line join.",
        type: "number"
      },
      strokeOffset: {
        description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
        type: "number"
      },
      strokeOpacity: {
        description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      strokeWidth: {
        description: "The stroke width, in pixels.",
        minimum: 0,
        type: "number"
      },
      tension: {
        description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
        type: "number"
      },
      text: {
        $ref: "#/definitions/Text",
        description: "Placeholder text if the `text` channel is not specified"
      },
      theta: {
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0,
        type: "number"
      },
      theta2: {
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise.",
        type: "number"
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        $ref: "#/definitions/URI",
        description: "The URL of the image file for image marks."
      },
      width: {
        description: "Width of the marks.",
        type: "number"
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  "MarkConfig<ExprOrSignalRef>": {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprOrSignalRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  MarkConfig: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  MarkDef: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      bandSize: {
        description: `The width of the ticks.

__Default value:__  3/4 of step (width step for horizontal ticks and height step for vertical ticks).`,
        minimum: 0,
        type: "number"
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      binSpacing: {
        description: "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`",
        minimum: 0,
        type: "number"
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      clip: {
        description: "Whether a mark be clipped to the enclosing group’s width and height.",
        type: "boolean"
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      continuousBandSize: {
        description: "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
        minimum: 0,
        type: "number"
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusEnd: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "- For vertical bars, top-left and top-right corner radius. - For horizontal bars, top-right and bottom-right corner radius."
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      discreteBandSize: {
        description: "The default size of the bars with discrete dimensions. If unspecified, the default size is  `step-2`, which provides 2 pixel offset between bars.",
        minimum: 0,
        type: "number"
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      line: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/OverlayMarkDef"
          }
        ],
        description: "A flag for overlaying line on top of area marks, or an object defining the properties of the overlayed lines.\n\n- If this value is an empty object (`{}`) or `true`, lines with default properties will be used.\n\n- If this value is `false`, no lines would be automatically added to area marks.\n\n__Default value:__ `false`."
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      point: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/OverlayMarkDef"
          },
          {
            const: "transparent",
            type: "string"
          }
        ],
        description: 'A flag for overlaying points on top of line or area marks, or an object defining the properties of the overlayed points.\n\n- If this property is `"transparent"`, transparent points will be used (for enhancing tooltips and selections).\n\n- If this property is an empty object (`{}`) or `true`, filled points with default properties will be used.\n\n- If this property is `false`, no points would be automatically added to line or area marks.\n\n__Default value:__ `false`.'
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      radius2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for radius2."
      },
      radiusOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for radius."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      style: {
        anyOf: [
          {
            type: "string"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          }
        ],
        description: 'A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark\'s name. For example, a bar mark will have style `"bar"` by default. __Note:__ Any specified style will augment the default style. For example, a bar mark with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo` (the specified style `"foo"` has higher precedence).'
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      theta2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for theta2."
      },
      thetaOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for theta."
      },
      thickness: {
        description: "Thickness of the tick mark.\n\n__Default value:__  `1`",
        minimum: 0,
        type: "number"
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      type: {
        $ref: "#/definitions/Mark",
        description: 'The mark type. This could a primitive mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"geoshape"`, `"rule"`, and `"text"`) or a composite mark type (`"boxplot"`, `"errorband"`, `"errorbar"`).'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for x2-position."
      },
      xOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for x-position."
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for y2-position."
      },
      yOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for y-position."
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  "MarkPropDef<(Gradient|string|null)>": {
    anyOf: [
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,(Gradient|string|null)>"
      },
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<DatumDef,(Gradient|string|null)>"
      },
      {
        $ref: "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>"
      }
    ]
  },
  "MarkPropDef<(string|null),TypeForShape>": {
    anyOf: [
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef<TypeForShape>,(string|null)>"
      },
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<DatumDef,(string|null)>"
      },
      {
        $ref: "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>"
      }
    ]
  },
  "MarkPropDef<number>": {
    anyOf: [
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number>"
      },
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<DatumDef,number>"
      },
      {
        $ref: "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number>"
      }
    ]
  },
  "MarkPropDef<number[]>": {
    anyOf: [
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<MarkPropFieldDef,number[]>"
      },
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<DatumDef,number[]>"
      },
      {
        $ref: "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>"
      }
    ]
  },
  MarkType: {
    enum: [
      "arc",
      "area",
      "image",
      "group",
      "line",
      "path",
      "rect",
      "rule",
      "shape",
      "symbol",
      "text",
      "trail"
    ],
    type: "string"
  },
  MergedStream: {
    additionalProperties: !1,
    properties: {
      between: {
        items: {
          $ref: "#/definitions/Stream"
        },
        type: "array"
      },
      consume: {
        type: "boolean"
      },
      debounce: {
        type: "number"
      },
      filter: {
        anyOf: [
          {
            $ref: "#/definitions/Expr"
          },
          {
            items: {
              $ref: "#/definitions/Expr"
            },
            type: "array"
          }
        ]
      },
      markname: {
        type: "string"
      },
      marktype: {
        $ref: "#/definitions/MarkType"
      },
      merge: {
        items: {
          $ref: "#/definitions/Stream"
        },
        type: "array"
      },
      throttle: {
        type: "number"
      }
    },
    required: [
      "merge"
    ],
    type: "object"
  },
  Month: {
    maximum: 12,
    minimum: 1,
    type: "number"
  },
  MultiSelection: {
    additionalProperties: !1,
    properties: {
      bind: {
        $ref: "#/definitions/LegendBinding",
        description: "When set, a selection is populated by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding."
      },
      clear: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          }
        ],
        description: "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
      },
      empty: {
        description: "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
        enum: [
          "all",
          "none"
        ],
        type: "string"
      },
      encodings: {
        description: "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/SingleDefUnitChannel"
        },
        type: "array"
      },
      fields: {
        description: "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      init: {
        description: "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial value (or array of values).\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation.",
        items: {
          $ref: "#/definitions/SelectionInitMapping"
        },
        type: "array"
      },
      nearest: {
        description: "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
        type: "boolean"
      },
      on: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          }
        ],
        description: "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
      },
      resolve: {
        $ref: "#/definitions/SelectionResolution",
        description: "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
      },
      toggle: {
        description: 'Controls whether data values should be toggled or only ever inserted into multi selections. Can be `true`, `false` (for insertion only), or a [Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e., data values are toggled when a user interacts with the shift-key pressed).\n\nSetting the value to the Vega expression `"true"` will toggle data values without the user pressing the shift-key.\n\n__See also:__ [`toggle`](https://vega.github.io/vega-lite/docs/toggle.html) documentation.',
        type: [
          "string",
          "boolean"
        ]
      },
      type: {
        const: "multi",
        description: 'Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `"single"` -- to select a single discrete data value on `click`. - `"multi"` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`. - `"interval"` -- to select a continuous range of data values on `drag`.',
        type: "string"
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  MultiSelectionConfig: {
    additionalProperties: !1,
    properties: {
      bind: {
        $ref: "#/definitions/LegendBinding",
        description: "When set, a selection is populated by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [`on`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.\n\nLegend bindings are restricted to selections that only specify a single field or encoding."
      },
      clear: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          }
        ],
        description: "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
      },
      empty: {
        description: "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
        enum: [
          "all",
          "none"
        ],
        type: "string"
      },
      encodings: {
        description: "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/SingleDefUnitChannel"
        },
        type: "array"
      },
      fields: {
        description: "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      init: {
        description: "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and an initial value (or array of values).\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation.",
        items: {
          $ref: "#/definitions/SelectionInitMapping"
        },
        type: "array"
      },
      nearest: {
        description: "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
        type: "boolean"
      },
      on: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          }
        ],
        description: "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
      },
      resolve: {
        $ref: "#/definitions/SelectionResolution",
        description: "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
      },
      toggle: {
        description: 'Controls whether data values should be toggled or only ever inserted into multi selections. Can be `true`, `false` (for insertion only), or a [Vega expression](https://vega.github.io/vega/docs/expressions/).\n\n__Default value:__ `true`, which corresponds to `event.shiftKey` (i.e., data values are toggled when a user interacts with the shift-key pressed).\n\nSetting the value to the Vega expression `"true"` will toggle data values without the user pressing the shift-key.\n\n__See also:__ [`toggle`](https://vega.github.io/vega-lite/docs/toggle.html) documentation.',
        type: [
          "string",
          "boolean"
        ]
      }
    },
    type: "object"
  },
  MultiTimeUnit: {
    anyOf: [
      {
        $ref: "#/definitions/LocalMultiTimeUnit"
      },
      {
        $ref: "#/definitions/UtcMultiTimeUnit"
      }
    ]
  },
  NamedData: {
    additionalProperties: !1,
    properties: {
      format: {
        $ref: "#/definitions/DataFormat",
        description: "An object that specifies the format for parsing the data."
      },
      name: {
        description: "Provide a placeholder name and bind data at runtime.",
        type: "string"
      }
    },
    required: [
      "name"
    ],
    type: "object"
  },
  NonArgAggregateOp: {
    enum: [
      "average",
      "count",
      "distinct",
      "max",
      "mean",
      "median",
      "min",
      "missing",
      "product",
      "q1",
      "q3",
      "ci0",
      "ci1",
      "stderr",
      "stdev",
      "stdevp",
      "sum",
      "valid",
      "values",
      "variance",
      "variancep"
    ],
    type: "string"
  },
  NonLayerRepeatSpec: {
    additionalProperties: !1,
    description: "Base interface for a repeat specification.",
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      repeat: {
        anyOf: [
          {
            items: {
              type: "string"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/RepeatMapping"
          }
        ],
        description: 'Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed fields to be repeated along the particular orientations. The objects `{"repeat": "row"}` and `{"repeat": "column"}` can be used to refer to the repeated field respectively.'
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      spec: {
        $ref: "#/definitions/Spec",
        description: "A specification of the view that gets repeated."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      }
    },
    required: [
      "repeat",
      "spec"
    ],
    type: "object"
  },
  NumericArrayMarkPropDef: {
    $ref: "#/definitions/MarkPropDef<number[]>"
  },
  NumericMarkPropDef: {
    $ref: "#/definitions/MarkPropDef<number>"
  },
  NumericValueDef: {
    $ref: "#/definitions/ValueDef<(number|ExprRef)>"
  },
  OrderFieldDef: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      sort: {
        $ref: "#/definitions/SortOrder",
        description: 'The sort order. One of `"ascending"` (default) or `"descending"`.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  OrderValueDef: {
    additionalProperties: !1,
    properties: {
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalValueDef<number>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<number>"
            },
            type: "array"
          }
        ],
        description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
      },
      value: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "value"
    ],
    type: "object"
  },
  Orient: {
    enum: [
      "left",
      "right",
      "top",
      "bottom"
    ],
    type: "string"
  },
  Orientation: {
    enum: [
      "horizontal",
      "vertical"
    ],
    type: "string"
  },
  OverlayMarkDef: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      clip: {
        description: "Whether a mark be clipped to the enclosing group’s width and height.",
        type: "boolean"
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      radius2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for radius2."
      },
      radiusOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for radius."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      style: {
        anyOf: [
          {
            type: "string"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          }
        ],
        description: 'A string or array of strings indicating the name of custom styles to apply to the mark. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles. Any [mark properties](https://vega.github.io/vega-lite/docs/encoding.html#mark-prop) explicitly defined within the `encoding` will override a style default.\n\n__Default value:__ The mark\'s name. For example, a bar mark will have style `"bar"` by default. __Note:__ Any specified style will augment the default style. For example, a bar mark with `"style": "foo"` will receive from `config.style.bar` and `config.style.foo` (the specified style `"foo"` has higher precedence).'
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      theta2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for theta2."
      },
      thetaOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for theta."
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for x2-position."
      },
      xOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for x-position."
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2Offset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for y2-position."
      },
      yOffset: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Offset for y-position."
      }
    },
    type: "object"
  },
  Padding: {
    anyOf: [
      {
        type: "number"
      },
      {
        additionalProperties: !1,
        properties: {
          bottom: {
            type: "number"
          },
          left: {
            type: "number"
          },
          right: {
            type: "number"
          },
          top: {
            type: "number"
          }
        },
        type: "object"
      }
    ],
    minimum: 0
  },
  Parameter: {
    additionalProperties: !1,
    properties: {
      bind: {
        $ref: "#/definitions/Binding",
        description: "Binds the parameter to an external input element such as a slider, selection list or radio button group."
      },
      description: {
        description: "A text description of the parameter, useful for inline documentation.",
        type: "string"
      },
      expr: {
        $ref: "#/definitions/Expr",
        description: "An expression for the value of the parameter. This expression may include other parameters, in which case the parameter will automatically update in response to upstream parameter changes."
      },
      name: {
        description: 'Required. A unique name for the parameter. Parameter names should be valid JavaScript identifiers: they should contain only alphanumeric characters (or “$”, or “_”) and may not start with a digit. Reserved keywords that may not be used as parameter names are "datum", "event", "item", and "parent".',
        type: "string"
      },
      value: {
        description: "The initial value of the parameter.\n\n__Default value:__ `undefined`"
      }
    },
    required: [
      "name"
    ],
    type: "object"
  },
  Parse: {
    additionalProperties: {
      $ref: "#/definitions/ParseValue"
    },
    type: "object"
  },
  ParseValue: {
    anyOf: [
      {
        type: "null"
      },
      {
        type: "string"
      },
      {
        const: "string",
        type: "string"
      },
      {
        const: "boolean",
        type: "string"
      },
      {
        const: "date",
        type: "string"
      },
      {
        const: "number",
        type: "string"
      }
    ]
  },
  PivotTransform: {
    additionalProperties: !1,
    properties: {
      groupby: {
        description: "The optional data fields to group by. If not specified, a single group containing all data objects will be used.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      limit: {
        description: "An optional parameter indicating the maximum number of pivoted fields to generate. The default (`0`) applies no limit. The pivoted `pivot` names are sorted in ascending order prior to enforcing the limit. __Default value:__ `0`",
        type: "number"
      },
      op: {
        description: "The aggregation operation to apply to grouped `value` field values. __Default value:__ `sum`",
        type: "string"
      },
      pivot: {
        $ref: "#/definitions/FieldName",
        description: "The data field to pivot on. The unique values of this field become new field names in the output stream."
      },
      value: {
        $ref: "#/definitions/FieldName",
        description: "The data field to populate pivoted fields. The aggregate values of this field become the values of the new pivoted fields."
      }
    },
    required: [
      "pivot",
      "value"
    ],
    type: "object"
  },
  PolarDef: {
    anyOf: [
      {
        $ref: "#/definitions/PositionFieldDefBase"
      },
      {
        $ref: "#/definitions/PositionDatumDefBase"
      },
      {
        $ref: "#/definitions/PositionValueDef"
      }
    ]
  },
  Position2Def: {
    anyOf: [
      {
        $ref: "#/definitions/SecondaryFieldDef"
      },
      {
        $ref: "#/definitions/DatumDef"
      },
      {
        $ref: "#/definitions/PositionValueDef"
      }
    ]
  },
  PositionDatumDef: {
    additionalProperties: !1,
    properties: {
      axis: {
        anyOf: [
          {
            $ref: "#/definitions/Axis"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      impute: {
        anyOf: [
          {
            $ref: "#/definitions/ImputeParams"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      stack: {
        anyOf: [
          {
            $ref: "#/definitions/StackOffset"
          },
          {
            type: "null"
          },
          {
            type: "boolean"
          }
        ],
        description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  PositionDatumDefBase: {
    additionalProperties: !1,
    properties: {
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      datum: {
        anyOf: [
          {
            $ref: "#/definitions/PrimitiveValue"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/RepeatRef"
          }
        ],
        description: "A constant value in data domain."
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      stack: {
        anyOf: [
          {
            $ref: "#/definitions/StackOffset"
          },
          {
            type: "null"
          },
          {
            type: "boolean"
          }
        ],
        description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
      },
      type: {
        $ref: "#/definitions/Type",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  PositionDef: {
    anyOf: [
      {
        $ref: "#/definitions/PositionFieldDef"
      },
      {
        $ref: "#/definitions/PositionDatumDef"
      },
      {
        $ref: "#/definitions/PositionValueDef"
      }
    ]
  },
  PositionFieldDef: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      axis: {
        anyOf: [
          {
            $ref: "#/definitions/Axis"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      impute: {
        anyOf: [
          {
            $ref: "#/definitions/ImputeParams"
          },
          {
            type: "null"
          }
        ],
        description: "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      sort: {
        $ref: "#/definitions/Sort",
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
      },
      stack: {
        anyOf: [
          {
            $ref: "#/definitions/StackOffset"
          },
          {
            type: "null"
          },
          {
            type: "boolean"
          }
        ],
        description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  PositionFieldDefBase: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      scale: {
        anyOf: [
          {
            $ref: "#/definitions/Scale"
          },
          {
            type: "null"
          }
        ],
        description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
      },
      sort: {
        $ref: "#/definitions/Sort",
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
      },
      stack: {
        anyOf: [
          {
            $ref: "#/definitions/StackOffset"
          },
          {
            type: "null"
          },
          {
            type: "boolean"
          }
        ],
        description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  PositionValueDef: {
    $ref: '#/definitions/ValueDef<(number|"width"|"height"|ExprRef)>'
  },
  Predicate: {
    anyOf: [
      {
        $ref: "#/definitions/FieldEqualPredicate"
      },
      {
        $ref: "#/definitions/FieldRangePredicate"
      },
      {
        $ref: "#/definitions/FieldOneOfPredicate"
      },
      {
        $ref: "#/definitions/FieldLTPredicate"
      },
      {
        $ref: "#/definitions/FieldGTPredicate"
      },
      {
        $ref: "#/definitions/FieldLTEPredicate"
      },
      {
        $ref: "#/definitions/FieldGTEPredicate"
      },
      {
        $ref: "#/definitions/FieldValidPredicate"
      },
      {
        $ref: "#/definitions/SelectionPredicate"
      },
      {
        type: "string"
      }
    ]
  },
  PrimitiveValue: {
    type: [
      "number",
      "string",
      "boolean",
      "null"
    ]
  },
  Projection: {
    additionalProperties: !1,
    properties: {
      center: {
        $ref: "#/definitions/Vector2<number>",
        description: "The projection's center, a two-element array of longitude and latitude in degrees.\n\n__Default value:__ `[0, 0]`"
      },
      clipAngle: {
        description: "The projection's clipping circle radius to the specified angle in degrees. If `null`, switches to [antimeridian](http://bl.ocks.org/mbostock/3788999) cutting rather than small-circle clipping.",
        type: "number"
      },
      clipExtent: {
        $ref: "#/definitions/Vector2<Vector2<number>>",
        description: "The projection's viewport clip extent to the specified bounds in pixels. The extent bounds are specified as an array `[[x0, y0], [x1, y1]]`, where `x0` is the left-side of the viewport, `y0` is the top, `x1` is the right and `y1` is the bottom. If `null`, no viewport clipping is performed."
      },
      coefficient: {
        type: "number"
      },
      distance: {
        type: "number"
      },
      extent: {
        $ref: "#/definitions/Vector2<Vector2<number>>"
      },
      fit: {
        anyOf: [
          {
            $ref: "#/definitions/Fit"
          },
          {
            items: {
              $ref: "#/definitions/Fit"
            },
            type: "array"
          }
        ]
      },
      fraction: {
        type: "number"
      },
      lobes: {
        type: "number"
      },
      parallel: {
        type: "number"
      },
      parallels: {
        description: "For conic projections, the [two standard parallels](https://en.wikipedia.org/wiki/Map_projection#Conic) that define the map layout. The default depends on the specific conic projection used.",
        items: {
          type: "number"
        },
        type: "array"
      },
      pointRadius: {
        description: "The default radius (in pixels) to use when drawing GeoJSON `Point` and `MultiPoint` geometries. This parameter sets a constant default value. To modify the point radius in response to data, see the corresponding parameter of the GeoPath and GeoShape transforms.\n\n__Default value:__ `4.5`",
        type: "number"
      },
      precision: {
        description: "The threshold for the projection's [adaptive resampling](http://bl.ocks.org/mbostock/3795544) to the specified value in pixels. This value corresponds to the [Douglas–Peucker distance](http://en.wikipedia.org/wiki/Ramer%E2%80%93Douglas%E2%80%93Peucker_algorithm). If precision is not specified, returns the projection's current resampling precision which defaults to `√0.5 ≅ 0.70710…`.",
        type: "number"
      },
      radius: {
        type: "number"
      },
      ratio: {
        type: "number"
      },
      reflectX: {
        type: "boolean"
      },
      reflectY: {
        type: "boolean"
      },
      rotate: {
        anyOf: [
          {
            $ref: "#/definitions/Vector2<number>"
          },
          {
            $ref: "#/definitions/Vector3<number>"
          }
        ],
        description: "The projection's three-axis rotation to the specified angles, which must be a two- or three-element array of numbers [`lambda`, `phi`, `gamma`] specifying the rotation angles in degrees about each spherical axis. (These correspond to yaw, pitch and roll.)\n\n__Default value:__ `[0, 0, 0]`"
      },
      scale: {
        description: "The projection’s scale (zoom) factor, overriding automatic fitting. The default scale is projection-specific. The scale factor corresponds linearly to the distance between projected points; however, scale factor values are not equivalent across projections.",
        type: "number"
      },
      size: {
        $ref: "#/definitions/Vector2<number>"
      },
      spacing: {
        type: "number"
      },
      tilt: {
        type: "number"
      },
      translate: {
        $ref: "#/definitions/Vector2<number>",
        description: "The projection’s translation offset as a two-element array `[tx, ty]`."
      },
      type: {
        $ref: "#/definitions/ProjectionType",
        description: 'The cartographic projection to use. This value is case-insensitive, for example `"albers"` and `"Albers"` indicate the same projection type. You can find all valid projection types [in the documentation](https://vega.github.io/vega-lite/docs/projection.html#projection-types).\n\n__Default value:__ `mercator`'
      }
    },
    type: "object"
  },
  ProjectionConfig: {
    $ref: "#/definitions/Projection",
    description: "Any property of Projection can be in config"
  },
  ProjectionType: {
    enum: [
      "albers",
      "albersUsa",
      "azimuthalEqualArea",
      "azimuthalEquidistant",
      "conicConformal",
      "conicEqualArea",
      "conicEquidistant",
      "equalEarth",
      "equirectangular",
      "gnomonic",
      "identity",
      "mercator",
      "naturalEarth1",
      "orthographic",
      "stereographic",
      "transverseMercator"
    ],
    type: "string"
  },
  QuantileTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        description: 'The output field names for the probability and quantile values.\n\n__Default value:__ `["prob", "value"]`',
        items: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            $ref: "#/definitions/FieldName"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      groupby: {
        description: "The data fields to group by. If not specified, a single group containing all data objects will be used.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      probs: {
        description: "An array of probabilities in the range (0, 1) for which to compute quantile values. If not specified, the *step* parameter will be used.",
        items: {
          type: "number"
        },
        type: "array"
      },
      quantile: {
        $ref: "#/definitions/FieldName",
        description: "The data field for which to perform quantile estimation."
      },
      step: {
        description: "A probability step size (default 0.01) for sampling quantile values. All values from one-half the step size up to 1 (exclusive) will be sampled. This parameter is only used if the *probs* parameter is not provided.",
        type: "number"
      }
    },
    required: [
      "quantile"
    ],
    type: "object"
  },
  RadialGradient: {
    additionalProperties: !1,
    properties: {
      gradient: {
        const: "radial",
        description: 'The type of gradient. Use `"radial"` for a radial gradient.',
        type: "string"
      },
      id: {
        type: "string"
      },
      r1: {
        description: "The radius length, in normalized [0, 1] coordinates, of the inner circle for the gradient.\n\n__Default value:__ `0`",
        type: "number"
      },
      r2: {
        description: "The radius length, in normalized [0, 1] coordinates, of the outer circle for the gradient.\n\n__Default value:__ `0.5`",
        type: "number"
      },
      stops: {
        description: "An array of gradient stops defining the gradient color sequence.",
        items: {
          $ref: "#/definitions/GradientStop"
        },
        type: "array"
      },
      x1: {
        description: "The x-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\n\n__Default value:__ `0.5`",
        type: "number"
      },
      x2: {
        description: "The x-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\n\n__Default value:__ `0.5`",
        type: "number"
      },
      y1: {
        description: "The y-coordinate, in normalized [0, 1] coordinates, for the center of the inner circle for the gradient.\n\n__Default value:__ `0.5`",
        type: "number"
      },
      y2: {
        description: "The y-coordinate, in normalized [0, 1] coordinates, for the center of the outer circle for the gradient.\n\n__Default value:__ `0.5`",
        type: "number"
      }
    },
    required: [
      "gradient",
      "stops"
    ],
    type: "object"
  },
  RangeConfig: {
    additionalProperties: {
      anyOf: [
        {
          $ref: "#/definitions/RangeScheme"
        },
        {
          type: "array"
        }
      ]
    },
    properties: {
      category: {
        anyOf: [
          {
            $ref: "#/definitions/RangeScheme"
          },
          {
            items: {
              $ref: "#/definitions/Color"
            },
            type: "array"
          }
        ],
        description: "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for categorical data."
      },
      diverging: {
        anyOf: [
          {
            $ref: "#/definitions/RangeScheme"
          },
          {
            items: {
              $ref: "#/definitions/Color"
            },
            type: "array"
          }
        ],
        description: "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for diverging quantitative ramps."
      },
      heatmap: {
        anyOf: [
          {
            $ref: "#/definitions/RangeScheme"
          },
          {
            items: {
              $ref: "#/definitions/Color"
            },
            type: "array"
          }
        ],
        description: "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for quantitative heatmaps."
      },
      ordinal: {
        anyOf: [
          {
            $ref: "#/definitions/RangeScheme"
          },
          {
            items: {
              $ref: "#/definitions/Color"
            },
            type: "array"
          }
        ],
        description: "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for rank-ordered data."
      },
      ramp: {
        anyOf: [
          {
            $ref: "#/definitions/RangeScheme"
          },
          {
            items: {
              $ref: "#/definitions/Color"
            },
            type: "array"
          }
        ],
        description: "Default [color scheme](https://vega.github.io/vega/docs/schemes/) for sequential quantitative ramps."
      },
      symbol: {
        description: "Array of [symbol](https://vega.github.io/vega/docs/marks/symbol/) names or paths for the default shape palette.",
        items: {
          $ref: "#/definitions/SymbolShape"
        },
        type: "array"
      }
    },
    type: "object"
  },
  RangeEnum: {
    enum: [
      "width",
      "height",
      "symbol",
      "category",
      "ordinal",
      "ramp",
      "diverging",
      "heatmap"
    ],
    type: "string"
  },
  RangeRaw: {
    items: {
      anyOf: [
        {
          type: "null"
        },
        {
          type: "boolean"
        },
        {
          type: "string"
        },
        {
          type: "number"
        },
        {
          $ref: "#/definitions/RangeRawArray"
        }
      ]
    },
    type: "array"
  },
  RangeRawArray: {
    items: {
      type: "number"
    },
    type: "array"
  },
  RangeScheme: {
    anyOf: [
      {
        $ref: "#/definitions/RangeEnum"
      },
      {
        $ref: "#/definitions/RangeRaw"
      },
      {
        additionalProperties: !1,
        properties: {
          count: {
            type: "number"
          },
          extent: {
            items: {
              type: "number"
            },
            type: "array"
          },
          scheme: {
            anyOf: [
              {
                type: "string"
              },
              {
                items: {
                  type: "string"
                },
                type: "array"
              },
              {
                $ref: "#/definitions/ColorScheme"
              }
            ]
          }
        },
        required: [
          "scheme"
        ],
        type: "object"
      }
    ]
  },
  RectConfig: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      binSpacing: {
        description: "Offset between bars for binned field. The ideal value for this is either 0 (preferred by statisticians) or 1 (Vega-Lite default, D3 example style).\n\n__Default value:__ `1`",
        minimum: 0,
        type: "number"
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      continuousBandSize: {
        description: "The default size of the bars on continuous scales.\n\n__Default value:__ `5`",
        minimum: 0,
        type: "number"
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      discreteBandSize: {
        description: "The default size of the bars with discrete dimensions. If unspecified, the default size is  `step-2`, which provides 2 pixel offset between bars.",
        minimum: 0,
        type: "number"
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  RegressionTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        description: `The output field names for the smoothed points generated by the regression transform.

__Default value:__ The field names of the input x and y values.`,
        items: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            $ref: "#/definitions/FieldName"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      extent: {
        description: "A [min, max] domain over the independent (x) field for the starting and ending points of the generated trend line.",
        items: [
          {
            type: "number"
          },
          {
            type: "number"
          }
        ],
        maxItems: 2,
        minItems: 2,
        type: "array"
      },
      groupby: {
        description: "The data fields to group by. If not specified, a single group containing all data objects will be used.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      method: {
        description: 'The functional form of the regression model. One of `"linear"`, `"log"`, `"exp"`, `"pow"`, `"quad"`, or `"poly"`.\n\n__Default value:__ `"linear"`',
        enum: [
          "linear",
          "log",
          "exp",
          "pow",
          "quad",
          "poly"
        ],
        type: "string"
      },
      on: {
        $ref: "#/definitions/FieldName",
        description: "The data field of the independent variable to use a predictor."
      },
      order: {
        description: "The polynomial order (number of coefficients) for the 'poly' method.\n\n__Default value:__ `3`",
        type: "number"
      },
      params: {
        description: "A boolean flag indicating if the transform should return the regression model parameters (one object per group), rather than trend line points. The resulting objects include a `coef` array of fitted coefficient values (starting with the intercept term and then including terms of increasing order) and an `rSquared` value (indicating the total variance explained by the model).\n\n__Default value:__ `false`",
        type: "boolean"
      },
      regression: {
        $ref: "#/definitions/FieldName",
        description: "The data field of the dependent variable to predict."
      }
    },
    required: [
      "regression",
      "on"
    ],
    type: "object"
  },
  RepeatMapping: {
    additionalProperties: !1,
    properties: {
      column: {
        description: "An array of fields to be repeated horizontally.",
        items: {
          type: "string"
        },
        type: "array"
      },
      row: {
        description: "An array of fields to be repeated vertically.",
        items: {
          type: "string"
        },
        type: "array"
      }
    },
    type: "object"
  },
  RepeatRef: {
    additionalProperties: !1,
    description: "Reference to a repeated value.",
    properties: {
      repeat: {
        enum: [
          "row",
          "column",
          "repeat",
          "layer"
        ],
        type: "string"
      }
    },
    required: [
      "repeat"
    ],
    type: "object"
  },
  RepeatSpec: {
    anyOf: [
      {
        $ref: "#/definitions/NonLayerRepeatSpec"
      },
      {
        $ref: "#/definitions/LayerRepeatSpec"
      }
    ]
  },
  Resolve: {
    additionalProperties: !1,
    description: 'Defines how scales, axes, and legends from different specs should be combined. Resolve is a mapping from `scale`, `axis`, and `legend` to a mapping from channels to resolutions. Scales and guides can be resolved to be `"independent"` or `"shared"`.',
    properties: {
      axis: {
        $ref: "#/definitions/AxisResolveMap"
      },
      legend: {
        $ref: "#/definitions/LegendResolveMap"
      },
      scale: {
        $ref: "#/definitions/ScaleResolveMap"
      }
    },
    type: "object"
  },
  ResolveMode: {
    enum: [
      "independent",
      "shared"
    ],
    type: "string"
  },
  "RowCol<LayoutAlign>": {
    additionalProperties: !1,
    properties: {
      column: {
        $ref: "#/definitions/LayoutAlign"
      },
      row: {
        $ref: "#/definitions/LayoutAlign"
      }
    },
    type: "object"
  },
  "RowCol<boolean>": {
    additionalProperties: !1,
    properties: {
      column: {
        type: "boolean"
      },
      row: {
        type: "boolean"
      }
    },
    type: "object"
  },
  "RowCol<number>": {
    additionalProperties: !1,
    properties: {
      column: {
        type: "number"
      },
      row: {
        type: "number"
      }
    },
    type: "object"
  },
  RowColumnEncodingFieldDef: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      align: {
        $ref: "#/definitions/LayoutAlign",
        description: 'The alignment to apply to row/column facet\'s subplot. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\n__Default value:__ `"all"`.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      center: {
        description: "Boolean flag indicating if facet's subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      header: {
        $ref: "#/definitions/Header",
        description: "An object defining properties of a facet's header."
      },
      sort: {
        anyOf: [
          {
            $ref: "#/definitions/SortArray"
          },
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            $ref: "#/definitions/EncodingSortField"
          },
          {
            type: "null"
          }
        ],
        description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` is not supported for `row` and `column`.'
      },
      spacing: {
        description: 'The spacing in pixels between facet\'s sub-views.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)',
        type: "number"
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  SampleTransform: {
    additionalProperties: !1,
    properties: {
      sample: {
        description: "The maximum number of data objects to include in the sample.\n\n__Default value:__ `1000`",
        type: "number"
      }
    },
    required: [
      "sample"
    ],
    type: "object"
  },
  Scale: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The alignment of the steps within the scale range.\n\nThis value must lie in the range `[0,1]`. A value of `0.5` indicates that the steps should be centered within the range. A value of `0` or `1` may be used to shift the bands to one side, say to position them adjacent to an axis.\n\n__Default value:__ `0.5`"
      },
      base: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The logarithm base of the `log` scale (default `10`)."
      },
      bins: {
        $ref: "#/definitions/ScaleBins",
        description: "Bin boundaries can be provided to scales as either an explicit array of bin boundaries or as a bin specification object. The legal values are: - An [array](../types/#Array) literal of bin boundary values. For example, `[0, 5, 10, 15, 20]`. The array must include both starting and ending boundaries. The previous example uses five values to indicate a total of four bin intervals: [0-5), [5-10), [10-15), [15-20]. Array literals may include signal references as elements. - A [bin specification object](https://vega.github.io/vega-lite/docs/scale.html#bins) that indicates the bin _step_ size, and optionally the _start_ and _stop_ boundaries. - An array of bin boundaries over the scale domain. If provided, axes and legends will use the bin boundaries to inform the choice of tick marks and text labels."
      },
      clamp: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "If `true`, values that exceed the data domain are clamped to either the minimum or maximum range value\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/config.html#scale-config)'s `clamp` (`true` by default)."
      },
      constant: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "A constant determining the slope of the symlog function around zero. Only used for `symlog` scales.\n\n__Default value:__ `1`"
      },
      domain: {
        anyOf: [
          {
            items: {
              anyOf: [
                {
                  type: "null"
                },
                {
                  type: "string"
                },
                {
                  type: "number"
                },
                {
                  type: "boolean"
                },
                {
                  $ref: "#/definitions/DateTime"
                },
                {
                  $ref: "#/definitions/ExprRef"
                }
              ]
            },
            type: "array"
          },
          {
            const: "unaggregated",
            type: "string"
          },
          {
            $ref: "#/definitions/SelectionExtent"
          },
          {
            $ref: "#/definitions/DomainUnionWith"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Customized domain values in the form of constant values or dynamic values driven by a selection.\n\n1) Constant `domain` for _quantitative_ fields can take one of the following forms:\n\n- A two-element array with minimum and maximum values. To create a diverging scale, this two-element array can be combined with the `domainMid` property. - An array with more than two entries, for [Piecewise quantitative scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). - A string value `"unaggregated"`, if the input field is aggregated, to indicate that the domain should include the raw data values prior to the aggregation.\n\n2) Constant `domain` for _temporal_ fields can be a two-element array with minimum and maximum values, in the form of either timestamps or the [DateTime definition objects](https://vega.github.io/vega-lite/docs/types.html#datetime).\n\n3) Constant `domain` for _ordinal_ and _nominal_ fields can be an array that lists valid input values.\n\n4) To combine (union) specified constant domain with the field\'s values, `domain` can be an object with a `unionWith` property that specify constant domain to be combined. For example, `domain: {unionWith: [0, 100]}` for a quantitative scale means that the scale domain always includes `[0, 100]`, but will include other values in the fields beyond `[0, 100]`.\n\n5) Domain can also takes an object defining a field or encoding of a selection that [interactively determines](https://vega.github.io/vega-lite/docs/selection.html#scale-domains) the scale domain.'
      },
      domainMax: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Sets the maximum value in the scale domain, overriding the `domain` property. This property is only intended for use with scales having continuous domains."
      },
      domainMid: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Inserts a single mid-point value into a two-element domain. The mid-point value must lie between the domain minimum and maximum values. This property can be useful for setting a midpoint for [diverging color scales](https://vega.github.io/vega-lite/docs/scale.html#piecewise). The domainMid property is only intended for use with scales supporting continuous, piecewise domains."
      },
      domainMin: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/DateTime"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Sets the minimum value in the scale domain, overriding the domain property. This property is only intended for use with scales having continuous domains."
      },
      exponent: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The exponent of the `pow` scale."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/ScaleInterpolateEnum"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            $ref: "#/definitions/ScaleInterpolateParams"
          }
        ],
        description: "The interpolation method for range values. By default, a general interpolator for numbers, dates, strings and colors (in HCL space) is used. For color ranges, this property allows interpolation in alternative color spaces. Legal values include `rgb`, `hsl`, `hsl-long`, `lab`, `hcl`, `hcl-long`, `cubehelix` and `cubehelix-long` ('-long' variants use longer paths in polar coordinate spaces). If object-valued, this property accepts an object with a string-valued _type_ property and an optional numeric _gamma_ property applicable to rgb and cubehelix interpolators. For more, see the [d3-interpolate documentation](https://github.com/d3/d3-interpolate).\n\n* __Default value:__ `hcl`"
      },
      nice: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            type: "number"
          },
          {
            $ref: "#/definitions/TimeInterval"
          },
          {
            $ref: "#/definitions/TimeIntervalStep"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Extending the domain so that it starts and ends on nice round values. This method typically modifies the scale’s domain, and may only extend the bounds to the nearest round value. Nicing is useful if the domain is computed from data and may be irregular. For example, for a domain of _[0.201479…, 0.996679…]_, a nice domain might be _[0.2, 1.0]_.\n\nFor quantitative scales such as linear, `nice` can be either a boolean flag or a number. If `nice` is a number, it will represent a desired tick count. This allows greater control over the step size used to extend the bounds, guaranteeing that the returned ticks will exactly cover the domain.\n\nFor temporal fields with time and utc scales, the `nice` value can be a string indicating the desired time interval. Legal values are `"millisecond"`, `"second"`, `"minute"`, `"hour"`, `"day"`, `"week"`, `"month"`, and `"year"`. Alternatively, `time` and `utc` scales can accept an object-valued interval specifier of the form `{"interval": "month", "step": 3}`, which includes a desired number of interval steps. Here, the domain would snap to quarter (Jan, Apr, Jul, Oct) boundaries.\n\n__Default value:__ `true` for unbinned _quantitative_ fields; `false` otherwise.'
      },
      padding: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For _[continuous](https://vega.github.io/vega-lite/docs/scale.html#continuous)_ scales, expands the scale domain to accommodate the specified number of pixels on each of the scale range. The scale range must represent pixels for this parameter to function as intended. Padding adjustment is performed prior to all other adjustments, including the effects of the `zero`, `nice`, `domainMin`, and `domainMax` properties.\n\nFor _[band](https://vega.github.io/vega-lite/docs/scale.html#band)_ scales, shortcut for setting `paddingInner` and `paddingOuter` to the same value.\n\nFor _[point](https://vega.github.io/vega-lite/docs/scale.html#point)_ scales, alias for `paddingOuter`.\n\n__Default value:__ For _continuous_ scales, derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `continuousPadding`. For _band and point_ scales, see `paddingInner` and `paddingOuter`. By default, Vega-Lite sets padding such that _width/height = number of unique values * step_.",
        minimum: 0
      },
      paddingInner: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `The inner padding (spacing) within each band step of band scales, as a fraction of the step size. This value must lie in the range [0,1].

For point scale, this property is invalid as point scales do not have internal band widths (only step sizes between bands).

__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s \`bandPaddingInner\`.`,
        maximum: 1,
        minimum: 0
      },
      paddingOuter: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer padding (spacing) at the ends of the range of band and point scales, as a fraction of the step size. This value must lie in the range [0,1].\n\n__Default value:__ derived from the [scale config](https://vega.github.io/vega-lite/docs/scale.html#config)'s `bandPaddingOuter` for band scales and `pointPadding` for point scales. By default, Vega-Lite sets outer padding such that _width/height = number of unique values * step_.",
        maximum: 1,
        minimum: 0
      },
      range: {
        anyOf: [
          {
            $ref: "#/definitions/RangeEnum"
          },
          {
            items: {
              anyOf: [
                {
                  type: "number"
                },
                {
                  type: "string"
                },
                {
                  items: {
                    type: "number"
                  },
                  type: "array"
                },
                {
                  $ref: "#/definitions/ExprRef"
                }
              ]
            },
            type: "array"
          },
          {
            additionalProperties: !1,
            properties: {
              field: {
                type: "string"
              }
            },
            required: [
              "field"
            ],
            type: "object"
          }
        ],
        description: 'The range of the scale. One of:\n\n- A string indicating a [pre-defined named scale range](https://vega.github.io/vega-lite/docs/scale.html#range-config) (e.g., example, `"symbol"`, or `"diverging"`).\n\n- For [continuous scales](https://vega.github.io/vega-lite/docs/scale.html#continuous), two-element array indicating  minimum and maximum values, or an array with more than two entries for specifying a [piecewise scale](https://vega.github.io/vega-lite/docs/scale.html#piecewise).\n\n- For [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) and [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales, an array of desired output values or an object with a `field` property representing the range values.  For example, if a field `color` contains CSS color names, we can set `range` to `{field: "color"}`.\n\n__Notes:__\n\n1) For color scales you can also specify a color [`scheme`](https://vega.github.io/vega-lite/docs/scale.html#scheme) instead of `range`.\n\n2) Any directly specified `range` for `x` and `y` channels will be ignored. Range can be customized via the view\'s corresponding [size](https://vega.github.io/vega-lite/docs/size.html) (`width` and `height`).'
      },
      rangeMax: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Sets the maximum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges."
      },
      rangeMin: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Sets the minimum value in the scale range, overriding the `range` property or the default range. This property is only intended for use with scales having continuous ranges."
      },
      reverse: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "If true, reverses the order of the scale range. __Default value:__ `false`."
      },
      round: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "If `true`, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid.\n\n__Default value:__ `false`."
      },
      scheme: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/SchemeParams"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A string indicating a color [scheme](https://vega.github.io/vega-lite/docs/scale.html#scheme) name (e.g., `"category10"` or `"blues"`) or a [scheme parameter object](https://vega.github.io/vega-lite/docs/scale.html#scheme-params).\n\nDiscrete color schemes may be used with [discrete](https://vega.github.io/vega-lite/docs/scale.html#discrete) or [discretizing](https://vega.github.io/vega-lite/docs/scale.html#discretizing) scales. Continuous color schemes are intended for use with color scales.\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.'
      },
      type: {
        $ref: "#/definitions/ScaleType",
        description: 'The type of scale. Vega-Lite supports the following categories of scale types:\n\n1) [**Continuous Scales**](https://vega.github.io/vega-lite/docs/scale.html#continuous) -- mapping continuous domains to continuous output ranges ([`"linear"`](https://vega.github.io/vega-lite/docs/scale.html#linear), [`"pow"`](https://vega.github.io/vega-lite/docs/scale.html#pow), [`"sqrt"`](https://vega.github.io/vega-lite/docs/scale.html#sqrt), [`"symlog"`](https://vega.github.io/vega-lite/docs/scale.html#symlog), [`"log"`](https://vega.github.io/vega-lite/docs/scale.html#log), [`"time"`](https://vega.github.io/vega-lite/docs/scale.html#time), [`"utc"`](https://vega.github.io/vega-lite/docs/scale.html#utc).\n\n2) [**Discrete Scales**](https://vega.github.io/vega-lite/docs/scale.html#discrete) -- mapping discrete domains to discrete ([`"ordinal"`](https://vega.github.io/vega-lite/docs/scale.html#ordinal)) or continuous ([`"band"`](https://vega.github.io/vega-lite/docs/scale.html#band) and [`"point"`](https://vega.github.io/vega-lite/docs/scale.html#point)) output ranges.\n\n3) [**Discretizing Scales**](https://vega.github.io/vega-lite/docs/scale.html#discretizing) -- mapping continuous domains to discrete output ranges [`"bin-ordinal"`](https://vega.github.io/vega-lite/docs/scale.html#bin-ordinal), [`"quantile"`](https://vega.github.io/vega-lite/docs/scale.html#quantile), [`"quantize"`](https://vega.github.io/vega-lite/docs/scale.html#quantize) and [`"threshold"`](https://vega.github.io/vega-lite/docs/scale.html#threshold).\n\n__Default value:__ please see the [scale type table](https://vega.github.io/vega-lite/docs/scale.html#type).'
      },
      zero: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "If `true`, ensures that a zero baseline value is included in the scale domain.\n\n__Default value:__ `true` for x and y channels if the quantitative field is not binned and no custom `domain` is provided; `false` otherwise.\n\n__Note:__ Log, time, and utc scales do not support `zero`."
      }
    },
    type: "object"
  },
  ScaleBinParams: {
    additionalProperties: !1,
    properties: {
      start: {
        description: `The starting (lowest-valued) bin boundary.

__Default value:__ The lowest value of the scale domain will be used.`,
        type: "number"
      },
      step: {
        description: "The step size defining the bin interval width.",
        type: "number"
      },
      stop: {
        description: `The stopping (highest-valued) bin boundary.

__Default value:__ The highest value of the scale domain will be used.`,
        type: "number"
      }
    },
    required: [
      "step"
    ],
    type: "object"
  },
  ScaleBins: {
    anyOf: [
      {
        items: {
          type: "number"
        },
        type: "array"
      },
      {
        $ref: "#/definitions/ScaleBinParams"
      }
    ]
  },
  ScaleConfig: {
    additionalProperties: !1,
    properties: {
      bandPaddingInner: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default inner padding for `x` and `y` band-ordinal scales.\n\n__Default value:__ - `barBandPaddingInner` for bar marks (`0.1` by default) - `rectBandPaddingInner` for rect and other marks (`0` by default)",
        maximum: 1,
        minimum: 0
      },
      bandPaddingOuter: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default outer padding for `x` and `y` band-ordinal scales.\n\n__Default value:__ `paddingInner/2` (which makes _width/height = number of unique values * step_)",
        maximum: 1,
        minimum: 0
      },
      barBandPaddingInner: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default inner padding for `x` and `y` band-ordinal scales of `"bar"` marks.\n\n__Default value:__ `0.1`',
        maximum: 1,
        minimum: 0
      },
      clamp: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "If true, values that exceed the data domain are clamped to either the minimum or maximum range value"
      },
      continuousPadding: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default padding for continuous scales.\n\n__Default:__ `5` for continuous x-scale of a vertical bar and continuous y-scale of a horizontal bar.; `0` otherwise.",
        minimum: 0
      },
      maxBandSize: {
        description: `The default max value for mapping quantitative fields to bar's size/bandSize.

If undefined (default), we will use the axis's size (width or height) - 1.`,
        minimum: 0,
        type: "number"
      },
      maxFontSize: {
        description: "The default max value for mapping quantitative fields to text's size/fontSize.\n\n__Default value:__ `40`",
        minimum: 0,
        type: "number"
      },
      maxOpacity: {
        description: "Default max opacity for mapping a field to opacity.\n\n__Default value:__ `0.8`",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      maxSize: {
        description: "Default max value for point size scale.",
        minimum: 0,
        type: "number"
      },
      maxStrokeWidth: {
        description: "Default max strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks.\n\n__Default value:__ `4`",
        minimum: 0,
        type: "number"
      },
      minBandSize: {
        description: "The default min value for mapping quantitative fields to bar and tick's size/bandSize scale with zero=false.\n\n__Default value:__ `2`",
        minimum: 0,
        type: "number"
      },
      minFontSize: {
        description: "The default min value for mapping quantitative fields to tick's size/fontSize scale with zero=false\n\n__Default value:__ `8`",
        minimum: 0,
        type: "number"
      },
      minOpacity: {
        description: "Default minimum opacity for mapping a field to opacity.\n\n__Default value:__ `0.3`",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      minSize: {
        description: "Default minimum value for point size scale with zero=false.\n\n__Default value:__ `9`",
        minimum: 0,
        type: "number"
      },
      minStrokeWidth: {
        description: "Default minimum strokeWidth for the scale of strokeWidth for rule and line marks and of size for trail marks with zero=false.\n\n__Default value:__ `1`",
        minimum: 0,
        type: "number"
      },
      pointPadding: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default outer padding for `x` and `y` point-ordinal scales.\n\n__Default value:__ `0.5` (which makes _width/height = number of unique values * step_)",
        maximum: 1,
        minimum: 0
      },
      quantileCount: {
        description: "Default range cardinality for [`quantile`](https://vega.github.io/vega-lite/docs/scale.html#quantile) scale.\n\n__Default value:__ `4`",
        minimum: 0,
        type: "number"
      },
      quantizeCount: {
        description: "Default range cardinality for [`quantize`](https://vega.github.io/vega-lite/docs/scale.html#quantize) scale.\n\n__Default value:__ `4`",
        minimum: 0,
        type: "number"
      },
      rectBandPaddingInner: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default inner padding for `x` and `y` band-ordinal scales of `"rect"` marks.\n\n__Default value:__ `0`',
        maximum: 1,
        minimum: 0
      },
      round: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "If true, rounds numeric output values to integers. This can be helpful for snapping to the pixel grid. (Only available for `x`, `y`, and `size` scales.)"
      },
      useUnaggregatedDomain: {
        description: 'Use the source data range before aggregation as scale domain instead of aggregated data for aggregate axis.\n\nThis is equivalent to setting `domain` to `"unaggregate"` for aggregated _quantitative_ fields by default.\n\nThis property only works with aggregate functions that produce values within the raw data domain (`"mean"`, `"average"`, `"median"`, `"q1"`, `"q3"`, `"min"`, `"max"`). For other aggregations that produce values outside of the raw data domain (e.g. `"count"`, `"sum"`), this property is ignored.\n\n__Default value:__ `false`',
        type: "boolean"
      },
      xReverse: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Reverse x-scale by default (useful for right-to-left charts)."
      }
    },
    type: "object"
  },
  ScaleInterpolateEnum: {
    enum: [
      "rgb",
      "lab",
      "hcl",
      "hsl",
      "hsl-long",
      "hcl-long",
      "cubehelix",
      "cubehelix-long"
    ],
    type: "string"
  },
  ScaleInterpolateParams: {
    additionalProperties: !1,
    properties: {
      gamma: {
        type: "number"
      },
      type: {
        enum: [
          "rgb",
          "cubehelix",
          "cubehelix-long"
        ],
        type: "string"
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  ScaleResolveMap: {
    additionalProperties: !1,
    properties: {
      angle: {
        $ref: "#/definitions/ResolveMode"
      },
      color: {
        $ref: "#/definitions/ResolveMode"
      },
      fill: {
        $ref: "#/definitions/ResolveMode"
      },
      fillOpacity: {
        $ref: "#/definitions/ResolveMode"
      },
      opacity: {
        $ref: "#/definitions/ResolveMode"
      },
      radius: {
        $ref: "#/definitions/ResolveMode"
      },
      shape: {
        $ref: "#/definitions/ResolveMode"
      },
      size: {
        $ref: "#/definitions/ResolveMode"
      },
      stroke: {
        $ref: "#/definitions/ResolveMode"
      },
      strokeDash: {
        $ref: "#/definitions/ResolveMode"
      },
      strokeOpacity: {
        $ref: "#/definitions/ResolveMode"
      },
      strokeWidth: {
        $ref: "#/definitions/ResolveMode"
      },
      theta: {
        $ref: "#/definitions/ResolveMode"
      },
      x: {
        $ref: "#/definitions/ResolveMode"
      },
      y: {
        $ref: "#/definitions/ResolveMode"
      }
    },
    type: "object"
  },
  ScaleType: {
    enum: [
      "linear",
      "log",
      "pow",
      "sqrt",
      "symlog",
      "identity",
      "sequential",
      "time",
      "utc",
      "quantile",
      "quantize",
      "threshold",
      "bin-ordinal",
      "ordinal",
      "point",
      "band"
    ],
    type: "string"
  },
  SchemeParams: {
    additionalProperties: !1,
    properties: {
      count: {
        description: 'The number of colors to use in the scheme. This can be useful for scale types such as `"quantize"`, which use the length of the scale range to determine the number of discrete bins for the scale domain.',
        type: "number"
      },
      extent: {
        description: "The extent of the color range to use. For example `[0.2, 1]` will rescale the color scheme such that color values in the range _[0, 0.2)_ are excluded from the scheme.",
        items: {
          type: "number"
        },
        type: "array"
      },
      name: {
        description: 'A color scheme name for ordinal scales (e.g., `"category10"` or `"blues"`).\n\nFor the full list of supported schemes, please refer to the [Vega Scheme](https://vega.github.io/vega/docs/schemes/#reference) reference.',
        type: "string"
      }
    },
    required: [
      "name"
    ],
    type: "object"
  },
  SecondaryFieldDef: {
    additionalProperties: !1,
    description: "A field definition of a secondary channel that shares a scale with another primary channel. For example, `x2`, `xError` and `xError2` share the same scale with `x`.",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
        type: "null"
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      }
    },
    type: "object"
  },
  SelectionConfig: {
    additionalProperties: !1,
    properties: {
      interval: {
        $ref: "#/definitions/IntervalSelectionConfig",
        description: 'The default definition for an [`interval`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations for an interval selection definition (except `type`) may be specified here.\n\nFor instance, setting `interval` to `{"translate": false}` disables the ability to move interval selections by default.'
      },
      multi: {
        $ref: "#/definitions/MultiSelectionConfig",
        description: 'The default definition for a [`multi`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations for a multi selection definition (except `type`) may be specified here.\n\nFor instance, setting `multi` to `{"toggle": "event.altKey"}` adds additional values to multi selections when clicking with the alt-key pressed by default.'
      },
      single: {
        $ref: "#/definitions/SingleSelectionConfig",
        description: 'The default definition for a [`single`](https://vega.github.io/vega-lite/docs/selection.html#type) selection. All properties and transformations   for a single selection definition (except `type`) may be specified here.\n\nFor instance, setting `single` to `{"on": "dblclick"}` populates single selections on double-click by default.'
      }
    },
    type: "object"
  },
  SelectionDef: {
    anyOf: [
      {
        $ref: "#/definitions/SingleSelection"
      },
      {
        $ref: "#/definitions/MultiSelection"
      },
      {
        $ref: "#/definitions/IntervalSelection"
      }
    ]
  },
  SelectionExtent: {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          field: {
            $ref: "#/definitions/FieldName",
            description: "The field name to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html) over multiple fields or encodings."
          },
          selection: {
            description: "The name of a selection.",
            type: "string"
          }
        },
        required: [
          "selection"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          encoding: {
            $ref: "#/definitions/SingleDefUnitChannel",
            description: "The encoding channel to extract selected values for, when a selection is [projected](https://vega.github.io/vega-lite/docs/project.html) over multiple fields or encodings."
          },
          selection: {
            description: "The name of a selection.",
            type: "string"
          }
        },
        required: [
          "selection"
        ],
        type: "object"
      }
    ]
  },
  SelectionInit: {
    anyOf: [
      {
        $ref: "#/definitions/PrimitiveValue"
      },
      {
        $ref: "#/definitions/DateTime"
      }
    ]
  },
  SelectionInitInterval: {
    anyOf: [
      {
        $ref: "#/definitions/Vector2<boolean>"
      },
      {
        $ref: "#/definitions/Vector2<number>"
      },
      {
        $ref: "#/definitions/Vector2<string>"
      },
      {
        $ref: "#/definitions/Vector2<DateTime>"
      }
    ]
  },
  SelectionInitIntervalMapping: {
    $ref: "#/definitions/Dict<SelectionInitInterval>"
  },
  SelectionInitMapping: {
    $ref: "#/definitions/Dict<SelectionInit>"
  },
  SelectionPredicate: {
    additionalProperties: !1,
    properties: {
      selection: {
        $ref: "#/definitions/SelectionComposition",
        description: "Filter using a selection name or a logical composition of selection names."
      }
    },
    required: [
      "selection"
    ],
    type: "object"
  },
  SelectionResolution: {
    enum: [
      "global",
      "union",
      "intersect"
    ],
    type: "string"
  },
  SequenceGenerator: {
    additionalProperties: !1,
    properties: {
      name: {
        description: "Provide a placeholder name and bind data at runtime.",
        type: "string"
      },
      sequence: {
        $ref: "#/definitions/SequenceParams",
        description: "Generate a sequence of numbers."
      }
    },
    required: [
      "sequence"
    ],
    type: "object"
  },
  SequenceParams: {
    additionalProperties: !1,
    properties: {
      as: {
        $ref: "#/definitions/FieldName",
        description: 'The name of the generated sequence field.\n\n__Default value:__ `"data"`'
      },
      start: {
        description: "The starting value of the sequence (inclusive).",
        type: "number"
      },
      step: {
        description: "The step value between sequence entries.\n\n__Default value:__ `1`",
        type: "number"
      },
      stop: {
        description: "The ending value of the sequence (exclusive).",
        type: "number"
      }
    },
    required: [
      "start",
      "stop"
    ],
    type: "object"
  },
  SequentialMultiHue: {
    enum: [
      "turbo",
      "viridis",
      "inferno",
      "magma",
      "plasma",
      "cividis",
      "bluegreen",
      "bluegreen-3",
      "bluegreen-4",
      "bluegreen-5",
      "bluegreen-6",
      "bluegreen-7",
      "bluegreen-8",
      "bluegreen-9",
      "bluepurple",
      "bluepurple-3",
      "bluepurple-4",
      "bluepurple-5",
      "bluepurple-6",
      "bluepurple-7",
      "bluepurple-8",
      "bluepurple-9",
      "goldgreen",
      "goldgreen-3",
      "goldgreen-4",
      "goldgreen-5",
      "goldgreen-6",
      "goldgreen-7",
      "goldgreen-8",
      "goldgreen-9",
      "goldorange",
      "goldorange-3",
      "goldorange-4",
      "goldorange-5",
      "goldorange-6",
      "goldorange-7",
      "goldorange-8",
      "goldorange-9",
      "goldred",
      "goldred-3",
      "goldred-4",
      "goldred-5",
      "goldred-6",
      "goldred-7",
      "goldred-8",
      "goldred-9",
      "greenblue",
      "greenblue-3",
      "greenblue-4",
      "greenblue-5",
      "greenblue-6",
      "greenblue-7",
      "greenblue-8",
      "greenblue-9",
      "orangered",
      "orangered-3",
      "orangered-4",
      "orangered-5",
      "orangered-6",
      "orangered-7",
      "orangered-8",
      "orangered-9",
      "purplebluegreen",
      "purplebluegreen-3",
      "purplebluegreen-4",
      "purplebluegreen-5",
      "purplebluegreen-6",
      "purplebluegreen-7",
      "purplebluegreen-8",
      "purplebluegreen-9",
      "purpleblue",
      "purpleblue-3",
      "purpleblue-4",
      "purpleblue-5",
      "purpleblue-6",
      "purpleblue-7",
      "purpleblue-8",
      "purpleblue-9",
      "purplered",
      "purplered-3",
      "purplered-4",
      "purplered-5",
      "purplered-6",
      "purplered-7",
      "purplered-8",
      "purplered-9",
      "redpurple",
      "redpurple-3",
      "redpurple-4",
      "redpurple-5",
      "redpurple-6",
      "redpurple-7",
      "redpurple-8",
      "redpurple-9",
      "yellowgreenblue",
      "yellowgreenblue-3",
      "yellowgreenblue-4",
      "yellowgreenblue-5",
      "yellowgreenblue-6",
      "yellowgreenblue-7",
      "yellowgreenblue-8",
      "yellowgreenblue-9",
      "yellowgreen",
      "yellowgreen-3",
      "yellowgreen-4",
      "yellowgreen-5",
      "yellowgreen-6",
      "yellowgreen-7",
      "yellowgreen-8",
      "yellowgreen-9",
      "yelloworangebrown",
      "yelloworangebrown-3",
      "yelloworangebrown-4",
      "yelloworangebrown-5",
      "yelloworangebrown-6",
      "yelloworangebrown-7",
      "yelloworangebrown-8",
      "yelloworangebrown-9",
      "yelloworangered",
      "yelloworangered-3",
      "yelloworangered-4",
      "yelloworangered-5",
      "yelloworangered-6",
      "yelloworangered-7",
      "yelloworangered-8",
      "yelloworangered-9",
      "darkblue",
      "darkblue-3",
      "darkblue-4",
      "darkblue-5",
      "darkblue-6",
      "darkblue-7",
      "darkblue-8",
      "darkblue-9",
      "darkgold",
      "darkgold-3",
      "darkgold-4",
      "darkgold-5",
      "darkgold-6",
      "darkgold-7",
      "darkgold-8",
      "darkgold-9",
      "darkgreen",
      "darkgreen-3",
      "darkgreen-4",
      "darkgreen-5",
      "darkgreen-6",
      "darkgreen-7",
      "darkgreen-8",
      "darkgreen-9",
      "darkmulti",
      "darkmulti-3",
      "darkmulti-4",
      "darkmulti-5",
      "darkmulti-6",
      "darkmulti-7",
      "darkmulti-8",
      "darkmulti-9",
      "darkred",
      "darkred-3",
      "darkred-4",
      "darkred-5",
      "darkred-6",
      "darkred-7",
      "darkred-8",
      "darkred-9",
      "lightgreyred",
      "lightgreyred-3",
      "lightgreyred-4",
      "lightgreyred-5",
      "lightgreyred-6",
      "lightgreyred-7",
      "lightgreyred-8",
      "lightgreyred-9",
      "lightgreyteal",
      "lightgreyteal-3",
      "lightgreyteal-4",
      "lightgreyteal-5",
      "lightgreyteal-6",
      "lightgreyteal-7",
      "lightgreyteal-8",
      "lightgreyteal-9",
      "lightmulti",
      "lightmulti-3",
      "lightmulti-4",
      "lightmulti-5",
      "lightmulti-6",
      "lightmulti-7",
      "lightmulti-8",
      "lightmulti-9",
      "lightorange",
      "lightorange-3",
      "lightorange-4",
      "lightorange-5",
      "lightorange-6",
      "lightorange-7",
      "lightorange-8",
      "lightorange-9",
      "lighttealblue",
      "lighttealblue-3",
      "lighttealblue-4",
      "lighttealblue-5",
      "lighttealblue-6",
      "lighttealblue-7",
      "lighttealblue-8",
      "lighttealblue-9"
    ],
    type: "string"
  },
  SequentialSingleHue: {
    enum: [
      "blues",
      "tealblues",
      "teals",
      "greens",
      "browns",
      "greys",
      "purples",
      "warmgreys",
      "reds",
      "oranges"
    ],
    type: "string"
  },
  ShapeDef: {
    $ref: "#/definitions/MarkPropDef<(string|null),TypeForShape>"
  },
  SharedEncoding: {
    additionalProperties: !1,
    properties: {
      angle: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      color: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Gradient"
              },
              {
                type: "string"
              },
              {
                type: "null"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      description: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          format: {
            anyOf: [
              {
                type: "string"
              },
              {
                $ref: "#/definitions/Dict<unknown>"
              }
            ],
            description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
          },
          formatType: {
            description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
            type: "string"
          },
          labelExpr: {
            description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
            type: "string"
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/StandardType",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "string"
              },
              {
                type: "null"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      detail: {
        anyOf: [
          {
            $ref: "#/definitions/FieldDefWithoutScale"
          },
          {
            items: {
              $ref: "#/definitions/FieldDefWithoutScale"
            },
            type: "array"
          }
        ],
        description: "Additional levels of detail for grouping data in aggregate views and in line, trail, and area marks without mapping data to a specific visual channel."
      },
      fill: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Gradient"
              },
              {
                type: "string"
              },
              {
                type: "null"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      fillOpacity: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      href: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          format: {
            anyOf: [
              {
                type: "string"
              },
              {
                $ref: "#/definitions/Dict<unknown>"
              }
            ],
            description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
          },
          formatType: {
            description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
            type: "string"
          },
          labelExpr: {
            description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
            type: "string"
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/StandardType",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "string"
              },
              {
                type: "null"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      key: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/StandardType",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          }
        },
        type: "object"
      },
      latitude: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                const: "quantitative",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.',
                type: "string"
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      latitude2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      longitude: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                const: "quantitative",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.',
                type: "string"
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      longitude2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      opacity: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      order: {
        anyOf: [
          {
            $ref: "#/definitions/OrderFieldDef"
          },
          {
            items: {
              $ref: "#/definitions/OrderFieldDef"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/OrderValueDef"
          }
        ],
        description: 'Order of the marks. - For stacked marks, this `order` channel encodes [stack order](https://vega.github.io/vega-lite/docs/stack.html#order). - For line and trail marks, this `order` channel encodes order of data points in the lines. This can be useful for creating [a connected scatterplot](https://vega.github.io/vega-lite/examples/connected_scatterplot.html). Setting `order` to `{"value": null}` makes the line marks use the original order in the data sources. - Otherwise, this `order` channel encodes layer order of the marks.\n\n__Note__: In aggregate plots, `order` field should be `aggregate`d to avoid creating additional aggregation grouping.'
      },
      radius: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          stack: {
            anyOf: [
              {
                $ref: "#/definitions/StackOffset"
              },
              {
                type: "null"
              },
              {
                type: "boolean"
              }
            ],
            description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      radius2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      shape: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/TypeForShape",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "string"
              },
              {
                type: "null"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      size: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      stroke: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Gradient"
              },
              {
                type: "string"
              },
              {
                type: "null"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      strokeDash: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                items: {
                  type: "number"
                },
                type: "array"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      strokeOpacity: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      strokeWidth: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          legend: {
            anyOf: [
              {
                $ref: "#/definitions/Legend"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of the legend. If `null`, the legend for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [legend properties](https://vega.github.io/vega-lite/docs/legend.html) are applied.\n\n__See also:__ [`legend`](https://vega.github.io/vega-lite/docs/legend.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      text: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalStringFieldDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          format: {
            anyOf: [
              {
                type: "string"
              },
              {
                $ref: "#/definitions/Dict<unknown>"
              }
            ],
            description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
          },
          formatType: {
            description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
            type: "string"
          },
          labelExpr: {
            description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
            type: "string"
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      theta: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          stack: {
            anyOf: [
              {
                $ref: "#/definitions/StackOffset"
              },
              {
                type: "null"
              },
              {
                type: "boolean"
              }
            ],
            description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      theta2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      tooltip: {
        anyOf: [
          {
            $ref: "#/definitions/StringFieldDefWithCondition"
          },
          {
            $ref: "#/definitions/StringValueDefWithCondition"
          },
          {
            items: {
              $ref: "#/definitions/StringFieldDef"
            },
            type: "array"
          },
          {
            type: "null"
          }
        ],
        description: "The tooltip text to show upon mouse hover. Specifying `tooltip` encoding overrides [the `tooltip` property in the mark definition](https://vega.github.io/vega-lite/docs/mark.html#mark-def).\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip in Vega-Lite."
      },
      url: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          condition: {
            anyOf: [
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
              },
              {
                anyOf: [
                  {
                    $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
                  },
                  {
                    $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                  },
                  {
                    items: {
                      $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
                    },
                    type: "array"
                  }
                ],
                description: "A field definition or one or more value definition(s) with a selection predicate."
              }
            ],
            description: "One or more value definition(s) with [a selection or a test predicate](https://vega.github.io/vega-lite/docs/condition.html).\n\n__Note:__ A field definition's `condition` property can only contain [conditional value definitions](https://vega.github.io/vega-lite/docs/condition.html#value) since Vega-Lite only allows at most one encoded field per encoding channel."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          format: {
            anyOf: [
              {
                type: "string"
              },
              {
                $ref: "#/definitions/Dict<unknown>"
              }
            ],
            description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
          },
          formatType: {
            description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
            type: "string"
          },
          labelExpr: {
            description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
            type: "string"
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/StandardType",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "string"
              },
              {
                type: "null"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      x: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          axis: {
            anyOf: [
              {
                $ref: "#/definitions/Axis"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          impute: {
            anyOf: [
              {
                $ref: "#/definitions/ImputeParams"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          stack: {
            anyOf: [
              {
                $ref: "#/definitions/StackOffset"
              },
              {
                type: "null"
              },
              {
                type: "boolean"
              }
            ],
            description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      x2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      xError: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: "number"
          }
        },
        type: "object"
      },
      xError2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: "number"
          }
        },
        type: "object"
      },
      y: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          axis: {
            anyOf: [
              {
                $ref: "#/definitions/Axis"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining properties of axis's gridlines, ticks and labels. If `null`, the axis for the encoding channel will be removed.\n\n__Default value:__ If undefined, default [axis properties](https://vega.github.io/vega-lite/docs/axis.html) are applied.\n\n__See also:__ [`axis`](https://vega.github.io/vega-lite/docs/axis.html) documentation."
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/BinParams"
              },
              {
                const: "binned",
                type: "string"
              },
              {
                type: "null"
              }
            ],
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          impute: {
            anyOf: [
              {
                $ref: "#/definitions/ImputeParams"
              },
              {
                type: "null"
              }
            ],
            description: "An object defining the properties of the Impute Operation to be applied. The field value of the other positional channel is taken as `key` of the `Impute` Operation. The field of the `color` channel if specified is used as `groupby` of the `Impute` Operation.\n\n__See also:__ [`impute`](https://vega.github.io/vega-lite/docs/impute.html) documentation."
          },
          scale: {
            anyOf: [
              {
                $ref: "#/definitions/Scale"
              },
              {
                type: "null"
              }
            ],
            description: `An object defining properties of the channel's scale, which is the function that transforms values in the data domain (numbers, dates, strings, etc) to visual values (pixels, colors, sizes) of the encoding channels.

If \`null\`, the scale will be [disabled and the data value will be directly encoded](https://vega.github.io/vega-lite/docs/scale.html#disable).

__Default value:__ If undefined, default [scale properties](https://vega.github.io/vega-lite/docs/scale.html) are applied.

__See also:__ [\`scale\`](https://vega.github.io/vega-lite/docs/scale.html) documentation.`
          },
          sort: {
            $ref: "#/definitions/Sort",
            description: 'Sort order for the encoded field.\n\nFor continuous fields (quantitative or temporal), `sort` can be either `"ascending"` or `"descending"`.\n\nFor discrete fields, `sort` can be one of the following: - `"ascending"` or `"descending"` -- for sorting by the values\' natural order in JavaScript. - [A string indicating an encoding channel name to sort by](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding) (e.g., `"x"` or `"y"`) with an optional minus prefix for descending sort (e.g., `"-x"` to sort by x-field, descending). This channel string is short-form of [a sort-by-encoding definition](https://vega.github.io/vega-lite/docs/sort.html#sort-by-encoding). For example, `"sort": "-x"` is equivalent to `"sort": {"encoding": "x", "order": "descending"}`. - [A sort field definition](https://vega.github.io/vega-lite/docs/sort.html#sort-field) for sorting by another field. - [An array specifying the field values in preferred order](https://vega.github.io/vega-lite/docs/sort.html#sort-array). In this case, the sort order will obey the values in the array, followed by any unspecified values in their original order. For discrete time field, values in the sort array can be [date-time definition objects](types#datetime). In addition, for time units `"month"` and `"day"`, the values can be the month or day names (case insensitive) or their 3-letter initials (e.g., `"Mon"`, `"Tue"`). - `null` indicating no sort.\n\n__Default value:__ `"ascending"`\n\n__Note:__ `null` and sorting by another channel is not supported for `row` and `column`.\n\n__See also:__ [`sort`](https://vega.github.io/vega-lite/docs/sort.html) documentation.'
          },
          stack: {
            anyOf: [
              {
                $ref: "#/definitions/StackOffset"
              },
              {
                type: "null"
              },
              {
                type: "boolean"
              }
            ],
            description: 'Type of stacking offset if the field should be stacked. `stack` is only applicable for `x`, `y`, `theta`, and `radius` channels with continuous domains. For example, `stack` of `y` can be used to customize stacking for a vertical bar chart.\n\n`stack` can be one of the following values: - `"zero"` or `true`: stacking with baseline offset at zero value of the scale (for creating typical stacked [bar](https://vega.github.io/vega-lite/docs/stack.html#bar) and [area](https://vega.github.io/vega-lite/docs/stack.html#area) chart). - `"normalize"` - stacking with normalized domain (for creating [normalized stacked bar and area charts](https://vega.github.io/vega-lite/docs/stack.html#normalized). <br/> -`"center"` - stacking with center baseline (for [streamgraph](https://vega.github.io/vega-lite/docs/stack.html#streamgraph)). - `null` or `false` - No-stacking. This will produce layered [bar](https://vega.github.io/vega-lite/docs/stack.html#layered-bar-chart) and area chart.\n\n__Default value:__ `zero` for plots with all of the following conditions are true: (1) the mark is `bar`, `area`, or `arc`; (2) the stacked measure channel (x or y) has a linear scale; (3) At least one of non-position channels mapped to an unaggregated field that is different from x and y. Otherwise, `null` by default.\n\n__See also:__ [`stack`](https://vega.github.io/vega-lite/docs/stack.html) documentation.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            anyOf: [
              {
                $ref: "#/definitions/StandardType",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              },
              {
                $ref: "#/definitions/Type",
                description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
              }
            ],
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      y2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          datum: {
            anyOf: [
              {
                $ref: "#/definitions/PrimitiveValue"
              },
              {
                $ref: "#/definitions/DateTime"
              },
              {
                $ref: "#/definitions/ExprRef"
              },
              {
                $ref: "#/definitions/RepeatRef"
              }
            ],
            description: "A constant value in data domain."
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          type: {
            $ref: "#/definitions/Type",
            description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
          },
          value: {
            anyOf: [
              {
                type: "number"
              },
              {
                const: "width",
                type: "string"
              },
              {
                const: "height",
                type: "string"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
          }
        },
        type: "object"
      },
      yError: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: "number"
          }
        },
        type: "object"
      },
      yError2: {
        additionalProperties: !1,
        properties: {
          aggregate: {
            $ref: "#/definitions/Aggregate",
            description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
          },
          band: {
            description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          bin: {
            description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.',
            type: "null"
          },
          field: {
            $ref: "#/definitions/Field",
            description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
          },
          timeUnit: {
            anyOf: [
              {
                $ref: "#/definitions/TimeUnit"
              },
              {
                $ref: "#/definitions/TimeUnitParams"
              }
            ],
            description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                type: "null"
              }
            ],
            description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
          },
          value: {
            description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
            type: "number"
          }
        },
        type: "object"
      }
    },
    type: "object"
  },
  SingleDefUnitChannel: {
    enum: [
      "x",
      "y",
      "x2",
      "y2",
      "longitude",
      "latitude",
      "longitude2",
      "latitude2",
      "theta",
      "theta2",
      "radius",
      "radius2",
      "color",
      "fill",
      "stroke",
      "opacity",
      "fillOpacity",
      "strokeOpacity",
      "strokeWidth",
      "strokeDash",
      "size",
      "angle",
      "shape",
      "key",
      "text",
      "href",
      "url",
      "description"
    ],
    type: "string"
  },
  SingleSelection: {
    additionalProperties: !1,
    properties: {
      bind: {
        anyOf: [
          {
            $ref: "#/definitions/Binding"
          },
          {
            additionalProperties: {
              $ref: "#/definitions/Binding"
            },
            type: "object"
          },
          {
            $ref: "#/definitions/LegendBinding"
          }
        ],
        description: `When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [\`on\`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.

Legend bindings are restricted to selections that only specify a single field or encoding.

Query widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.

__See also:__ [\`bind\`](https://vega.github.io/vega-lite/docs/bind.html) documentation.`
      },
      clear: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          }
        ],
        description: "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
      },
      empty: {
        description: "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
        enum: [
          "all",
          "none"
        ],
        type: "string"
      },
      encodings: {
        description: "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/SingleDefUnitChannel"
        },
        type: "array"
      },
      fields: {
        description: "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      init: {
        $ref: "#/definitions/SelectionInitMapping",
        description: "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
      },
      nearest: {
        description: "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
        type: "boolean"
      },
      on: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          }
        ],
        description: "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
      },
      resolve: {
        $ref: "#/definitions/SelectionResolution",
        description: "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
      },
      type: {
        const: "single",
        description: 'Determines the default event processing and data query for the selection. Vega-Lite currently supports three selection types:\n\n- `"single"` -- to select a single discrete data value on `click`. - `"multi"` -- to select multiple discrete data value; the first value is selected on `click` and additional values toggled on shift-`click`. - `"interval"` -- to select a continuous range of data values on `drag`.',
        type: "string"
      }
    },
    required: [
      "type"
    ],
    type: "object"
  },
  SingleSelectionConfig: {
    additionalProperties: !1,
    properties: {
      bind: {
        anyOf: [
          {
            $ref: "#/definitions/Binding"
          },
          {
            additionalProperties: {
              $ref: "#/definitions/Binding"
            },
            type: "object"
          },
          {
            $ref: "#/definitions/LegendBinding"
          }
        ],
        description: `When set, a selection is populated by input elements (also known as dynamic query widgets) or by interacting with the corresponding legend. Direct manipulation interaction is disabled by default; to re-enable it, set the selection's [\`on\`](https://vega.github.io/vega-lite/docs/selection.html#common-selection-properties) property.

Legend bindings are restricted to selections that only specify a single field or encoding.

Query widget binding takes the form of Vega's [input element binding definition](https://vega.github.io/vega/docs/signals/#bind) or can be a mapping between projected field/encodings and binding definitions.

__See also:__ [\`bind\`](https://vega.github.io/vega-lite/docs/bind.html) documentation.`
      },
      clear: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          }
        ],
        description: "Clears the selection, emptying it of all values. Can be a [Event Stream](https://vega.github.io/vega/docs/event-streams/) or `false` to disable.\n\n__Default value:__ `dblclick`.\n\n__See also:__ [`clear`](https://vega.github.io/vega-lite/docs/clear.html) documentation."
      },
      empty: {
        description: "By default, `all` data values are considered to lie within an empty selection. When set to `none`, empty selections contain no data values.",
        enum: [
          "all",
          "none"
        ],
        type: "string"
      },
      encodings: {
        description: "An array of encoding channels. The corresponding data field values must match for a data tuple to fall within the selection.\n\n__See also:__ [`encodings`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/SingleDefUnitChannel"
        },
        type: "array"
      },
      fields: {
        description: "An array of field names whose values must match for a data tuple to fall within the selection.\n\n__See also:__ [`fields`](https://vega.github.io/vega-lite/docs/project.html) documentation.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      init: {
        $ref: "#/definitions/SelectionInitMapping",
        description: "Initialize the selection with a mapping between [projected channels or field names](https://vega.github.io/vega-lite/docs/project.html) and initial values.\n\n__See also:__ [`init`](https://vega.github.io/vega-lite/docs/init.html) documentation."
      },
      nearest: {
        description: "When true, an invisible voronoi diagram is computed to accelerate discrete selection. The data value _nearest_ the mouse cursor is added to the selection.\n\n__See also:__ [`nearest`](https://vega.github.io/vega-lite/docs/nearest.html) documentation.",
        type: "boolean"
      },
      on: {
        anyOf: [
          {
            $ref: "#/definitions/Stream"
          },
          {
            type: "string"
          }
        ],
        description: "A [Vega event stream](https://vega.github.io/vega/docs/event-streams/) (object or selector) that triggers the selection. For interval selections, the event stream must specify a [start and end](https://vega.github.io/vega/docs/event-streams/#between-filters)."
      },
      resolve: {
        $ref: "#/definitions/SelectionResolution",
        description: "With layered and multi-view displays, a strategy that determines how selections' data queries are resolved when applied in a filter transform, conditional encoding rule, or scale domain.\n\n__See also:__ [`resolve`](https://vega.github.io/vega-lite/docs/selection-resolve.html) documentation."
      }
    },
    type: "object"
  },
  SingleTimeUnit: {
    anyOf: [
      {
        $ref: "#/definitions/LocalSingleTimeUnit"
      },
      {
        $ref: "#/definitions/UtcSingleTimeUnit"
      }
    ]
  },
  Sort: {
    anyOf: [
      {
        $ref: "#/definitions/SortArray"
      },
      {
        $ref: "#/definitions/AllSortString"
      },
      {
        $ref: "#/definitions/EncodingSortField"
      },
      {
        $ref: "#/definitions/SortByEncoding"
      },
      {
        type: "null"
      }
    ]
  },
  SortArray: {
    anyOf: [
      {
        items: {
          type: "number"
        },
        type: "array"
      },
      {
        items: {
          type: "string"
        },
        type: "array"
      },
      {
        items: {
          type: "boolean"
        },
        type: "array"
      },
      {
        items: {
          $ref: "#/definitions/DateTime"
        },
        type: "array"
      }
    ]
  },
  SortByChannel: {
    enum: [
      "x",
      "y",
      "color",
      "fill",
      "stroke",
      "strokeWidth",
      "size",
      "shape",
      "fillOpacity",
      "strokeOpacity",
      "opacity",
      "text"
    ],
    type: "string"
  },
  SortByChannelDesc: {
    enum: [
      "-x",
      "-y",
      "-color",
      "-fill",
      "-stroke",
      "-strokeWidth",
      "-size",
      "-shape",
      "-fillOpacity",
      "-strokeOpacity",
      "-opacity",
      "-text"
    ],
    type: "string"
  },
  SortByEncoding: {
    additionalProperties: !1,
    properties: {
      encoding: {
        $ref: "#/definitions/SortByChannel",
        description: 'The [encoding channel](https://vega.github.io/vega-lite/docs/encoding.html#channels) to sort by (e.g., `"x"`, `"y"`)'
      },
      order: {
        anyOf: [
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            type: "null"
          }
        ],
        description: 'The sort order. One of `"ascending"` (default), `"descending"`, or `null` (no not sort).'
      }
    },
    required: [
      "encoding"
    ],
    type: "object"
  },
  SortField: {
    additionalProperties: !1,
    description: "A sort definition for transform",
    properties: {
      field: {
        $ref: "#/definitions/FieldName",
        description: "The name of the field to sort."
      },
      order: {
        anyOf: [
          {
            $ref: "#/definitions/SortOrder"
          },
          {
            type: "null"
          }
        ],
        description: 'Whether to sort the field in ascending or descending order. One of `"ascending"` (default), `"descending"`, or `null` (no not sort).'
      }
    },
    required: [
      "field"
    ],
    type: "object"
  },
  SortOrder: {
    enum: [
      "ascending",
      "descending"
    ],
    type: "string"
  },
  SphereGenerator: {
    additionalProperties: !1,
    properties: {
      name: {
        description: "Provide a placeholder name and bind data at runtime.",
        type: "string"
      },
      sphere: {
        anyOf: [
          {
            const: !0,
            type: "boolean"
          },
          {
            additionalProperties: !1,
            type: "object"
          }
        ],
        description: "Generate sphere GeoJSON data for the full globe."
      }
    },
    required: [
      "sphere"
    ],
    type: "object"
  },
  StackOffset: {
    enum: [
      "zero",
      "center",
      "normalize"
    ],
    type: "string"
  },
  StackTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        anyOf: [
          {
            $ref: "#/definitions/FieldName"
          },
          {
            items: [
              {
                $ref: "#/definitions/FieldName"
              },
              {
                $ref: "#/definitions/FieldName"
              }
            ],
            maxItems: 2,
            minItems: 2,
            type: "array"
          }
        ],
        description: 'Output field names. This can be either a string or an array of strings with two elements denoting the name for the fields for stack start and stack end respectively. If a single string(e.g., `"val"`) is provided, the end field will be `"val_end"`.'
      },
      groupby: {
        description: "The data fields to group by.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      offset: {
        description: 'Mode for stacking marks. One of `"zero"` (default), `"center"`, or `"normalize"`. The `"zero"` offset will stack starting at `0`. The `"center"` offset will center the stacks. The `"normalize"` offset will compute percentage values for each stack point, with output values in the range `[0,1]`.\n\n__Default value:__ `"zero"`',
        enum: [
          "zero",
          "center",
          "normalize"
        ],
        type: "string"
      },
      sort: {
        description: "Field that determines the order of leaves in the stacked charts.",
        items: {
          $ref: "#/definitions/SortField"
        },
        type: "array"
      },
      stack: {
        $ref: "#/definitions/FieldName",
        description: "The field which is stacked."
      }
    },
    required: [
      "stack",
      "groupby",
      "as"
    ],
    type: "object"
  },
  StandardType: {
    enum: [
      "quantitative",
      "ordinal",
      "temporal",
      "nominal"
    ],
    type: "string"
  },
  Step: {
    additionalProperties: !1,
    properties: {
      step: {
        description: "The size (width/height) per discrete step.",
        type: "number"
      }
    },
    required: [
      "step"
    ],
    type: "object"
  },
  Stream: {
    anyOf: [
      {
        $ref: "#/definitions/EventStream"
      },
      {
        $ref: "#/definitions/DerivedStream"
      },
      {
        $ref: "#/definitions/MergedStream"
      }
    ]
  },
  StringFieldDef: {
    additionalProperties: !1,
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      format: {
        anyOf: [
          {
            type: "string"
          },
          {
            $ref: "#/definitions/Dict<unknown>"
          }
        ],
        description: 'When used with the default `"number"` and `"time"` format type, the text formatting pattern for labels of guides (axes, legends, headers) and text marks.\n\n- If the format type is `"number"` (e.g., for quantitative fields), this is D3\'s [number format pattern](https://github.com/d3/d3-format#locale_format). - If the format type is `"time"` (e.g., for temporal fields), this is D3\'s [time format pattern](https://github.com/d3/d3-time-format#locale_format).\n\nSee the [format documentation](https://vega.github.io/vega-lite/docs/format.html) for more examples.\n\nWhen used with a [custom `formatType`](https://vega.github.io/vega-lite/docs/config.html#custom-format-type), this value will be passed as `format` alongside `datum.value` to the registered function.\n\n__Default value:__  Derived from [numberFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for number format and from [timeFormat](https://vega.github.io/vega-lite/docs/config.html#format) config for time format.'
      },
      formatType: {
        description: 'The format type for labels. One of `"number"`, `"time"`, or a [registered custom format type](https://vega.github.io/vega-lite/docs/config.html#custom-format-type).\n\n__Default value:__ - `"time"` for temporal fields and ordinal and nominal fields with `timeUnit`. - `"number"` for quantitative fields as well as ordinal and nominal fields without `timeUnit`.',
        type: "string"
      },
      labelExpr: {
        description: "[Vega expression](https://vega.github.io/vega/docs/expressions/) for customizing labels text.\n\n__Note:__ The label text and value can be assessed via the `label` and `value` properties of the axis's backing `datum` object.",
        type: "string"
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  StringFieldDefWithCondition: {
    $ref: "#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,string>"
  },
  StringValueDefWithCondition: {
    $ref: "#/definitions/ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>"
  },
  StrokeCap: {
    enum: [
      "butt",
      "round",
      "square"
    ],
    type: "string"
  },
  StrokeJoin: {
    enum: [
      "miter",
      "round",
      "bevel"
    ],
    type: "string"
  },
  StyleConfigIndex: {
    additionalProperties: {
      anyOf: [
        {
          $ref: "#/definitions/AnyMarkConfig"
        },
        {
          $ref: "#/definitions/Axis"
        }
      ]
    },
    properties: {
      arc: {
        $ref: "#/definitions/RectConfig",
        description: "Arc-specific Config"
      },
      area: {
        $ref: "#/definitions/AreaConfig",
        description: "Area-Specific Config"
      },
      bar: {
        $ref: "#/definitions/BarConfig",
        description: "Bar-Specific Config"
      },
      circle: {
        $ref: "#/definitions/MarkConfig",
        description: "Circle-Specific Config"
      },
      geoshape: {
        $ref: "#/definitions/MarkConfig",
        description: "Geoshape-Specific Config"
      },
      "group-subtitle": {
        $ref: "#/definitions/MarkConfig",
        description: "Default style for chart subtitles"
      },
      "group-title": {
        $ref: "#/definitions/MarkConfig",
        description: "Default style for chart titles"
      },
      "guide-label": {
        $ref: "#/definitions/MarkConfig",
        description: "Default style for axis, legend, and header labels."
      },
      "guide-title": {
        $ref: "#/definitions/MarkConfig",
        description: "Default style for axis, legend, and header titles."
      },
      image: {
        $ref: "#/definitions/RectConfig",
        description: "Image-specific Config"
      },
      line: {
        $ref: "#/definitions/LineConfig",
        description: "Line-Specific Config"
      },
      mark: {
        $ref: "#/definitions/MarkConfig",
        description: "Mark Config"
      },
      point: {
        $ref: "#/definitions/MarkConfig",
        description: "Point-Specific Config"
      },
      rect: {
        $ref: "#/definitions/RectConfig",
        description: "Rect-Specific Config"
      },
      rule: {
        $ref: "#/definitions/MarkConfig",
        description: "Rule-Specific Config"
      },
      square: {
        $ref: "#/definitions/MarkConfig",
        description: "Square-Specific Config"
      },
      text: {
        $ref: "#/definitions/MarkConfig",
        description: "Text-Specific Config"
      },
      tick: {
        $ref: "#/definitions/TickConfig",
        description: "Tick-Specific Config"
      },
      trail: {
        $ref: "#/definitions/LineConfig",
        description: "Trail-Specific Config"
      }
    },
    type: "object"
  },
  SymbolShape: {
    type: "string"
  },
  Text: {
    anyOf: [
      {
        type: "string"
      },
      {
        items: {
          type: "string"
        },
        type: "array"
      }
    ]
  },
  TextBaseline: {
    anyOf: [
      {
        const: "alphabetic",
        type: "string"
      },
      {
        $ref: "#/definitions/Baseline"
      },
      {
        const: "line-top",
        type: "string"
      },
      {
        const: "line-bottom",
        type: "string"
      }
    ]
  },
  TextDef: {
    anyOf: [
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<StringFieldDef,Text>"
      },
      {
        $ref: "#/definitions/FieldOrDatumDefWithCondition<StringDatumDef,Text>"
      },
      {
        $ref: "#/definitions/ValueDefWithCondition<StringFieldDef,Text>"
      }
    ]
  },
  TextDirection: {
    enum: [
      "ltr",
      "rtl"
    ],
    type: "string"
  },
  TickConfig: {
    additionalProperties: !1,
    properties: {
      align: {
        anyOf: [
          {
            $ref: "#/definitions/Align"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The horizontal alignment of the text or ranged marks (area, bar, image, rect, rule). One of `"left"`, `"right"`, `"center"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      angle: {
        anyOf: [
          {
            description: "The rotation angle of the text, in degrees.",
            maximum: 360,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG element, removing the mark item from the ARIA accessibility tree.',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRole: {
        anyOf: [
          {
            description: 'Sets the type of user interface element of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "role" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ariaRoleDescription: {
        anyOf: [
          {
            description: 'A human-readable, author-localized description for the role of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the "aria-roledescription" attribute. Warning: this property is experimental and may be changed in the future.',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aspect: {
        anyOf: [
          {
            description: "Whether to keep aspect ratio of image marks.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      bandSize: {
        description: `The width of the ticks.

__Default value:__  3/4 of step (width step for horizontal ticks and height step for vertical ticks).`,
        minimum: 0,
        type: "number"
      },
      baseline: {
        anyOf: [
          {
            $ref: "#/definitions/TextBaseline"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'For text marks, the vertical text baseline. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, `"line-bottom"`, or an expression reference that provides one of the valid values. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the `lineHeight` rather than `fontSize` alone.\n\nFor range marks, the vertical alignment of the marks. One of `"top"`, `"middle"`, `"bottom"`.\n\n__Note:__ Expression reference is *not* supported for range marks.'
      },
      blend: {
        anyOf: [
          {
            $ref: "#/definitions/Blend",
            description: 'The color blend mode for drawing an item on its current background. Any valid [CSS mix-blend-mode](https://developer.mozilla.org/en-US/docs/Web/CSS/mix-blend-mode) value can be used.\n\n__Default value: `"source-over"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      color: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Default color.\n\n__Default value:__ <span style="color: #4682b4;">&#9632;</span> `"#4682b4"`\n\n__Note:__ - This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config). - The `fill` and `stroke` properties have higher precedence than `color` and will override `color`.'
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusBottomRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' bottom right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopLeft: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top right corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cornerRadiusTopRight: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles' top left corner.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        anyOf: [
          {
            $ref: "#/definitions/Cursor",
            description: "The mouse cursor used over the mark. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      description: {
        anyOf: [
          {
            description: 'A text description of the mark item for [ARIA accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) (SVG output only). If specified, this property determines the ["aria-label" attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-label_attribute).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dir: {
        anyOf: [
          {
            $ref: "#/definitions/TextDirection",
            description: 'The direction of the text. One of `"ltr"` (left-to-right) or `"rtl"` (right-to-left). This property determines on which side is truncated in response to the limit parameter.\n\n__Default value:__ `"ltr"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "The horizontal offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "The vertical offset, in pixels, between the text label and its anchor point. The offset is applied after rotation by the _angle_ property.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      ellipsis: {
        anyOf: [
          {
            description: 'The ellipsis string for text truncated in response to the limit parameter.\n\n__Default value:__ `"…"`',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      endAngle: {
        anyOf: [
          {
            description: "The end angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default fill color. This property has higher precedence than `config.color`. Set to `null` to remove fill.\n\n__Default value:__ (None)"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      filled: {
        description: "Whether the mark's color should be used as fill color instead of stroke color.\n\n__Default value:__ `false` for all `point`, `line`, and `rule` marks as well as `geoshape` marks for [`graticule`](https://vega.github.io/vega-lite/docs/data.html#graticule) data sources; otherwise, `true`.\n\n__Note:__ This property cannot be used in a [style config](https://vega.github.io/vega-lite/docs/mark.html#style-config).",
        type: "boolean"
      },
      font: {
        anyOf: [
          {
            description: 'The typeface to set the text in (e.g., `"Helvetica Neue"`).',
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "The font size, in pixels.\n\n__Default value:__ `11`",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: 'The font style (e.g., `"italic"`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'The font weight. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        anyOf: [
          {
            description: "Height of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      href: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "A URL to load upon mouse click. If defined, the mark acts as a hyperlink."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      innerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The inner radius in pixels of arc marks. `innerRadius` is an alias for `radius2`."
      },
      interpolate: {
        anyOf: [
          {
            $ref: "#/definitions/Interpolate",
            description: 'The line interpolation method to use for line and area marks. One of the following: - `"linear"`: piecewise linear segments, as in a polyline. - `"linear-closed"`: close the linear segments to form a polygon. - `"step"`: alternate between horizontal and vertical segments, as in a step function. - `"step-before"`: alternate between vertical and horizontal segments, as in a step function. - `"step-after"`: alternate between horizontal and vertical segments, as in a step function. - `"basis"`: a B-spline, with control point duplication on the ends. - `"basis-open"`: an open B-spline; may not intersect the start or end. - `"basis-closed"`: a closed B-spline, as in a loop. - `"cardinal"`: a Cardinal spline, with control point duplication on the ends. - `"cardinal-open"`: an open Cardinal spline; may not intersect the start or end, but will intersect other control points. - `"cardinal-closed"`: a closed Cardinal spline, as in a loop. - `"bundle"`: equivalent to basis, except the tension parameter is used to straighten the spline. - `"monotone"`: cubic interpolation that preserves monotonicity in y.'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      invalid: {
        description: 'Defines how Vega-Lite should handle marks for invalid values (`null` and `NaN`). - If set to `"filter"` (default), all data items with null values will be skipped (for line, trail, and area marks) or filtered (for other marks). - If `null`, all data items are included. In this case, invalid values will be interpreted as zeroes.',
        enum: [
          "filter",
          null
        ],
        type: [
          "string",
          "null"
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum length of the text mark in pixels. The text value will be automatically truncated if the rendered size exceeds the limit.\n\n__Default value:__ `0` -- indicating no limit",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineBreak: {
        anyOf: [
          {
            description: "A delimiter, such as a newline character, upon which to break text strings into multiple lines. This property is ignored if the text is array-valued.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: "The line height in pixels (the spacing between subsequent lines of text) for multi-line text marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      order: {
        description: "For line and trail marks, this `order` property can be set to `null` or `false` to make the lines use the original order in the data sources.",
        type: [
          "null",
          "boolean"
        ]
      },
      orient: {
        $ref: "#/definitions/Orientation",
        description: "The orientation of a non-stacked bar, tick, area, and line charts. The value is either horizontal (default) or vertical. - For bar, rule and tick, this determines whether the size of the bar and tick should be applied to x or y dimension. - For area, this property determines the orient property of the Vega output. - For line and trail marks, this property determines the sort order of the points in the line if `config.sortLineBy` is not specified. For stacked charts, this is always determined by the orientation of the stack; therefore explicitly specified value will be ignored."
      },
      outerRadius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The outer radius in pixels of arc marks. `outerRadius` is an alias for `radius`."
      },
      padAngle: {
        anyOf: [
          {
            description: "The angular padding applied to sides of the arc, in radians.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      radius: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "For arc mark, the primary (outer) radius in pixels.\n\nFor text marks, polar coordinate radial offset, in pixels, of the text from the origin determined by the `x` and `y` properties."
      },
      radius2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The secondary (inner) radius in pixels of arc marks."
      },
      shape: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/SymbolShape"
              },
              {
                type: "string"
              }
            ],
            description: 'Shape of the point marks. Supported values include: - plotting shapes: `"circle"`, `"square"`, `"cross"`, `"diamond"`, `"triangle-up"`, `"triangle-down"`, `"triangle-right"`, or `"triangle-left"`. - the line symbol `"stroke"` - centered directional shapes `"arrow"`, `"wedge"`, or `"triangle"` - a custom [SVG path string](https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths) (For correct sizing, custom shape paths should be defined within a square bounding box with coordinates ranging from -1 to 1 along both the x and y dimensions.)\n\n__Default value:__ `"circle"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      size: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default size for marks. - For `point`/`circle`/`square`, this represents the pixel area of the marks. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value. - For `bar`, this represents the band size of the bar, in pixels. - For `text`, this represents the font size, in pixels.\n\n__Default value:__ - `30` for point, circle, square marks; width/height's `step` - `2` for bar marks with discrete dimensions; - `5` for bar marks with continuous dimensions; - `11` for text marks.",
        minimum: 0
      },
      smooth: {
        anyOf: [
          {
            description: "A boolean flag (default true) indicating if the image should be smoothed when resized. If false, individual pixels should be scaled directly rather than interpolated with smoothing. For SVG rendering, this option may not work in some browsers due to lack of standardization.",
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      startAngle: {
        anyOf: [
          {
            description: "The start angle in radians for arc marks. A value of `0` indicates up (north), increasing values proceed clockwise.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "Default stroke color. This property has higher precedence than `config.color`. Set to `null` to remove stroke.\n\n__Default value:__ (None)"
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOffset: {
        anyOf: [
          {
            description: "The offset in pixels at which to draw the group stroke and fill. If unspecified, the default behavior is to dynamically offset stroked groups such that 1 pixel stroke widths align with the pixel grid.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      tension: {
        anyOf: [
          {
            description: "Depending on the interpolation type, sets the tension parameter (for line and area marks).",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text",
            description: "Placeholder text if the `text` channel is not specified"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      theta: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: `- For arc marks, the arc length in radians if theta2 is not specified, otherwise the start arc angle. (A value of 0 indicates up or “north”, increasing values proceed clockwise.)

- For text marks, polar coordinate angle in radians.`,
        maximum: 360,
        minimum: 0
      },
      theta2: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The end angle of arc marks in radians. A value of 0 indicates up or “north”, increasing values proceed clockwise."
      },
      thickness: {
        description: "Thickness of the tick mark.\n\n__Default value:__  `1`",
        minimum: 0,
        type: "number"
      },
      timeUnitBand: {
        description: "Default relative band size for a time unit. If set to `1`, the bandwidth of the marks will be equal to the time unit band step. If set to `0.5`, bandwidth of the marks will be half of the time unit band step.",
        type: "number"
      },
      timeUnitBandPosition: {
        description: "Default relative band position for a time unit. If set to `0`, the marks will be positioned at the beginning of the time unit band step. If set to `0.5`, the marks will be positioned in the middle of the time unit band step.",
        type: "number"
      },
      tooltip: {
        anyOf: [
          {
            type: "number"
          },
          {
            type: "string"
          },
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/TooltipContent"
          },
          {
            $ref: "#/definitions/ExprRef"
          },
          {
            type: "null"
          }
        ],
        description: 'The tooltip text string to show upon mouse hover or an object defining which fields should the tooltip be derived from.\n\n- If `tooltip` is `true` or `{"content": "encoding"}`, then all fields from `encoding` will be used. - If `tooltip` is `{"content": "data"}`, then all fields that appear in the highlighted data point will be used. - If set to `null` or `false`, then no tooltip will be used.\n\nSee the [`tooltip`](https://vega.github.io/vega-lite/docs/tooltip.html) documentation for a detailed discussion about tooltip  in Vega-Lite.\n\n__Default value:__ `null`'
      },
      url: {
        anyOf: [
          {
            $ref: "#/definitions/URI",
            description: "The URL of the image file for image marks."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        anyOf: [
          {
            description: "Width of the marks.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      x: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X coordinates of the marks, or width of horizontal `"bar"` and `"area"` without specified `x2` or `width`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      x2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'X2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"width"` for the width of the plot.'
      },
      y: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y coordinates of the marks, or height of vertical `"bar"` and `"area"` without specified `y2` or `height`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      },
      y2: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'Y2 coordinates for ranged `"area"`, `"bar"`, `"rect"`, and  `"rule"`.\n\nThe `value` of this channel can be a number or a string `"height"` for the height of the plot.'
      }
    },
    type: "object"
  },
  TickCount: {
    anyOf: [
      {
        type: "number"
      },
      {
        $ref: "#/definitions/TimeInterval"
      },
      {
        $ref: "#/definitions/TimeIntervalStep"
      }
    ]
  },
  TimeInterval: {
    enum: [
      "millisecond",
      "second",
      "minute",
      "hour",
      "day",
      "week",
      "month",
      "year"
    ],
    type: "string"
  },
  TimeIntervalStep: {
    additionalProperties: !1,
    properties: {
      interval: {
        $ref: "#/definitions/TimeInterval"
      },
      step: {
        type: "number"
      }
    },
    required: [
      "interval",
      "step"
    ],
    type: "object"
  },
  TimeUnit: {
    anyOf: [
      {
        $ref: "#/definitions/SingleTimeUnit"
      },
      {
        $ref: "#/definitions/MultiTimeUnit"
      }
    ]
  },
  TimeUnitParams: {
    additionalProperties: !1,
    properties: {
      maxbins: {
        description: "If no `unit` is specified, maxbins is used to infer time units.",
        type: "number"
      },
      step: {
        description: "The number of steps between bins, in terms of the least significant unit provided.",
        type: "number"
      },
      unit: {
        $ref: "#/definitions/TimeUnit",
        description: "Defines how date-time values should be binned."
      },
      utc: {
        description: "True to use UTC timezone. Equivalent to using a `utc` prefixed `TimeUnit`.",
        type: "boolean"
      }
    },
    type: "object"
  },
  TimeUnitTransform: {
    additionalProperties: !1,
    properties: {
      as: {
        $ref: "#/definitions/FieldName",
        description: "The output field to write the timeUnit value."
      },
      field: {
        $ref: "#/definitions/FieldName",
        description: "The data field to apply time unit."
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "The timeUnit."
      }
    },
    required: [
      "timeUnit",
      "field",
      "as"
    ],
    type: "object"
  },
  TitleAnchor: {
    enum: [
      null,
      "start",
      "middle",
      "end"
    ],
    type: [
      "null",
      "string"
    ]
  },
  TitleConfig: {
    $ref: "#/definitions/BaseTitleNoValueRefs"
  },
  TitleFrame: {
    enum: [
      "bounds",
      "group"
    ],
    type: "string"
  },
  TitleOrient: {
    enum: [
      "none",
      "left",
      "right",
      "top",
      "bottom"
    ],
    type: "string"
  },
  TitleParams: {
    additionalProperties: !1,
    properties: {
      align: {
        $ref: "#/definitions/Align",
        description: 'Horizontal text alignment for title text. One of `"left"`, `"center"`, or `"right"`.'
      },
      anchor: {
        $ref: "#/definitions/TitleAnchor",
        description: 'The anchor position for placing the title. One of `"start"`, `"middle"`, or `"end"`. For example, with an orientation of top these anchor positions map to a left-, center-, or right-aligned title.\n\n__Default value:__ `"middle"` for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. `"start"` for other composite views.\n\n__Note:__ [For now](https://github.com/vega/vega-lite/issues/2875), `anchor` is only customizable only for [single](https://vega.github.io/vega-lite/docs/spec.html) and [layered](https://vega.github.io/vega-lite/docs/layer.html) views. For other composite views, `anchor` is always `"start"`.'
      },
      angle: {
        anyOf: [
          {
            description: "Angle in degrees of title and subtitle text.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      aria: {
        anyOf: [
          {
            description: 'A boolean flag indicating if [ARIA attributes](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA) should be included (SVG output only). If `false`, the "aria-hidden" attribute will be set on the output SVG group, removing the title from the ARIA accessibility tree.\n\n__Default value:__ `true`',
            type: "boolean"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      baseline: {
        $ref: "#/definitions/TextBaseline",
        description: 'Vertical text baseline for title and subtitle text. One of `"alphabetic"` (default), `"top"`, `"middle"`, `"bottom"`, `"line-top"`, or `"line-bottom"`. The `"line-top"` and `"line-bottom"` values operate similarly to `"top"` and `"bottom"`, but are calculated relative to the *lineHeight* rather than *fontSize* alone.'
      },
      color: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Text color for title text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dx: {
        anyOf: [
          {
            description: "Delta offset for title and subtitle text x-coordinate.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      dy: {
        anyOf: [
          {
            description: "Delta offset for title and subtitle text y-coordinate.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      font: {
        anyOf: [
          {
            description: "Font name for title text.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontSize: {
        anyOf: [
          {
            description: "Font size in pixels for title text.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style for title text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      fontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'Font weight for title text. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      frame: {
        anyOf: [
          {
            anyOf: [
              {
                $ref: "#/definitions/TitleFrame"
              },
              {
                type: "string"
              }
            ],
            description: 'The reference frame for the anchor position, one of `"bounds"` (to anchor relative to the full bounding box) or `"group"` (to anchor relative to the group width or height).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      limit: {
        anyOf: [
          {
            description: "The maximum allowed length in pixels of title and subtitle text.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      lineHeight: {
        anyOf: [
          {
            description: 'Line height in pixels for multi-line title text or title text with `"line-top"` or `"line-bottom"` baseline.',
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      offset: {
        anyOf: [
          {
            description: "The orthogonal offset in pixels by which to displace the title group from its position along the edge of the chart.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      orient: {
        anyOf: [
          {
            $ref: "#/definitions/TitleOrient",
            description: 'Default title orientation (`"top"`, `"bottom"`, `"left"`, or `"right"`)'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      style: {
        anyOf: [
          {
            type: "string"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          }
        ],
        description: 'A [mark style property](https://vega.github.io/vega-lite/docs/config.html#style) to apply to the title text mark.\n\n__Default value:__ `"group-title"`.'
      },
      subtitle: {
        $ref: "#/definitions/Text",
        description: "The subtitle Text."
      },
      subtitleColor: {
        anyOf: [
          {
            anyOf: [
              {
                type: "null"
              },
              {
                $ref: "#/definitions/Color"
              }
            ],
            description: "Text color for subtitle text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFont: {
        anyOf: [
          {
            description: "Font name for subtitle text.",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFontSize: {
        anyOf: [
          {
            description: "Font size in pixels for subtitle text.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFontStyle: {
        anyOf: [
          {
            $ref: "#/definitions/FontStyle",
            description: "Font style for subtitle text."
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleFontWeight: {
        anyOf: [
          {
            $ref: "#/definitions/FontWeight",
            description: 'Font weight for subtitle text. This can be either a string (e.g `"bold"`, `"normal"`) or a number (`100`, `200`, `300`, ..., `900` where `"normal"` = `400` and `"bold"` = `700`).'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitleLineHeight: {
        anyOf: [
          {
            description: "Line height in pixels for multi-line subtitle text.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      subtitlePadding: {
        anyOf: [
          {
            description: "The padding in pixels between title and subtitle text.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      text: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The title text."
      },
      zindex: {
        description: "The integer z-index indicating the layering of the title group relative to other axis, mark and legend groups.\n\n__Default value:__ `0`.",
        minimum: 0,
        type: "number"
      }
    },
    required: [
      "text"
    ],
    type: "object"
  },
  TooltipContent: {
    additionalProperties: !1,
    properties: {
      content: {
        enum: [
          "encoding",
          "data"
        ],
        type: "string"
      }
    },
    required: [
      "content"
    ],
    type: "object"
  },
  "TopLevelNormalizedConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    properties: {
      $schema: {
        description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
        format: "uri",
        type: "string"
      },
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      autosize: {
        anyOf: [
          {
            $ref: "#/definitions/AutosizeType"
          },
          {
            $ref: "#/definitions/AutoSizeParams"
          }
        ],
        description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
      },
      background: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      concat: {
        description: "A list of views to be concatenated.",
        items: {
          $ref: "#/definitions/NormalizedSpec"
        },
        type: "array"
      },
      config: {
        $ref: "#/definitions/Config",
        description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      datasets: {
        $ref: "#/definitions/Datasets",
        description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      padding: {
        anyOf: [
          {
            $ref: "#/definitions/Padding"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
      },
      params: {
        description: "Dynamic variables that parameterize a visualization.",
        items: {
          $ref: "#/definitions/Parameter"
        },
        type: "array"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      usermeta: {
        $ref: "#/definitions/Dict<unknown>",
        description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
      }
    },
    required: [
      "concat"
    ],
    type: "object"
  },
  "TopLevelNormalizedHConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    properties: {
      $schema: {
        description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
        format: "uri",
        type: "string"
      },
      autosize: {
        anyOf: [
          {
            $ref: "#/definitions/AutosizeType"
          },
          {
            $ref: "#/definitions/AutoSizeParams"
          }
        ],
        description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
      },
      background: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        description: "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      config: {
        $ref: "#/definitions/Config",
        description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      datasets: {
        $ref: "#/definitions/Datasets",
        description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      hconcat: {
        description: "A list of views to be concatenated and put into a row.",
        items: {
          $ref: "#/definitions/NormalizedSpec"
        },
        type: "array"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      padding: {
        anyOf: [
          {
            $ref: "#/definitions/Padding"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
      },
      params: {
        description: "Dynamic variables that parameterize a visualization.",
        items: {
          $ref: "#/definitions/Parameter"
        },
        type: "array"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        description: "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
        type: "number"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      usermeta: {
        $ref: "#/definitions/Dict<unknown>",
        description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
      }
    },
    required: [
      "hconcat"
    ],
    type: "object"
  },
  "TopLevelNormalizedVConcatSpec<GenericSpec>": {
    additionalProperties: !1,
    properties: {
      $schema: {
        description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
        format: "uri",
        type: "string"
      },
      autosize: {
        anyOf: [
          {
            $ref: "#/definitions/AutosizeType"
          },
          {
            $ref: "#/definitions/AutoSizeParams"
          }
        ],
        description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
      },
      background: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        description: "Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      config: {
        $ref: "#/definitions/Config",
        description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      datasets: {
        $ref: "#/definitions/Datasets",
        description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      padding: {
        anyOf: [
          {
            $ref: "#/definitions/Padding"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
      },
      params: {
        description: "Dynamic variables that parameterize a visualization.",
        items: {
          $ref: "#/definitions/Parameter"
        },
        type: "array"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        description: "The spacing in pixels between sub-views of the concat operator.\n\n__Default value__: `10`",
        type: "number"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      usermeta: {
        $ref: "#/definitions/Dict<unknown>",
        description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
      },
      vconcat: {
        description: "A list of views to be concatenated and put into a column.",
        items: {
          $ref: "#/definitions/NormalizedSpec"
        },
        type: "array"
      }
    },
    required: [
      "vconcat"
    ],
    type: "object"
  },
  TopLevelLayerSpec: {
    additionalProperties: !1,
    properties: {
      $schema: {
        description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
        format: "uri",
        type: "string"
      },
      autosize: {
        anyOf: [
          {
            $ref: "#/definitions/AutosizeType"
          },
          {
            $ref: "#/definitions/AutoSizeParams"
          }
        ],
        description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
      },
      background: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
      },
      config: {
        $ref: "#/definitions/Config",
        description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      datasets: {
        $ref: "#/definitions/Datasets",
        description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      encoding: {
        $ref: "#/definitions/SharedEncoding",
        description: "A shared key-value mapping between encoding channels and definition of fields in the underlying layers."
      },
      height: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      },
      layer: {
        description: "Layer or single view specifications to be layered.\n\n__Note__: Specifications inside `layer` cannot use `row` and `column` channels as layering facet specifications is not allowed. Instead, use the [facet operator](https://vega.github.io/vega-lite/docs/facet.html) and place a layer inside a facet.",
        items: {
          anyOf: [
            {
              $ref: "#/definitions/LayerSpec"
            },
            {
              $ref: "#/definitions/UnitSpec"
            }
          ]
        },
        type: "array"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      padding: {
        anyOf: [
          {
            $ref: "#/definitions/Padding"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
      },
      params: {
        description: "Dynamic variables that parameterize a visualization.",
        items: {
          $ref: "#/definitions/Parameter"
        },
        type: "array"
      },
      projection: {
        $ref: "#/definitions/Projection",
        description: "An object defining properties of the geographic projection shared by underlying layers."
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      usermeta: {
        $ref: "#/definitions/Dict<unknown>",
        description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
      },
      view: {
        $ref: "#/definitions/ViewBackground",
        description: `An object defining the view background's fill and stroke.

__Default value:__ none (transparent)`
      },
      width: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      }
    },
    required: [
      "layer"
    ],
    type: "object"
  },
  TopLevelRepeatSpec: {
    anyOf: [
      {
        additionalProperties: !1,
        properties: {
          $schema: {
            description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
            format: "uri",
            type: "string"
          },
          align: {
            anyOf: [
              {
                $ref: "#/definitions/LayoutAlign"
              },
              {
                $ref: "#/definitions/RowCol<LayoutAlign>"
              }
            ],
            description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
          },
          autosize: {
            anyOf: [
              {
                $ref: "#/definitions/AutosizeType"
              },
              {
                $ref: "#/definitions/AutoSizeParams"
              }
            ],
            description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
          },
          background: {
            anyOf: [
              {
                $ref: "#/definitions/Color"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
          },
          bounds: {
            description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
            enum: [
              "full",
              "flush"
            ],
            type: "string"
          },
          center: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/RowCol<boolean>"
              }
            ],
            description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
          },
          columns: {
            description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
            type: "number"
          },
          config: {
            $ref: "#/definitions/Config",
            description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
          },
          data: {
            anyOf: [
              {
                $ref: "#/definitions/Data"
              },
              {
                type: "null"
              }
            ],
            description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
          },
          datasets: {
            $ref: "#/definitions/Datasets",
            description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
          },
          description: {
            description: "Description of this mark for commenting purpose.",
            type: "string"
          },
          name: {
            description: "Name of the visualization for later reference.",
            type: "string"
          },
          padding: {
            anyOf: [
              {
                $ref: "#/definitions/Padding"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
          },
          params: {
            description: "Dynamic variables that parameterize a visualization.",
            items: {
              $ref: "#/definitions/Parameter"
            },
            type: "array"
          },
          repeat: {
            anyOf: [
              {
                items: {
                  type: "string"
                },
                type: "array"
              },
              {
                $ref: "#/definitions/RepeatMapping"
              }
            ],
            description: 'Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed fields to be repeated along the particular orientations. The objects `{"repeat": "row"}` and `{"repeat": "column"}` can be used to refer to the repeated field respectively.'
          },
          resolve: {
            $ref: "#/definitions/Resolve",
            description: "Scale, axis, and legend resolutions for view composition specifications."
          },
          spacing: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/RowCol<number>"
              }
            ],
            description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
          },
          spec: {
            $ref: "#/definitions/Spec",
            description: "A specification of the view that gets repeated."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                $ref: "#/definitions/TitleParams"
              }
            ],
            description: "Title for the plot."
          },
          transform: {
            description: "An array of data transformations such as filter and new field calculation.",
            items: {
              $ref: "#/definitions/Transform"
            },
            type: "array"
          },
          usermeta: {
            $ref: "#/definitions/Dict<unknown>",
            description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
          }
        },
        required: [
          "repeat",
          "spec"
        ],
        type: "object"
      },
      {
        additionalProperties: !1,
        properties: {
          $schema: {
            description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
            format: "uri",
            type: "string"
          },
          align: {
            anyOf: [
              {
                $ref: "#/definitions/LayoutAlign"
              },
              {
                $ref: "#/definitions/RowCol<LayoutAlign>"
              }
            ],
            description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
          },
          autosize: {
            anyOf: [
              {
                $ref: "#/definitions/AutosizeType"
              },
              {
                $ref: "#/definitions/AutoSizeParams"
              }
            ],
            description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
          },
          background: {
            anyOf: [
              {
                $ref: "#/definitions/Color"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
          },
          bounds: {
            description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
            enum: [
              "full",
              "flush"
            ],
            type: "string"
          },
          center: {
            anyOf: [
              {
                type: "boolean"
              },
              {
                $ref: "#/definitions/RowCol<boolean>"
              }
            ],
            description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
          },
          columns: {
            description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
            type: "number"
          },
          config: {
            $ref: "#/definitions/Config",
            description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
          },
          data: {
            anyOf: [
              {
                $ref: "#/definitions/Data"
              },
              {
                type: "null"
              }
            ],
            description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
          },
          datasets: {
            $ref: "#/definitions/Datasets",
            description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
          },
          description: {
            description: "Description of this mark for commenting purpose.",
            type: "string"
          },
          name: {
            description: "Name of the visualization for later reference.",
            type: "string"
          },
          padding: {
            anyOf: [
              {
                $ref: "#/definitions/Padding"
              },
              {
                $ref: "#/definitions/ExprRef"
              }
            ],
            description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
          },
          params: {
            description: "Dynamic variables that parameterize a visualization.",
            items: {
              $ref: "#/definitions/Parameter"
            },
            type: "array"
          },
          repeat: {
            $ref: "#/definitions/LayerRepeatMapping",
            description: 'Definition for fields to be repeated. One of: 1) An array of fields to be repeated. If `"repeat"` is an array, the field can be referred to as `{"repeat": "repeat"}`. The repeated views are laid out in a wrapped row. You can set the number of columns to control the wrapping. 2) An object that maps `"row"` and/or `"column"` to the listed fields to be repeated along the particular orientations. The objects `{"repeat": "row"}` and `{"repeat": "column"}` can be used to refer to the repeated field respectively.'
          },
          resolve: {
            $ref: "#/definitions/Resolve",
            description: "Scale, axis, and legend resolutions for view composition specifications."
          },
          spacing: {
            anyOf: [
              {
                type: "number"
              },
              {
                $ref: "#/definitions/RowCol<number>"
              }
            ],
            description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
          },
          spec: {
            anyOf: [
              {
                $ref: "#/definitions/LayerSpec"
              },
              {
                $ref: "#/definitions/UnitSpec"
              }
            ],
            description: "A specification of the view that gets repeated."
          },
          title: {
            anyOf: [
              {
                $ref: "#/definitions/Text"
              },
              {
                $ref: "#/definitions/TitleParams"
              }
            ],
            description: "Title for the plot."
          },
          transform: {
            description: "An array of data transformations such as filter and new field calculation.",
            items: {
              $ref: "#/definitions/Transform"
            },
            type: "array"
          },
          usermeta: {
            $ref: "#/definitions/Dict<unknown>",
            description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
          }
        },
        required: [
          "repeat",
          "spec"
        ],
        type: "object"
      }
    ]
  },
  TopLevelFacetSpec: {
    additionalProperties: !1,
    properties: {
      $schema: {
        description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
        format: "uri",
        type: "string"
      },
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      autosize: {
        anyOf: [
          {
            $ref: "#/definitions/AutosizeType"
          },
          {
            $ref: "#/definitions/AutoSizeParams"
          }
        ],
        description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
      },
      background: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      columns: {
        description: "The number of columns to include in the view composition layout.\n\n__Default value__: `undefined` -- An infinite number of columns (a single row) will be assumed. This is equivalent to `hconcat` (for `concat`) and to using the `column` channel (for `facet` and `repeat`).\n\n__Note__:\n\n1) This property is only for: - the general (wrappable) `concat` operator (not `hconcat`/`vconcat`) - the `facet` and `repeat` operator with one field/repetition definition (without row/column nesting)\n\n2) Setting the `columns` to `1` is equivalent to `vconcat` (for `concat`) and to using the `row` channel (for `facet` and `repeat`).",
        type: "number"
      },
      config: {
        $ref: "#/definitions/Config",
        description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      datasets: {
        $ref: "#/definitions/Datasets",
        description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      facet: {
        anyOf: [
          {
            $ref: "#/definitions/FacetFieldDef"
          },
          {
            $ref: "#/definitions/FacetMapping"
          }
        ],
        description: "Definition for how to facet the data. One of: 1) [a field definition for faceting the plot by one field](https://vega.github.io/vega-lite/docs/facet.html#field-def) 2) [An object that maps `row` and `column` channels to their field definitions](https://vega.github.io/vega-lite/docs/facet.html#mapping)"
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      padding: {
        anyOf: [
          {
            $ref: "#/definitions/Padding"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
      },
      params: {
        description: "Dynamic variables that parameterize a visualization.",
        items: {
          $ref: "#/definitions/Parameter"
        },
        type: "array"
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      spec: {
        anyOf: [
          {
            $ref: "#/definitions/LayerSpec"
          },
          {
            $ref: "#/definitions/UnitSpecWithFrame"
          }
        ],
        description: "A specification of the view that gets faceted."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      usermeta: {
        $ref: "#/definitions/Dict<unknown>",
        description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
      }
    },
    required: [
      "data",
      "facet",
      "spec"
    ],
    type: "object"
  },
  TopLevelSpec: {
    anyOf: [
      {
        $ref: "#/definitions/TopLevelUnitSpec"
      },
      {
        $ref: "#/definitions/TopLevelFacetSpec"
      },
      {
        $ref: "#/definitions/TopLevelLayerSpec"
      },
      {
        $ref: "#/definitions/TopLevelRepeatSpec"
      },
      {
        $ref: "#/definitions/TopLevelNormalizedConcatSpec<GenericSpec>"
      },
      {
        $ref: "#/definitions/TopLevelNormalizedVConcatSpec<GenericSpec>"
      },
      {
        $ref: "#/definitions/TopLevelNormalizedHConcatSpec<GenericSpec>"
      }
    ],
    description: "A Vega-Lite top-level specification. This is the root class for all Vega-Lite specifications. (The json schema is generated from this type.)"
  },
  TopLevelUnitSpec: {
    additionalProperties: !1,
    properties: {
      $schema: {
        description: "URL to [JSON schema](http://json-schema.org/) for a Vega-Lite specification. Unless you have a reason to change this, use `https://vega.github.io/schema/vega-lite/v4.json`. Setting the `$schema` property allows automatic validation and autocomplete in editors that support JSON schema.",
        format: "uri",
        type: "string"
      },
      align: {
        anyOf: [
          {
            $ref: "#/definitions/LayoutAlign"
          },
          {
            $ref: "#/definitions/RowCol<LayoutAlign>"
          }
        ],
        description: 'The alignment to apply to grid rows and columns. The supported string values are `"all"`, `"each"`, and `"none"`.\n\n- For `"none"`, a flow layout will be used, in which adjacent subviews are simply placed one after the other. - For `"each"`, subviews will be aligned into a clean grid structure, but each row or column may be of variable size. - For `"all"`, subviews will be aligned and each row or column will be sized identically based on the maximum observed size. String values for this property will be applied to both grid rows and columns.\n\nAlternatively, an object value of the form `{"row": string, "column": string}` can be used to supply different alignments for rows and columns.\n\n__Default value:__ `"all"`.'
      },
      autosize: {
        anyOf: [
          {
            $ref: "#/definitions/AutosizeType"
          },
          {
            $ref: "#/definitions/AutoSizeParams"
          }
        ],
        description: 'How the visualization size should be determined. If a string, should be one of `"pad"`, `"fit"` or `"none"`. Object values can additionally specify parameters for content sizing and automatic resizing.\n\n__Default value__: `pad`'
      },
      background: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'CSS color property to use as the background of the entire view.\n\n__Default value:__ `"white"`'
      },
      bounds: {
        description: 'The bounds calculation method to use for determining the extent of a sub-plot. One of `full` (the default) or `flush`.\n\n- If set to `full`, the entire calculated bounds (including axes, title, and legend) will be used. - If set to `flush`, only the specified width and height values for the sub-view will be used. The `flush` setting can be useful when attempting to place sub-plots without axes or legends into a uniform grid structure.\n\n__Default value:__ `"full"`',
        enum: [
          "full",
          "flush"
        ],
        type: "string"
      },
      center: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/RowCol<boolean>"
          }
        ],
        description: 'Boolean flag indicating if subviews should be centered relative to their respective rows or columns.\n\nAn object value of the form `{"row": boolean, "column": boolean}` can be used to supply different centering values for rows and columns.\n\n__Default value:__ `false`'
      },
      config: {
        $ref: "#/definitions/Config",
        description: "Vega-Lite configuration object. This property can only be defined at the top-level of a specification."
      },
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      datasets: {
        $ref: "#/definitions/Datasets",
        description: "A global data store for named datasets. This is a mapping from names to inline datasets. This can be an array of objects or primitive values or a string. Arrays of primitive values are ingested as objects with a `data` property."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      encoding: {
        $ref: "#/definitions/FacetedEncoding",
        description: "A key-value mapping between encoding channels and definition of fields."
      },
      height: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      },
      mark: {
        $ref: "#/definitions/AnyMark",
        description: 'A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).'
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      padding: {
        anyOf: [
          {
            $ref: "#/definitions/Padding"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The default visualization padding, in pixels, from the edge of the visualization canvas to the data rectangle. If a number, specifies padding for all sides. If an object, the value should have the format `{"left": 5, "top": 5, "right": 5, "bottom": 5}` to specify padding for each side of the visualization.\n\n__Default value__: `5`'
      },
      params: {
        description: "Dynamic variables that parameterize a visualization.",
        items: {
          $ref: "#/definitions/Parameter"
        },
        type: "array"
      },
      projection: {
        $ref: "#/definitions/Projection",
        description: 'An object defining properties of geographic projection, which will be applied to `shape` path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other marks.'
      },
      resolve: {
        $ref: "#/definitions/Resolve",
        description: "Scale, axis, and legend resolutions for view composition specifications."
      },
      selection: {
        additionalProperties: {
          $ref: "#/definitions/SelectionDef"
        },
        description: "A key-value mapping between selection names and definitions.",
        type: "object"
      },
      spacing: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/RowCol<number>"
          }
        ],
        description: 'The spacing in pixels between sub-views of the composition operator. An object of the form `{"row": number, "column": number}` can be used to set different spacing values for rows and columns.\n\n__Default value__: Depends on `"spacing"` property of [the view composition configuration](https://vega.github.io/vega-lite/docs/config.html#view-config) (`20` by default)'
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      usermeta: {
        $ref: "#/definitions/Dict<unknown>",
        description: "Optional metadata that will be passed to Vega. This object is completely ignored by Vega and Vega-Lite and can be used for custom metadata."
      },
      view: {
        $ref: "#/definitions/ViewBackground",
        description: `An object defining the view background's fill and stroke.

__Default value:__ none (transparent)`
      },
      width: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      }
    },
    required: [
      "data",
      "mark"
    ],
    type: "object"
  },
  TopoDataFormat: {
    additionalProperties: !1,
    properties: {
      feature: {
        description: 'The name of the TopoJSON object set to convert to a GeoJSON feature collection. For example, in a map of the world, there may be an object set named `"countries"`. Using the feature property, we can extract this set and generate a GeoJSON feature object for each country.',
        type: "string"
      },
      mesh: {
        description: "The name of the TopoJSON object set to convert to mesh. Similar to the `feature` option, `mesh` extracts a named TopoJSON object set.   Unlike the `feature` option, the corresponding geo data is returned as a single, unified mesh instance, not as individual GeoJSON features. Extracting a mesh is useful for more efficiently drawing borders or other geographic elements that you do not need to associate with specific regions such as individual countries, states or counties.",
        type: "string"
      },
      parse: {
        anyOf: [
          {
            $ref: "#/definitions/Parse"
          },
          {
            type: "null"
          }
        ],
        description: 'If set to `null`, disable type inference based on the spec and only use type inference based on the data. Alternatively, a parsing directive object can be provided for explicit data types. Each property of the object corresponds to a field name, and the value to the desired data type (one of `"number"`, `"boolean"`, `"date"`, or null (do not parse the field)). For example, `"parse": {"modified_on": "date"}` parses the `modified_on` field in each input record a Date value.\n\nFor `"date"`, we parse data based using Javascript\'s [`Date.parse()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/parse). For Specific date formats can be provided (e.g., `{foo: "date:\'%m%d%Y\'"}`), using the [d3-time-format syntax](https://github.com/d3/d3-time-format#locale_format). UTC date format parsing is supported similarly (e.g., `{foo: "utc:\'%m%d%Y\'"}`). See more about [UTC time](https://vega.github.io/vega-lite/docs/timeunit.html#utc)'
      },
      type: {
        const: "topojson",
        description: 'Type of input data: `"json"`, `"csv"`, `"tsv"`, `"dsv"`.\n\n__Default value:__  The default format type is determined by the extension of the file URL. If no extension is detected, `"json"` will be used by default.',
        type: "string"
      }
    },
    type: "object"
  },
  Transform: {
    anyOf: [
      {
        $ref: "#/definitions/AggregateTransform"
      },
      {
        $ref: "#/definitions/BinTransform"
      },
      {
        $ref: "#/definitions/CalculateTransform"
      },
      {
        $ref: "#/definitions/DensityTransform"
      },
      {
        $ref: "#/definitions/FilterTransform"
      },
      {
        $ref: "#/definitions/FlattenTransform"
      },
      {
        $ref: "#/definitions/FoldTransform"
      },
      {
        $ref: "#/definitions/ImputeTransform"
      },
      {
        $ref: "#/definitions/JoinAggregateTransform"
      },
      {
        $ref: "#/definitions/LoessTransform"
      },
      {
        $ref: "#/definitions/LookupTransform"
      },
      {
        $ref: "#/definitions/QuantileTransform"
      },
      {
        $ref: "#/definitions/RegressionTransform"
      },
      {
        $ref: "#/definitions/TimeUnitTransform"
      },
      {
        $ref: "#/definitions/SampleTransform"
      },
      {
        $ref: "#/definitions/StackTransform"
      },
      {
        $ref: "#/definitions/WindowTransform"
      },
      {
        $ref: "#/definitions/PivotTransform"
      }
    ]
  },
  Type: {
    description: "Data type based on level of measurement",
    enum: [
      "quantitative",
      "ordinal",
      "temporal",
      "nominal",
      "geojson"
    ],
    type: "string"
  },
  TypeForShape: {
    enum: [
      "nominal",
      "ordinal",
      "geojson"
    ],
    type: "string"
  },
  TypedFieldDef: {
    additionalProperties: !1,
    description: "Definition object for a data field, its type and transformation of an encoding channel.",
    properties: {
      aggregate: {
        $ref: "#/definitions/Aggregate",
        description: 'Aggregation function for the field (e.g., `"mean"`, `"sum"`, `"median"`, `"min"`, `"max"`, `"count"`).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html) documentation.'
      },
      band: {
        description: "For rect-based marks (`rect`, `bar`, and `image`), mark size relative to bandwidth of [band scales](https://vega.github.io/vega-lite/docs/scale.html#band), bins or time units. If set to `1`, the mark size is set to the bandwidth, the bin interval, or the time unit interval. If set to `0.5`, the mark size is half of the bandwidth or the time unit interval.\n\nFor other marks, relative position on a band of a stacked, binned, time unit or band scale. If set to `0`, the marks will be positioned at the beginning of the band. If set to `0.5`, the marks will be positioned in the middle of the band.",
        maximum: 1,
        minimum: 0,
        type: "number"
      },
      bin: {
        anyOf: [
          {
            type: "boolean"
          },
          {
            $ref: "#/definitions/BinParams"
          },
          {
            const: "binned",
            type: "string"
          },
          {
            type: "null"
          }
        ],
        description: 'A flag for binning a `quantitative` field, [an object defining binning parameters](https://vega.github.io/vega-lite/docs/bin.html#params), or indicating that the data for `x` or `y` channel are binned before they are imported into Vega-Lite (`"binned"`).\n\n- If `true`, default [binning parameters](https://vega.github.io/vega-lite/docs/bin.html) will be applied.\n\n- If `"binned"`, this indicates that the data for the `x` (or `y`) channel are already binned. You can map the bin-start field to `x` (or `y`) and the bin-end field to `x2` (or `y2`). The scale and axis will be formatted similar to binning in Vega-Lite.  To adjust the axis ticks based on the bin step, you can also set the axis\'s [`tickMinStep`](https://vega.github.io/vega-lite/docs/axis.html#ticks) property.\n\n__Default value:__ `false`\n\n__See also:__ [`bin`](https://vega.github.io/vega-lite/docs/bin.html) documentation.'
      },
      field: {
        $ref: "#/definitions/Field",
        description: '__Required.__ A string defining the name of the field from which to pull a data value or an object defining iterated values from the [`repeat`](https://vega.github.io/vega-lite/docs/repeat.html) operator.\n\n__See also:__ [`field`](https://vega.github.io/vega-lite/docs/field.html) documentation.\n\n__Notes:__ 1)  Dots (`.`) and brackets (`[` and `]`) can be used to access nested objects (e.g., `"field": "foo.bar"` and `"field": "foo[\'bar\']"`). If field names contain dots or brackets but are not nested, you can use `\\\\` to escape dots and brackets (e.g., `"a\\\\.b"` and `"a\\\\[0\\\\]"`). See more details about escaping in the [field documentation](https://vega.github.io/vega-lite/docs/field.html). 2) `field` is not required if `aggregate` is `count`.'
      },
      timeUnit: {
        anyOf: [
          {
            $ref: "#/definitions/TimeUnit"
          },
          {
            $ref: "#/definitions/TimeUnitParams"
          }
        ],
        description: "Time unit (e.g., `year`, `yearmonth`, `month`, `hours`) for a temporal field. or [a temporal field that gets casted as ordinal](https://vega.github.io/vega-lite/docs/type.html#cast).\n\n__Default value:__ `undefined` (None)\n\n__See also:__ [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html) documentation."
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            type: "null"
          }
        ],
        description: 'A title for the field. If `null`, the title will be removed.\n\n__Default value:__  derived from the field\'s name and transformation function (`aggregate`, `bin` and `timeUnit`). If the field has an aggregate function, the function is displayed as part of the title (e.g., `"Sum of Profit"`). If the field is binned or has a time unit applied, the applied function is shown in parentheses (e.g., `"Profit (binned)"`, `"Transaction Date (year-month)"`). Otherwise, the title is simply the field name.\n\n__Notes__:\n\n1) You can customize the default field title format by providing the [`fieldTitle`](https://vega.github.io/vega-lite/docs/config.html#top-level-config) property in the [config](https://vega.github.io/vega-lite/docs/config.html) or [`fieldTitle` function via the `compile` function\'s options](https://vega.github.io/vega-lite/docs/compile.html#field-title).\n\n2) If both field definition\'s `title` and axis, header, or legend `title` are defined, axis/header/legend title will be used.'
      },
      type: {
        $ref: "#/definitions/StandardType",
        description: 'The type of measurement (`"quantitative"`, `"temporal"`, `"ordinal"`, or `"nominal"`) for the encoded field or constant value (`datum`). It can also be a `"geojson"` type for encoding [\'geoshape\'](https://vega.github.io/vega-lite/docs/geoshape.html).\n\nVega-Lite automatically infers data types in many cases as discussed below. However, type is required for a field if: (1) the field is not nominal and the field encoding has no specified `aggregate` (except `argmin` and `argmax`), `bin`, scale type, custom `sort` order, nor `timeUnit` or (2) if you wish to use an ordinal scale for a field with `bin` or `timeUnit`.\n\n__Default value:__\n\n1) For a data `field`, `"nominal"` is the default data type unless the field encoding has `aggregate`, `channel`, `bin`, scale type, `sort`, or `timeUnit` that satisfies the following criteria: - `"quantitative"` is the default type if (1) the encoded field contains `bin` or `aggregate` except `"argmin"` and `"argmax"`, (2) the encoding channel is `latitude` or `longitude` channel or (3) if the specified scale type is [a quantitative scale](https://vega.github.io/vega-lite/docs/scale.html#type). - `"temporal"` is the default type if (1) the encoded field contains `timeUnit` or (2) the specified scale type is a time or utc scale - `ordinal""` is the default type if (1) the encoded field contains a [custom `sort` order](https://vega.github.io/vega-lite/docs/sort.html#specifying-custom-sort-order), (2) the specified scale type is an ordinal/point/band scale, or (3) the encoding channel is `order`.\n\n2) For a constant value in data domain (`datum`): - `"quantitative"` if the datum is a number - `"nominal"` if the datum is a string - `"temporal"` if the datum is [a date time object](https://vega.github.io/vega-lite/docs/datetime.html)\n\n__Note:__ - Data `type` describes the semantics of the data rather than the primitive data types (number, string, etc.). The same primitive data type can have different types of measurement. For example, numeric data can represent quantitative, ordinal, or nominal data. - Data values for a temporal field can be either a date-time string (e.g., `"2015-03-07 12:32:17"`, `"17:01"`, `"2015-03-16"`. `"2015"`) or a timestamp number (e.g., `1552199579097`). - When using with [`bin`](https://vega.github.io/vega-lite/docs/bin.html), the `type` property can be either `"quantitative"` (for using a linear bin scale) or [`"ordinal"` (for using an ordinal bin scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`timeUnit`](https://vega.github.io/vega-lite/docs/timeunit.html), the `type` property can be either `"temporal"` (default, for using a temporal scale) or [`"ordinal"` (for using an ordinal scale)](https://vega.github.io/vega-lite/docs/type.html#cast-bin). - When using with [`aggregate`](https://vega.github.io/vega-lite/docs/aggregate.html), the `type` property refers to the post-aggregation data type. For example, we can calculate count `distinct` of a categorical field `"cat"` using `{"aggregate": "distinct", "field": "cat"}`. The `"type"` of the aggregate output is `"quantitative"`. - Secondary channels (e.g., `x2`, `y2`, `xError`, `yError`) do not have `type` as they must have exactly the same type as their primary channels (e.g., `x`, `y`).\n\n__See also:__ [`type`](https://vega.github.io/vega-lite/docs/type.html) documentation.'
      }
    },
    type: "object"
  },
  URI: {
    format: "uri-reference",
    type: "string"
  },
  UnitSpec: {
    additionalProperties: !1,
    description: "A unit specification, which can contain either [primitive marks or composite marks](https://vega.github.io/vega-lite/docs/mark.html#types).",
    properties: {
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      encoding: {
        $ref: "#/definitions/Encoding",
        description: "A key-value mapping between encoding channels and definition of fields."
      },
      height: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: "__Deprecated:__ Please avoid using width in a unit spec that's a part of a layer spec."
      },
      mark: {
        $ref: "#/definitions/AnyMark",
        description: 'A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).'
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      projection: {
        $ref: "#/definitions/Projection",
        description: 'An object defining properties of geographic projection, which will be applied to `shape` path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other marks.'
      },
      selection: {
        additionalProperties: {
          $ref: "#/definitions/SelectionDef"
        },
        description: "A key-value mapping between selection names and definitions.",
        type: "object"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      view: {
        $ref: "#/definitions/ViewBackground",
        description: "__Deprecated:__ Please avoid using width in a unit spec that's a part of a layer spec."
      },
      width: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: "__Deprecated:__ Please avoid using width in a unit spec that's a part of a layer spec."
      }
    },
    required: [
      "mark"
    ],
    type: "object"
  },
  UnitSpecWithFrame: {
    additionalProperties: !1,
    properties: {
      data: {
        anyOf: [
          {
            $ref: "#/definitions/Data"
          },
          {
            type: "null"
          }
        ],
        description: "An object describing the data source. Set to `null` to ignore the parent's data source. If no data is set, it is derived from the parent."
      },
      description: {
        description: "Description of this mark for commenting purpose.",
        type: "string"
      },
      encoding: {
        $ref: "#/definitions/Encoding",
        description: "A key-value mapping between encoding channels and definition of fields."
      },
      height: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The height of a visualization.\n\n- For a plot with a continuous y-field, height should be a number. - For a plot with either a discrete y-field or no y-field, height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step. (No y-field is equivalent to having one discrete step.) - To enable responsive sizing on height, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousHeight` for a plot with a continuous y-field and `config.view.discreteHeight` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the height of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`height`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      },
      mark: {
        $ref: "#/definitions/AnyMark",
        description: 'A string describing the mark type (one of `"bar"`, `"circle"`, `"square"`, `"tick"`, `"line"`, `"area"`, `"point"`, `"rule"`, `"geoshape"`, and `"text"`) or a [mark definition object](https://vega.github.io/vega-lite/docs/mark.html#mark-def).'
      },
      name: {
        description: "Name of the visualization for later reference.",
        type: "string"
      },
      projection: {
        $ref: "#/definitions/Projection",
        description: 'An object defining properties of geographic projection, which will be applied to `shape` path for `"geoshape"` marks and to `latitude` and `"longitude"` channels for other marks.'
      },
      selection: {
        additionalProperties: {
          $ref: "#/definitions/SelectionDef"
        },
        description: "A key-value mapping between selection names and definitions.",
        type: "object"
      },
      title: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/TitleParams"
          }
        ],
        description: "Title for the plot."
      },
      transform: {
        description: "An array of data transformations such as filter and new field calculation.",
        items: {
          $ref: "#/definitions/Transform"
        },
        type: "array"
      },
      view: {
        $ref: "#/definitions/ViewBackground",
        description: `An object defining the view background's fill and stroke.

__Default value:__ none (transparent)`
      },
      width: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "container",
            type: "string"
          },
          {
            $ref: "#/definitions/Step"
          }
        ],
        description: 'The width of a visualization.\n\n- For a plot with a continuous x-field, width should be a number. - For a plot with either a discrete x-field or no x-field, width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step. (No x-field is equivalent to having one discrete step.) - To enable responsive sizing on width, it should be set to `"container"`.\n\n__Default value:__ Based on `config.view.continuousWidth` for a plot with a continuous x-field and `config.view.discreteWidth` otherwise.\n\n__Note:__ For plots with [`row` and `column` channels](https://vega.github.io/vega-lite/docs/encoding.html#facet), this represents the width of a single view and the `"container"` option cannot be used.\n\n__See also:__ [`width`](https://vega.github.io/vega-lite/docs/size.html) documentation.'
      }
    },
    required: [
      "mark"
    ],
    type: "object"
  },
  UrlData: {
    additionalProperties: !1,
    properties: {
      format: {
        $ref: "#/definitions/DataFormat",
        description: "An object that specifies the format for parsing the data."
      },
      name: {
        description: "Provide a placeholder name and bind data at runtime.",
        type: "string"
      },
      url: {
        description: "An URL from which to load the data set. Use the `format.type` property to ensure the loaded data is correctly parsed.",
        type: "string"
      }
    },
    required: [
      "url"
    ],
    type: "object"
  },
  UtcMultiTimeUnit: {
    enum: [
      "utcyearquarter",
      "utcyearquartermonth",
      "utcyearmonth",
      "utcyearmonthdate",
      "utcyearmonthdatehours",
      "utcyearmonthdatehoursminutes",
      "utcyearmonthdatehoursminutesseconds",
      "utcyearweek",
      "utcyearweekday",
      "utcyearweekdayhours",
      "utcyearweekdayhoursminutes",
      "utcyearweekdayhoursminutesseconds",
      "utcyeardayofyear",
      "utcquartermonth",
      "utcmonthdate",
      "utcmonthdatehours",
      "utcmonthdatehoursminutes",
      "utcmonthdatehoursminutesseconds",
      "utcweekday",
      "utcweeksdayhours",
      "utcweekdayhoursminutes",
      "utcweekdayhoursminutesseconds",
      "utcdayhours",
      "utcdayhoursminutes",
      "utcdayhoursminutesseconds",
      "utchoursminutes",
      "utchoursminutesseconds",
      "utcminutesseconds",
      "utcsecondsmilliseconds"
    ],
    type: "string"
  },
  UtcSingleTimeUnit: {
    enum: [
      "utcyear",
      "utcquarter",
      "utcmonth",
      "utcweek",
      "utcday",
      "utcdayofyear",
      "utcdate",
      "utchours",
      "utcminutes",
      "utcseconds",
      "utcmilliseconds"
    ],
    type: "string"
  },
  'ValueDef<(number|"width"|"height"|ExprRef)>': {
    additionalProperties: !1,
    description: "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.",
    properties: {
      value: {
        anyOf: [
          {
            type: "number"
          },
          {
            const: "width",
            type: "string"
          },
          {
            const: "height",
            type: "string"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "value"
    ],
    type: "object"
  },
  "ValueDef<(number|ExprRef)>": {
    additionalProperties: !1,
    description: "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.",
    properties: {
      value: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    required: [
      "value"
    ],
    type: "object"
  },
  "ValueDef<number>": {
    additionalProperties: !1,
    description: "Definition object for a constant value (primitive value or gradient definition) of an encoding channel.",
    properties: {
      value: {
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).',
        type: "number"
      }
    },
    required: [
      "value"
    ],
    type: "object"
  },
  "ValueDefWithCondition<MarkPropFieldOrDatumDef,(Gradient|string|null)>": {
    additionalProperties: !1,
    minProperties: 1,
    properties: {
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
          },
          {
            $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(Gradient|string|null|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "A field definition or one or more value definition(s) with a selection predicate."
      },
      value: {
        anyOf: [
          {
            $ref: "#/definitions/Gradient"
          },
          {
            type: "string"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    type: "object"
  },
  "ValueDefWithCondition<MarkPropFieldOrDatumDef,(string|null)>": {
    additionalProperties: !1,
    minProperties: 1,
    properties: {
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
          },
          {
            $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "A field definition or one or more value definition(s) with a selection predicate."
      },
      value: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    type: "object"
  },
  "ValueDefWithCondition<MarkPropFieldOrDatumDef,number>": {
    additionalProperties: !1,
    minProperties: 1,
    properties: {
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
          },
          {
            $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(number|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "A field definition or one or more value definition(s) with a selection predicate."
      },
      value: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    type: "object"
  },
  "ValueDefWithCondition<MarkPropFieldOrDatumDef,number[]>": {
    additionalProperties: !1,
    minProperties: 1,
    properties: {
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef"
          },
          {
            $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(number[]|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "A field definition or one or more value definition(s) with a selection predicate."
      },
      value: {
        anyOf: [
          {
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    type: "object"
  },
  "ValueDefWithCondition<MarkPropFieldOrDatumDef<TypeForShape>,(string|null)>": {
    additionalProperties: !1,
    minProperties: 1,
    properties: {
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalMarkPropFieldOrDatumDef<TypeForShape>"
          },
          {
            $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(string|null|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "A field definition or one or more value definition(s) with a selection predicate."
      },
      value: {
        anyOf: [
          {
            type: "string"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    type: "object"
  },
  "ValueDefWithCondition<StringFieldDef,Text>": {
    additionalProperties: !1,
    minProperties: 1,
    properties: {
      condition: {
        anyOf: [
          {
            $ref: "#/definitions/ConditionalStringFieldDef"
          },
          {
            $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
          },
          {
            items: {
              $ref: "#/definitions/ConditionalValueDef<(Text|ExprRef)>"
            },
            type: "array"
          }
        ],
        description: "A field definition or one or more value definition(s) with a selection predicate."
      },
      value: {
        anyOf: [
          {
            $ref: "#/definitions/Text"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'A constant value in visual domain (e.g., `"red"` / `"#0099ff"` / [gradient definition](https://vega.github.io/vega-lite/docs/types.html#gradient) for color, values between `0` to `1` for opacity).'
      }
    },
    type: "object"
  },
  "Vector2<DateTime>": {
    items: [
      {
        $ref: "#/definitions/DateTime"
      },
      {
        $ref: "#/definitions/DateTime"
      }
    ],
    maxItems: 2,
    minItems: 2,
    type: "array"
  },
  "Vector2<Vector2<number>>": {
    items: [
      {
        $ref: "#/definitions/Vector2<number>"
      },
      {
        $ref: "#/definitions/Vector2<number>"
      }
    ],
    maxItems: 2,
    minItems: 2,
    type: "array"
  },
  "Vector2<boolean>": {
    items: [
      {
        type: "boolean"
      },
      {
        type: "boolean"
      }
    ],
    maxItems: 2,
    minItems: 2,
    type: "array"
  },
  "Vector2<number>": {
    items: [
      {
        type: "number"
      },
      {
        type: "number"
      }
    ],
    maxItems: 2,
    minItems: 2,
    type: "array"
  },
  "Vector2<string>": {
    items: [
      {
        type: "string"
      },
      {
        type: "string"
      }
    ],
    maxItems: 2,
    minItems: 2,
    type: "array"
  },
  "Vector3<number>": {
    items: [
      {
        type: "number"
      },
      {
        type: "number"
      },
      {
        type: "number"
      }
    ],
    maxItems: 3,
    minItems: 3,
    type: "array"
  },
  ViewBackground: {
    additionalProperties: !1,
    properties: {
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        $ref: "#/definitions/Cursor",
        description: "The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The fill color.\n\n__Default value:__ `undefined`"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The stroke color.\n\n__Default value:__ `"#ddd"`'
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      style: {
        anyOf: [
          {
            type: "string"
          },
          {
            items: {
              type: "string"
            },
            type: "array"
          }
        ],
        description: 'A string or array of strings indicating the name of custom styles to apply to the view background. A style is a named collection of mark property defaults defined within the [style configuration](https://vega.github.io/vega-lite/docs/mark.html#style-config). If style is an array, later styles will override earlier styles.\n\n__Default value:__ `"cell"` __Note:__ Any specified view background properties will augment the default style.'
      }
    },
    type: "object"
  },
  ViewConfig: {
    additionalProperties: !1,
    properties: {
      clip: {
        description: "Whether the view should be clipped.",
        type: "boolean"
      },
      continuousHeight: {
        description: "The default height when the plot has a continuous y-field for x or latitude, or has arc marks.\n\n__Default value:__ `200`",
        type: "number"
      },
      continuousWidth: {
        description: "The default width when the plot has a continuous field for x or longitude, or has arc marks.\n\n__Default value:__ `200`",
        type: "number"
      },
      cornerRadius: {
        anyOf: [
          {
            description: "The radius in pixels of rounded rectangles or arcs' corners.\n\n__Default value:__ `0`",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      cursor: {
        $ref: "#/definitions/Cursor",
        description: "The mouse cursor used over the view. Any valid [CSS cursor type](https://developer.mozilla.org/en-US/docs/Web/CSS/cursor#Values) can be used."
      },
      discreteHeight: {
        anyOf: [
          {
            type: "number"
          },
          {
            additionalProperties: !1,
            properties: {
              step: {
                type: "number"
              }
            },
            required: [
              "step"
            ],
            type: "object"
          }
        ],
        description: "The default height when the plot has non arc marks and either a discrete y-field or no y-field. The height can be either a number indicating a fixed height or an object in the form of `{step: number}` defining the height per discrete step.\n\n__Default value:__ a step size based on `config.view.step`."
      },
      discreteWidth: {
        anyOf: [
          {
            type: "number"
          },
          {
            additionalProperties: !1,
            properties: {
              step: {
                type: "number"
              }
            },
            required: [
              "step"
            ],
            type: "object"
          }
        ],
        description: "The default width when the plot has non-arc marks and either a discrete x-field or no x-field. The width can be either a number indicating a fixed width or an object in the form of `{step: number}` defining the width per discrete step.\n\n__Default value:__ a step size based on `config.view.step`."
      },
      fill: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The fill color.\n\n__Default value:__ `undefined`"
      },
      fillOpacity: {
        anyOf: [
          {
            description: "The fill opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      height: {
        description: `Default height

__Deprecated:__ Since Vega-Lite 4.0. Please use continuousHeight and discreteHeight instead.`,
        type: "number"
      },
      opacity: {
        anyOf: [
          {
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: "The overall opacity (value between [0,1]).\n\n__Default value:__ `0.7` for non-aggregate plots with `point`, `tick`, `circle`, or `square` marks or layered `bar` charts and `1` otherwise.",
        maximum: 1,
        minimum: 0
      },
      step: {
        description: "Default step size for x-/y- discrete fields.",
        type: "number"
      },
      stroke: {
        anyOf: [
          {
            $ref: "#/definitions/Color"
          },
          {
            type: "null"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ],
        description: 'The stroke color.\n\n__Default value:__ `"#ddd"`'
      },
      strokeCap: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeCap",
            description: 'The stroke cap for line ending style. One of `"butt"`, `"round"`, or `"square"`.\n\n__Default value:__ `"butt"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDash: {
        anyOf: [
          {
            description: "An array of alternating stroke, space lengths for creating dashed or dotted lines.",
            items: {
              type: "number"
            },
            type: "array"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeDashOffset: {
        anyOf: [
          {
            description: "The offset (in pixels) into which to begin drawing with the stroke dash array.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeJoin: {
        anyOf: [
          {
            $ref: "#/definitions/StrokeJoin",
            description: 'The stroke line join method. One of `"miter"`, `"round"` or `"bevel"`.\n\n__Default value:__ `"miter"`'
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeMiterLimit: {
        anyOf: [
          {
            description: "The miter limit at which to bevel a line join.",
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeOpacity: {
        anyOf: [
          {
            description: "The stroke opacity (value between [0,1]).\n\n__Default value:__ `1`",
            maximum: 1,
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      strokeWidth: {
        anyOf: [
          {
            description: "The stroke width, in pixels.",
            minimum: 0,
            type: "number"
          },
          {
            $ref: "#/definitions/ExprRef"
          }
        ]
      },
      width: {
        description: `Default width

__Deprecated:__ Since Vega-Lite 4.0. Please use continuousWidth and discreteWidth instead.`,
        type: "number"
      }
    },
    type: "object"
  },
  WindowEventType: {
    anyOf: [
      {
        $ref: "#/definitions/EventType"
      },
      {
        type: "string"
      }
    ]
  },
  WindowFieldDef: {
    additionalProperties: !1,
    properties: {
      as: {
        $ref: "#/definitions/FieldName",
        description: "The output name for the window operation."
      },
      field: {
        $ref: "#/definitions/FieldName",
        description: 'The data field for which to compute the aggregate or window function. This can be omitted for window functions that do not operate over a field such as `"count"`, `"rank"`, `"dense_rank"`.'
      },
      op: {
        anyOf: [
          {
            $ref: "#/definitions/AggregateOp"
          },
          {
            $ref: "#/definitions/WindowOnlyOp"
          }
        ],
        description: 'The window or aggregation operation to apply within a window (e.g., `"rank"`, `"lead"`, `"sum"`, `"average"` or `"count"`). See the list of all supported operations [here](https://vega.github.io/vega-lite/docs/window.html#ops).'
      },
      param: {
        description: `Parameter values for the window functions. Parameter values can be omitted for operations that do not accept a parameter.

See the list of all supported operations and their parameters [here](https://vega.github.io/vega-lite/docs/transforms/window.html).`,
        type: "number"
      }
    },
    required: [
      "op",
      "as"
    ],
    type: "object"
  },
  WindowOnlyOp: {
    enum: [
      "row_number",
      "rank",
      "dense_rank",
      "percent_rank",
      "cume_dist",
      "ntile",
      "lag",
      "lead",
      "first_value",
      "last_value",
      "nth_value"
    ],
    type: "string"
  },
  WindowTransform: {
    additionalProperties: !1,
    properties: {
      frame: {
        description: "A frame specification as a two-element array indicating how the sliding window should proceed. The array entries should either be a number indicating the offset from the current data object, or null to indicate unbounded rows preceding or following the current data object. The default value is `[null, 0]`, indicating that the sliding window includes the current object and all preceding objects. The value `[-5, 5]` indicates that the window should include five objects preceding and five objects following the current object. Finally, `[null, null]` indicates that the window frame should always include all data objects. If you this frame and want to assign the same value to add objects, you can use the simpler [join aggregate transform](https://vega.github.io/vega-lite/docs/joinaggregate.html). The only operators affected are the aggregation operations and the `first_value`, `last_value`, and `nth_value` window operations. The other window operations are not affected by this.\n\n__Default value:__:  `[null, 0]` (includes the current object and all preceding objects)",
        items: {
          type: [
            "null",
            "number"
          ]
        },
        type: "array"
      },
      groupby: {
        description: "The data fields for partitioning the data objects into separate windows. If unspecified, all data points will be in a single window.",
        items: {
          $ref: "#/definitions/FieldName"
        },
        type: "array"
      },
      ignorePeers: {
        description: "Indicates if the sliding window frame should ignore peer values (data that are considered identical by the sort criteria). The default is false, causing the window frame to expand to include all peer values. If set to true, the window frame will be defined by offset values only. This setting only affects those operations that depend on the window frame, namely aggregation operations and the first_value, last_value, and nth_value window operations.\n\n__Default value:__ `false`",
        type: "boolean"
      },
      sort: {
        description: 'A sort field definition for sorting data objects within a window. If two data objects are considered equal by the comparator, they are considered "peer" values of equal rank. If sort is not specified, the order is undefined: data objects are processed in the order they are observed and none are considered peers (the ignorePeers parameter is ignored and treated as if set to `true`).',
        items: {
          $ref: "#/definitions/SortField"
        },
        type: "array"
      },
      window: {
        description: "The definition of the fields in the window, and what calculations to use.",
        items: {
          $ref: "#/definitions/WindowFieldDef"
        },
        type: "array"
      }
    },
    required: [
      "window"
    ],
    type: "object"
  }
}, RN = {
  $ref: FN,
  $schema: TN,
  definitions: CN
};
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2022 Joachim Wester
 * MIT licensed
 */
var IN = /* @__PURE__ */ function() {
  var e = function(t, i) {
    return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, a) {
      n.__proto__ = a;
    } || function(n, a) {
      for (var o in a) a.hasOwnProperty(o) && (n[o] = a[o]);
    }, e(t, i);
  };
  return function(t, i) {
    e(t, i);
    function n() {
      this.constructor = t;
    }
    t.prototype = i === null ? Object.create(i) : (n.prototype = i.prototype, new n());
  };
}(), jN = Object.prototype.hasOwnProperty;
function fy(e, t) {
  return jN.call(e, t);
}
function uy(e) {
  if (Array.isArray(e)) {
    for (var t = new Array(e.length), i = 0; i < t.length; i++)
      t[i] = "" + i;
    return t;
  }
  if (Object.keys)
    return Object.keys(e);
  var n = [];
  for (var a in e)
    fy(e, a) && n.push(a);
  return n;
}
function $i(e) {
  switch (typeof e) {
    case "object":
      return JSON.parse(JSON.stringify(e));
    case "undefined":
      return null;
    default:
      return e;
  }
}
function cy(e) {
  for (var t = 0, i = e.length, n; t < i; ) {
    if (n = e.charCodeAt(t), n >= 48 && n <= 57) {
      t++;
      continue;
    }
    return !1;
  }
  return !0;
}
function hr(e) {
  return e.indexOf("/") === -1 && e.indexOf("~") === -1 ? e : e.replace(/~/g, "~0").replace(/\//g, "~1");
}
function AD(e) {
  return e.replace(/~1/g, "/").replace(/~0/g, "~");
}
function hy(e) {
  if (e === void 0)
    return !0;
  if (e) {
    if (Array.isArray(e)) {
      for (var t = 0, i = e.length; t < i; t++)
        if (hy(e[t]))
          return !0;
    } else if (typeof e == "object") {
      for (var n = uy(e), a = n.length, o = 0; o < a; o++)
        if (hy(e[n[o]]))
          return !0;
    }
  }
  return !1;
}
function f$(e, t) {
  var i = [e];
  for (var n in t) {
    var a = typeof t[n] == "object" ? JSON.stringify(t[n], null, 2) : t[n];
    typeof a < "u" && i.push(n + ": " + a);
  }
  return i.join(`
`);
}
var OD = (
  /** @class */
  function(e) {
    IN(t, e);
    function t(i, n, a, o, r) {
      var s = this.constructor, l = e.call(this, f$(i, { name: n, index: a, operation: o, tree: r })) || this;
      return l.name = n, l.index = a, l.operation = o, l.tree = r, Object.setPrototypeOf(l, s.prototype), l.message = f$(i, { name: n, index: a, operation: o, tree: r }), l;
    }
    return t;
  }(Error)
), He = OD, zN = $i, Cs = {
  add: function(e, t, i) {
    return e[t] = this.value, { newDocument: i };
  },
  remove: function(e, t, i) {
    var n = e[t];
    return delete e[t], { newDocument: i, removed: n };
  },
  replace: function(e, t, i) {
    var n = e[t];
    return e[t] = this.value, { newDocument: i, removed: n };
  },
  move: function(e, t, i) {
    var n = ph(i, this.path);
    n && (n = $i(n));
    var a = kr(i, { op: "remove", path: this.from }).removed;
    return kr(i, { op: "add", path: this.path, value: a }), { newDocument: i, removed: n };
  },
  copy: function(e, t, i) {
    var n = ph(i, this.from);
    return kr(i, { op: "add", path: this.path, value: $i(n) }), { newDocument: i };
  },
  test: function(e, t, i) {
    return { newDocument: i, test: of(e[t], this.value) };
  },
  _get: function(e, t, i) {
    return this.value = e[t], { newDocument: i };
  }
}, PN = {
  add: function(e, t, i) {
    return cy(t) ? e.splice(t, 0, this.value) : e[t] = this.value, { newDocument: i, index: t };
  },
  remove: function(e, t, i) {
    var n = e.splice(t, 1);
    return { newDocument: i, removed: n[0] };
  },
  replace: function(e, t, i) {
    var n = e[t];
    return e[t] = this.value, { newDocument: i, removed: n };
  },
  move: Cs.move,
  copy: Cs.copy,
  test: Cs.test,
  _get: Cs._get
};
function ph(e, t) {
  if (t == "")
    return e;
  var i = { op: "_get", path: t };
  return kr(e, i), i.value;
}
function kr(e, t, i, n, a, o) {
  if (i === void 0 && (i = !1), n === void 0 && (n = !0), a === void 0 && (a = !0), o === void 0 && (o = 0), i && (typeof i == "function" ? i(t, 0, e, t.path) : gh(t, 0)), t.path === "") {
    var r = { newDocument: e };
    if (t.op === "add")
      return r.newDocument = t.value, r;
    if (t.op === "replace")
      return r.newDocument = t.value, r.removed = e, r;
    if (t.op === "move" || t.op === "copy")
      return r.newDocument = ph(e, t.from), t.op === "move" && (r.removed = e), r;
    if (t.op === "test") {
      if (r.test = of(e, t.value), r.test === !1)
        throw new He("Test operation failed", "TEST_OPERATION_FAILED", o, t, e);
      return r.newDocument = e, r;
    } else {
      if (t.op === "remove")
        return r.removed = e, r.newDocument = null, r;
      if (t.op === "_get")
        return t.value = e, r;
      if (i)
        throw new He("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", o, t, e);
      return r;
    }
  } else {
    n || (e = $i(e));
    var s = t.path || "", l = s.split("/"), d = e, f = 1, u = l.length, c = void 0, h = void 0, p = void 0;
    for (typeof i == "function" ? p = i : p = gh; ; ) {
      if (h = l[f], h && h.indexOf("~") != -1 && (h = AD(h)), a && (h == "__proto__" || h == "prototype" && f > 0 && l[f - 1] == "constructor"))
        throw new TypeError("JSON-Patch: modifying `__proto__` or `constructor/prototype` prop is banned for security reasons, if this was on purpose, please set `banPrototypeModifications` flag false and pass it to this function. More info in fast-json-patch README");
      if (i && c === void 0 && (d[h] === void 0 ? c = l.slice(0, f).join("/") : f == u - 1 && (c = t.path), c !== void 0 && p(t, 0, e, c)), f++, Array.isArray(d)) {
        if (h === "-")
          h = d.length;
        else {
          if (i && !cy(h))
            throw new He("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", o, t, e);
          cy(h) && (h = ~~h);
        }
        if (f >= u) {
          if (i && t.op === "add" && h > d.length)
            throw new He("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", o, t, e);
          var r = PN[t.op].call(t, d, h, e);
          if (r.test === !1)
            throw new He("Test operation failed", "TEST_OPERATION_FAILED", o, t, e);
          return r;
        }
      } else if (f >= u) {
        var r = Cs[t.op].call(t, d, h, e);
        if (r.test === !1)
          throw new He("Test operation failed", "TEST_OPERATION_FAILED", o, t, e);
        return r;
      }
      if (d = d[h], i && f < u && (!d || typeof d != "object"))
        throw new He("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", o, t, e);
    }
  }
}
function Ep(e, t, i, n, a) {
  if (n === void 0 && (n = !0), a === void 0 && (a = !0), i && !Array.isArray(t))
    throw new He("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
  n || (e = $i(e));
  for (var o = new Array(t.length), r = 0, s = t.length; r < s; r++)
    o[r] = kr(e, t[r], i, !0, a, r), e = o[r].newDocument;
  return o.newDocument = e, o;
}
function NN(e, t, i) {
  var n = kr(e, t);
  if (n.test === !1)
    throw new He("Test operation failed", "TEST_OPERATION_FAILED", i, t, e);
  return n.newDocument;
}
function gh(e, t, i, n) {
  if (typeof e != "object" || e === null || Array.isArray(e))
    throw new He("Operation is not an object", "OPERATION_NOT_AN_OBJECT", t, e, i);
  if (Cs[e.op]) {
    if (typeof e.path != "string")
      throw new He("Operation `path` property is not a string", "OPERATION_PATH_INVALID", t, e, i);
    if (e.path.indexOf("/") !== 0 && e.path.length > 0)
      throw new He('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", t, e, i);
    if ((e.op === "move" || e.op === "copy") && typeof e.from != "string")
      throw new He("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", t, e, i);
    if ((e.op === "add" || e.op === "replace" || e.op === "test") && e.value === void 0)
      throw new He("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", t, e, i);
    if ((e.op === "add" || e.op === "replace" || e.op === "test") && hy(e.value))
      throw new He("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", t, e, i);
    if (i) {
      if (e.op == "add") {
        var a = e.path.split("/").length, o = n.split("/").length;
        if (a !== o + 1 && a !== o)
          throw new He("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", t, e, i);
      } else if (e.op === "replace" || e.op === "remove" || e.op === "_get") {
        if (e.path !== n)
          throw new He("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", t, e, i);
      } else if (e.op === "move" || e.op === "copy") {
        var r = { op: "_get", path: e.from, value: void 0 }, s = ED([r], i);
        if (s && s.name === "OPERATION_PATH_UNRESOLVABLE")
          throw new He("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", t, e, i);
      }
    }
  } else throw new He("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", t, e, i);
}
function ED(e, t, i) {
  try {
    if (!Array.isArray(e))
      throw new He("Patch sequence must be an array", "SEQUENCE_NOT_AN_ARRAY");
    if (t)
      Ep($i(t), $i(e), i || !0);
    else {
      i = i || gh;
      for (var n = 0; n < e.length; n++)
        i(e[n], n, t, void 0);
    }
  } catch (a) {
    if (a instanceof He)
      return a;
    throw a;
  }
}
function of(e, t) {
  if (e === t)
    return !0;
  if (e && t && typeof e == "object" && typeof t == "object") {
    var i = Array.isArray(e), n = Array.isArray(t), a, o, r;
    if (i && n) {
      if (o = e.length, o != t.length)
        return !1;
      for (a = o; a-- !== 0; )
        if (!of(e[a], t[a]))
          return !1;
      return !0;
    }
    if (i != n)
      return !1;
    var s = Object.keys(e);
    if (o = s.length, o !== Object.keys(t).length)
      return !1;
    for (a = o; a-- !== 0; )
      if (!t.hasOwnProperty(s[a]))
        return !1;
    for (a = o; a-- !== 0; )
      if (r = s[a], !of(e[r], t[r]))
        return !1;
    return !0;
  }
  return e !== e && t !== t;
}
const qN = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  JsonPatchError: He,
  _areEquals: of,
  applyOperation: kr,
  applyPatch: Ep,
  applyReducer: NN,
  deepClone: zN,
  getValueByPointer: ph,
  validate: ED,
  validator: gh
}, Symbol.toStringTag, { value: "Module" }));
/*!
 * https://github.com/Starcounter-Jack/JSON-Patch
 * (c) 2017-2021 Joachim Wester
 * MIT license
 */
var t0 = /* @__PURE__ */ new WeakMap(), LN = (
  /** @class */
  /* @__PURE__ */ function() {
    function e(t) {
      this.observers = /* @__PURE__ */ new Map(), this.obj = t;
    }
    return e;
  }()
), BN = (
  /** @class */
  /* @__PURE__ */ function() {
    function e(t, i) {
      this.callback = t, this.observer = i;
    }
    return e;
  }()
);
function UN(e) {
  return t0.get(e);
}
function MN(e, t) {
  return e.observers.get(t);
}
function VN(e, t) {
  e.observers.delete(t.callback);
}
function WN(e, t) {
  t.unobserve();
}
function GN(e, t) {
  var i = [], n, a = UN(e);
  if (!a)
    a = new LN(e), t0.set(e, a);
  else {
    var o = MN(a, t);
    n = o && o.observer;
  }
  if (n)
    return n;
  if (n = {}, a.value = $i(e), t) {
    n.callback = t, n.next = null;
    var r = function() {
      py(n);
    }, s = function() {
      clearTimeout(n.next), n.next = setTimeout(r);
    };
    typeof window < "u" && (window.addEventListener("mouseup", s), window.addEventListener("keyup", s), window.addEventListener("mousedown", s), window.addEventListener("keydown", s), window.addEventListener("change", s));
  }
  return n.patches = i, n.object = e, n.unobserve = function() {
    py(n), clearTimeout(n.next), VN(a, n), typeof window < "u" && (window.removeEventListener("mouseup", s), window.removeEventListener("keyup", s), window.removeEventListener("mousedown", s), window.removeEventListener("keydown", s), window.removeEventListener("change", s));
  }, a.observers.set(t, new BN(t, n)), n;
}
function py(e, t) {
  t === void 0 && (t = !1);
  var i = t0.get(e.object);
  i0(i.value, e.object, e.patches, "", t), e.patches.length && Ep(i.value, e.patches);
  var n = e.patches;
  return n.length > 0 && (e.patches = [], e.callback && e.callback(n)), n;
}
function i0(e, t, i, n, a) {
  if (t !== e) {
    typeof t.toJSON == "function" && (t = t.toJSON());
    for (var o = uy(t), r = uy(e), s = !1, l = r.length - 1; l >= 0; l--) {
      var d = r[l], f = e[d];
      if (fy(t, d) && !(t[d] === void 0 && f !== void 0 && Array.isArray(t) === !1)) {
        var u = t[d];
        typeof f == "object" && f != null && typeof u == "object" && u != null && Array.isArray(f) === Array.isArray(u) ? i0(f, u, i, n + "/" + hr(d), a) : f !== u && (a && i.push({ op: "test", path: n + "/" + hr(d), value: $i(f) }), i.push({ op: "replace", path: n + "/" + hr(d), value: $i(u) }));
      } else Array.isArray(e) === Array.isArray(t) ? (a && i.push({ op: "test", path: n + "/" + hr(d), value: $i(f) }), i.push({ op: "remove", path: n + "/" + hr(d) }), s = !0) : (a && i.push({ op: "test", path: n, value: e }), i.push({ op: "replace", path: n, value: t }));
    }
    if (!(!s && o.length == r.length))
      for (var l = 0; l < o.length; l++) {
        var d = o[l];
        !fy(e, d) && t[d] !== void 0 && i.push({ op: "add", path: n + "/" + hr(d), value: $i(t[d]) });
      }
  }
}
function HN(e, t, i) {
  i === void 0 && (i = !1);
  var n = [];
  return i0(e, t, n, "", i), n;
}
const YN = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  compare: HN,
  generate: py,
  observe: GN,
  unobserve: WN
}, Symbol.toStringTag, { value: "Module" }));
Object.assign({}, qN, YN, {
  JsonPatchError: OD,
  deepClone: $i,
  escapePathComponent: hr,
  unescapePathComponent: AD
});
var XN = /("(?:[^\\"]|\\.)*")|[:,]/g, JN = function(t, i) {
  var n, a, o;
  return i = i || {}, n = JSON.stringify(
    [1],
    void 0,
    i.indent === void 0 ? 2 : i.indent
  ).slice(2, -3), a = n === "" ? 1 / 0 : i.maxLength === void 0 ? 80 : i.maxLength, o = i.replacer, function r(s, l, d) {
    var f, u, c, h, p, g, m, b, y, v, w, x;
    if (s && typeof s.toJSON == "function" && (s = s.toJSON()), w = JSON.stringify(s, o), w === void 0)
      return w;
    if (m = a - l.length - d, w.length <= m && (y = w.replace(
      XN,
      function($, _) {
        return _ || $ + " ";
      }
    ), y.length <= m))
      return y;
    if (o != null && (s = JSON.parse(w), o = void 0), typeof s == "object" && s !== null) {
      if (b = l + n, c = [], u = 0, Array.isArray(s))
        for (v = "[", f = "]", m = s.length; u < m; u++)
          c.push(
            r(s[u], b, u === m - 1 ? 0 : 1) || "null"
          );
      else
        for (v = "{", f = "}", g = Object.keys(s), m = g.length; u < m; u++)
          h = g[u], p = JSON.stringify(h) + ": ", x = r(
            s[h],
            b,
            p.length + (u === m - 1 ? 0 : 1)
          ), x !== void 0 && c.push(p + x);
      if (c.length > 0)
        return [v, n + c.join(`,
` + b), f].join(
          `
` + l
        );
    }
    return w;
  }(t, "", 0);
};
const wm = /* @__PURE__ */ kp(JN);
function Pa(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function ZN(e) {
  return e == null ? null : e.fname;
}
function DD(e) {
  return e == null ? null : e.fields;
}
function SD(e) {
  return e.length === 1 ? KN(e[0]) : QN(e);
}
const KN = (e) => function(t) {
  return t[e];
}, QN = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Ni(e) {
  throw Error(e);
}
function n0(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Ni("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Ni("Access path missing closing bracket: " + e), n && Ni("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function a0(e, t, i) {
  const n = n0(e);
  return e = n.length === 1 ? n[0] : e, Pa((i && i.get || SD)(n), [e], t || e);
}
const e5 = a0("id"), o0 = Pa((e) => e, [], "identity"), t5 = Pa(() => 0, [], "zero"), i5 = Pa(() => 1, [], "one"), n5 = Pa(() => !0, [], "true"), a5 = Pa(() => !1, [], "false");
function o5(e, t, i) {
  const n = [t].concat([].slice.call(i));
  console[e].apply(console, n);
}
const FD = 0, TD = 1, CD = 2, RD = 3, ID = 4;
function r5(e, t) {
  let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : o5, n = e || FD;
  return {
    level(a) {
      return arguments.length ? (n = +a, this) : n;
    },
    error() {
      return n >= TD && i(t || "error", "ERROR", arguments), this;
    },
    warn() {
      return n >= CD && i(t || "warn", "WARN", arguments), this;
    },
    info() {
      return n >= RD && i(t || "log", "INFO", arguments), this;
    },
    debug() {
      return n >= ID && i(t || "log", "DEBUG", arguments), this;
    }
  };
}
var Dp = Array.isArray;
function rf(e) {
  return e === Object(e);
}
const u$ = (e) => e !== "__proto__";
function r0() {
  for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
    t[i] = arguments[i];
  return t.reduce((n, a) => {
    for (const o in a)
      if (o === "signals")
        n.signals = s5(n.signals, a.signals);
      else {
        const r = o === "legend" ? {
          layout: 1
        } : o === "style" ? !0 : null;
        Sp(n, o, a[o], r);
      }
    return n;
  }, {});
}
function Sp(e, t, i, n) {
  if (!u$(t)) return;
  let a, o;
  if (rf(i) && !Dp(i)) {
    o = rf(e[t]) ? e[t] : e[t] = {};
    for (a in i)
      n && (n === !0 || n[a]) ? Sp(o, a, i[a]) : u$(a) && (o[a] = i[a]);
  } else
    e[t] = i;
}
function s5(e, t) {
  if (e == null) return t;
  const i = {}, n = [];
  function a(o) {
    i[o.name] || (i[o.name] = 1, n.push(o));
  }
  return t.forEach(a), e.forEach(a), n;
}
function bl(e) {
  return e[e.length - 1];
}
function s0(e) {
  return e == null || e === "" ? null : +e;
}
const jD = (e) => (t) => e * Math.exp(t), zD = (e) => (t) => Math.log(e * t), PD = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), ND = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, mh = (e) => (t) => t < 0 ? -Math.pow(-t, e) : Math.pow(t, e);
function Fp(e, t, i, n) {
  const a = i(e[0]), o = i(bl(e)), r = (o - a) * t;
  return [n(a - r), n(o - r)];
}
function l5(e, t) {
  return Fp(e, t, s0, o0);
}
function d5(e, t) {
  var i = Math.sign(e[0]);
  return Fp(e, t, zD(i), jD(i));
}
function f5(e, t, i) {
  return Fp(e, t, mh(i), mh(1 / i));
}
function u5(e, t, i) {
  return Fp(e, t, PD(i), ND(i));
}
function Tp(e, t, i, n, a) {
  const o = n(e[0]), r = n(bl(e)), s = t != null ? n(t) : (o + r) / 2;
  return [a(s + (o - s) * i), a(s + (r - s) * i)];
}
function c5(e, t, i) {
  return Tp(e, t, i, s0, o0);
}
function h5(e, t, i) {
  const n = Math.sign(e[0]);
  return Tp(e, t, i, zD(n), jD(n));
}
function p5(e, t, i, n) {
  return Tp(e, t, i, mh(n), mh(1 / n));
}
function g5(e, t, i, n) {
  return Tp(e, t, i, PD(n), ND(n));
}
function m5(e) {
  return 1 + ~~(new Date(e).getMonth() / 3);
}
function b5(e) {
  return 1 + ~~(new Date(e).getUTCMonth() / 3);
}
function sf(e) {
  return e != null ? Dp(e) ? e : [e] : [];
}
function y5(e, t, i) {
  let n = e[0], a = e[1], o;
  return a < n && (o = a, a = n, n = o), o = a - n, o >= i - t ? [t, i] : [n = Math.min(Math.max(n, t), i - o), n + o];
}
function Gs(e) {
  return typeof e == "function";
}
const v5 = "descending";
function _5(e, t, i) {
  i = i || {}, t = sf(t) || [];
  const n = [], a = [], o = {}, r = i.comparator || x5;
  return sf(e).forEach((s, l) => {
    s != null && (n.push(t[l] === v5 ? -1 : 1), a.push(s = Gs(s) ? s : a0(s, null, i)), (DD(s) || []).forEach((d) => o[d] = 1));
  }), a.length === 0 ? null : Pa(r(a, n), Object.keys(o));
}
const l0 = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, (e = e instanceof Date ? +e : e) !== e && t === t ? -1 : t !== t && e === e ? 1 : 0), x5 = (e, t) => e.length === 1 ? w5(e[0], t[0]) : $5(e, t, e.length), w5 = (e, t) => function(i, n) {
  return l0(e(i), e(n)) * t;
}, $5 = (e, t, i) => (t.push(0), function(n, a) {
  let o, r = 0, s = -1;
  for (; r === 0 && ++s < i; )
    o = e[s], r = l0(o(n), o(a));
  return r * t[s];
});
function k5(e) {
  return Gs(e) ? e : () => e;
}
function A5(e, t) {
  let i;
  return (n) => {
    i && clearTimeout(i), i = setTimeout(() => (t(n), i = null), e);
  };
}
function d0(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function O5(e, t) {
  let i = 0, n, a, o, r;
  if (e && (n = e.length))
    if (t == null) {
      for (a = e[i]; i < n && (a == null || a !== a); a = e[++i]) ;
      for (o = r = a; i < n; ++i)
        a = e[i], a != null && (a < o && (o = a), a > r && (r = a));
    } else {
      for (a = t(e[i]); i < n && (a == null || a !== a); a = t(e[++i])) ;
      for (o = r = a; i < n; ++i)
        a = t(e[i]), a != null && (a < o && (o = a), a > r && (r = a));
    }
  return [o, r];
}
function E5(e, t) {
  const i = e.length;
  let n = -1, a, o, r, s, l;
  if (t == null) {
    for (; ++n < i; )
      if (o = e[n], o != null && o >= o) {
        a = r = o;
        break;
      }
    if (n === i) return [-1, -1];
    for (s = l = n; ++n < i; )
      o = e[n], o != null && (a > o && (a = o, s = n), r < o && (r = o, l = n));
  } else {
    for (; ++n < i; )
      if (o = t(e[n], n, e), o != null && o >= o) {
        a = r = o;
        break;
      }
    if (n === i) return [-1, -1];
    for (s = l = n; ++n < i; )
      o = t(e[n], n, e), o != null && (a > o && (a = o, s = n), r < o && (r = o, l = n));
  }
  return [s, l];
}
const D5 = Object.prototype.hasOwnProperty;
function tn(e, t) {
  return D5.call(e, t);
}
const qu = {};
function S5(e) {
  let t = {}, i;
  function n(o) {
    return tn(t, o) && t[o] !== qu;
  }
  const a = {
    size: 0,
    empty: 0,
    object: t,
    has: n,
    get(o) {
      return n(o) ? t[o] : void 0;
    },
    set(o, r) {
      return n(o) || (++a.size, t[o] === qu && --a.empty), t[o] = r, this;
    },
    delete(o) {
      return n(o) && (--a.size, ++a.empty, t[o] = qu), this;
    },
    clear() {
      a.size = a.empty = 0, a.object = t = {};
    },
    test(o) {
      return arguments.length ? (i = o, a) : i;
    },
    clean() {
      const o = {};
      let r = 0;
      for (const s in t) {
        const l = t[s];
        l !== qu && (!i || !i(l)) && (o[s] = l, ++r);
      }
      a.size = r, a.empty = 0, a.object = t = o;
    }
  };
  return e && Object.keys(e).forEach((o) => {
    a.set(o, e[o]);
  }), a;
}
function F5(e, t, i, n, a, o) {
  if (!i && i !== 0) return o;
  const r = +i;
  let s = e[0], l = bl(e), d;
  l < s && (d = s, s = l, l = d), d = Math.abs(t - s);
  const f = Math.abs(l - t);
  return d < f && d <= r ? n : f <= r ? a : o;
}
function T5(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), d0(n, i);
}
function C5(e, t, i, n) {
  let a = t[0], o = t[t.length - 1], r;
  return a > o && (r = a, a = o, o = r), i = i === void 0 || i, n = n === void 0 || n, (i ? a <= e : a < e) && (n ? e <= o : e < o);
}
function qD(e) {
  return typeof e == "boolean";
}
function LD(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
function R5(e) {
  return e && Gs(e[Symbol.iterator]);
}
function BD(e) {
  return typeof e == "number";
}
function I5(e) {
  return Object.prototype.toString.call(e) === "[object RegExp]";
}
function Ir(e) {
  return typeof e == "string";
}
function j5(e, t, i) {
  e && (e = t ? sf(e).map((s) => s.replace(/\\(.)/g, "$1")) : sf(e));
  const n = e && e.length, a = i && i.get || SD, o = (s) => a(t ? [s] : n0(s));
  let r;
  if (!n)
    r = function() {
      return "";
    };
  else if (n === 1) {
    const s = o(e[0]);
    r = function(l) {
      return "" + s(l);
    };
  } else {
    const s = e.map(o);
    r = function(l) {
      let d = "" + s[0](l), f = 0;
      for (; ++f < n; ) d += "|" + s[f](l);
      return d;
    };
  }
  return Pa(r, e, "key");
}
function z5(e, t) {
  const i = e[0], n = bl(e), a = +t;
  return a ? a === 1 ? n : i + a * (n - i) : i;
}
const P5 = 1e4;
function N5(e) {
  e = +e || P5;
  let t, i, n;
  const a = () => {
    t = {}, i = {}, n = 0;
  }, o = (r, s) => (++n > e && (i = t, t = {}, n = 1), t[r] = s);
  return a(), {
    clear: a,
    has: (r) => tn(t, r) || tn(i, r),
    get: (r) => tn(t, r) ? t[r] : tn(i, r) ? o(r, i[r]) : void 0,
    set: (r, s) => tn(t, r) ? t[r] = s : o(r, s)
  };
}
function q5(e, t, i, n) {
  const a = t.length, o = i.length;
  if (!o) return t;
  if (!a) return i;
  const r = n || new t.constructor(a + o);
  let s = 0, l = 0, d = 0;
  for (; s < a && l < o; ++d)
    r[d] = e(t[s], i[l]) > 0 ? i[l++] : t[s++];
  for (; s < a; ++s, ++d)
    r[d] = t[s];
  for (; l < o; ++l, ++d)
    r[d] = i[l];
  return r;
}
function $d(e, t) {
  let i = "";
  for (; --t >= 0; ) i += e;
  return i;
}
function L5(e, t, i, n) {
  const a = i || " ", o = e + "", r = t - o.length;
  return r <= 0 ? o : n === "left" ? $d(a, r) + o : n === "center" ? $d(a, ~~(r / 2)) + o + $d(a, Math.ceil(r / 2)) : o + $d(a, r);
}
function B5(e) {
  return e && bl(e) - e[0] || 0;
}
function UD(e) {
  return Dp(e) ? "[" + e.map(UD) + "]" : rf(e) || Ir(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function U5(e) {
  return e == null || e === "" ? null : !e || e === "false" || e === "0" ? !1 : !!e;
}
const M5 = (e) => BD(e) || LD(e) ? e : Date.parse(e);
function V5(e, t) {
  return t = t || M5, e == null || e === "" ? null : t(e);
}
function W5(e) {
  return e == null || e === "" ? null : e + "";
}
function gy(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
function G5(e, t, i, n) {
  const a = n ?? "…", o = e + "", r = o.length, s = Math.max(0, t - a.length);
  return r <= t ? o : i === "left" ? a + o.slice(r - s) : i === "center" ? o.slice(0, Math.ceil(s / 2)) + a + o.slice(r - ~~(s / 2)) : o.slice(0, s) + a;
}
function H5(e, t, i) {
  if (e)
    if (t) {
      const n = e.length;
      for (let a = 0; a < n; ++a) {
        const o = t(e[a]);
        o && i(o, a, e);
      }
    } else
      e.forEach(i);
}
function yl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function Y5(e) {
  return e.length === 1 ? X5(e[0]) : J5(e);
}
const X5 = (e) => function(t) {
  return t[e];
}, J5 = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Ar(e) {
  throw Error(e);
}
function Z5(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Ar("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Ar("Access path missing closing bracket: " + e), n && Ar("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function K5(e, t, i) {
  const n = Z5(e);
  return e = n.length === 1 ? n[0] : e, yl(Y5(n), [e], e);
}
const Cp = K5("id"), MD = yl((e) => e, [], "identity");
yl(() => 0, [], "zero");
yl(() => 1, [], "one");
const my = yl(() => !0, [], "true");
yl(() => !1, [], "false");
function Q5(e, t, i) {
  const n = [t].concat([].slice.call(i));
  console[e].apply(console, n);
}
const eq = 0, VD = 1, tq = 2, iq = 3, nq = 4;
function aq(e, t) {
  let i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : Q5, n = e || eq;
  return {
    level(a) {
      return arguments.length ? (n = +a, this) : n;
    },
    error() {
      return n >= VD && i("error", "ERROR", arguments), this;
    },
    warn() {
      return n >= tq && i("warn", "WARN", arguments), this;
    },
    info() {
      return n >= iq && i("log", "INFO", arguments), this;
    },
    debug() {
      return n >= nq && i("log", "DEBUG", arguments), this;
    }
  };
}
var _o = Array.isArray;
function bh(e) {
  return e != null ? _o(e) ? e : [e] : [];
}
function go(e) {
  return typeof e == "function";
}
function f0(e) {
  return go(e) ? e : () => e;
}
function oq(e, t) {
  let i;
  return (n) => {
    i && clearTimeout(i), i = setTimeout(() => (t(n), i = null), e);
  };
}
function WD(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const rq = Object.prototype.hasOwnProperty;
function sq(e, t) {
  return rq.call(e, t);
}
function GD(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), WD(n, i);
}
function pr(e, t, i) {
  if (e)
    if (t) {
      const n = e.length;
      for (let a = 0; a < n; ++a) {
        const o = t(e[a]);
        o && i(o, a, e);
      }
    } else
      e.forEach(i);
}
function vl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function lq(e) {
  return e.length === 1 ? dq(e[0]) : fq(e);
}
const dq = (e) => function(t) {
  return t[e];
}, fq = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Rn(e) {
  throw Error(e);
}
function uq(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Rn("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Rn("Access path missing closing bracket: " + e), n && Rn("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function HD(e, t, i) {
  const n = uq(e);
  return e = n.length === 1 ? n[0] : e, vl(lq(n), [e], e);
}
HD("id");
const YD = vl((e) => e, [], "identity");
vl(() => 0, [], "zero");
vl(() => 1, [], "one");
vl(() => !0, [], "true");
vl(() => !1, [], "false");
var XD = Array.isArray;
function JD(e) {
  return e === Object(e);
}
function c$(e) {
  return e == null || e === "" ? null : +e;
}
function u0(e) {
  return typeof e == "function";
}
function c0(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const cq = Object.prototype.hasOwnProperty;
function ZD(e, t) {
  return cq.call(e, t);
}
function hq(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
function pq(e) {
  return e && u0(e[Symbol.iterator]);
}
function gq(e) {
  return typeof e == "number";
}
function mq(e) {
  return typeof e == "string";
}
function h0(e) {
  return XD(e) ? "[" + e.map(h0) + "]" : JD(e) || mq(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function bq(e) {
  return e == null || e === "" ? null : !e || e === "false" || e === "0" ? !1 : !!e;
}
const yq = (e) => gq(e) || hq(e) ? e : Date.parse(e);
function vq(e, t) {
  return t = t || yq, e == null || e === "" ? null : t(e);
}
function _q(e) {
  return e == null || e === "" ? null : e + "";
}
var h$ = {}, $m = {}, km = 34, Ql = 10, Am = 13;
function KD(e) {
  return new Function("d", "return {" + e.map(function(t, i) {
    return JSON.stringify(t) + ": d[" + i + '] || ""';
  }).join(",") + "}");
}
function xq(e, t) {
  var i = KD(e);
  return function(n, a) {
    return t(i(n), a, e);
  };
}
function p$(e) {
  var t = /* @__PURE__ */ Object.create(null), i = [];
  return e.forEach(function(n) {
    for (var a in n)
      a in t || i.push(t[a] = a);
  }), i;
}
function ri(e, t) {
  var i = e + "", n = i.length;
  return n < t ? new Array(t - n + 1).join(0) + i : i;
}
function wq(e) {
  return e < 0 ? "-" + ri(-e, 6) : e > 9999 ? "+" + ri(e, 6) : ri(e, 4);
}
function $q(e) {
  var t = e.getUTCHours(), i = e.getUTCMinutes(), n = e.getUTCSeconds(), a = e.getUTCMilliseconds();
  return isNaN(e) ? "Invalid Date" : wq(e.getUTCFullYear()) + "-" + ri(e.getUTCMonth() + 1, 2) + "-" + ri(e.getUTCDate(), 2) + (a ? "T" + ri(t, 2) + ":" + ri(i, 2) + ":" + ri(n, 2) + "." + ri(a, 3) + "Z" : n ? "T" + ri(t, 2) + ":" + ri(i, 2) + ":" + ri(n, 2) + "Z" : i || t ? "T" + ri(t, 2) + ":" + ri(i, 2) + "Z" : "");
}
function kq(e) {
  var t = new RegExp('["' + e + `
\r]`), i = e.charCodeAt(0);
  function n(u, c) {
    var h, p, g = a(u, function(m, b) {
      if (h) return h(m, b - 1);
      p = m, h = c ? xq(m, c) : KD(m);
    });
    return g.columns = p || [], g;
  }
  function a(u, c) {
    var h = [], p = u.length, g = 0, m = 0, b, y = p <= 0, v = !1;
    u.charCodeAt(p - 1) === Ql && --p, u.charCodeAt(p - 1) === Am && --p;
    function w() {
      if (y) return $m;
      if (v) return v = !1, h$;
      var $, _ = g, k;
      if (u.charCodeAt(_) === km) {
        for (; g++ < p && u.charCodeAt(g) !== km || u.charCodeAt(++g) === km; ) ;
        return ($ = g) >= p ? y = !0 : (k = u.charCodeAt(g++)) === Ql ? v = !0 : k === Am && (v = !0, u.charCodeAt(g) === Ql && ++g), u.slice(_ + 1, $ - 1).replace(/""/g, '"');
      }
      for (; g < p; ) {
        if ((k = u.charCodeAt($ = g++)) === Ql) v = !0;
        else if (k === Am)
          v = !0, u.charCodeAt(g) === Ql && ++g;
        else if (k !== i) continue;
        return u.slice(_, $);
      }
      return y = !0, u.slice(_, p);
    }
    for (; (b = w()) !== $m; ) {
      for (var x = []; b !== h$ && b !== $m; ) x.push(b), b = w();
      c && (x = c(x, m++)) == null || h.push(x);
    }
    return h;
  }
  function o(u, c) {
    return u.map(function(h) {
      return c.map(function(p) {
        return f(h[p]);
      }).join(e);
    });
  }
  function r(u, c) {
    return c == null && (c = p$(u)), [c.map(f).join(e)].concat(o(u, c)).join(`
`);
  }
  function s(u, c) {
    return c == null && (c = p$(u)), o(u, c).join(`
`);
  }
  function l(u) {
    return u.map(d).join(`
`);
  }
  function d(u) {
    return u.map(f).join(e);
  }
  function f(u) {
    return u == null ? "" : u instanceof Date ? $q(u) : t.test(u += "") ? '"' + u.replace(/"/g, '""') + '"' : u;
  }
  return {
    parse: n,
    parseRows: a,
    format: r,
    formatBody: s,
    formatRows: l,
    formatRow: d,
    formatValue: f
  };
}
function Aq(e) {
  return Math.abs(e = Math.round(e)) >= 1e21 ? e.toLocaleString("en").replace(/,/g, "") : e.toString(10);
}
function yh(e, t) {
  if ((i = (e = t ? e.toExponential(t - 1) : e.toExponential()).indexOf("e")) < 0) return null;
  var i, n = e.slice(0, i);
  return [
    n.length > 1 ? n[0] + n.slice(2) : n,
    +e.slice(i + 1)
  ];
}
function Hs(e) {
  return e = yh(Math.abs(e)), e ? e[1] : NaN;
}
function Oq(e, t) {
  return function(i, n) {
    for (var a = i.length, o = [], r = 0, s = e[0], l = 0; a > 0 && s > 0 && (l + s + 1 > n && (s = Math.max(1, n - l)), o.push(i.substring(a -= s, a + s)), !((l += s + 1) > n)); )
      s = e[r = (r + 1) % e.length];
    return o.reverse().join(t);
  };
}
function Eq(e) {
  return function(t) {
    return t.replace(/[0-9]/g, function(i) {
      return e[+i];
    });
  };
}
var Dq = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
function lf(e) {
  if (!(t = Dq.exec(e))) throw new Error("invalid format: " + e);
  var t;
  return new p0({
    fill: t[1],
    align: t[2],
    sign: t[3],
    symbol: t[4],
    zero: t[5],
    width: t[6],
    comma: t[7],
    precision: t[8] && t[8].slice(1),
    trim: t[9],
    type: t[10]
  });
}
lf.prototype = p0.prototype;
function p0(e) {
  this.fill = e.fill === void 0 ? " " : e.fill + "", this.align = e.align === void 0 ? ">" : e.align + "", this.sign = e.sign === void 0 ? "-" : e.sign + "", this.symbol = e.symbol === void 0 ? "" : e.symbol + "", this.zero = !!e.zero, this.width = e.width === void 0 ? void 0 : +e.width, this.comma = !!e.comma, this.precision = e.precision === void 0 ? void 0 : +e.precision, this.trim = !!e.trim, this.type = e.type === void 0 ? "" : e.type + "";
}
p0.prototype.toString = function() {
  return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
};
function Sq(e) {
  e: for (var t = e.length, i = 1, n = -1, a; i < t; ++i)
    switch (e[i]) {
      case ".":
        n = a = i;
        break;
      case "0":
        n === 0 && (n = i), a = i;
        break;
      default:
        if (!+e[i]) break e;
        n > 0 && (n = 0);
        break;
    }
  return n > 0 ? e.slice(0, n) + e.slice(a + 1) : e;
}
var QD;
function Fq(e, t) {
  var i = yh(e, t);
  if (!i) return e + "";
  var n = i[0], a = i[1], o = a - (QD = Math.max(-8, Math.min(8, Math.floor(a / 3))) * 3) + 1, r = n.length;
  return o === r ? n : o > r ? n + new Array(o - r + 1).join("0") : o > 0 ? n.slice(0, o) + "." + n.slice(o) : "0." + new Array(1 - o).join("0") + yh(e, Math.max(0, t + o - 1))[0];
}
function g$(e, t) {
  var i = yh(e, t);
  if (!i) return e + "";
  var n = i[0], a = i[1];
  return a < 0 ? "0." + new Array(-a).join("0") + n : n.length > a + 1 ? n.slice(0, a + 1) + "." + n.slice(a + 1) : n + new Array(a - n.length + 2).join("0");
}
const m$ = {
  "%": (e, t) => (e * 100).toFixed(t),
  b: (e) => Math.round(e).toString(2),
  c: (e) => e + "",
  d: Aq,
  e: (e, t) => e.toExponential(t),
  f: (e, t) => e.toFixed(t),
  g: (e, t) => e.toPrecision(t),
  o: (e) => Math.round(e).toString(8),
  p: (e, t) => g$(e * 100, t),
  r: g$,
  s: Fq,
  X: (e) => Math.round(e).toString(16).toUpperCase(),
  x: (e) => Math.round(e).toString(16)
};
function b$(e) {
  return e;
}
var y$ = Array.prototype.map, v$ = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
function eS(e) {
  var t = e.grouping === void 0 || e.thousands === void 0 ? b$ : Oq(y$.call(e.grouping, Number), e.thousands + ""), i = e.currency === void 0 ? "" : e.currency[0] + "", n = e.currency === void 0 ? "" : e.currency[1] + "", a = e.decimal === void 0 ? "." : e.decimal + "", o = e.numerals === void 0 ? b$ : Eq(y$.call(e.numerals, String)), r = e.percent === void 0 ? "%" : e.percent + "", s = e.minus === void 0 ? "−" : e.minus + "", l = e.nan === void 0 ? "NaN" : e.nan + "";
  function d(u) {
    u = lf(u);
    var c = u.fill, h = u.align, p = u.sign, g = u.symbol, m = u.zero, b = u.width, y = u.comma, v = u.precision, w = u.trim, x = u.type;
    x === "n" ? (y = !0, x = "g") : m$[x] || (v === void 0 && (v = 12), w = !0, x = "g"), (m || c === "0" && h === "=") && (m = !0, c = "0", h = "=");
    var $ = g === "$" ? i : g === "#" && /[boxX]/.test(x) ? "0" + x.toLowerCase() : "", _ = g === "$" ? n : /[%p]/.test(x) ? r : "", k = m$[x], A = /[defgprs%]/.test(x);
    v = v === void 0 ? 6 : /[gprs]/.test(x) ? Math.max(1, Math.min(21, v)) : Math.max(0, Math.min(20, v));
    function E(S) {
      var z = $, O = _, D, j, F;
      if (x === "c")
        O = k(S) + O, S = "";
      else {
        S = +S;
        var P = S < 0 || 1 / S < 0;
        if (S = isNaN(S) ? l : k(Math.abs(S), v), w && (S = Sq(S)), P && +S == 0 && p !== "+" && (P = !1), z = (P ? p === "(" ? p : s : p === "-" || p === "(" ? "" : p) + z, O = (x === "s" ? v$[8 + QD / 3] : "") + O + (P && p === "(" ? ")" : ""), A) {
          for (D = -1, j = S.length; ++D < j; )
            if (F = S.charCodeAt(D), 48 > F || F > 57) {
              O = (F === 46 ? a + S.slice(D + 1) : S.slice(D)) + O, S = S.slice(0, D);
              break;
            }
        }
      }
      y && !m && (S = t(S, 1 / 0));
      var N = z.length + S.length + O.length, L = N < b ? new Array(b - N + 1).join(c) : "";
      switch (y && m && (S = t(L + S, L.length ? b - O.length : 1 / 0), L = ""), h) {
        case "<":
          S = z + S + O + L;
          break;
        case "=":
          S = z + L + S + O;
          break;
        case "^":
          S = L.slice(0, N = L.length >> 1) + z + S + O + L.slice(N);
          break;
        default:
          S = L + z + S + O;
          break;
      }
      return o(S);
    }
    return E.toString = function() {
      return u + "";
    }, E;
  }
  function f(u, c) {
    var h = d((u = lf(u), u.type = "f", u)), p = Math.max(-8, Math.min(8, Math.floor(Hs(c) / 3))) * 3, g = Math.pow(10, -p), m = v$[8 + p / 3];
    return function(b) {
      return h(g * b) + m;
    };
  }
  return {
    format: d,
    formatPrefix: f
  };
}
var Lu, tS, iS;
Tq({
  thousands: ",",
  grouping: [3],
  currency: ["$", ""]
});
function Tq(e) {
  return Lu = eS(e), tS = Lu.format, iS = Lu.formatPrefix, Lu;
}
function Cq(e) {
  return Math.max(0, -Hs(Math.abs(e)));
}
function Rq(e, t) {
  return Math.max(0, Math.max(-8, Math.min(8, Math.floor(Hs(t) / 3))) * 3 - Hs(Math.abs(e)));
}
function Iq(e, t) {
  return e = Math.abs(e), t = Math.abs(t) - e, Math.max(0, Hs(t) - Hs(e)) + 1;
}
function _l(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function jq(e) {
  return e.length === 1 ? zq(e[0]) : Pq(e);
}
const zq = (e) => function(t) {
  return t[e];
}, Pq = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Ld(e) {
  throw Error(e);
}
function Nq(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Ld("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Ld("Access path missing closing bracket: " + e), n && Ld("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function qq(e, t, i) {
  const n = Nq(e);
  return e = n.length === 1 ? n[0] : e, _l(jq(n), [e], e);
}
qq("id");
_l((e) => e, [], "identity");
_l(() => 0, [], "zero");
_l(() => 1, [], "one");
_l(() => !0, [], "true");
_l(() => !1, [], "false");
function Lq(e) {
  return e === Object(e);
}
function Bq(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function _$(e) {
  return typeof e == "string";
}
const Om = /* @__PURE__ */ new Date(), Em = /* @__PURE__ */ new Date();
function Gn(e, t, i, n) {
  function a(o) {
    return e(o = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+o)), o;
  }
  return a.floor = (o) => (e(o = /* @__PURE__ */ new Date(+o)), o), a.ceil = (o) => (e(o = new Date(o - 1)), t(o, 1), e(o), o), a.round = (o) => {
    const r = a(o), s = a.ceil(o);
    return o - r < s - o ? r : s;
  }, a.offset = (o, r) => (t(o = /* @__PURE__ */ new Date(+o), r == null ? 1 : Math.floor(r)), o), a.range = (o, r, s) => {
    const l = [];
    if (o = a.ceil(o), s = s == null ? 1 : Math.floor(s), !(o < r) || !(s > 0)) return l;
    let d;
    do
      l.push(d = /* @__PURE__ */ new Date(+o)), t(o, s), e(o);
    while (d < o && o < r);
    return l;
  }, a.filter = (o) => Gn((r) => {
    if (r >= r) for (; e(r), !o(r); ) r.setTime(r - 1);
  }, (r, s) => {
    if (r >= r)
      if (s < 0) for (; ++s <= 0; )
        for (; t(r, -1), !o(r); )
          ;
      else for (; --s >= 0; )
        for (; t(r, 1), !o(r); )
          ;
  }), i && (a.count = (o, r) => (Om.setTime(+o), Em.setTime(+r), e(Om), e(Em), Math.floor(i(Om, Em))), a.every = (o) => (o = Math.floor(o), !isFinite(o) || !(o > 0) ? null : o > 1 ? a.filter(n ? (r) => n(r) % o === 0 : (r) => a.count(0, r) % o === 0) : a)), a;
}
const Uq = 1e3, g0 = Uq * 60, Mq = g0 * 60, df = Mq * 24, nS = df * 7, m0 = Gn(
  (e) => e.setHours(0, 0, 0, 0),
  (e, t) => e.setDate(e.getDate() + t),
  (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * g0) / df,
  (e) => e.getDate() - 1
);
m0.range;
const b0 = Gn((e) => {
  e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
  e.setUTCDate(e.getUTCDate() + t);
}, (e, t) => (t - e) / df, (e) => e.getUTCDate() - 1);
b0.range;
const Vq = Gn((e) => {
  e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
  e.setUTCDate(e.getUTCDate() + t);
}, (e, t) => (t - e) / df, (e) => Math.floor(e / df));
Vq.range;
function es(e) {
  return Gn((t) => {
    t.setDate(t.getDate() - (t.getDay() + 7 - e) % 7), t.setHours(0, 0, 0, 0);
  }, (t, i) => {
    t.setDate(t.getDate() + i * 7);
  }, (t, i) => (i - t - (i.getTimezoneOffset() - t.getTimezoneOffset()) * g0) / nS);
}
const aS = es(0), vh = es(1), Wq = es(2), Gq = es(3), Ys = es(4), Hq = es(5), Yq = es(6);
aS.range;
vh.range;
Wq.range;
Gq.range;
Ys.range;
Hq.range;
Yq.range;
function ts(e) {
  return Gn((t) => {
    t.setUTCDate(t.getUTCDate() - (t.getUTCDay() + 7 - e) % 7), t.setUTCHours(0, 0, 0, 0);
  }, (t, i) => {
    t.setUTCDate(t.getUTCDate() + i * 7);
  }, (t, i) => (i - t) / nS);
}
const oS = ts(0), _h = ts(1), Xq = ts(2), Jq = ts(3), Xs = ts(4), Zq = ts(5), Kq = ts(6);
oS.range;
_h.range;
Xq.range;
Jq.range;
Xs.range;
Zq.range;
Kq.range;
const jr = Gn((e) => {
  e.setMonth(0, 1), e.setHours(0, 0, 0, 0);
}, (e, t) => {
  e.setFullYear(e.getFullYear() + t);
}, (e, t) => t.getFullYear() - e.getFullYear(), (e) => e.getFullYear());
jr.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : Gn((t) => {
  t.setFullYear(Math.floor(t.getFullYear() / e) * e), t.setMonth(0, 1), t.setHours(0, 0, 0, 0);
}, (t, i) => {
  t.setFullYear(t.getFullYear() + i * e);
});
jr.range;
const zr = Gn((e) => {
  e.setUTCMonth(0, 1), e.setUTCHours(0, 0, 0, 0);
}, (e, t) => {
  e.setUTCFullYear(e.getUTCFullYear() + t);
}, (e, t) => t.getUTCFullYear() - e.getUTCFullYear(), (e) => e.getUTCFullYear());
zr.every = (e) => !isFinite(e = Math.floor(e)) || !(e > 0) ? null : Gn((t) => {
  t.setUTCFullYear(Math.floor(t.getUTCFullYear() / e) * e), t.setUTCMonth(0, 1), t.setUTCHours(0, 0, 0, 0);
}, (t, i) => {
  t.setUTCFullYear(t.getUTCFullYear() + i * e);
});
zr.range;
function Dm(e) {
  if (0 <= e.y && e.y < 100) {
    var t = new Date(-1, e.m, e.d, e.H, e.M, e.S, e.L);
    return t.setFullYear(e.y), t;
  }
  return new Date(e.y, e.m, e.d, e.H, e.M, e.S, e.L);
}
function Sm(e) {
  if (0 <= e.y && e.y < 100) {
    var t = new Date(Date.UTC(-1, e.m, e.d, e.H, e.M, e.S, e.L));
    return t.setUTCFullYear(e.y), t;
  }
  return new Date(Date.UTC(e.y, e.m, e.d, e.H, e.M, e.S, e.L));
}
function ed(e, t, i) {
  return { y: e, m: t, d: i, H: 0, M: 0, S: 0, L: 0 };
}
function rS(e) {
  var t = e.dateTime, i = e.date, n = e.time, a = e.periods, o = e.days, r = e.shortDays, s = e.months, l = e.shortMonths, d = td(a), f = id(a), u = td(o), c = id(o), h = td(r), p = id(r), g = td(s), m = id(s), b = td(l), y = id(l), v = {
    a: P,
    A: N,
    b: L,
    B: K,
    c: null,
    d: O$,
    e: O$,
    f: xL,
    g: TL,
    G: RL,
    H: yL,
    I: vL,
    j: _L,
    L: sS,
    m: wL,
    M: $L,
    p: te,
    q: ce,
    Q: S$,
    s: F$,
    S: kL,
    u: AL,
    U: OL,
    V: EL,
    w: DL,
    W: SL,
    x: null,
    X: null,
    y: FL,
    Y: CL,
    Z: IL,
    "%": D$
  }, w = {
    a: Ve,
    A: ke,
    b: We,
    B: Jo,
    c: null,
    d: E$,
    e: E$,
    f: NL,
    g: YL,
    G: JL,
    H: jL,
    I: zL,
    j: PL,
    L: dS,
    m: qL,
    M: LL,
    p: Ha,
    q: Zo,
    Q: S$,
    s: F$,
    S: BL,
    u: UL,
    U: ML,
    V: VL,
    w: WL,
    W: GL,
    x: null,
    X: null,
    y: HL,
    Y: XL,
    Z: ZL,
    "%": D$
  }, x = {
    a: E,
    A: S,
    b: z,
    B: O,
    c: D,
    d: k$,
    e: k$,
    f: pL,
    g: $$,
    G: w$,
    H: A$,
    I: A$,
    j: fL,
    L: hL,
    m: dL,
    M: uL,
    p: A,
    q: lL,
    Q: mL,
    s: bL,
    S: cL,
    u: nL,
    U: aL,
    V: oL,
    w: iL,
    W: rL,
    x: j,
    X: F,
    y: $$,
    Y: w$,
    Z: sL,
    "%": gL
  };
  v.x = $(i, v), v.X = $(n, v), v.c = $(t, v), w.x = $(i, w), w.X = $(n, w), w.c = $(t, w);
  function $(W, oe) {
    return function(de) {
      var B = [], yt = -1, _e = 0, At = W.length, Ut, Ko, Jw;
      for (de instanceof Date || (de = /* @__PURE__ */ new Date(+de)); ++yt < At; )
        W.charCodeAt(yt) === 37 && (B.push(W.slice(_e, yt)), (Ko = x$[Ut = W.charAt(++yt)]) != null ? Ut = W.charAt(++yt) : Ko = Ut === "e" ? " " : "0", (Jw = oe[Ut]) && (Ut = Jw(de, Ko)), B.push(Ut), _e = yt + 1);
      return B.push(W.slice(_e, yt)), B.join("");
    };
  }
  function _(W, oe) {
    return function(de) {
      var B = ed(1900, void 0, 1), yt = k(B, W, de += "", 0), _e, At;
      if (yt != de.length) return null;
      if ("Q" in B) return new Date(B.Q);
      if ("s" in B) return new Date(B.s * 1e3 + ("L" in B ? B.L : 0));
      if (oe && !("Z" in B) && (B.Z = 0), "p" in B && (B.H = B.H % 12 + B.p * 12), B.m === void 0 && (B.m = "q" in B ? B.q : 0), "V" in B) {
        if (B.V < 1 || B.V > 53) return null;
        "w" in B || (B.w = 1), "Z" in B ? (_e = Sm(ed(B.y, 0, 1)), At = _e.getUTCDay(), _e = At > 4 || At === 0 ? _h.ceil(_e) : _h(_e), _e = b0.offset(_e, (B.V - 1) * 7), B.y = _e.getUTCFullYear(), B.m = _e.getUTCMonth(), B.d = _e.getUTCDate() + (B.w + 6) % 7) : (_e = Dm(ed(B.y, 0, 1)), At = _e.getDay(), _e = At > 4 || At === 0 ? vh.ceil(_e) : vh(_e), _e = m0.offset(_e, (B.V - 1) * 7), B.y = _e.getFullYear(), B.m = _e.getMonth(), B.d = _e.getDate() + (B.w + 6) % 7);
      } else ("W" in B || "U" in B) && ("w" in B || (B.w = "u" in B ? B.u % 7 : "W" in B ? 1 : 0), At = "Z" in B ? Sm(ed(B.y, 0, 1)).getUTCDay() : Dm(ed(B.y, 0, 1)).getDay(), B.m = 0, B.d = "W" in B ? (B.w + 6) % 7 + B.W * 7 - (At + 5) % 7 : B.w + B.U * 7 - (At + 6) % 7);
      return "Z" in B ? (B.H += B.Z / 100 | 0, B.M += B.Z % 100, Sm(B)) : Dm(B);
    };
  }
  function k(W, oe, de, B) {
    for (var yt = 0, _e = oe.length, At = de.length, Ut, Ko; yt < _e; ) {
      if (B >= At) return -1;
      if (Ut = oe.charCodeAt(yt++), Ut === 37) {
        if (Ut = oe.charAt(yt++), Ko = x[Ut in x$ ? oe.charAt(yt++) : Ut], !Ko || (B = Ko(W, de, B)) < 0) return -1;
      } else if (Ut != de.charCodeAt(B++))
        return -1;
    }
    return B;
  }
  function A(W, oe, de) {
    var B = d.exec(oe.slice(de));
    return B ? (W.p = f.get(B[0].toLowerCase()), de + B[0].length) : -1;
  }
  function E(W, oe, de) {
    var B = h.exec(oe.slice(de));
    return B ? (W.w = p.get(B[0].toLowerCase()), de + B[0].length) : -1;
  }
  function S(W, oe, de) {
    var B = u.exec(oe.slice(de));
    return B ? (W.w = c.get(B[0].toLowerCase()), de + B[0].length) : -1;
  }
  function z(W, oe, de) {
    var B = b.exec(oe.slice(de));
    return B ? (W.m = y.get(B[0].toLowerCase()), de + B[0].length) : -1;
  }
  function O(W, oe, de) {
    var B = g.exec(oe.slice(de));
    return B ? (W.m = m.get(B[0].toLowerCase()), de + B[0].length) : -1;
  }
  function D(W, oe, de) {
    return k(W, t, oe, de);
  }
  function j(W, oe, de) {
    return k(W, i, oe, de);
  }
  function F(W, oe, de) {
    return k(W, n, oe, de);
  }
  function P(W) {
    return r[W.getDay()];
  }
  function N(W) {
    return o[W.getDay()];
  }
  function L(W) {
    return l[W.getMonth()];
  }
  function K(W) {
    return s[W.getMonth()];
  }
  function te(W) {
    return a[+(W.getHours() >= 12)];
  }
  function ce(W) {
    return 1 + ~~(W.getMonth() / 3);
  }
  function Ve(W) {
    return r[W.getUTCDay()];
  }
  function ke(W) {
    return o[W.getUTCDay()];
  }
  function We(W) {
    return l[W.getUTCMonth()];
  }
  function Jo(W) {
    return s[W.getUTCMonth()];
  }
  function Ha(W) {
    return a[+(W.getUTCHours() >= 12)];
  }
  function Zo(W) {
    return 1 + ~~(W.getUTCMonth() / 3);
  }
  return {
    format: function(W) {
      var oe = $(W += "", v);
      return oe.toString = function() {
        return W;
      }, oe;
    },
    parse: function(W) {
      var oe = _(W += "", !1);
      return oe.toString = function() {
        return W;
      }, oe;
    },
    utcFormat: function(W) {
      var oe = $(W += "", w);
      return oe.toString = function() {
        return W;
      }, oe;
    },
    utcParse: function(W) {
      var oe = _(W += "", !0);
      return oe.toString = function() {
        return W;
      }, oe;
    }
  };
}
var x$ = { "-": "", _: " ", 0: "0" }, mt = /^\s*\d+/, Qq = /^%/, eL = /[\\^$*+?|[\]().{}]/g;
function be(e, t, i) {
  var n = e < 0 ? "-" : "", a = (n ? -e : e) + "", o = a.length;
  return n + (o < i ? new Array(i - o + 1).join(t) + a : a);
}
function tL(e) {
  return e.replace(eL, "\\$&");
}
function td(e) {
  return new RegExp("^(?:" + e.map(tL).join("|") + ")", "i");
}
function id(e) {
  return new Map(e.map((t, i) => [t.toLowerCase(), i]));
}
function iL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 1));
  return n ? (e.w = +n[0], i + n[0].length) : -1;
}
function nL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 1));
  return n ? (e.u = +n[0], i + n[0].length) : -1;
}
function aL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.U = +n[0], i + n[0].length) : -1;
}
function oL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.V = +n[0], i + n[0].length) : -1;
}
function rL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.W = +n[0], i + n[0].length) : -1;
}
function w$(e, t, i) {
  var n = mt.exec(t.slice(i, i + 4));
  return n ? (e.y = +n[0], i + n[0].length) : -1;
}
function $$(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
}
function sL(e, t, i) {
  var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(i, i + 6));
  return n ? (e.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
}
function lL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 1));
  return n ? (e.q = n[0] * 3 - 3, i + n[0].length) : -1;
}
function dL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.m = n[0] - 1, i + n[0].length) : -1;
}
function k$(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.d = +n[0], i + n[0].length) : -1;
}
function fL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 3));
  return n ? (e.m = 0, e.d = +n[0], i + n[0].length) : -1;
}
function A$(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.H = +n[0], i + n[0].length) : -1;
}
function uL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.M = +n[0], i + n[0].length) : -1;
}
function cL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 2));
  return n ? (e.S = +n[0], i + n[0].length) : -1;
}
function hL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 3));
  return n ? (e.L = +n[0], i + n[0].length) : -1;
}
function pL(e, t, i) {
  var n = mt.exec(t.slice(i, i + 6));
  return n ? (e.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1;
}
function gL(e, t, i) {
  var n = Qq.exec(t.slice(i, i + 1));
  return n ? i + n[0].length : -1;
}
function mL(e, t, i) {
  var n = mt.exec(t.slice(i));
  return n ? (e.Q = +n[0], i + n[0].length) : -1;
}
function bL(e, t, i) {
  var n = mt.exec(t.slice(i));
  return n ? (e.s = +n[0], i + n[0].length) : -1;
}
function O$(e, t) {
  return be(e.getDate(), t, 2);
}
function yL(e, t) {
  return be(e.getHours(), t, 2);
}
function vL(e, t) {
  return be(e.getHours() % 12 || 12, t, 2);
}
function _L(e, t) {
  return be(1 + m0.count(jr(e), e), t, 3);
}
function sS(e, t) {
  return be(e.getMilliseconds(), t, 3);
}
function xL(e, t) {
  return sS(e, t) + "000";
}
function wL(e, t) {
  return be(e.getMonth() + 1, t, 2);
}
function $L(e, t) {
  return be(e.getMinutes(), t, 2);
}
function kL(e, t) {
  return be(e.getSeconds(), t, 2);
}
function AL(e) {
  var t = e.getDay();
  return t === 0 ? 7 : t;
}
function OL(e, t) {
  return be(aS.count(jr(e) - 1, e), t, 2);
}
function lS(e) {
  var t = e.getDay();
  return t >= 4 || t === 0 ? Ys(e) : Ys.ceil(e);
}
function EL(e, t) {
  return e = lS(e), be(Ys.count(jr(e), e) + (jr(e).getDay() === 4), t, 2);
}
function DL(e) {
  return e.getDay();
}
function SL(e, t) {
  return be(vh.count(jr(e) - 1, e), t, 2);
}
function FL(e, t) {
  return be(e.getFullYear() % 100, t, 2);
}
function TL(e, t) {
  return e = lS(e), be(e.getFullYear() % 100, t, 2);
}
function CL(e, t) {
  return be(e.getFullYear() % 1e4, t, 4);
}
function RL(e, t) {
  var i = e.getDay();
  return e = i >= 4 || i === 0 ? Ys(e) : Ys.ceil(e), be(e.getFullYear() % 1e4, t, 4);
}
function IL(e) {
  var t = e.getTimezoneOffset();
  return (t > 0 ? "-" : (t *= -1, "+")) + be(t / 60 | 0, "0", 2) + be(t % 60, "0", 2);
}
function E$(e, t) {
  return be(e.getUTCDate(), t, 2);
}
function jL(e, t) {
  return be(e.getUTCHours(), t, 2);
}
function zL(e, t) {
  return be(e.getUTCHours() % 12 || 12, t, 2);
}
function PL(e, t) {
  return be(1 + b0.count(zr(e), e), t, 3);
}
function dS(e, t) {
  return be(e.getUTCMilliseconds(), t, 3);
}
function NL(e, t) {
  return dS(e, t) + "000";
}
function qL(e, t) {
  return be(e.getUTCMonth() + 1, t, 2);
}
function LL(e, t) {
  return be(e.getUTCMinutes(), t, 2);
}
function BL(e, t) {
  return be(e.getUTCSeconds(), t, 2);
}
function UL(e) {
  var t = e.getUTCDay();
  return t === 0 ? 7 : t;
}
function ML(e, t) {
  return be(oS.count(zr(e) - 1, e), t, 2);
}
function fS(e) {
  var t = e.getUTCDay();
  return t >= 4 || t === 0 ? Xs(e) : Xs.ceil(e);
}
function VL(e, t) {
  return e = fS(e), be(Xs.count(zr(e), e) + (zr(e).getUTCDay() === 4), t, 2);
}
function WL(e) {
  return e.getUTCDay();
}
function GL(e, t) {
  return be(_h.count(zr(e) - 1, e), t, 2);
}
function HL(e, t) {
  return be(e.getUTCFullYear() % 100, t, 2);
}
function YL(e, t) {
  return e = fS(e), be(e.getUTCFullYear() % 100, t, 2);
}
function XL(e, t) {
  return be(e.getUTCFullYear() % 1e4, t, 4);
}
function JL(e, t) {
  var i = e.getUTCDay();
  return e = i >= 4 || i === 0 ? Xs(e) : Xs.ceil(e), be(e.getUTCFullYear() % 1e4, t, 4);
}
function ZL() {
  return "+0000";
}
function D$() {
  return "%";
}
function S$(e) {
  return +e;
}
function F$(e) {
  return Math.floor(+e / 1e3);
}
var vs, uS, cS, hS, pS;
KL({
  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"]
});
function KL(e) {
  return vs = rS(e), uS = vs.format, cS = vs.parse, hS = vs.utcFormat, pS = vs.utcParse, vs;
}
function kd(e) {
  const t = {};
  return (i) => t[i] || (t[i] = e(i));
}
function QL(e, t) {
  return (i) => {
    const n = e(i), a = n.indexOf(t);
    if (a < 0) return n;
    let o = eB(n, a);
    const r = o < n.length ? n.slice(o) : "";
    for (; --o > a; ) if (n[o] !== "0") {
      ++o;
      break;
    }
    return n.slice(0, o) + r;
  };
}
function eB(e, t) {
  let i = e.lastIndexOf("e"), n;
  if (i > 0) return i;
  for (i = e.length; --i > t; )
    if (n = e.charCodeAt(i), n >= 48 && n <= 57) return i + 1;
}
function gS(e) {
  const t = kd(e.format), i = e.formatPrefix;
  return {
    format: t,
    formatPrefix: i,
    formatFloat(n) {
      const a = lf(n || ",");
      if (a.precision == null) {
        switch (a.precision = 12, a.type) {
          case "%":
            a.precision -= 2;
            break;
          case "e":
            a.precision -= 1;
            break;
        }
        return QL(
          t(a),
          // number format
          t(".1f")(1)[1]
          // decimal point character
        );
      } else
        return t(a);
    },
    formatSpan(n, a, o, r) {
      r = lf(r ?? ",f");
      const s = Hv(n, a, o), l = Math.max(Math.abs(n), Math.abs(a));
      let d;
      if (r.precision == null)
        switch (r.type) {
          case "s":
            return isNaN(d = Rq(s, l)) || (r.precision = d), i(r, l);
          case "":
          case "e":
          case "g":
          case "p":
          case "r": {
            isNaN(d = Iq(s, l)) || (r.precision = d - (r.type === "e"));
            break;
          }
          case "f":
          case "%": {
            isNaN(d = Cq(s)) || (r.precision = d - (r.type === "%") * 2);
            break;
          }
        }
      return t(r);
    }
  };
}
let by;
mS();
function mS() {
  return by = gS({
    format: tS,
    formatPrefix: iS
  });
}
function bS(e) {
  return gS(eS(e));
}
function xh(e) {
  return arguments.length ? by = bS(e) : by;
}
function T$(e, t, i) {
  i = i || {}, Lq(i) || Ld(`Invalid time multi-format specifier: ${i}`);
  const n = t(Yb), a = t(Xb), o = t(Jb), r = t(Zb), s = t(Kb), l = t(Qb), d = t(ey), f = t(ty), u = e(i[rE] || ".%L"), c = e(i[Yb] || ":%S"), h = e(i[Xb] || "%I:%M"), p = e(i[Jb] || "%I %p"), g = e(i[Zb] || i[sE] || "%a %d"), m = e(i[Kb] || "%b %d"), b = e(i[Qb] || "%B"), y = e(i[ey] || "%B"), v = e(i[ty] || "%Y");
  return (w) => (n(w) < w ? u : a(w) < w ? c : o(w) < w ? h : r(w) < w ? p : l(w) < w ? s(w) < w ? g : m : f(w) < w ? d(w) < w ? b : y : v)(w);
}
function yS(e) {
  const t = kd(e.format), i = kd(e.utcFormat);
  return {
    timeFormat: (n) => _$(n) ? t(n) : T$(t, Yv, n),
    utcFormat: (n) => _$(n) ? i(n) : T$(i, Xv, n),
    timeParse: kd(e.parse),
    utcParse: kd(e.utcParse)
  };
}
let yy;
vS();
function vS() {
  return yy = yS({
    format: uS,
    parse: cS,
    utcFormat: hS,
    utcParse: pS
  });
}
function _S(e) {
  return yS(rS(e));
}
function ff(e) {
  return arguments.length ? yy = _S(e) : yy;
}
const vy = (e, t) => Bq({}, e, t);
function xS(e, t) {
  const i = e ? bS(e) : xh(), n = t ? _S(t) : ff();
  return vy(i, n);
}
function y0(e, t) {
  const i = arguments.length;
  return i && i !== 2 && Ld("defaultLocale expects either zero or two arguments."), i ? vy(xh(e), ff(t)) : vy(xh(), ff());
}
function tB() {
  return mS(), vS(), y0();
}
const iB = /^(data:|([A-Za-z]+:)?\/\/)/, nB = /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|file|data):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i, aB = /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g, C$ = "file://";
function oB(e, t) {
  return (i) => ({
    options: i || {},
    sanitize: sB,
    load: rB,
    fileAccess: !!t,
    file: lB(t),
    http: fB(e)
  });
}
async function rB(e, t) {
  const i = await this.sanitize(e, t), n = i.href;
  return i.localFile ? this.file(n) : this.http(n, t);
}
async function sB(e, t) {
  t = c0({}, this.options, t);
  const i = this.fileAccess, n = {
    href: null
  };
  let a, o, r;
  const s = nB.test(e.replace(aB, ""));
  (e == null || typeof e != "string" || !s) && Rn("Sanitize failure, invalid URI: " + h0(e));
  const l = iB.test(e);
  return (r = t.baseURL) && !l && (!e.startsWith("/") && !r.endsWith("/") && (e = "/" + e), e = r + e), o = (a = e.startsWith(C$)) || t.mode === "file" || t.mode !== "http" && !l && i, a ? e = e.slice(C$.length) : e.startsWith("//") && (t.defaultProtocol === "file" ? (e = e.slice(2), o = !0) : e = (t.defaultProtocol || "http") + ":" + e), Object.defineProperty(n, "localFile", {
    value: !!o
  }), n.href = e, t.target && (n.target = t.target + ""), t.rel && (n.rel = t.rel + ""), t.context === "image" && t.crossOrigin && (n.crossOrigin = t.crossOrigin + ""), n;
}
function lB(e) {
  return e ? (t) => new Promise((i, n) => {
    e.readFile(t, (a, o) => {
      a ? n(a) : i(o);
    });
  }) : dB;
}
async function dB() {
  Rn("No file system access.");
}
function fB(e) {
  return e ? async function(t, i) {
    const n = c0({}, this.options.http, i), a = i && i.response, o = await e(t, n);
    return o.ok ? u0(o[a]) ? o[a]() : o.text() : Rn(o.status + "" + o.statusText);
  } : uB;
}
async function uB() {
  Rn("No HTTP fetch method available.");
}
const cB = (e) => e != null && e === e, hB = (e) => e === "true" || e === "false" || e === !0 || e === !1, pB = (e) => !Number.isNaN(Date.parse(e)), wS = (e) => !Number.isNaN(+e) && !(e instanceof Date), gB = (e) => wS(e) && Number.isInteger(+e), _y = {
  boolean: bq,
  integer: c$,
  number: c$,
  date: vq,
  string: _q,
  unknown: YD
}, Bu = [hB, gB, wS, pB], mB = ["boolean", "integer", "number", "date"];
function $S(e, t) {
  if (!e || !e.length) return "unknown";
  const i = e.length, n = Bu.length, a = Bu.map((o, r) => r + 1);
  for (let o = 0, r = 0, s, l; o < i; ++o)
    for (l = t ? e[o][t] : e[o], s = 0; s < n; ++s)
      if (a[s] && cB(l) && !Bu[s](l) && (a[s] = 0, ++r, r === Bu.length))
        return "string";
  return mB[a.reduce((o, r) => o === 0 ? r : o, 0) - 1];
}
function kS(e, t) {
  return t.reduce((i, n) => (i[n] = $S(e, n), i), {});
}
function R$(e) {
  const t = function(i, n) {
    const a = {
      delimiter: e
    };
    return v0(i, n ? c0(n, a) : a);
  };
  return t.responseType = "text", t;
}
function v0(e, t) {
  return t.header && (e = t.header.map(h0).join(t.delimiter) + `
` + e), kq(t.delimiter).parse(e + "");
}
v0.responseType = "text";
function bB(e) {
  return typeof Buffer == "function" && u0(Buffer.isBuffer) ? Buffer.isBuffer(e) : !1;
}
function _0(e, t) {
  const i = t && t.property ? HD(t.property) : YD;
  return JD(e) && !bB(e) ? yB(i(e), t) : i(JSON.parse(e));
}
_0.responseType = "json";
function yB(e, t) {
  return !XD(e) && pq(e) && (e = [...e]), t && t.copy ? JSON.parse(JSON.stringify(e)) : e;
}
const vB = {
  interior: (e, t) => e !== t,
  exterior: (e, t) => e === t
};
function AS(e, t) {
  let i, n, a, o;
  return e = _0(e, t), t && t.feature ? (i = E3, a = t.feature) : t && t.mesh ? (i = D3, a = t.mesh, o = vB[t.filter]) : Rn("Missing TopoJSON feature or mesh parameter."), n = (n = e.objects[a]) ? i(e, n, o) : Rn("Invalid TopoJSON object: " + a), n && n.features || [n];
}
AS.responseType = "json";
const kc = {
  dsv: v0,
  csv: R$(","),
  tsv: R$("	"),
  json: _0,
  topojson: AS
};
function x0(e, t) {
  return arguments.length > 1 ? (kc[e] = t, this) : ZD(kc, e) ? kc[e] : null;
}
function OS(e) {
  const t = x0(e);
  return t && t.responseType || "text";
}
function ES(e, t, i, n) {
  t = t || {};
  const a = x0(t.type || "json");
  return a || Rn("Unknown data format type: " + t.type), e = a(e, t), t.parse && _B(e, t.parse, i, n), ZD(e, "columns") && delete e.columns, e;
}
function _B(e, t, i, n) {
  if (!e.length) return;
  const a = ff();
  i = i || a.timeParse, n = n || a.utcParse;
  let o = e.columns || Object.keys(e[0]), r, s, l, d, f, u;
  t === "auto" && (t = kS(e, o)), o = Object.keys(t);
  const c = o.map((h) => {
    const p = t[h];
    let g, m;
    if (p && (p.startsWith("date:") || p.startsWith("utc:")))
      return g = p.split(/:(.+)?/, 2), m = g[1], (m[0] === "'" && m[m.length - 1] === "'" || m[0] === '"' && m[m.length - 1] === '"') && (m = m.slice(1, -1)), (g[0] === "utc" ? n : i)(m);
    if (!_y[p])
      throw Error("Illegal format pattern: " + h + ":" + p);
    return _y[p];
  });
  for (l = 0, f = e.length, u = o.length; l < f; ++l)
    for (r = e[l], d = 0; d < u; ++d)
      s = o[d], r[s] = c[d](r[s]);
}
const Rp = oB(
  typeof fetch < "u" && fetch,
  // use built-in fetch API
  null
  // no file system access
);
function Ip(e) {
  const t = e || MD, i = [], n = {};
  return i.add = (a) => {
    const o = t(a);
    return n[o] || (n[o] = 1, i.push(a)), i;
  }, i.remove = (a) => {
    const o = t(a);
    if (n[o]) {
      n[o] = 0;
      const r = i.indexOf(a);
      r >= 0 && i.splice(r, 1);
    }
    return i;
  }, i;
}
async function Ac(e, t) {
  try {
    await t(e);
  } catch (i) {
    e.error(i);
  }
}
const DS = Symbol("vega_id");
let xB = 1;
function jp(e) {
  return !!(e && Z(e));
}
function Z(e) {
  return e[DS];
}
function SS(e, t) {
  return e[DS] = t, e;
}
function xe(e) {
  const t = e === Object(e) ? e : {
    data: e
  };
  return Z(t) ? t : SS(t, xB++);
}
function w0(e) {
  return zp(e, xe({}));
}
function zp(e, t) {
  for (const i in e) t[i] = e[i];
  return t;
}
function FS(e, t) {
  return SS(t, Z(e));
}
function is(e, t) {
  return e ? t ? (i, n) => e(i, n) || Z(t(i)) - Z(t(n)) : (i, n) => e(i, n) || Z(i) - Z(n) : null;
}
function TS(e) {
  return e && e.constructor === ns;
}
function ns() {
  const e = [], t = [], i = [], n = [], a = [];
  let o = null, r = !1;
  return {
    constructor: ns,
    insert(s) {
      const l = bh(s), d = l.length;
      for (let f = 0; f < d; ++f) e.push(l[f]);
      return this;
    },
    remove(s) {
      const l = go(s) ? n : t, d = bh(s), f = d.length;
      for (let u = 0; u < f; ++u) l.push(d[u]);
      return this;
    },
    modify(s, l, d) {
      const f = {
        field: l,
        value: f0(d)
      };
      return go(s) ? (f.filter = s, a.push(f)) : (f.tuple = s, i.push(f)), this;
    },
    encode(s, l) {
      return go(s) ? a.push({
        filter: s,
        field: l
      }) : i.push({
        tuple: s,
        field: l
      }), this;
    },
    clean(s) {
      return o = s, this;
    },
    reflow() {
      return r = !0, this;
    },
    pulse(s, l) {
      const d = {}, f = {};
      let u, c, h, p, g, m;
      for (u = 0, c = l.length; u < c; ++u)
        d[Z(l[u])] = 1;
      for (u = 0, c = t.length; u < c; ++u)
        g = t[u], d[Z(g)] = -1;
      for (u = 0, c = n.length; u < c; ++u)
        p = n[u], l.forEach((y) => {
          p(y) && (d[Z(y)] = -1);
        });
      for (u = 0, c = e.length; u < c; ++u)
        g = e[u], m = Z(g), d[m] ? d[m] = 1 : s.add.push(xe(e[u]));
      for (u = 0, c = l.length; u < c; ++u)
        g = l[u], d[Z(g)] < 0 && s.rem.push(g);
      function b(y, v, w) {
        w ? y[v] = w(y) : s.encode = v, r || (f[Z(y)] = y);
      }
      for (u = 0, c = i.length; u < c; ++u)
        h = i[u], g = h.tuple, p = h.field, m = d[Z(g)], m > 0 && (b(g, p, h.value), s.modifies(p));
      for (u = 0, c = a.length; u < c; ++u)
        h = a[u], p = h.filter, l.forEach((y) => {
          p(y) && d[Z(y)] > 0 && b(y, h.field, h.value);
        }), s.modifies(h.field);
      if (r)
        s.mod = t.length || n.length ? l.filter((y) => d[Z(y)] > 0) : l.slice();
      else
        for (m in f) s.mod.push(f[m]);
      return (o || o == null && (t.length || n.length)) && s.clean(!0), s;
    }
  };
}
const Oc = "_:mod:_";
function Pp() {
  Object.defineProperty(this, Oc, {
    writable: !0,
    value: {}
  });
}
Pp.prototype = {
  /**
   * Set a parameter value. If the parameter value changes, the parameter
   * will be recorded as modified.
   * @param {string} name - The parameter name.
   * @param {number} index - The index into an array-value parameter. Ignored if
   *   the argument is undefined, null or less than zero.
   * @param {*} value - The parameter value to set.
   * @param {boolean} [force=false] - If true, records the parameter as modified
   *   even if the value is unchanged.
   * @return {Parameters} - This parameter object.
   */
  set(e, t, i, n) {
    const a = this, o = a[e], r = a[Oc];
    return t != null && t >= 0 ? (o[t] !== i || n) && (o[t] = i, r[t + ":" + e] = -1, r[e] = -1) : (o !== i || n) && (a[e] = i, r[e] = _o(i) ? 1 + i.length : -1), a;
  },
  /**
   * Tests if one or more parameters has been modified. If invoked with no
   * arguments, returns true if any parameter value has changed. If the first
   * argument is array, returns trues if any parameter name in the array has
   * changed. Otherwise, tests if the given name and optional array index has
   * changed.
   * @param {string} name - The parameter name to test.
   * @param {number} [index=undefined] - The parameter array index to test.
   * @return {boolean} - Returns true if a queried parameter was modified.
   */
  modified(e, t) {
    const i = this[Oc];
    if (arguments.length) {
      if (_o(e)) {
        for (let n = 0; n < e.length; ++n)
          if (i[e[n]]) return !0;
        return !1;
      }
    } else {
      for (const n in i)
        if (i[n]) return !0;
      return !1;
    }
    return t != null && t >= 0 ? t + 1 < i[e] || !!i[t + ":" + e] : !!i[e];
  },
  /**
   * Clears the modification records. After calling this method,
   * all parameters are considered unmodified.
   */
  clear() {
    return this[Oc] = {}, this;
  }
};
let wB = 0;
const $B = "pulse", kB = new Pp(), AB = 1, OB = 2;
function Te(e, t, i, n) {
  this.id = ++wB, this.value = e, this.stamp = -1, this.rank = -1, this.qrank = -1, this.flags = 0, t && (this._update = t), i && this.parameters(i, n);
}
function I$(e) {
  return function(t) {
    const i = this.flags;
    return arguments.length === 0 ? !!(i & e) : (this.flags = t ? i | e : i & ~e, this);
  };
}
Te.prototype = {
  /**
   * Returns a list of target operators dependent on this operator.
   * If this list does not exist, it is created and then returned.
   * @return {UniqueList}
   */
  targets() {
    return this._targets || (this._targets = Ip(Cp));
  },
  /**
   * Sets the value of this operator.
   * @param {*} value - the value to set.
   * @return {Number} Returns 1 if the operator value has changed
   *   according to strict equality, returns 0 otherwise.
   */
  set(e) {
    return this.value !== e ? (this.value = e, 1) : 0;
  },
  /**
   * Indicates that operator evaluation should be skipped on the next pulse.
   * This operator will still propagate incoming pulses, but its update function
   * will not be invoked. The skip flag is reset after every pulse, so calling
   * this method will affect processing of the next pulse only.
   */
  skip: I$(AB),
  /**
   * Indicates that this operator's value has been modified on its most recent
   * pulse. Normally modification is checked via strict equality; however, in
   * some cases it is more efficient to update the internal state of an object.
   * In those cases, the modified flag can be used to trigger propagation. Once
   * set, the modification flag persists across pulses until unset. The flag can
   * be used with the last timestamp to test if a modification is recent.
   */
  modified: I$(OB),
  /**
   * Sets the parameters for this operator. The parameter values are analyzed for
   * operator instances. If found, this operator will be added as a dependency
   * of the parameterizing operator. Operator values are dynamically marshalled
   * from each operator parameter prior to evaluation. If a parameter value is
   * an array, the array will also be searched for Operator instances. However,
   * the search does not recurse into sub-arrays or object properties.
   * @param {object} params - A hash of operator parameters.
   * @param {boolean} [react=true] - A flag indicating if this operator should
   *   automatically update (react) when parameter values change. In other words,
   *   this flag determines if the operator registers itself as a listener on
   *   any upstream operators included in the parameters.
   * @param {boolean} [initonly=false] - A flag indicating if this operator
   *   should calculate an update only upon its initial evaluation, then
   *   deregister dependencies and suppress all future update invocations.
   * @return {Operator[]} - An array of upstream dependencies.
   */
  parameters(e, t, i) {
    t = t !== !1;
    const n = this._argval = this._argval || new Pp(), a = this._argops = this._argops || [], o = [];
    let r, s, l, d;
    const f = (u, c, h) => {
      h instanceof Te ? (h !== this && (t && h.targets().add(this), o.push(h)), a.push({
        op: h,
        name: u,
        index: c
      })) : n.set(u, c, h);
    };
    for (r in e)
      if (s = e[r], r === $B)
        bh(s).forEach((u) => {
          u instanceof Te ? u !== this && (u.targets().add(this), o.push(u)) : Ar("Pulse parameters must be operator instances.");
        }), this.source = s;
      else if (_o(s))
        for (n.set(r, -1, Array(l = s.length)), d = 0; d < l; ++d) f(r, d, s[d]);
      else
        f(r, -1, s);
    return this.marshall().clear(), i && (a.initonly = !0), o;
  },
  /**
   * Internal method for marshalling parameter values.
   * Visits each operator dependency to pull the latest value.
   * @return {Parameters} A Parameters object to pass to the update function.
   */
  marshall(e) {
    const t = this._argval || kB, i = this._argops;
    let n, a, o, r;
    if (i) {
      const s = i.length;
      for (a = 0; a < s; ++a)
        n = i[a], o = n.op, r = o.modified() && o.stamp === e, t.set(n.name, n.index, o.value, r);
      if (i.initonly) {
        for (a = 0; a < s; ++a)
          n = i[a], n.op.targets().remove(this);
        this._argops = null, this._update = null;
      }
    }
    return t;
  },
  /**
   * Detach this operator from the dataflow.
   * Unregisters listeners on upstream dependencies.
   */
  detach() {
    const e = this._argops;
    let t, i, n, a;
    if (e)
      for (t = 0, i = e.length; t < i; ++t)
        n = e[t], a = n.op, a._targets && a._targets.remove(this);
    this.pulse = null, this.source = null;
  },
  /**
   * Delegate method to perform operator processing.
   * Subclasses can override this method to perform custom processing.
   * By default, it marshalls parameters and calls the update function
   * if that function is defined. If the update function does not
   * change the operator value then StopPropagation is returned.
   * If no update function is defined, this method does nothing.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return The output pulse or StopPropagation. A falsy return value
   *   (including undefined) will let the input pulse pass through.
   */
  evaluate(e) {
    const t = this._update;
    if (t) {
      const i = this.marshall(e.stamp), n = t.call(this, i, e);
      if (i.clear(), n !== this.value)
        this.value = n;
      else if (!this.modified())
        return e.StopPropagation;
    }
  },
  /**
   * Run this operator for the current pulse. If this operator has already
   * been run at (or after) the pulse timestamp, returns StopPropagation.
   * Internally, this method calls {@link evaluate} to perform processing.
   * If {@link evaluate} returns a falsy value, the input pulse is returned.
   * This method should NOT be overridden, instead overrride {@link evaluate}.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return the output pulse for this operator (or StopPropagation)
   */
  run(e) {
    if (e.stamp < this.stamp) return e.StopPropagation;
    let t;
    return this.skip() ? (this.skip(!1), t = 0) : t = this.evaluate(e), this.pulse = t || e;
  }
};
function EB(e, t, i, n) {
  let a = 1, o;
  return e instanceof Te ? o = e : e && e.prototype instanceof Te ? o = new e() : go(e) ? o = new Te(null, e) : (a = 0, o = new Te(e, t)), this.rank(o), a && (n = i, i = t), i && this.connect(o, o.parameters(i, n)), this.touch(o), o;
}
function DB(e, t) {
  const i = e.rank, n = t.length;
  for (let a = 0; a < n; ++a)
    if (i < t[a].rank) {
      this.rerank(e);
      return;
    }
}
let SB = 0;
function Np(e, t, i) {
  this.id = ++SB, this.value = null, i && (this.receive = i), e && (this._filter = e), t && (this._apply = t);
}
function Ja(e, t, i) {
  return new Np(e, t, i);
}
Np.prototype = {
  _filter: my,
  _apply: MD,
  targets() {
    return this._targets || (this._targets = Ip(Cp));
  },
  consume(e) {
    return arguments.length ? (this._consume = !!e, this) : !!this._consume;
  },
  receive(e) {
    if (this._filter(e)) {
      const t = this.value = this._apply(e), i = this._targets, n = i ? i.length : 0;
      for (let a = 0; a < n; ++a) i[a].receive(t);
      this._consume && (e.preventDefault(), e.stopPropagation());
    }
  },
  filter(e) {
    const t = Ja(e);
    return this.targets().add(t), t;
  },
  apply(e) {
    const t = Ja(null, e);
    return this.targets().add(t), t;
  },
  merge() {
    const e = Ja();
    this.targets().add(e);
    for (let t = 0, i = arguments.length; t < i; ++t)
      arguments[t].targets().add(e);
    return e;
  },
  throttle(e) {
    let t = -1;
    return this.filter(() => {
      const i = Date.now();
      return i - t > e ? (t = i, 1) : 0;
    });
  },
  debounce(e) {
    const t = Ja();
    return this.targets().add(Ja(null, null, oq(e, (i) => {
      const n = i.dataflow;
      t.receive(i), n && n.run && n.run();
    }))), t;
  },
  between(e, t) {
    let i = !1;
    return e.targets().add(Ja(null, null, () => i = !0)), t.targets().add(Ja(null, null, () => i = !1)), this.filter(() => i);
  },
  detach() {
    this._filter = my, this._targets = null;
  }
};
function FB(e, t, i, n) {
  const a = this, o = Ja(i, n), r = function(d) {
    d.dataflow = a;
    try {
      o.receive(d);
    } catch (f) {
      a.error(f);
    } finally {
      a.run();
    }
  };
  let s;
  typeof e == "string" && typeof document < "u" ? s = document.querySelectorAll(e) : s = bh(e);
  const l = s.length;
  for (let d = 0; d < l; ++d)
    s[d].addEventListener(t, r);
  return o;
}
function TB(e, t) {
  const i = this.locale();
  return ES(e, t, i.timeParse, i.utcParse);
}
function CB(e, t, i) {
  return t = this.parse(t, i), this.pulse(e, this.changeset().insert(t));
}
async function RB(e, t) {
  const i = this;
  let n = 0, a;
  try {
    a = await i.loader().load(e, {
      context: "dataflow",
      response: OS(t && t.type)
    });
    try {
      a = i.parse(a, t);
    } catch (o) {
      n = -2, i.warn("Data ingestion failed", e, o);
    }
  } catch (o) {
    n = -1, i.warn("Loading failed", e, o);
  }
  return {
    data: a,
    status: n
  };
}
async function IB(e, t, i) {
  const n = this, a = n._pending || jB(n);
  a.requests += 1;
  const o = await n.request(t, i);
  return n.pulse(e, n.changeset().remove(my).insert(o.data || [])), a.done(), o;
}
function jB(e) {
  let t;
  const i = new Promise((n) => t = n);
  return i.requests = 0, i.done = () => {
    --i.requests === 0 && (e._pending = null, t(e));
  }, e._pending = i;
}
const zB = {
  skip: !0
};
function PB(e, t, i, n, a) {
  return (e instanceof Te ? qB : NB)(this, e, t, i, n, a), this;
}
function NB(e, t, i, n, a, o) {
  const r = WD({}, o, zB);
  let s, l;
  go(i) || (i = f0(i)), n === void 0 ? s = (d) => e.touch(i(d)) : go(n) ? (l = new Te(null, n, a, !1), s = (d) => {
    l.evaluate(d);
    const f = i(d), u = l.value;
    TS(u) ? e.pulse(f, u, o) : e.update(f, u, r);
  }) : s = (d) => e.update(i(d), n, r), t.apply(s);
}
function qB(e, t, i, n, a, o) {
  if (n === void 0)
    t.targets().add(i);
  else {
    const r = o || {}, s = new Te(null, LB(i, n), a, !1);
    s.modified(r.force), s.rank = t.rank, t.targets().add(s), i && (s.skip(!0), s.value = i.value, s.targets().add(i), e.connect(i, [s]));
  }
}
function LB(e, t) {
  return t = go(t) ? t : f0(t), e ? function(i, n) {
    const a = t(i, n);
    return e.skip() || (e.skip(a !== this.value).value = a), a;
  } : t;
}
function BB(e) {
  e.rank = ++this._rank;
}
function UB(e) {
  const t = [e];
  let i, n, a;
  for (; t.length; )
    if (this.rank(i = t.pop()), n = i._targets)
      for (a = n.length; --a >= 0; )
        t.push(i = n[a]), i === e && Ar("Cycle detected in dataflow graph.");
}
const wh = {}, Dn = 1, Qa = 2, pa = 4, MB = Dn | Qa, j$ = Dn | pa, _s = Dn | Qa | pa, z$ = 8, nd = 16, P$ = 32, N$ = 64;
function mo(e, t, i) {
  this.dataflow = e, this.stamp = t ?? -1, this.add = [], this.rem = [], this.mod = [], this.fields = null, this.encode = i || null;
}
function Fm(e, t) {
  const i = [];
  return pr(e, t, (n) => i.push(n)), i;
}
function q$(e, t) {
  const i = {};
  return e.visit(t, (n) => {
    i[Z(n)] = 1;
  }), (n) => i[Z(n)] ? null : n;
}
function Uu(e, t) {
  return e ? (i, n) => e(i, n) && t(i, n) : t;
}
mo.prototype = {
  /**
   * Sentinel value indicating pulse propagation should stop.
   */
  StopPropagation: wh,
  /**
   * Boolean flag indicating ADD (added) tuples.
   */
  ADD: Dn,
  /**
   * Boolean flag indicating REM (removed) tuples.
   */
  REM: Qa,
  /**
   * Boolean flag indicating MOD (modified) tuples.
   */
  MOD: pa,
  /**
   * Boolean flag indicating ADD (added) and REM (removed) tuples.
   */
  ADD_REM: MB,
  /**
   * Boolean flag indicating ADD (added) and MOD (modified) tuples.
   */
  ADD_MOD: j$,
  /**
   * Boolean flag indicating ADD, REM and MOD tuples.
   */
  ALL: _s,
  /**
   * Boolean flag indicating all tuples in a data source
   * except for the ADD, REM and MOD tuples.
   */
  REFLOW: z$,
  /**
   * Boolean flag indicating a 'pass-through' to a
   * backing data source, ignoring ADD, REM and MOD tuples.
   */
  SOURCE: nd,
  /**
   * Boolean flag indicating that source data should be
   * suppressed when creating a forked pulse.
   */
  NO_SOURCE: P$,
  /**
   * Boolean flag indicating that field modifications should be
   * suppressed when creating a forked pulse.
   */
  NO_FIELDS: N$,
  /**
   * Creates a new pulse based on the values of this pulse.
   * The dataflow, time stamp and field modification values are copied over.
   * By default, new empty ADD, REM and MOD arrays are created.
   * @param {number} flags - Integer of boolean flags indicating which (if any)
   *   tuple arrays should be copied to the new pulse. The supported flag values
   *   are ADD, REM and MOD. Array references are copied directly: new array
   *   instances are not created.
   * @return {Pulse} - The forked pulse instance.
   * @see init
   */
  fork(e) {
    return new mo(this.dataflow).init(this, e);
  },
  /**
   * Creates a copy of this pulse with new materialized array
   * instances for the ADD, REM, MOD, and SOURCE arrays.
   * The dataflow, time stamp and field modification values are copied over.
   * @return {Pulse} - The cloned pulse instance.
   * @see init
   */
  clone() {
    const e = this.fork(_s);
    return e.add = e.add.slice(), e.rem = e.rem.slice(), e.mod = e.mod.slice(), e.source && (e.source = e.source.slice()), e.materialize(_s | nd);
  },
  /**
   * Returns a pulse that adds all tuples from a backing source. This is
   * useful for cases where operators are added to a dataflow after an
   * upstream data pipeline has already been processed, ensuring that
   * new operators can observe all tuples within a stream.
   * @return {Pulse} - A pulse instance with all source tuples included
   *   in the add array. If the current pulse already has all source
   *   tuples in its add array, it is returned directly. If the current
   *   pulse does not have a backing source, it is returned directly.
   */
  addAll() {
    let e = this;
    return !e.source || e.add === e.rem || !e.rem.length && e.source.length === e.add.length || (e = new mo(this.dataflow).init(this), e.add = e.source, e.rem = []), e;
  },
  /**
   * Initialize this pulse based on the values of another pulse. This method
   * is used internally by {@link fork} to initialize a new forked tuple.
   * The dataflow, time stamp and field modification values are copied over.
   * By default, new empty ADD, REM and MOD arrays are created.
   * @param {Pulse} src - The source pulse to copy from.
   * @param {number} flags - Integer of boolean flags indicating which (if any)
   *   tuple arrays should be copied to the new pulse. The supported flag values
   *   are ADD, REM and MOD. Array references are copied directly: new array
   *   instances are not created. By default, source data arrays are copied
   *   to the new pulse. Use the NO_SOURCE flag to enforce a null source.
   * @return {Pulse} - Returns this Pulse instance.
   */
  init(e, t) {
    const i = this;
    return i.stamp = e.stamp, i.encode = e.encode, e.fields && !(t & N$) && (i.fields = e.fields), t & Dn ? (i.addF = e.addF, i.add = e.add) : (i.addF = null, i.add = []), t & Qa ? (i.remF = e.remF, i.rem = e.rem) : (i.remF = null, i.rem = []), t & pa ? (i.modF = e.modF, i.mod = e.mod) : (i.modF = null, i.mod = []), t & P$ ? (i.srcF = null, i.source = null) : (i.srcF = e.srcF, i.source = e.source, e.cleans && (i.cleans = e.cleans)), i;
  },
  /**
   * Schedules a function to run after pulse propagation completes.
   * @param {function} func - The function to run.
   */
  runAfter(e) {
    this.dataflow.runAfter(e);
  },
  /**
   * Indicates if tuples have been added, removed or modified.
   * @param {number} [flags] - The tuple types (ADD, REM or MOD) to query.
   *   Defaults to ALL, returning true if any tuple type has changed.
   * @return {boolean} - Returns true if one or more queried tuple types have
   *   changed, false otherwise.
   */
  changed(e) {
    const t = e || _s;
    return t & Dn && this.add.length || t & Qa && this.rem.length || t & pa && this.mod.length;
  },
  /**
   * Forces a "reflow" of tuple values, such that all tuples in the backing
   * source are added to the MOD set, unless already present in the ADD set.
   * @param {boolean} [fork=false] - If true, returns a forked copy of this
   *   pulse, and invokes reflow on that derived pulse.
   * @return {Pulse} - The reflowed pulse instance.
   */
  reflow(e) {
    if (e) return this.fork(_s).reflow();
    const t = this.add.length, i = this.source && this.source.length;
    return i && i !== t && (this.mod = this.source, t && this.filter(pa, q$(this, Dn))), this;
  },
  /**
   * Get/set metadata to pulse requesting garbage collection
   * to reclaim currently unused resources.
   */
  clean(e) {
    return arguments.length ? (this.cleans = !!e, this) : this.cleans;
  },
  /**
   * Marks one or more data field names as modified to assist dependency
   * tracking and incremental processing by transform operators.
   * @param {string|Array<string>} _ - The field(s) to mark as modified.
   * @return {Pulse} - This pulse instance.
   */
  modifies(e) {
    const t = this.fields || (this.fields = {});
    return _o(e) ? e.forEach((i) => t[i] = !0) : t[e] = !0, this;
  },
  /**
   * Checks if one or more data fields have been modified during this pulse
   * propagation timestamp.
   * @param {string|Array<string>} _ - The field(s) to check for modified.
   * @param {boolean} nomod - If true, will check the modified flag even if
   *   no mod tuples exist. If false (default), mod tuples must be present.
   * @return {boolean} - Returns true if any of the provided fields has been
   *   marked as modified, false otherwise.
   */
  modified(e, t) {
    const i = this.fields;
    return (t || this.mod.length) && i ? arguments.length ? _o(e) ? e.some((n) => i[n]) : i[e] : !!i : !1;
  },
  /**
   * Adds a filter function to one more tuple sets. Filters are applied to
   * backing tuple arrays, to determine the actual set of tuples considered
   * added, removed or modified. They can be used to delay materialization of
   * a tuple set in order to avoid expensive array copies. In addition, the
   * filter functions can serve as value transformers: unlike standard predicate
   * function (which return boolean values), Pulse filters should return the
   * actual tuple value to process. If a tuple set is already filtered, the
   * new filter function will be appended into a conjuntive ('and') query.
   * @param {number} flags - Flags indicating the tuple set(s) to filter.
   * @param {function(*):object} filter - Filter function that will be applied
   *   to the tuple set array, and should return a data tuple if the value
   *   should be included in the tuple set, and falsy (or null) otherwise.
   * @return {Pulse} - Returns this pulse instance.
   */
  filter(e, t) {
    const i = this;
    return e & Dn && (i.addF = Uu(i.addF, t)), e & Qa && (i.remF = Uu(i.remF, t)), e & pa && (i.modF = Uu(i.modF, t)), e & nd && (i.srcF = Uu(i.srcF, t)), i;
  },
  /**
   * Materialize one or more tuple sets in this pulse. If the tuple set(s) have
   * a registered filter function, it will be applied and the tuple set(s) will
   * be replaced with materialized tuple arrays.
   * @param {number} flags - Flags indicating the tuple set(s) to materialize.
   * @return {Pulse} - Returns this pulse instance.
   */
  materialize(e) {
    e = e || _s;
    const t = this;
    return e & Dn && t.addF && (t.add = Fm(t.add, t.addF), t.addF = null), e & Qa && t.remF && (t.rem = Fm(t.rem, t.remF), t.remF = null), e & pa && t.modF && (t.mod = Fm(t.mod, t.modF), t.modF = null), e & nd && t.srcF && (t.source = t.source.filter(t.srcF), t.srcF = null), t;
  },
  /**
   * Visit one or more tuple sets in this pulse.
   * @param {number} flags - Flags indicating the tuple set(s) to visit.
   *   Legal values are ADD, REM, MOD and SOURCE (if a backing data source
   *   has been set).
   * @param {function(object):*} - Visitor function invoked per-tuple.
   * @return {Pulse} - Returns this pulse instance.
   */
  visit(e, t) {
    const i = this, n = t;
    if (e & nd)
      return pr(i.source, i.srcF, n), i;
    e & Dn && pr(i.add, i.addF, n), e & Qa && pr(i.rem, i.remF, n), e & pa && pr(i.mod, i.modF, n);
    const a = i.source;
    if (e & z$ && a) {
      const o = i.add.length + i.mod.length;
      o === a.length || (o ? pr(a, q$(i, j$), n) : pr(a, i.srcF, n));
    }
    return i;
  }
};
function $0(e, t, i, n) {
  const a = this;
  let o = 0;
  this.dataflow = e, this.stamp = t, this.fields = null, this.encode = n || null, this.pulses = i;
  for (const r of i)
    if (r.stamp === t) {
      if (r.fields) {
        const s = a.fields || (a.fields = {});
        for (const l in r.fields)
          s[l] = 1;
      }
      r.changed(a.ADD) && (o |= a.ADD), r.changed(a.REM) && (o |= a.REM), r.changed(a.MOD) && (o |= a.MOD);
    }
  this.changes = o;
}
GD($0, mo, {
  /**
   * Creates a new pulse based on the values of this pulse.
   * The dataflow, time stamp and field modification values are copied over.
   * @return {Pulse}
   */
  fork(e) {
    const t = new mo(this.dataflow).init(this, e & this.NO_FIELDS);
    return e !== void 0 && (e & t.ADD && this.visit(t.ADD, (i) => t.add.push(i)), e & t.REM && this.visit(t.REM, (i) => t.rem.push(i)), e & t.MOD && this.visit(t.MOD, (i) => t.mod.push(i))), t;
  },
  changed(e) {
    return this.changes & e;
  },
  modified(e) {
    const t = this, i = t.fields;
    return i && t.changes & t.MOD ? _o(e) ? e.some((n) => i[n]) : i[e] : 0;
  },
  filter() {
    Ar("MultiPulse does not support filtering.");
  },
  materialize() {
    Ar("MultiPulse does not support materialization.");
  },
  visit(e, t) {
    const i = this, n = i.pulses, a = n.length;
    let o = 0;
    if (e & i.SOURCE)
      for (; o < a; ++o)
        n[o].visit(e, t);
    else
      for (; o < a; ++o)
        n[o].stamp === i.stamp && n[o].visit(e, t);
    return i;
  }
});
async function VB(e, t, i) {
  const n = this, a = [];
  if (n._pulse) return CS(n);
  if (n._pending && await n._pending, t && await Ac(n, t), !n._touched.length)
    return n.debug("Dataflow invoked, but nothing to do."), n;
  const o = ++n._clock;
  n._pulse = new mo(n, o, e), n._touched.forEach((f) => n._enqueue(f, !0)), n._touched = Ip(Cp);
  let r = 0, s, l, d;
  try {
    for (; n._heap.size() > 0; ) {
      if (s = n._heap.pop(), s.rank !== s.qrank) {
        n._enqueue(s, !0);
        continue;
      }
      l = s.run(n._getPulse(s, e)), l.then ? l = await l : l.async && (a.push(l.async), l = wh), l !== wh && s._targets && s._targets.forEach((f) => n._enqueue(f)), ++r;
    }
  } catch (f) {
    n._heap.clear(), d = f;
  }
  if (n._input = {}, n._pulse = null, n.debug(`Pulse ${o}: ${r} operators`), d && (n._postrun = [], n.error(d)), n._postrun.length) {
    const f = n._postrun.sort((u, c) => c.priority - u.priority);
    n._postrun = [];
    for (let u = 0; u < f.length; ++u)
      await Ac(n, f[u].callback);
  }
  return i && await Ac(n, i), a.length && Promise.all(a).then((f) => n.runAsync(null, () => {
    f.forEach((u) => {
      try {
        u(n);
      } catch (c) {
        n.error(c);
      }
    });
  })), n;
}
async function WB(e, t, i) {
  for (; this._running; ) await this._running;
  const n = () => this._running = null;
  return (this._running = this.evaluate(e, t, i)).then(n, n), this._running;
}
function GB(e, t, i) {
  return this._pulse ? CS(this) : (this.evaluate(e, t, i), this);
}
function HB(e, t, i) {
  if (this._pulse || t)
    this._postrun.push({
      priority: i || 0,
      callback: e
    });
  else
    try {
      e(this);
    } catch (n) {
      this.error(n);
    }
}
function CS(e) {
  return e.error("Dataflow already running. Use runAsync() to chain invocations."), e;
}
function YB(e, t) {
  const i = e.stamp < this._clock;
  i && (e.stamp = this._clock), (i || t) && (e.qrank = e.rank, this._heap.push(e));
}
function XB(e, t) {
  const i = e.source, n = this._clock;
  return i && _o(i) ? new $0(this, n, i.map((a) => a.pulse), t) : this._input[e.id] || JB(this._pulse, i && i.pulse);
}
function JB(e, t) {
  return t && t.stamp === e.stamp ? t : (e = e.fork(), t && t !== wh && (e.source = t.source), e);
}
const k0 = {
  skip: !1,
  force: !1
};
function ZB(e, t) {
  const i = t || k0;
  return this._pulse ? this._enqueue(e) : this._touched.add(e), i.skip && e.skip(!0), this;
}
function KB(e, t, i) {
  const n = i || k0;
  return (e.set(t) || n.force) && this.touch(e, n), this;
}
function QB(e, t, i) {
  this.touch(e, i || k0);
  const n = new mo(this, this._clock + (this._pulse ? 0 : 1)), a = e.pulse && e.pulse.source || [];
  return n.target = e, this._input[e.id] = t.pulse(n, a), this;
}
function e9(e) {
  let t = [];
  return {
    clear: () => t = [],
    size: () => t.length,
    peek: () => t[0],
    push: (i) => (t.push(i), RS(t, 0, t.length - 1, e)),
    pop: () => {
      const i = t.pop();
      let n;
      return t.length ? (n = t[0], t[0] = i, t9(t, 0, e)) : n = i, n;
    }
  };
}
function RS(e, t, i, n) {
  let a, o;
  const r = e[i];
  for (; i > t; ) {
    if (o = i - 1 >> 1, a = e[o], n(r, a) < 0) {
      e[i] = a, i = o;
      continue;
    }
    break;
  }
  return e[i] = r;
}
function t9(e, t, i) {
  const n = t, a = e.length, o = e[t];
  let r = (t << 1) + 1, s;
  for (; r < a; )
    s = r + 1, s < a && i(e[r], e[s]) >= 0 && (r = s), e[t] = e[r], t = r, r = (t << 1) + 1;
  return e[t] = o, RS(e, n, t, i);
}
function qs() {
  this.logger(aq()), this.logLevel(VD), this._clock = 0, this._rank = 0, this._locale = y0();
  try {
    this._loader = Rp();
  } catch {
  }
  this._touched = Ip(Cp), this._input = {}, this._pulse = null, this._heap = e9((e, t) => e.qrank - t.qrank), this._postrun = [];
}
function ad(e) {
  return function() {
    return this._log[e].apply(this, arguments);
  };
}
qs.prototype = {
  /**
   * The current timestamp of this dataflow. This value reflects the
   * timestamp of the previous dataflow run. The dataflow is initialized
   * with a stamp value of 0. The initial run of the dataflow will have
   * a timestap of 1, and so on. This value will match the
   * {@link Pulse.stamp} property.
   * @return {number} - The current timestamp value.
   */
  stamp() {
    return this._clock;
  },
  /**
   * Gets or sets the loader instance to use for data file loading. A
   * loader object must provide a "load" method for loading files and a
   * "sanitize" method for checking URL/filename validity. Both methods
   * should accept a URI and options hash as arguments, and return a Promise
   * that resolves to the loaded file contents (load) or a hash containing
   * sanitized URI data with the sanitized url assigned to the "href" property
   * (sanitize).
   * @param {object} _ - The loader instance to use.
   * @return {object|Dataflow} - If no arguments are provided, returns
   *   the current loader instance. Otherwise returns this Dataflow instance.
   */
  loader(e) {
    return arguments.length ? (this._loader = e, this) : this._loader;
  },
  /**
   * Gets or sets the locale instance to use for formatting and parsing
   * string values. The locale object should be provided by the
   * vega-format library, and include methods such as format, timeFormat,
   * utcFormat, timeParse, and utcParse.
   * @param {object} _ - The locale instance to use.
   * @return {object|Dataflow} - If no arguments are provided, returns
   *   the current locale instance. Otherwise returns this Dataflow instance.
   */
  locale(e) {
    return arguments.length ? (this._locale = e, this) : this._locale;
  },
  /**
   * Get or set the logger instance used to log messages. If no arguments are
   * provided, returns the current logger instance. Otherwise, sets the logger
   * and return this Dataflow instance. Provided loggers must support the full
   * API of logger objects generated by the vega-util logger method. Note that
   * by default the log level of the new logger will be used; use the logLevel
   * method to adjust the log level as needed.
   */
  logger(e) {
    return arguments.length ? (this._log = e, this) : this._log;
  },
  /**
   * Logs an error message. By default, logged messages are written to console
   * output. The message will only be logged if the current log level is high
   * enough to permit error messages.
   */
  error: ad("error"),
  /**
   * Logs a warning message. By default, logged messages are written to console
   * output. The message will only be logged if the current log level is high
   * enough to permit warning messages.
   */
  warn: ad("warn"),
  /**
   * Logs a information message. By default, logged messages are written to
   * console output. The message will only be logged if the current log level is
   * high enough to permit information messages.
   */
  info: ad("info"),
  /**
   * Logs a debug message. By default, logged messages are written to console
   * output. The message will only be logged if the current log level is high
   * enough to permit debug messages.
   */
  debug: ad("debug"),
  /**
   * Get or set the current log level. If an argument is provided, it
   * will be used as the new log level.
   * @param {number} [level] - Should be one of None, Warn, Info
   * @return {number} - The current log level.
   */
  logLevel: ad("level"),
  /**
   * Empty entry threshold for garbage cleaning. Map data structures will
   * perform cleaning once the number of empty entries exceeds this value.
   */
  cleanThreshold: 1e4,
  // OPERATOR REGISTRATION
  add: EB,
  connect: DB,
  rank: BB,
  rerank: UB,
  // OPERATOR UPDATES
  pulse: QB,
  touch: ZB,
  update: KB,
  changeset: ns,
  // DATA LOADING
  ingest: CB,
  parse: TB,
  preload: IB,
  request: RB,
  // EVENT HANDLING
  events: FB,
  on: PB,
  // PULSE PROPAGATION
  evaluate: VB,
  run: GB,
  runAsync: WB,
  runAfter: HB,
  _enqueue: YB,
  _getPulse: XB
};
function T(e, t) {
  Te.call(this, e, null, t);
}
GD(T, Te, {
  /**
   * Overrides {@link Operator.evaluate} for transform operators.
   * Internally, this method calls {@link evaluate} to perform processing.
   * If {@link evaluate} returns a falsy value, the input pulse is returned.
   * This method should NOT be overridden, instead overrride {@link evaluate}.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return the output pulse for this operator (or StopPropagation)
   */
  run(e) {
    if (e.stamp < this.stamp) return e.StopPropagation;
    let t;
    return this.skip() ? this.skip(!1) : t = this.evaluate(e), t = t || e, t.then ? t = t.then((i) => this.pulse = i) : t !== e.StopPropagation && (this.pulse = t), t;
  },
  /**
   * Overrides {@link Operator.evaluate} for transform operators.
   * Marshalls parameter values and then invokes {@link transform}.
   * @param {Pulse} pulse - the current dataflow pulse.
   * @return {Pulse} The output pulse (or StopPropagation). A falsy return
       value (including undefined) will let the input pulse pass through.
  */
  evaluate(e) {
    const t = this.marshall(e.stamp), i = this.transform(t, e);
    return t.clear(), i;
  },
  /**
   * Process incoming pulses.
   * Subclasses should override this method to implement transforms.
   * @param {Parameters} _ - The operator parameter values.
   * @param {Pulse} pulse - The current dataflow pulse.
   * @return {Pulse} The output pulse (or StopPropagation). A falsy return
   *   value (including undefined) will let the input pulse pass through.
   */
  transform() {
  }
});
const Js = {};
function IS(e) {
  const t = jS(e);
  return t && t.Definition || null;
}
function jS(e) {
  return e = e && e.toLowerCase(), sq(Js, e) ? Js[e] : null;
}
function pn(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function pi(e) {
  return e == null ? null : e.fname;
}
function Ln(e) {
  return e == null ? null : e.fields;
}
function zS(e) {
  return e.length === 1 ? i9(e[0]) : n9(e);
}
const i9 = (e) => function(t) {
  return t[e];
}, n9 = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function wt(e) {
  throw Error(e);
}
function PS(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || wt("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && wt("Access path missing closing bracket: " + e), n && wt("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function uf(e, t, i) {
  const n = PS(e);
  return e = n.length === 1 ? n[0] : e, pn((i && i.get || zS)(n), [e], t || e);
}
uf("id");
const NS = pn((e) => e, [], "identity"), a9 = pn(() => 0, [], "zero");
pn(() => 1, [], "one");
const o9 = pn(() => !0, [], "true");
pn(() => !1, [], "false");
var qS = Array.isArray;
function LS(e) {
  return e[e.length - 1];
}
function BS(e) {
  return e == null || e === "" ? null : +e;
}
function Jt(e) {
  return e != null ? qS(e) ? e : [e] : [];
}
function US(e) {
  return typeof e == "function";
}
const r9 = "descending";
function s9(e, t, i) {
  i = i || {}, t = Jt(t) || [];
  const n = [], a = [], o = {}, r = i.comparator || l9;
  return Jt(e).forEach((s, l) => {
    s != null && (n.push(t[l] === r9 ? -1 : 1), a.push(s = US(s) ? s : uf(s, null, i)), (Ln(s) || []).forEach((d) => o[d] = 1));
  }), a.length === 0 ? null : pn(r(a, n), Object.keys(o));
}
const A0 = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, (e = e instanceof Date ? +e : e) !== e && t === t ? -1 : t !== t && e === e ? 1 : 0), l9 = (e, t) => e.length === 1 ? d9(e[0], t[0]) : f9(e, t, e.length), d9 = (e, t) => function(i, n) {
  return A0(e(i), e(n)) * t;
}, f9 = (e, t, i) => (t.push(0), function(n, a) {
  let o, r = 0, s = -1;
  for (; r === 0 && ++s < i; )
    o = e[s], r = A0(o(n), o(a));
  return r * t[s];
});
function u9(e) {
  return US(e) ? e : () => e;
}
function O0(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function cf(e, t) {
  let i = 0, n, a, o, r;
  if (e && (n = e.length))
    if (t == null) {
      for (a = e[i]; i < n && (a == null || a !== a); a = e[++i]) ;
      for (o = r = a; i < n; ++i)
        a = e[i], a != null && (a < o && (o = a), a > r && (r = a));
    } else {
      for (a = t(e[i]); i < n && (a == null || a !== a); a = t(e[++i])) ;
      for (o = r = a; i < n; ++i)
        a = t(e[i]), a != null && (a < o && (o = a), a > r && (r = a));
    }
  return [o, r];
}
function c9(e, t) {
  const i = e.length;
  let n = -1, a, o, r, s, l;
  if (t == null) {
    for (; ++n < i; )
      if (o = e[n], o != null && o >= o) {
        a = r = o;
        break;
      }
    if (n === i) return [-1, -1];
    for (s = l = n; ++n < i; )
      o = e[n], o != null && (a > o && (a = o, s = n), r < o && (r = o, l = n));
  } else {
    for (; ++n < i; )
      if (o = t(e[n], n, e), o != null && o >= o) {
        a = r = o;
        break;
      }
    if (n === i) return [-1, -1];
    for (s = l = n; ++n < i; )
      o = t(e[n], n, e), o != null && (a > o && (a = o, s = n), r < o && (r = o, l = n));
  }
  return [s, l];
}
const h9 = Object.prototype.hasOwnProperty;
function Yf(e, t) {
  return h9.call(e, t);
}
const Mu = {};
function E0(e) {
  let t = {}, i;
  function n(o) {
    return Yf(t, o) && t[o] !== Mu;
  }
  const a = {
    size: 0,
    empty: 0,
    object: t,
    has: n,
    get(o) {
      return n(o) ? t[o] : void 0;
    },
    set(o, r) {
      return n(o) || (++a.size, t[o] === Mu && --a.empty), t[o] = r, this;
    },
    delete(o) {
      return n(o) && (--a.size, ++a.empty, t[o] = Mu), this;
    },
    clear() {
      a.size = a.empty = 0, a.object = t = {};
    },
    test(o) {
      return arguments.length ? (i = o, a) : i;
    },
    clean() {
      const o = {};
      let r = 0;
      for (const s in t) {
        const l = t[s];
        l !== Mu && (!i || !i(l)) && (o[s] = l, ++r);
      }
      a.size = r, a.empty = 0, a.object = t = o;
    }
  };
  return a;
}
function le(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), O0(n, i);
}
function p9(e, t, i) {
  e && (e = t ? Jt(e).map((s) => s.replace(/\\(.)/g, "$1")) : Jt(e));
  const n = e && e.length, a = zS, o = (s) => a(t ? [s] : PS(s));
  let r;
  if (!n)
    r = function() {
      return "";
    };
  else if (n === 1) {
    const s = o(e[0]);
    r = function(l) {
      return "" + s(l);
    };
  } else {
    const s = e.map(o);
    r = function(l) {
      let d = "" + s[0](l), f = 0;
      for (; ++f < n; ) d += "|" + s[f](l);
      return d;
    };
  }
  return pn(r, e, "key");
}
function g9(e, t, i, n) {
  const a = t.length, o = i.length;
  if (!o) return t;
  if (!a) return i;
  const r = n || new t.constructor(a + o);
  let s = 0, l = 0, d = 0;
  for (; s < a && l < o; ++d)
    r[d] = e(t[s], i[l]) > 0 ? i[l++] : t[s++];
  for (; s < a; ++s, ++d)
    r[d] = t[s];
  for (; l < o; ++l, ++d)
    r[d] = i[l];
  return r;
}
function m9(e) {
  return e && LS(e) - e[0] || 0;
}
function b9(e) {
  return (t) => {
    const i = e.length;
    let n = 1, a = String(e[0](t));
    for (; n < i; ++n)
      a += "|" + e[n](t);
    return a;
  };
}
function xy(e) {
  return !e || !e.length ? function() {
    return "";
  } : e.length === 1 ? e[0] : b9(e);
}
function MS(e, t, i) {
  return i || e + (t ? "_" + t : "");
}
const Tm = () => {
}, y9 = {
  init: Tm,
  add: Tm,
  rem: Tm,
  idx: 0
}, hf = {
  values: {
    init: (e) => e.cell.store = !0,
    value: (e) => e.cell.data.values(),
    idx: -1
  },
  count: {
    value: (e) => e.cell.num
  },
  __count__: {
    value: (e) => e.missing + e.valid
  },
  missing: {
    value: (e) => e.missing
  },
  valid: {
    value: (e) => e.valid
  },
  sum: {
    init: (e) => e.sum = 0,
    value: (e) => e.valid ? e.sum : void 0,
    add: (e, t) => e.sum += +t,
    rem: (e, t) => e.sum -= t
  },
  product: {
    init: (e) => e.product = 1,
    value: (e) => e.valid ? e.product : void 0,
    add: (e, t) => e.product *= t,
    rem: (e, t) => e.product /= t
  },
  mean: {
    init: (e) => e.mean = 0,
    value: (e) => e.valid ? e.mean : void 0,
    add: (e, t) => (e.mean_d = t - e.mean, e.mean += e.mean_d / e.valid),
    rem: (e, t) => (e.mean_d = t - e.mean, e.mean -= e.valid ? e.mean_d / e.valid : e.mean)
  },
  average: {
    value: (e) => e.valid ? e.mean : void 0,
    req: ["mean"],
    idx: 1
  },
  variance: {
    init: (e) => e.dev = 0,
    value: (e) => e.valid > 1 ? e.dev / (e.valid - 1) : void 0,
    add: (e, t) => e.dev += e.mean_d * (t - e.mean),
    rem: (e, t) => e.dev -= e.mean_d * (t - e.mean),
    req: ["mean"],
    idx: 1
  },
  variancep: {
    value: (e) => e.valid > 1 ? e.dev / e.valid : void 0,
    req: ["variance"],
    idx: 2
  },
  stdev: {
    value: (e) => e.valid > 1 ? Math.sqrt(e.dev / (e.valid - 1)) : void 0,
    req: ["variance"],
    idx: 2
  },
  stdevp: {
    value: (e) => e.valid > 1 ? Math.sqrt(e.dev / e.valid) : void 0,
    req: ["variance"],
    idx: 2
  },
  stderr: {
    value: (e) => e.valid > 1 ? Math.sqrt(e.dev / (e.valid * (e.valid - 1))) : void 0,
    req: ["variance"],
    idx: 2
  },
  distinct: {
    value: (e) => e.cell.data.distinct(e.get),
    req: ["values"],
    idx: 3
  },
  ci0: {
    value: (e) => e.cell.data.ci0(e.get),
    req: ["values"],
    idx: 3
  },
  ci1: {
    value: (e) => e.cell.data.ci1(e.get),
    req: ["values"],
    idx: 3
  },
  median: {
    value: (e) => e.cell.data.q2(e.get),
    req: ["values"],
    idx: 3
  },
  q1: {
    value: (e) => e.cell.data.q1(e.get),
    req: ["values"],
    idx: 3
  },
  q3: {
    value: (e) => e.cell.data.q3(e.get),
    req: ["values"],
    idx: 3
  },
  min: {
    init: (e) => e.min = void 0,
    value: (e) => e.min = Number.isNaN(e.min) ? e.cell.data.min(e.get) : e.min,
    add: (e, t) => {
      (t < e.min || e.min === void 0) && (e.min = t);
    },
    rem: (e, t) => {
      t <= e.min && (e.min = NaN);
    },
    req: ["values"],
    idx: 4
  },
  max: {
    init: (e) => e.max = void 0,
    value: (e) => e.max = Number.isNaN(e.max) ? e.cell.data.max(e.get) : e.max,
    add: (e, t) => {
      (t > e.max || e.max === void 0) && (e.max = t);
    },
    rem: (e, t) => {
      t >= e.max && (e.max = NaN);
    },
    req: ["values"],
    idx: 4
  },
  argmin: {
    init: (e) => e.argmin = void 0,
    value: (e) => e.argmin || e.cell.data.argmin(e.get),
    add: (e, t, i) => {
      t < e.min && (e.argmin = i);
    },
    rem: (e, t) => {
      t <= e.min && (e.argmin = void 0);
    },
    req: ["min", "values"],
    idx: 3
  },
  argmax: {
    init: (e) => e.argmax = void 0,
    value: (e) => e.argmax || e.cell.data.argmax(e.get),
    add: (e, t, i) => {
      t > e.max && (e.argmax = i);
    },
    rem: (e, t) => {
      t >= e.max && (e.argmax = void 0);
    },
    req: ["max", "values"],
    idx: 3
  },
  exponential: {
    init: (e, t) => {
      e.exp = 0, e.exp_r = t;
    },
    value: (e) => e.valid ? e.exp * (1 - e.exp_r) / (1 - e.exp_r ** e.valid) : void 0,
    add: (e, t) => e.exp = e.exp_r * e.exp + t,
    rem: (e, t) => e.exp = (e.exp - t / e.exp_r ** (e.valid - 1)) / e.exp_r
  },
  exponentialb: {
    value: (e) => e.valid ? e.exp * (1 - e.exp_r) : void 0,
    req: ["exponential"],
    idx: 1
  }
}, Xf = Object.keys(hf).filter((e) => e !== "__count__");
function v9(e, t) {
  return (i, n) => O0({
    name: e,
    aggregate_param: n,
    out: i || e
  }, y9, t);
}
[...Xf, "__count__"].forEach((e) => {
  hf[e] = v9(e, hf[e]);
});
function VS(e, t, i) {
  return hf[e](i, t);
}
function WS(e, t) {
  return e.idx - t.idx;
}
function _9(e) {
  const t = {};
  e.forEach((n) => t[n.name] = n);
  const i = (n) => {
    n.req && n.req.forEach((a) => {
      t[a] || i(t[a] = hf[a]());
    });
  };
  return e.forEach(i), Object.values(t).sort(WS);
}
function x9() {
  this.valid = 0, this.missing = 0, this._ops.forEach((e) => e.aggregate_param == null ? e.init(this) : e.init(this, e.aggregate_param));
}
function w9(e, t) {
  if (e == null || e === "") {
    ++this.missing;
    return;
  }
  e === e && (++this.valid, this._ops.forEach((i) => i.add(this, e, t)));
}
function $9(e, t) {
  if (e == null || e === "") {
    --this.missing;
    return;
  }
  e === e && (--this.valid, this._ops.forEach((i) => i.rem(this, e, t)));
}
function k9(e) {
  return this._out.forEach((t) => e[t.out] = t.value(this)), e;
}
function GS(e, t) {
  const i = t || NS, n = _9(e), a = e.slice().sort(WS);
  function o(r) {
    this._ops = n, this._out = a, this.cell = r, this.init();
  }
  return o.prototype.init = x9, o.prototype.add = w9, o.prototype.rem = $9, o.prototype.set = k9, o.prototype.get = i, o.fields = e.map((r) => r.out), o;
}
function D0(e) {
  this._key = e ? uf(e) : Z, this.reset();
}
const kt = D0.prototype;
kt.reset = function() {
  this._add = [], this._rem = [], this._ext = null, this._get = null, this._q = null;
};
kt.add = function(e) {
  this._add.push(e);
};
kt.rem = function(e) {
  this._rem.push(e);
};
kt.values = function() {
  if (this._get = null, this._rem.length === 0) return this._add;
  const e = this._add, t = this._rem, i = this._key, n = e.length, a = t.length, o = Array(n - a), r = {};
  let s, l, d;
  for (s = 0; s < a; ++s)
    r[i(t[s])] = 1;
  for (s = 0, l = 0; s < n; ++s)
    r[i(d = e[s])] ? r[i(d)] = 0 : o[l++] = d;
  return this._rem = [], this._add = o;
};
kt.distinct = function(e) {
  const t = this.values(), i = {};
  let n = t.length, a = 0, o;
  for (; --n >= 0; )
    o = e(t[n]) + "", Yf(i, o) || (i[o] = 1, ++a);
  return a;
};
kt.extent = function(e) {
  if (this._get !== e || !this._ext) {
    const t = this.values(), i = c9(t, e);
    this._ext = [t[i[0]], t[i[1]]], this._get = e;
  }
  return this._ext;
};
kt.argmin = function(e) {
  return this.extent(e)[0] || {};
};
kt.argmax = function(e) {
  return this.extent(e)[1] || {};
};
kt.min = function(e) {
  const t = this.extent(e)[0];
  return t != null ? e(t) : void 0;
};
kt.max = function(e) {
  const t = this.extent(e)[1];
  return t != null ? e(t) : void 0;
};
kt.quartile = function(e) {
  return (this._get !== e || !this._q) && (this._q = bE(this.values(), e), this._get = e), this._q;
};
kt.q1 = function(e) {
  return this.quartile(e)[0];
};
kt.q2 = function(e) {
  return this.quartile(e)[1];
};
kt.q3 = function(e) {
  return this.quartile(e)[2];
};
kt.ci = function(e) {
  return (this._get !== e || !this._ci) && (this._ci = yE(this.values(), 1e3, 0.05, e), this._get = e), this._ci;
};
kt.ci0 = function(e) {
  return this.ci(e)[0];
};
kt.ci1 = function(e) {
  return this.ci(e)[1];
};
function xo(e) {
  T.call(this, null, e), this._adds = [], this._mods = [], this._alen = 0, this._mlen = 0, this._drop = !0, this._cross = !1, this._dims = [], this._dnames = [], this._measures = [], this._countOnly = !1, this._counts = null, this._prev = null, this._inputs = null, this._outputs = null;
}
xo.Definition = {
  type: "Aggregate",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "ops",
    type: "enum",
    array: !0,
    values: Xf
  }, {
    name: "aggregate_params",
    type: "number",
    null: !0,
    array: !0
  }, {
    name: "fields",
    type: "field",
    null: !0,
    array: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }, {
    name: "drop",
    type: "boolean",
    default: !0
  }, {
    name: "cross",
    type: "boolean",
    default: !1
  }, {
    name: "key",
    type: "field"
  }]
};
le(xo, T, {
  transform(e, t) {
    const i = this, n = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = e.modified();
    return i.stamp = n.stamp, i.value && (a || t.modified(i._inputs, !0)) ? (i._prev = i.value, i.value = a ? i.init(e) : /* @__PURE__ */ Object.create(null), t.visit(t.SOURCE, (o) => i.add(o))) : (i.value = i.value || i.init(e), t.visit(t.REM, (o) => i.rem(o)), t.visit(t.ADD, (o) => i.add(o))), n.modifies(i._outputs), i._drop = e.drop !== !1, e.cross && i._dims.length > 1 && (i._drop = !1, i.cross()), t.clean() && i._drop && n.clean(!0).runAfter(() => this.clean()), i.changes(n);
  },
  cross() {
    const e = this, t = e.value, i = e._dnames, n = i.map(() => ({})), a = i.length;
    function o(s) {
      let l, d, f, u;
      for (l in s)
        for (f = s[l].tuple, d = 0; d < a; ++d)
          n[d][u = f[i[d]]] = u;
    }
    o(e._prev), o(t);
    function r(s, l, d) {
      const f = i[d], u = n[d++];
      for (const c in u) {
        const h = s ? s + "|" + c : c;
        l[f] = u[c], d < a ? r(h, l, d) : t[h] || e.cell(h, l);
      }
    }
    r("", {}, 0);
  },
  init(e) {
    const t = this._inputs = [], i = this._outputs = [], n = {};
    function a(y) {
      const v = Jt(Ln(y)), w = v.length;
      let x = 0, $;
      for (; x < w; ++x)
        n[$ = v[x]] || (n[$] = 1, t.push($));
    }
    this._dims = Jt(e.groupby), this._dnames = this._dims.map((y) => {
      const v = pi(y);
      return a(y), i.push(v), v;
    }), this.cellkey = e.key ? e.key : xy(this._dims), this._countOnly = !0, this._counts = [], this._measures = [];
    const o = e.fields || [null], r = e.ops || ["count"], s = e.aggregate_params || [null], l = e.as || [], d = o.length, f = {};
    let u, c, h, p, g, m, b;
    for (d !== r.length && wt("Unmatched number of fields and aggregate ops."), b = 0; b < d; ++b) {
      if (u = o[b], c = r[b], h = s[b] || null, u == null && c !== "count" && wt("Null aggregate field specified."), g = pi(u), m = MS(c, g, l[b]), i.push(m), c === "count") {
        this._counts.push(m);
        continue;
      }
      p = f[g], p || (a(u), p = f[g] = [], p.field = u, this._measures.push(p)), c !== "count" && (this._countOnly = !1), p.push(VS(c, h, m));
    }
    return this._measures = this._measures.map((y) => GS(y, y.field)), /* @__PURE__ */ Object.create(null);
  },
  // -- Cell Management -----
  cellkey: xy(),
  cell(e, t) {
    let i = this.value[e];
    return i ? i.num === 0 && this._drop && i.stamp < this.stamp ? (i.stamp = this.stamp, this._adds[this._alen++] = i) : i.stamp < this.stamp && (i.stamp = this.stamp, this._mods[this._mlen++] = i) : (i = this.value[e] = this.newcell(e, t), this._adds[this._alen++] = i), i;
  },
  newcell(e, t) {
    const i = {
      key: e,
      num: 0,
      agg: null,
      tuple: this.newtuple(t, this._prev && this._prev[e]),
      stamp: this.stamp,
      store: !1
    };
    if (!this._countOnly) {
      const n = this._measures, a = n.length;
      i.agg = Array(a);
      for (let o = 0; o < a; ++o)
        i.agg[o] = new n[o](i);
    }
    return i.store && (i.data = new D0()), i;
  },
  newtuple(e, t) {
    const i = this._dnames, n = this._dims, a = n.length, o = {};
    for (let r = 0; r < a; ++r)
      o[i[r]] = n[r](e);
    return t ? FS(t.tuple, o) : xe(o);
  },
  clean() {
    const e = this.value;
    for (const t in e)
      e[t].num === 0 && delete e[t];
  },
  // -- Process Tuples -----
  add(e) {
    const t = this.cellkey(e), i = this.cell(t, e);
    if (i.num += 1, this._countOnly) return;
    i.store && i.data.add(e);
    const n = i.agg;
    for (let a = 0, o = n.length; a < o; ++a)
      n[a].add(n[a].get(e), e);
  },
  rem(e) {
    const t = this.cellkey(e), i = this.cell(t, e);
    if (i.num -= 1, this._countOnly) return;
    i.store && i.data.rem(e);
    const n = i.agg;
    for (let a = 0, o = n.length; a < o; ++a)
      n[a].rem(n[a].get(e), e);
  },
  celltuple(e) {
    const t = e.tuple, i = this._counts;
    e.store && e.data.values();
    for (let n = 0, a = i.length; n < a; ++n)
      t[i[n]] = e.num;
    if (!this._countOnly) {
      const n = e.agg;
      for (let a = 0, o = n.length; a < o; ++a)
        n[a].set(t);
    }
    return t;
  },
  changes(e) {
    const t = this._adds, i = this._mods, n = this._prev, a = this._drop, o = e.add, r = e.rem, s = e.mod;
    let l, d, f, u;
    if (n) for (d in n)
      l = n[d], (!a || l.num) && r.push(l.tuple);
    for (f = 0, u = this._alen; f < u; ++f)
      o.push(this.celltuple(t[f])), t[f] = null;
    for (f = 0, u = this._mlen; f < u; ++f)
      l = i[f], (l.num === 0 && a ? r : s).push(this.celltuple(l)), i[f] = null;
    return this._alen = this._mlen = 0, this._prev = null, e;
  }
});
const A9 = 1e-14;
function S0(e) {
  T.call(this, null, e);
}
S0.Definition = {
  type: "Bin",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "interval",
    type: "boolean",
    default: !0
  }, {
    name: "anchor",
    type: "number"
  }, {
    name: "maxbins",
    type: "number",
    default: 20
  }, {
    name: "base",
    type: "number",
    default: 10
  }, {
    name: "divide",
    type: "number",
    array: !0,
    default: [5, 2]
  }, {
    name: "extent",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "span",
    type: "number"
  }, {
    name: "step",
    type: "number"
  }, {
    name: "steps",
    type: "number",
    array: !0
  }, {
    name: "minstep",
    type: "number",
    default: 0
  }, {
    name: "nice",
    type: "boolean",
    default: !0
  }, {
    name: "name",
    type: "string"
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["bin0", "bin1"]
  }]
};
le(S0, T, {
  transform(e, t) {
    const i = e.interval !== !1, n = this._bins(e), a = n.start, o = n.step, r = e.as || ["bin0", "bin1"], s = r[0], l = r[1];
    let d;
    return e.modified() ? (t = t.reflow(!0), d = t.SOURCE) : d = t.modified(Ln(e.field)) ? t.ADD_MOD : t.ADD, t.visit(d, i ? (f) => {
      const u = n(f);
      f[s] = u, f[l] = u == null ? null : a + o * (1 + (u - a) / o);
    } : (f) => f[s] = n(f)), t.modifies(i ? r : s);
  },
  _bins(e) {
    if (this.value && !e.modified())
      return this.value;
    const t = e.field, i = lE(e), n = i.step;
    let a = i.start, o = a + Math.ceil((i.stop - a) / n) * n, r, s;
    (r = e.anchor) != null && (s = r - (a + n * Math.floor((r - a) / n)), a += s, o += s);
    const l = function(d) {
      let f = BS(t(d));
      return f == null ? null : f < a ? -1 / 0 : f > o ? 1 / 0 : (f = Math.max(a, Math.min(f, o - n)), a + n * Math.floor(A9 + (f - a) / n));
    };
    return l.start = a, l.stop = i.stop, l.step = n, this.value = pn(l, Ln(t), e.name || "bin_" + pi(t));
  }
});
function HS(e, t, i) {
  const n = e;
  let a = t || [], o = i || [], r = {}, s = 0;
  return {
    add: (l) => o.push(l),
    remove: (l) => r[n(l)] = ++s,
    size: () => a.length,
    data: (l, d) => (s && (a = a.filter((f) => !r[n(f)]), r = {}, s = 0), d && l && a.sort(l), o.length && (a = l ? g9(l, a, o.sort(l)) : a.concat(o), o = []), a)
  };
}
function F0(e) {
  T.call(this, [], e);
}
F0.Definition = {
  type: "Collect",
  metadata: {
    source: !0
  },
  params: [{
    name: "sort",
    type: "compare"
  }]
};
le(F0, T, {
  transform(e, t) {
    const i = t.fork(t.ALL), n = HS(Z, this.value, i.materialize(i.ADD).add), a = e.sort, o = t.changed() || a && (e.modified("sort") || t.modified(a.fields));
    return i.visit(i.REM, n.remove), this.modified(o), this.value = i.source = n.data(is(a), o), t.source && t.source.root && (this.value.root = t.source.root), i;
  }
});
function YS(e) {
  Te.call(this, null, O9, e);
}
le(YS, Te);
function O9(e) {
  return this.value && !e.modified() ? this.value : s9(e.fields, e.orders);
}
function T0(e) {
  T.call(this, null, e);
}
T0.Definition = {
  type: "CountPattern",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "case",
    type: "enum",
    values: ["upper", "lower", "mixed"],
    default: "mixed"
  }, {
    name: "pattern",
    type: "string",
    default: '[\\w"]+'
  }, {
    name: "stopwords",
    type: "string",
    default: ""
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["text", "count"]
  }]
};
function E9(e, t, i) {
  switch (t) {
    case "upper":
      e = e.toUpperCase();
      break;
    case "lower":
      e = e.toLowerCase();
      break;
  }
  return e.match(i);
}
le(T0, T, {
  transform(e, t) {
    const i = (u) => (c) => {
      for (var h = E9(s(c), e.case, o) || [], p, g = 0, m = h.length; g < m; ++g)
        r.test(p = h[g]) || u(p);
    }, n = this._parameterCheck(e, t), a = this._counts, o = this._match, r = this._stop, s = e.field, l = e.as || ["text", "count"], d = i((u) => a[u] = 1 + (a[u] || 0)), f = i((u) => a[u] -= 1);
    return n ? t.visit(t.SOURCE, d) : (t.visit(t.ADD, d), t.visit(t.REM, f)), this._finish(t, l);
  },
  _parameterCheck(e, t) {
    let i = !1;
    return (e.modified("stopwords") || !this._stop) && (this._stop = new RegExp("^" + (e.stopwords || "") + "$", "i"), i = !0), (e.modified("pattern") || !this._match) && (this._match = new RegExp(e.pattern || "[\\w']+", "g"), i = !0), (e.modified("field") || t.modified(e.field.fields)) && (i = !0), i && (this._counts = {}), i;
  },
  _finish(e, t) {
    const i = this._counts, n = this._tuples || (this._tuples = {}), a = t[0], o = t[1], r = e.fork(e.NO_SOURCE | e.NO_FIELDS);
    let s, l, d;
    for (s in i)
      l = n[s], d = i[s] || 0, !l && d ? (n[s] = l = xe({}), l[a] = s, l[o] = d, r.add.push(l)) : d === 0 ? (l && r.rem.push(l), i[s] = null, n[s] = null) : l[o] !== d && (l[o] = d, r.mod.push(l));
    return r.modifies(t);
  }
});
function C0(e) {
  T.call(this, null, e);
}
C0.Definition = {
  type: "Cross",
  metadata: {
    generates: !0
  },
  params: [{
    name: "filter",
    type: "expr"
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["a", "b"]
  }]
};
le(C0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE), n = e.as || ["a", "b"], a = n[0], o = n[1], r = !this.value || t.changed(t.ADD_REM) || e.modified("as") || e.modified("filter");
    let s = this.value;
    return r ? (s && (i.rem = s), s = t.materialize(t.SOURCE).source, i.add = this.value = D9(s, a, o, e.filter || o9)) : i.mod = s, i.source = this.value, i.modifies(n);
  }
});
function D9(e, t, i, n) {
  for (var a = [], o = {}, r = e.length, s = 0, l, d; s < r; ++s)
    for (o[t] = d = e[s], l = 0; l < r; ++l)
      o[i] = e[l], n(o) && (a.push(xe(o)), o = {}, o[t] = d);
  return a;
}
const L$ = {
  kde: Jv,
  mixture: vE,
  normal: _E,
  lognormal: xE,
  uniform: wE
}, S9 = "distributions", B$ = "function", F9 = "field";
function XS(e, t) {
  const i = e[B$];
  Yf(L$, i) || wt("Unknown distribution function: " + i);
  const n = L$[i]();
  for (const a in e)
    a === F9 ? n.data((e.from || t()).map(e[a])) : a === S9 ? n[a](e[a].map((o) => XS(o, t))) : typeof n[a] === B$ && n[a](e[a]);
  return n;
}
function R0(e) {
  T.call(this, null, e);
}
const JS = [{
  key: {
    function: "normal"
  },
  params: [{
    name: "mean",
    type: "number",
    default: 0
  }, {
    name: "stdev",
    type: "number",
    default: 1
  }]
}, {
  key: {
    function: "lognormal"
  },
  params: [{
    name: "mean",
    type: "number",
    default: 0
  }, {
    name: "stdev",
    type: "number",
    default: 1
  }]
}, {
  key: {
    function: "uniform"
  },
  params: [{
    name: "min",
    type: "number",
    default: 0
  }, {
    name: "max",
    type: "number",
    default: 1
  }]
}, {
  key: {
    function: "kde"
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "from",
    type: "data"
  }, {
    name: "bandwidth",
    type: "number",
    default: 0
  }]
}], T9 = {
  key: {
    function: "mixture"
  },
  params: [{
    name: "distributions",
    type: "param",
    array: !0,
    params: JS
  }, {
    name: "weights",
    type: "number",
    array: !0
  }]
};
R0.Definition = {
  type: "Density",
  metadata: {
    generates: !0
  },
  params: [{
    name: "extent",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "steps",
    type: "number"
  }, {
    name: "minsteps",
    type: "number",
    default: 25
  }, {
    name: "maxsteps",
    type: "number",
    default: 200
  }, {
    name: "method",
    type: "string",
    default: "pdf",
    values: ["pdf", "cdf"]
  }, {
    name: "distribution",
    type: "param",
    params: JS.concat(T9)
  }, {
    name: "as",
    type: "string",
    array: !0,
    default: ["value", "density"]
  }]
};
le(R0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const n = XS(e.distribution, C9(t)), a = e.steps || e.minsteps || 25, o = e.steps || e.maxsteps || 200;
      let r = e.method || "pdf";
      r !== "pdf" && r !== "cdf" && wt("Invalid density method: " + r), !e.extent && !n.data && wt("Missing density extent parameter."), r = n[r];
      const s = e.as || ["value", "density"], l = e.extent || cf(n.data()), d = Ap(r, l, a, o).map((f) => {
        const u = {};
        return u[s[0]] = f[0], u[s[1]] = f[1], xe(u);
      });
      this.value && (i.rem = this.value), this.value = i.add = i.source = d;
    }
    return i;
  }
});
function C9(e) {
  return () => e.materialize(e.SOURCE).source;
}
function ZS(e, t) {
  return e ? e.map((i, n) => t[n] || pi(i)) : null;
}
function I0(e, t, i) {
  const n = [], a = (u) => u(l);
  let o, r, s, l, d, f;
  if (t == null)
    n.push(e.map(i));
  else
    for (o = {}, r = 0, s = e.length; r < s; ++r)
      l = e[r], d = t.map(a), f = o[d], f || (o[d] = f = [], f.dims = d, n.push(f)), f.push(i(l));
  return n;
}
const KS = "bin";
function j0(e) {
  T.call(this, null, e);
}
j0.Definition = {
  type: "DotBin",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "step",
    type: "number"
  }, {
    name: "smooth",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    default: KS
  }]
};
const R9 = (e, t) => m9(cf(e, t)) / 30;
le(j0, T, {
  transform(e, t) {
    if (this.value && !(e.modified() || t.changed()))
      return t;
    const i = t.materialize(t.SOURCE).source, n = I0(t.source, e.groupby, NS), a = e.smooth || !1, o = e.field, r = e.step || R9(i, o), s = is((p, g) => o(p) - o(g)), l = e.as || KS, d = n.length;
    let f = 1 / 0, u = -1 / 0, c = 0, h;
    for (; c < d; ++c) {
      const p = n[c].sort(s);
      h = -1;
      for (const g of dE(p, r, a, o))
        g < f && (f = g), g > u && (u = g), p[++h][l] = g;
    }
    return this.value = {
      start: f,
      stop: u,
      step: r
    }, t.reflow(!0).modifies(l);
  }
});
function QS(e) {
  Te.call(this, null, I9, e), this.modified(!0);
}
le(QS, Te);
function I9(e) {
  const t = e.expr;
  return this.value && !e.modified("expr") ? this.value : pn((i) => t(i, e), Ln(t), pi(t));
}
function z0(e) {
  T.call(this, [void 0, void 0], e);
}
z0.Definition = {
  type: "Extent",
  metadata: {},
  params: [{
    name: "field",
    type: "field",
    required: !0
  }]
};
le(z0, T, {
  transform(e, t) {
    const i = this.value, n = e.field, a = t.changed() || t.modified(n.fields) || e.modified("field");
    let o = i[0], r = i[1];
    if ((a || o == null) && (o = 1 / 0, r = -1 / 0), t.visit(a ? t.SOURCE : t.ADD, (s) => {
      const l = BS(n(s));
      l != null && (l < o && (o = l), l > r && (r = l));
    }), !Number.isFinite(o) || !Number.isFinite(r)) {
      let s = pi(n);
      s && (s = ` for field "${s}"`), t.dataflow.warn(`Infinite extent${s}: [${o}, ${r}]`), o = r = void 0;
    }
    this.value = [o, r];
  }
});
function P0(e, t) {
  Te.call(this, e), this.parent = t, this.count = 0;
}
le(P0, Te, {
  /**
   * Routes pulses from this subflow to a target transform.
   * @param {Transform} target - A transform that receives the subflow of tuples.
   */
  connect(e) {
    return this.detachSubflow = e.detachSubflow, this.targets().add(e), e.source = this;
  },
  /**
   * Add an 'add' tuple to the subflow pulse.
   * @param {Tuple} t - The tuple being added.
   */
  add(e) {
    this.count += 1, this.value.add.push(e);
  },
  /**
   * Add a 'rem' tuple to the subflow pulse.
   * @param {Tuple} t - The tuple being removed.
   */
  rem(e) {
    this.count -= 1, this.value.rem.push(e);
  },
  /**
   * Add a 'mod' tuple to the subflow pulse.
   * @param {Tuple} t - The tuple being modified.
   */
  mod(e) {
    this.value.mod.push(e);
  },
  /**
   * Re-initialize this operator's pulse value.
   * @param {Pulse} pulse - The pulse to copy from.
   * @see Pulse.init
   */
  init(e) {
    this.value.init(e, e.NO_SOURCE);
  },
  /**
   * Evaluate this operator. This method overrides the
   * default behavior to simply return the contained pulse value.
   * @return {Pulse}
   */
  evaluate() {
    return this.value;
  }
});
function qp(e) {
  T.call(this, {}, e), this._keys = E0();
  const t = this._targets = [];
  t.active = 0, t.forEach = (i) => {
    for (let n = 0, a = t.active; n < a; ++n)
      i(t[n], n, t);
  };
}
le(qp, T, {
  activate(e) {
    this._targets[this._targets.active++] = e;
  },
  // parent argument provided by PreFacet subclass
  subflow(e, t, i, n) {
    const a = this.value;
    let o = Yf(a, e) && a[e], r, s;
    return o ? o.value.stamp < i.stamp && (o.init(i), this.activate(o)) : (s = n || (s = this._group[e]) && s.tuple, r = i.dataflow, o = new P0(i.fork(i.NO_SOURCE), this), r.add(o).connect(t(r, e, s)), a[e] = o, this.activate(o)), o;
  },
  clean() {
    const e = this.value;
    let t = 0;
    for (const i in e)
      if (e[i].count === 0) {
        const n = e[i].detachSubflow;
        n && n(), delete e[i], ++t;
      }
    if (t) {
      const i = this._targets.filter((n) => n && n.count > 0);
      this.initTargets(i);
    }
  },
  initTargets(e) {
    const t = this._targets, i = t.length, n = e ? e.length : 0;
    let a = 0;
    for (; a < n; ++a)
      t[a] = e[a];
    for (; a < i && t[a] != null; ++a)
      t[a] = null;
    t.active = n;
  },
  transform(e, t) {
    const i = t.dataflow, n = e.key, a = e.subflow, o = this._keys, r = e.modified("key"), s = (l) => this.subflow(l, a, t);
    return this._group = e.group || {}, this.initTargets(), t.visit(t.REM, (l) => {
      const d = Z(l), f = o.get(d);
      f !== void 0 && (o.delete(d), s(f).rem(l));
    }), t.visit(t.ADD, (l) => {
      const d = n(l);
      o.set(Z(l), d), s(d).add(l);
    }), r || t.modified(n.fields) ? t.visit(t.MOD, (l) => {
      const d = Z(l), f = o.get(d), u = n(l);
      f === u ? s(u).mod(l) : (o.set(d, u), s(f).rem(l), s(u).add(l));
    }) : t.changed(t.MOD) && t.visit(t.MOD, (l) => {
      s(o.get(Z(l))).mod(l);
    }), r && t.visit(t.REFLOW, (l) => {
      const d = Z(l), f = o.get(d), u = n(l);
      f !== u && (o.set(d, u), s(f).rem(l), s(u).add(l));
    }), t.clean() ? i.runAfter(() => {
      this.clean(), o.clean();
    }) : o.empty > i.cleanThreshold && i.runAfter(o.clean), t;
  }
});
function eF(e) {
  Te.call(this, null, j9, e);
}
le(eF, Te);
function j9(e) {
  return this.value && !e.modified() ? this.value : qS(e.name) ? Jt(e.name).map((t) => uf(t)) : uf(e.name, e.as);
}
function N0(e) {
  T.call(this, E0(), e);
}
N0.Definition = {
  type: "Filter",
  metadata: {
    changes: !0
  },
  params: [{
    name: "expr",
    type: "expr",
    required: !0
  }]
};
le(N0, T, {
  transform(e, t) {
    const i = t.dataflow, n = this.value, a = t.fork(), o = a.add, r = a.rem, s = a.mod, l = e.expr;
    let d = !0;
    t.visit(t.REM, (u) => {
      const c = Z(u);
      n.has(c) ? n.delete(c) : r.push(u);
    }), t.visit(t.ADD, (u) => {
      l(u, e) ? o.push(u) : n.set(Z(u), 1);
    });
    function f(u) {
      const c = Z(u), h = l(u, e), p = n.get(c);
      h && p ? (n.delete(c), o.push(u)) : !h && !p ? (n.set(c, 1), r.push(u)) : d && h && !p && s.push(u);
    }
    return t.visit(t.MOD, f), e.modified() && (d = !1, t.visit(t.REFLOW, f)), n.empty > i.cleanThreshold && i.runAfter(n.clean), a;
  }
});
function q0(e) {
  T.call(this, [], e);
}
q0.Definition = {
  type: "Flatten",
  metadata: {
    generates: !0
  },
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "index",
    type: "string"
  }, {
    name: "as",
    type: "string",
    array: !0
  }]
};
le(q0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE), n = e.fields, a = ZS(n, e.as || []), o = e.index || null, r = a.length;
    return i.rem = this.value, t.visit(t.SOURCE, (s) => {
      const l = n.map((p) => p(s)), d = l.reduce((p, g) => Math.max(p, g.length), 0);
      let f = 0, u, c, h;
      for (; f < d; ++f) {
        for (c = w0(s), u = 0; u < r; ++u)
          c[a[u]] = (h = l[u][f]) == null ? null : h;
        o && (c[o] = f), i.add.push(c);
      }
    }), this.value = i.source = i.add, o && i.modifies(o), i.modifies(a);
  }
});
function L0(e) {
  T.call(this, [], e);
}
L0.Definition = {
  type: "Fold",
  metadata: {
    generates: !0
  },
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["key", "value"]
  }]
};
le(L0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE), n = e.fields, a = n.map(pi), o = e.as || ["key", "value"], r = o[0], s = o[1], l = n.length;
    return i.rem = this.value, t.visit(t.SOURCE, (d) => {
      for (let f = 0, u; f < l; ++f)
        u = w0(d), u[r] = a[f], u[s] = n[f](d), i.add.push(u);
    }), this.value = i.source = i.add, i.modifies(o);
  }
});
function B0(e) {
  T.call(this, null, e);
}
B0.Definition = {
  type: "Formula",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "expr",
    type: "expr",
    required: !0
  }, {
    name: "as",
    type: "string",
    required: !0
  }, {
    name: "initonly",
    type: "boolean"
  }]
};
le(B0, T, {
  transform(e, t) {
    const i = e.expr, n = e.as, a = e.modified(), o = e.initonly ? t.ADD : a ? t.SOURCE : t.modified(i.fields) || t.modified(n) ? t.ADD_MOD : t.ADD;
    return a && (t = t.materialize().reflow(!0)), e.initonly || t.modifies(n), t.visit(o, (r) => r[n] = i(r, e));
  }
});
function tF(e) {
  T.call(this, [], e);
}
le(tF, T, {
  transform(e, t) {
    const i = t.fork(t.ALL), n = e.generator;
    let a = this.value, o = e.size - a.length, r, s, l;
    if (o > 0) {
      for (r = []; --o >= 0; )
        r.push(l = xe(n(e))), a.push(l);
      i.add = i.add.length ? i.materialize(i.ADD).add.concat(r) : r;
    } else
      s = a.slice(0, -o), i.rem = i.rem.length ? i.materialize(i.REM).rem.concat(s) : s, a = a.slice(-o);
    return i.source = this.value = a, i;
  }
});
const Vu = {
  value: "value",
  median: S3,
  mean: uN,
  min: F3,
  max: Nd
}, z9 = [];
function U0(e) {
  T.call(this, [], e);
}
U0.Definition = {
  type: "Impute",
  metadata: {
    changes: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "key",
    type: "field",
    required: !0
  }, {
    name: "keyvals",
    array: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "method",
    type: "enum",
    default: "value",
    values: ["value", "mean", "median", "max", "min"]
  }, {
    name: "value",
    default: 0
  }]
};
function P9(e) {
  var t = e.method || Vu.value, i;
  if (Vu[t] == null)
    wt("Unrecognized imputation method: " + t);
  else return t === Vu.value ? (i = e.value !== void 0 ? e.value : 0, () => i) : Vu[t];
}
function N9(e) {
  const t = e.field;
  return (i) => i ? t(i) : NaN;
}
le(U0, T, {
  transform(e, t) {
    var i = t.fork(t.ALL), n = P9(e), a = N9(e), o = pi(e.field), r = pi(e.key), s = (e.groupby || []).map(pi), l = q9(t.source, e.groupby, e.key, e.keyvals), d = [], f = this.value, u = l.domain.length, c, h, p, g, m, b, y, v, w, x;
    for (m = 0, v = l.length; m < v; ++m)
      for (c = l[m], p = c.values, h = NaN, y = 0; y < u; ++y)
        if (c[y] == null) {
          for (g = l.domain[y], x = {
            _impute: !0
          }, b = 0, w = p.length; b < w; ++b) x[s[b]] = p[b];
          x[r] = g, x[o] = Number.isNaN(h) ? h = n(c, a) : h, d.push(xe(x));
        }
    return d.length && (i.add = i.materialize(i.ADD).add.concat(d)), f.length && (i.rem = i.materialize(i.REM).rem.concat(f)), this.value = d, i;
  }
});
function q9(e, t, i, n) {
  var a = (b) => b(m), o = [], r = n ? n.slice() : [], s = {}, l = {}, d, f, u, c, h, p, g, m;
  for (r.forEach((b, y) => s[b] = y + 1), c = 0, g = e.length; c < g; ++c)
    m = e[c], p = i(m), h = s[p] || (s[p] = r.push(p)), f = (d = t ? t.map(a) : z9) + "", (u = l[f]) || (u = l[f] = [], o.push(u), u.values = d), u[h - 1] = m;
  return o.domain = r, o;
}
function M0(e) {
  xo.call(this, e);
}
M0.Definition = {
  type: "JoinAggregate",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "fields",
    type: "field",
    null: !0,
    array: !0
  }, {
    name: "ops",
    type: "enum",
    array: !0,
    values: Xf
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }, {
    name: "key",
    type: "field"
  }]
};
le(M0, xo, {
  transform(e, t) {
    const i = this, n = e.modified();
    let a;
    return i.value && (n || t.modified(i._inputs, !0)) ? (a = i.value = n ? i.init(e) : {}, t.visit(t.SOURCE, (o) => i.add(o))) : (a = i.value = i.value || this.init(e), t.visit(t.REM, (o) => i.rem(o)), t.visit(t.ADD, (o) => i.add(o))), i.changes(), t.visit(t.SOURCE, (o) => {
      O0(o, a[i.cellkey(o)].tuple);
    }), t.reflow(n).modifies(this._outputs);
  },
  changes() {
    const e = this._adds, t = this._mods;
    let i, n;
    for (i = 0, n = this._alen; i < n; ++i)
      this.celltuple(e[i]), e[i] = null;
    for (i = 0, n = this._mlen; i < n; ++i)
      this.celltuple(t[i]), t[i] = null;
    this._alen = this._mlen = 0;
  }
});
function V0(e) {
  T.call(this, null, e);
}
V0.Definition = {
  type: "KDE",
  metadata: {
    generates: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "cumulative",
    type: "boolean",
    default: !1
  }, {
    name: "counts",
    type: "boolean",
    default: !1
  }, {
    name: "bandwidth",
    type: "number",
    default: 0
  }, {
    name: "extent",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "resolve",
    type: "enum",
    values: ["shared", "independent"],
    default: "independent"
  }, {
    name: "steps",
    type: "number"
  }, {
    name: "minsteps",
    type: "number",
    default: 25
  }, {
    name: "maxsteps",
    type: "number",
    default: 200
  }, {
    name: "as",
    type: "string",
    array: !0,
    default: ["value", "density"]
  }]
};
le(V0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const n = t.materialize(t.SOURCE).source, a = I0(n, e.groupby, e.field), o = (e.groupby || []).map(pi), r = e.bandwidth, s = e.cumulative ? "cdf" : "pdf", l = e.as || ["value", "density"], d = [];
      let f = e.extent, u = e.steps || e.minsteps || 25, c = e.steps || e.maxsteps || 200;
      s !== "pdf" && s !== "cdf" && wt("Invalid density method: " + s), e.resolve === "shared" && (f || (f = cf(n, e.field)), u = c = e.steps || c), a.forEach((h) => {
        const p = Jv(h, r)[s], g = e.counts ? h.length : 1, m = f || cf(h);
        Ap(p, m, u, c).forEach((b) => {
          const y = {};
          for (let v = 0; v < o.length; ++v)
            y[o[v]] = h.dims[v];
          y[l[0]] = b[0], y[l[1]] = b[1] * g, d.push(xe(y));
        });
      }), this.value && (i.rem = this.value), this.value = i.add = i.source = d;
    }
    return i;
  }
});
function iF(e) {
  Te.call(this, null, L9, e);
}
le(iF, Te);
function L9(e) {
  return this.value && !e.modified() ? this.value : p9(e.fields, e.flat);
}
function nF(e) {
  T.call(this, [], e), this._pending = null;
}
le(nF, T, {
  transform(e, t) {
    const i = t.dataflow;
    return this._pending ? Cm(this, t, this._pending) : B9(e) ? t.StopPropagation : e.values ? Cm(this, t, i.parse(e.values, e.format)) : e.async ? {
      async: i.request(e.url, e.format).then((a) => (this._pending = Jt(a.data), (o) => o.touch(this)))
    } : i.request(e.url, e.format).then((n) => Cm(this, t, Jt(n.data)));
  }
});
function B9(e) {
  return e.modified("async") && !(e.modified("values") || e.modified("url") || e.modified("format"));
}
function Cm(e, t, i) {
  i.forEach(xe);
  const n = t.fork(t.NO_FIELDS & t.NO_SOURCE);
  return n.rem = e.value, e.value = n.source = n.add = i, e._pending = null, n.rem.length && n.clean(!0), n;
}
function W0(e) {
  T.call(this, {}, e);
}
W0.Definition = {
  type: "Lookup",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "index",
    type: "index",
    params: [{
      name: "from",
      type: "data",
      required: !0
    }, {
      name: "key",
      type: "field",
      required: !0
    }]
  }, {
    name: "values",
    type: "field",
    array: !0
  }, {
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "as",
    type: "string",
    array: !0
  }, {
    name: "default",
    default: null
  }]
};
le(W0, T, {
  transform(e, t) {
    const i = e.fields, n = e.index, a = e.values, o = e.default == null ? null : e.default, r = e.modified(), s = i.length;
    let l = r ? t.SOURCE : t.ADD, d = t, f = e.as, u, c, h;
    return a ? (c = a.length, s > 1 && !f && wt('Multi-field lookup requires explicit "as" parameter.'), f && f.length !== s * c && wt('The "as" parameter has too few output field names.'), f = f || a.map(pi), u = function(p) {
      for (var g = 0, m = 0, b, y; g < s; ++g)
        if (y = n.get(i[g](p)), y == null) for (b = 0; b < c; ++b, ++m) p[f[m]] = o;
        else for (b = 0; b < c; ++b, ++m) p[f[m]] = a[b](y);
    }) : (f || wt("Missing output field names."), u = function(p) {
      for (var g = 0, m; g < s; ++g)
        m = n.get(i[g](p)), p[f[g]] = m ?? o;
    }), r ? d = t.reflow(!0) : (h = i.some((p) => t.modified(p.fields)), l |= h ? t.MOD : 0), t.visit(l, u), d.modifies(f);
  }
});
function aF(e) {
  Te.call(this, null, U9, e);
}
le(aF, Te);
function U9(e) {
  if (this.value && !e.modified())
    return this.value;
  const t = e.extents, i = t.length;
  let n = 1 / 0, a = -1 / 0, o, r;
  for (o = 0; o < i; ++o)
    r = t[o], r[0] < n && (n = r[0]), r[1] > a && (a = r[1]);
  return [n, a];
}
function oF(e) {
  Te.call(this, null, M9, e);
}
le(oF, Te);
function M9(e) {
  return this.value && !e.modified() ? this.value : e.values.reduce((t, i) => t.concat(i), []);
}
function rF(e) {
  T.call(this, null, e);
}
le(rF, T, {
  transform(e, t) {
    return this.modified(e.modified()), this.value = e, t.fork(t.NO_SOURCE | t.NO_FIELDS);
  }
});
function G0(e) {
  xo.call(this, e);
}
G0.Definition = {
  type: "Pivot",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "value",
    type: "field",
    required: !0
  }, {
    name: "op",
    type: "enum",
    values: Xf,
    default: "sum"
  }, {
    name: "limit",
    type: "number",
    default: 0
  }, {
    name: "key",
    type: "field"
  }]
};
le(G0, xo, {
  _transform: xo.prototype.transform,
  transform(e, t) {
    return this._transform(V9(e, t), t);
  }
});
function V9(e, t) {
  const i = e.field, n = e.value, a = (e.op === "count" ? "__count__" : e.op) || "sum", o = Ln(i).concat(Ln(n)), r = G9(i, e.limit || 0, t);
  return t.changed() && e.set("__pivot__", null, null, !0), {
    key: e.key,
    groupby: e.groupby,
    ops: r.map(() => a),
    fields: r.map((s) => W9(s, i, n, o)),
    as: r.map((s) => s + ""),
    modified: e.modified.bind(e)
  };
}
function W9(e, t, i, n) {
  return pn((a) => t(a) === e ? i(a) : NaN, n, e + "");
}
function G9(e, t, i) {
  const n = {}, a = [];
  return i.visit(i.SOURCE, (o) => {
    const r = e(o);
    n[r] || (n[r] = 1, a.push(r));
  }), a.sort(A0), t ? a.slice(0, t) : a;
}
function sF(e) {
  qp.call(this, e);
}
le(sF, qp, {
  transform(e, t) {
    const i = e.subflow, n = e.field, a = (o) => this.subflow(Z(o), i, t, o);
    return (e.modified("field") || n && t.modified(Ln(n))) && wt("PreFacet does not support field modification."), this.initTargets(), n ? (t.visit(t.MOD, (o) => {
      const r = a(o);
      n(o).forEach((s) => r.mod(s));
    }), t.visit(t.ADD, (o) => {
      const r = a(o);
      n(o).forEach((s) => r.add(xe(s)));
    }), t.visit(t.REM, (o) => {
      const r = a(o);
      n(o).forEach((s) => r.rem(s));
    })) : (t.visit(t.MOD, (o) => a(o).mod(o)), t.visit(t.ADD, (o) => a(o).add(o)), t.visit(t.REM, (o) => a(o).rem(o))), t.clean() && t.runAfter(() => this.clean()), t;
  }
});
function H0(e) {
  T.call(this, null, e);
}
H0.Definition = {
  type: "Project",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "fields",
    type: "field",
    array: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }]
};
le(H0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE), n = e.fields, a = ZS(e.fields, e.as || []), o = n ? (s, l) => H9(s, l, n, a) : zp;
    let r;
    return this.value ? r = this.value : (t = t.addAll(), r = this.value = {}), t.visit(t.REM, (s) => {
      const l = Z(s);
      i.rem.push(r[l]), r[l] = null;
    }), t.visit(t.ADD, (s) => {
      const l = o(s, xe({}));
      r[Z(s)] = l, i.add.push(l);
    }), t.visit(t.MOD, (s) => {
      i.mod.push(o(s, r[Z(s)]));
    }), i;
  }
});
function H9(e, t, i, n) {
  for (let a = 0, o = i.length; a < o; ++a)
    t[n[a]] = i[a](e);
  return t;
}
function lF(e) {
  T.call(this, null, e);
}
le(lF, T, {
  transform(e, t) {
    return this.value = e.value, e.modified("value") ? t.fork(t.NO_SOURCE | t.NO_FIELDS) : t.StopPropagation;
  }
});
function Y0(e) {
  T.call(this, null, e);
}
Y0.Definition = {
  type: "Quantile",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "probs",
    type: "number",
    array: !0
  }, {
    name: "step",
    type: "number",
    default: 0.01
  }, {
    name: "as",
    type: "string",
    array: !0,
    default: ["prob", "value"]
  }]
};
const Y9 = 1e-14;
le(Y0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE | t.NO_FIELDS), n = e.as || ["prob", "value"];
    if (this.value && !e.modified() && !t.changed())
      return i.source = this.value, i;
    const a = t.materialize(t.SOURCE).source, o = I0(a, e.groupby, e.field), r = (e.groupby || []).map(pi), s = [], l = e.step || 0.01, d = e.probs || Pi(l / 2, 1 - Y9, l), f = d.length;
    return o.forEach((u) => {
      const c = fE(u, d);
      for (let h = 0; h < f; ++h) {
        const p = {};
        for (let g = 0; g < r.length; ++g)
          p[r[g]] = u.dims[g];
        p[n[0]] = d[h], p[n[1]] = c[h], s.push(xe(p));
      }
    }), this.value && (i.rem = this.value), this.value = i.add = i.source = s, i;
  }
});
function dF(e) {
  T.call(this, null, e);
}
le(dF, T, {
  transform(e, t) {
    let i, n;
    return this.value ? n = this.value : (i = t = t.addAll(), n = this.value = {}), e.derive && (i = t.fork(t.NO_SOURCE), t.visit(t.REM, (a) => {
      const o = Z(a);
      i.rem.push(n[o]), n[o] = null;
    }), t.visit(t.ADD, (a) => {
      const o = w0(a);
      n[Z(a)] = o, i.add.push(o);
    }), t.visit(t.MOD, (a) => {
      const o = n[Z(a)];
      for (const r in a)
        o[r] = a[r], i.modifies(r);
      i.mod.push(o);
    })), i;
  }
});
function X0(e) {
  T.call(this, [], e), this.count = 0;
}
X0.Definition = {
  type: "Sample",
  metadata: {},
  params: [{
    name: "size",
    type: "number",
    default: 1e3
  }]
};
le(X0, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE), n = e.modified("size"), a = e.size, o = this.value.reduce((f, u) => (f[Z(u)] = 1, f), {});
    let r = this.value, s = this.count, l = 0;
    function d(f) {
      let u, c;
      r.length < a ? r.push(f) : (c = ~~((s + 1) * Op()), c < r.length && c >= l && (u = r[c], o[Z(u)] && i.rem.push(u), r[c] = f)), ++s;
    }
    if (t.rem.length && (t.visit(t.REM, (f) => {
      const u = Z(f);
      o[u] && (o[u] = -1, i.rem.push(f)), --s;
    }), r = r.filter((f) => o[Z(f)] !== -1)), (t.rem.length || n) && r.length < a && t.source && (l = s = r.length, t.visit(t.SOURCE, (f) => {
      o[Z(f)] || d(f);
    }), l = -1), n && r.length > a) {
      const f = r.length - a;
      for (let u = 0; u < f; ++u)
        o[Z(r[u])] = -1, i.rem.push(r[u]);
      r = r.slice(f);
    }
    return t.mod.length && t.visit(t.MOD, (f) => {
      o[Z(f)] && i.mod.push(f);
    }), t.add.length && t.visit(t.ADD, d), (t.add.length || l < 0) && (i.add = r.filter((f) => !o[Z(f)])), this.count = s, this.value = i.source = r, i;
  }
});
function J0(e) {
  T.call(this, null, e);
}
J0.Definition = {
  type: "Sequence",
  metadata: {
    generates: !0,
    changes: !0
  },
  params: [{
    name: "start",
    type: "number",
    required: !0
  }, {
    name: "stop",
    type: "number",
    required: !0
  }, {
    name: "step",
    type: "number",
    default: 1
  }, {
    name: "as",
    type: "string",
    default: "data"
  }]
};
le(J0, T, {
  transform(e, t) {
    if (this.value && !e.modified()) return;
    const i = t.materialize().fork(t.MOD), n = e.as || "data";
    return i.rem = this.value ? t.rem.concat(this.value) : t.rem, this.value = Pi(e.start, e.stop, e.step || 1).map((a) => {
      const o = {};
      return o[n] = a, xe(o);
    }), i.add = t.add.concat(this.value), i;
  }
});
function fF(e) {
  T.call(this, null, e), this.modified(!0);
}
le(fF, T, {
  transform(e, t) {
    return this.value = t.source, t.changed() ? t.fork(t.NO_SOURCE | t.NO_FIELDS) : t.StopPropagation;
  }
});
function Z0(e) {
  T.call(this, null, e);
}
const uF = ["unit0", "unit1"];
Z0.Definition = {
  type: "TimeUnit",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field",
    required: !0
  }, {
    name: "interval",
    type: "boolean",
    default: !0
  }, {
    name: "units",
    type: "enum",
    values: uE,
    array: !0
  }, {
    name: "step",
    type: "number",
    default: 1
  }, {
    name: "maxbins",
    type: "number",
    default: 40
  }, {
    name: "extent",
    type: "date",
    array: !0
  }, {
    name: "timezone",
    type: "enum",
    default: "local",
    values: ["local", "utc"]
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: uF
  }]
};
le(Z0, T, {
  transform(e, t) {
    const i = e.field, n = e.interval !== !1, a = e.timezone === "utc", o = this._floor(e, t), r = (a ? Xv : Yv)(o.unit).offset, s = e.as || uF, l = s[0], d = s[1], f = o.step;
    let u = o.start || 1 / 0, c = o.stop || -1 / 0, h = t.ADD;
    return (e.modified() || t.changed(t.REM) || t.modified(Ln(i))) && (t = t.reflow(!0), h = t.SOURCE, u = 1 / 0, c = -1 / 0), t.visit(h, (p) => {
      const g = i(p);
      let m, b;
      g == null ? (p[l] = null, n && (p[d] = null)) : (p[l] = m = b = o(g), n && (p[d] = b = r(m, f)), m < u && (u = m), b > c && (c = b));
    }), o.start = u, o.stop = c, t.modifies(n ? s : l);
  },
  _floor(e, t) {
    const i = e.timezone === "utc", {
      units: n,
      step: a
    } = e.units ? {
      units: e.units,
      step: e.step || 1
    } : cE({
      extent: e.extent || cf(t.materialize(t.SOURCE).source, e.field),
      maxbins: e.maxbins
    }), o = hE(n), r = this.value || {}, s = (i ? pE : gE)(o, a);
    return s.unit = LS(o), s.units = o, s.step = a, s.start = r.start, s.stop = r.stop, this.value = s;
  }
});
function cF(e) {
  T.call(this, E0(), e);
}
le(cF, T, {
  transform(e, t) {
    const i = t.dataflow, n = e.field, a = this.value, o = (s) => a.set(n(s), s);
    let r = !0;
    return e.modified("field") || t.modified(n.fields) ? (a.clear(), t.visit(t.SOURCE, o)) : t.changed() ? (t.visit(t.REM, (s) => a.delete(n(s))), t.visit(t.ADD, o)) : r = !1, this.modified(r), a.empty > i.cleanThreshold && i.runAfter(a.clean), t.fork();
  }
});
function hF(e) {
  T.call(this, null, e);
}
le(hF, T, {
  transform(e, t) {
    (!this.value || e.modified("field") || e.modified("sort") || t.changed() || e.sort && t.modified(e.sort.fields)) && (this.value = (e.sort ? t.source.slice().sort(is(e.sort)) : t.source).map(e.field));
  }
});
function X9(e, t, i, n) {
  const a = pf[e](t, i);
  return {
    init: a.init || a9,
    update: function(o, r) {
      r[n] = a.next(o);
    }
  };
}
const pf = {
  row_number: function() {
    return {
      next: (e) => e.index + 1
    };
  },
  rank: function() {
    let e;
    return {
      init: () => e = 1,
      next: (t) => {
        const i = t.index, n = t.data;
        return i && t.compare(n[i - 1], n[i]) ? e = i + 1 : e;
      }
    };
  },
  dense_rank: function() {
    let e;
    return {
      init: () => e = 1,
      next: (t) => {
        const i = t.index, n = t.data;
        return i && t.compare(n[i - 1], n[i]) ? ++e : e;
      }
    };
  },
  percent_rank: function() {
    const e = pf.rank(), t = e.next;
    return {
      init: e.init,
      next: (i) => (t(i) - 1) / (i.data.length - 1)
    };
  },
  cume_dist: function() {
    let e;
    return {
      init: () => e = 0,
      next: (t) => {
        const i = t.data, n = t.compare;
        let a = t.index;
        if (e < a) {
          for (; a + 1 < i.length && !n(i[a], i[a + 1]); ) ++a;
          e = a;
        }
        return (1 + e) / i.length;
      }
    };
  },
  ntile: function(e, t) {
    t = +t, t > 0 || wt("ntile num must be greater than zero.");
    const i = pf.cume_dist(), n = i.next;
    return {
      init: i.init,
      next: (a) => Math.ceil(t * n(a))
    };
  },
  lag: function(e, t) {
    return t = +t || 1, {
      next: (i) => {
        const n = i.index - t;
        return n >= 0 ? e(i.data[n]) : null;
      }
    };
  },
  lead: function(e, t) {
    return t = +t || 1, {
      next: (i) => {
        const n = i.index + t, a = i.data;
        return n < a.length ? e(a[n]) : null;
      }
    };
  },
  first_value: function(e) {
    return {
      next: (t) => e(t.data[t.i0])
    };
  },
  last_value: function(e) {
    return {
      next: (t) => e(t.data[t.i1 - 1])
    };
  },
  nth_value: function(e, t) {
    return t = +t, t > 0 || wt("nth_value nth must be greater than zero."), {
      next: (i) => {
        const n = i.i0 + (t - 1);
        return n < i.i1 ? e(i.data[n]) : null;
      }
    };
  },
  prev_value: function(e) {
    let t;
    return {
      init: () => t = null,
      next: (i) => {
        const n = e(i.data[i.index]);
        return n != null ? t = n : t;
      }
    };
  },
  next_value: function(e) {
    let t, i;
    return {
      init: () => (t = null, i = -1),
      next: (n) => {
        const a = n.data;
        return n.index <= i ? t : (i = J9(e, a, n.index)) < 0 ? (i = a.length, t = null) : t = e(a[i]);
      }
    };
  }
};
function J9(e, t, i) {
  for (let n = t.length; i < n; ++i)
    if (e(t[i]) != null) return i;
  return -1;
}
const Z9 = Object.keys(pf);
function pF(e) {
  const t = Jt(e.ops), i = Jt(e.fields), n = Jt(e.params), a = Jt(e.aggregate_params), o = Jt(e.as), r = this.outputs = [], s = this.windows = [], l = {}, d = {}, f = [], u = [];
  let c = !0;
  function h(p) {
    Jt(Ln(p)).forEach((g) => l[g] = 1);
  }
  h(e.sort), t.forEach((p, g) => {
    const m = i[g], b = n[g], y = a[g] || null, v = pi(m), w = MS(p, v, o[g]);
    if (h(m), r.push(w), Yf(pf, p))
      s.push(X9(p, m, b, w));
    else {
      if (m == null && p !== "count" && wt("Null aggregate field specified."), p === "count") {
        f.push(w);
        return;
      }
      c = !1;
      let x = d[v];
      x || (x = d[v] = [], x.field = m, u.push(x)), x.push(VS(p, y, w));
    }
  }), (f.length || u.length) && (this.cell = K9(u, f, c)), this.inputs = Object.keys(l);
}
const gF = pF.prototype;
gF.init = function() {
  this.windows.forEach((e) => e.init()), this.cell && this.cell.init();
};
gF.update = function(e, t) {
  const i = this.cell, n = this.windows, a = e.data, o = n && n.length;
  let r;
  if (i) {
    for (r = e.p0; r < e.i0; ++r) i.rem(a[r]);
    for (r = e.p1; r < e.i1; ++r) i.add(a[r]);
    i.set(t);
  }
  for (r = 0; r < o; ++r) n[r].update(e, t);
};
function K9(e, t, i) {
  e = e.map((l) => GS(l, l.field));
  const n = {
    num: 0,
    agg: null,
    store: !1,
    count: t
  };
  if (!i)
    for (var a = e.length, o = n.agg = Array(a), r = 0; r < a; ++r) o[r] = new e[r](n);
  if (n.store)
    var s = n.data = new D0();
  return n.add = function(l) {
    if (n.num += 1, !i) {
      s && s.add(l);
      for (let d = 0; d < a; ++d)
        o[d].add(o[d].get(l), l);
    }
  }, n.rem = function(l) {
    if (n.num -= 1, !i) {
      s && s.rem(l);
      for (let d = 0; d < a; ++d)
        o[d].rem(o[d].get(l), l);
    }
  }, n.set = function(l) {
    let d, f;
    for (s && s.values(), d = 0, f = t.length; d < f; ++d) l[t[d]] = n.num;
    if (!i) for (d = 0, f = o.length; d < f; ++d) o[d].set(l);
  }, n.init = function() {
    n.num = 0, s && s.reset();
    for (let l = 0; l < a; ++l) o[l].init();
  }, n;
}
function K0(e) {
  T.call(this, {}, e), this._mlen = 0, this._mods = [];
}
K0.Definition = {
  type: "Window",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "sort",
    type: "compare"
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "ops",
    type: "enum",
    array: !0,
    values: Z9.concat(Xf)
  }, {
    name: "params",
    type: "number",
    null: !0,
    array: !0
  }, {
    name: "aggregate_params",
    type: "number",
    null: !0,
    array: !0
  }, {
    name: "fields",
    type: "field",
    null: !0,
    array: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    array: !0
  }, {
    name: "frame",
    type: "number",
    null: !0,
    array: !0,
    length: 2,
    default: [null, 0]
  }, {
    name: "ignorePeers",
    type: "boolean",
    default: !1
  }]
};
le(K0, T, {
  transform(e, t) {
    this.stamp = t.stamp;
    const i = e.modified(), n = is(e.sort), a = xy(e.groupby), o = (s) => this.group(a(s));
    let r = this.state;
    (!r || i) && (r = this.state = new pF(e)), i || t.modified(r.inputs) ? (this.value = {}, t.visit(t.SOURCE, (s) => o(s).add(s))) : (t.visit(t.REM, (s) => o(s).remove(s)), t.visit(t.ADD, (s) => o(s).add(s)));
    for (let s = 0, l = this._mlen; s < l; ++s)
      Q9(this._mods[s], r, n, e);
    return this._mlen = 0, this._mods = [], t.reflow(i).modifies(r.outputs);
  },
  group(e) {
    let t = this.value[e];
    return t || (t = this.value[e] = HS(Z), t.stamp = -1), t.stamp < this.stamp && (t.stamp = this.stamp, this._mods[this._mlen++] = t), t;
  }
});
function Q9(e, t, i, n) {
  const a = n.sort, o = a && !n.ignorePeers, r = n.frame || [null, 0], s = e.data(i), l = s.length, d = o ? mE(a) : null, f = {
    i0: 0,
    i1: 0,
    p0: 0,
    p1: 0,
    index: 0,
    data: s,
    compare: a || u9(-1)
  };
  t.init();
  for (let u = 0; u < l; ++u)
    eU(f, r, u, l), o && tU(f, d), t.update(f, s[u]);
}
function eU(e, t, i, n) {
  e.p0 = e.i0, e.p1 = e.i1, e.i0 = t[0] == null ? 0 : Math.max(0, i - Math.abs(t[0])), e.i1 = t[1] == null ? n : Math.min(n, i + Math.abs(t[1]) + 1), e.index = i;
}
function tU(e, t) {
  const i = e.i0, n = e.i1 - 1, a = e.compare, o = e.data, r = o.length - 1;
  i > 0 && !a(o[i], o[i - 1]) && (e.i0 = t.left(o, o[i])), n < r && !a(o[n], o[n + 1]) && (e.i1 = t.right(o, o[n]));
}
const iU = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  aggregate: xo,
  bin: S0,
  collect: F0,
  compare: YS,
  countpattern: T0,
  cross: C0,
  density: R0,
  dotbin: j0,
  expression: QS,
  extent: z0,
  facet: qp,
  field: eF,
  filter: N0,
  flatten: q0,
  fold: L0,
  formula: B0,
  generate: tF,
  impute: U0,
  joinaggregate: M0,
  kde: V0,
  key: iF,
  load: nF,
  lookup: W0,
  multiextent: aF,
  multivalues: oF,
  params: rF,
  pivot: G0,
  prefacet: sF,
  project: H0,
  proxy: lF,
  quantile: Y0,
  relay: dF,
  sample: X0,
  sequence: J0,
  sieve: fF,
  subflow: P0,
  timeunit: Z0,
  tupleindex: cF,
  values: hF,
  window: K0
}, Symbol.toStringTag, { value: "Module" }));
function xl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function nU(e) {
  return e.length === 1 ? aU(e[0]) : oU(e);
}
const aU = (e) => function(t) {
  return t[e];
}, oU = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Bd(e) {
  throw Error(e);
}
function rU(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Bd("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Bd("Access path missing closing bracket: " + e), n && Bd("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function sU(e, t, i) {
  const n = rU(e);
  return e = n.length === 1 ? n[0] : e, xl(nU(n), [e], e);
}
sU("id");
xl((e) => e, [], "identity");
xl(() => 0, [], "zero");
xl(() => 1, [], "one");
const mF = xl(() => !0, [], "true");
xl(() => !1, [], "false");
var Io = Array.isArray;
function U$(e) {
  return e === Object(e);
}
function bF(e) {
  return e[e.length - 1];
}
function yF(e) {
  return e != null ? Io(e) ? e : [e] : [];
}
function Q0(e) {
  return typeof e == "function";
}
function vF(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const lU = Object.prototype.hasOwnProperty;
function _a(e, t) {
  return lU.call(e, t);
}
function dU(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), vF(n, i);
}
function M$(e) {
  return typeof e == "number";
}
const fU = 1e4;
function uU(e) {
  e = +e || fU;
  let t, i, n;
  const a = () => {
    t = {}, i = {}, n = 0;
  }, o = (r, s) => (++n > e && (i = t, t = {}, n = 1), t[r] = s);
  return a(), {
    clear: a,
    has: (r) => _a(t, r) || _a(i, r),
    get: (r) => _a(t, r) ? t[r] : _a(i, r) ? o(r, i[r]) : void 0,
    set: (r, s) => _a(t, r) ? t[r] = s : o(r, s)
  };
}
function cU(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
function we(e) {
  return function() {
    return e;
  };
}
const V$ = Math.abs, Ot = Math.atan2, Qo = Math.cos, hU = Math.max, Rm = Math.min, $n = Math.sin, _r = Math.sqrt, Dt = 1e-12, Zs = Math.PI, $h = Zs / 2, _F = 2 * Zs;
function pU(e) {
  return e > 1 ? 0 : e < -1 ? Zs : Math.acos(e);
}
function W$(e) {
  return e >= 1 ? $h : e <= -1 ? -$h : Math.asin(e);
}
const wy = Math.PI, $y = 2 * wy, gr = 1e-6, gU = $y - gr;
function xF(e) {
  this._ += e[0];
  for (let t = 1, i = e.length; t < i; ++t)
    this._ += arguments[t] + e[t];
}
function mU(e) {
  let t = Math.floor(e);
  if (!(t >= 0)) throw new Error(`invalid digits: ${e}`);
  if (t > 15) return xF;
  const i = 10 ** t;
  return function(n) {
    this._ += n[0];
    for (let a = 1, o = n.length; a < o; ++a)
      this._ += Math.round(arguments[a] * i) / i + n[a];
  };
}
let e_ = class {
  constructor(t) {
    this._x0 = this._y0 = // start of current subpath
    this._x1 = this._y1 = null, this._ = "", this._append = t == null ? xF : mU(t);
  }
  moveTo(t, i) {
    this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}`;
  }
  closePath() {
    this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._append`Z`);
  }
  lineTo(t, i) {
    this._append`L${this._x1 = +t},${this._y1 = +i}`;
  }
  quadraticCurveTo(t, i, n, a) {
    this._append`Q${+t},${+i},${this._x1 = +n},${this._y1 = +a}`;
  }
  bezierCurveTo(t, i, n, a, o, r) {
    this._append`C${+t},${+i},${+n},${+a},${this._x1 = +o},${this._y1 = +r}`;
  }
  arcTo(t, i, n, a, o) {
    if (t = +t, i = +i, n = +n, a = +a, o = +o, o < 0) throw new Error(`negative radius: ${o}`);
    let r = this._x1, s = this._y1, l = n - t, d = a - i, f = r - t, u = s - i, c = f * f + u * u;
    if (this._x1 === null)
      this._append`M${this._x1 = t},${this._y1 = i}`;
    else if (c > gr) if (!(Math.abs(u * l - d * f) > gr) || !o)
      this._append`L${this._x1 = t},${this._y1 = i}`;
    else {
      let h = n - r, p = a - s, g = l * l + d * d, m = h * h + p * p, b = Math.sqrt(g), y = Math.sqrt(c), v = o * Math.tan((wy - Math.acos((g + c - m) / (2 * b * y))) / 2), w = v / y, x = v / b;
      Math.abs(w - 1) > gr && this._append`L${t + w * f},${i + w * u}`, this._append`A${o},${o},0,0,${+(u * h > f * p)},${this._x1 = t + x * l},${this._y1 = i + x * d}`;
    }
  }
  arc(t, i, n, a, o, r) {
    if (t = +t, i = +i, n = +n, r = !!r, n < 0) throw new Error(`negative radius: ${n}`);
    let s = n * Math.cos(a), l = n * Math.sin(a), d = t + s, f = i + l, u = 1 ^ r, c = r ? a - o : o - a;
    this._x1 === null ? this._append`M${d},${f}` : (Math.abs(this._x1 - d) > gr || Math.abs(this._y1 - f) > gr) && this._append`L${d},${f}`, n && (c < 0 && (c = c % $y + $y), c > gU ? this._append`A${n},${n},0,1,${u},${t - s},${i - l}A${n},${n},0,1,${u},${this._x1 = d},${this._y1 = f}` : c > gr && this._append`A${n},${n},0,${+(c >= wy)},${u},${this._x1 = t + n * Math.cos(o)},${this._y1 = i + n * Math.sin(o)}`);
  }
  rect(t, i, n, a) {
    this._append`M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}h${n = +n}v${+a}h${-n}Z`;
  }
  toString() {
    return this._;
  }
};
function Lp() {
  return new e_();
}
Lp.prototype = e_.prototype;
function Bp(e) {
  let t = 3;
  return e.digits = function(i) {
    if (!arguments.length) return t;
    if (i == null)
      t = null;
    else {
      const n = Math.floor(i);
      if (!(n >= 0)) throw new RangeError(`invalid digits: ${i}`);
      t = n;
    }
    return e;
  }, () => new e_(t);
}
function bU(e) {
  return e.innerRadius;
}
function yU(e) {
  return e.outerRadius;
}
function vU(e) {
  return e.startAngle;
}
function _U(e) {
  return e.endAngle;
}
function xU(e) {
  return e && e.padAngle;
}
function wU(e, t, i, n, a, o, r, s) {
  var l = i - e, d = n - t, f = r - a, u = s - o, c = u * l - f * d;
  if (!(c * c < Dt))
    return c = (f * (t - o) - u * (e - a)) / c, [e + c * l, t + c * d];
}
function Wu(e, t, i, n, a, o, r) {
  var s = e - i, l = t - n, d = (r ? o : -o) / _r(s * s + l * l), f = d * l, u = -d * s, c = e + f, h = t + u, p = i + f, g = n + u, m = (c + p) / 2, b = (h + g) / 2, y = p - c, v = g - h, w = y * y + v * v, x = a - o, $ = c * g - p * h, _ = (v < 0 ? -1 : 1) * _r(hU(0, x * x * w - $ * $)), k = ($ * v - y * _) / w, A = (-$ * y - v * _) / w, E = ($ * v + y * _) / w, S = (-$ * y + v * _) / w, z = k - m, O = A - b, D = E - m, j = S - b;
  return z * z + O * O > D * D + j * j && (k = E, A = S), {
    cx: k,
    cy: A,
    x01: -f,
    y01: -u,
    x11: k * (a / x - 1),
    y11: A * (a / x - 1)
  };
}
function $U() {
  var e = bU, t = yU, i = we(0), n = null, a = vU, o = _U, r = xU, s = null, l = Bp(d);
  function d() {
    var f, u, c = +e.apply(this, arguments), h = +t.apply(this, arguments), p = a.apply(this, arguments) - $h, g = o.apply(this, arguments) - $h, m = V$(g - p), b = g > p;
    if (s || (s = f = l()), h < c && (u = h, h = c, c = u), !(h > Dt)) s.moveTo(0, 0);
    else if (m > _F - Dt)
      s.moveTo(h * Qo(p), h * $n(p)), s.arc(0, 0, h, p, g, !b), c > Dt && (s.moveTo(c * Qo(g), c * $n(g)), s.arc(0, 0, c, g, p, b));
    else {
      var y = p, v = g, w = p, x = g, $ = m, _ = m, k = r.apply(this, arguments) / 2, A = k > Dt && (n ? +n.apply(this, arguments) : _r(c * c + h * h)), E = Rm(V$(h - c) / 2, +i.apply(this, arguments)), S = E, z = E, O, D;
      if (A > Dt) {
        var j = W$(A / c * $n(k)), F = W$(A / h * $n(k));
        ($ -= j * 2) > Dt ? (j *= b ? 1 : -1, w += j, x -= j) : ($ = 0, w = x = (p + g) / 2), (_ -= F * 2) > Dt ? (F *= b ? 1 : -1, y += F, v -= F) : (_ = 0, y = v = (p + g) / 2);
      }
      var P = h * Qo(y), N = h * $n(y), L = c * Qo(x), K = c * $n(x);
      if (E > Dt) {
        var te = h * Qo(v), ce = h * $n(v), Ve = c * Qo(w), ke = c * $n(w), We;
        if (m < Zs)
          if (We = wU(P, N, Ve, ke, te, ce, L, K)) {
            var Jo = P - We[0], Ha = N - We[1], Zo = te - We[0], W = ce - We[1], oe = 1 / $n(pU((Jo * Zo + Ha * W) / (_r(Jo * Jo + Ha * Ha) * _r(Zo * Zo + W * W))) / 2), de = _r(We[0] * We[0] + We[1] * We[1]);
            S = Rm(E, (c - de) / (oe - 1)), z = Rm(E, (h - de) / (oe + 1));
          } else
            S = z = 0;
      }
      _ > Dt ? z > Dt ? (O = Wu(Ve, ke, P, N, h, z, b), D = Wu(te, ce, L, K, h, z, b), s.moveTo(O.cx + O.x01, O.cy + O.y01), z < E ? s.arc(O.cx, O.cy, z, Ot(O.y01, O.x01), Ot(D.y01, D.x01), !b) : (s.arc(O.cx, O.cy, z, Ot(O.y01, O.x01), Ot(O.y11, O.x11), !b), s.arc(0, 0, h, Ot(O.cy + O.y11, O.cx + O.x11), Ot(D.cy + D.y11, D.cx + D.x11), !b), s.arc(D.cx, D.cy, z, Ot(D.y11, D.x11), Ot(D.y01, D.x01), !b))) : (s.moveTo(P, N), s.arc(0, 0, h, y, v, !b)) : s.moveTo(P, N), !(c > Dt) || !($ > Dt) ? s.lineTo(L, K) : S > Dt ? (O = Wu(L, K, te, ce, c, -S, b), D = Wu(P, N, Ve, ke, c, -S, b), s.lineTo(O.cx + O.x01, O.cy + O.y01), S < E ? s.arc(O.cx, O.cy, S, Ot(O.y01, O.x01), Ot(D.y01, D.x01), !b) : (s.arc(O.cx, O.cy, S, Ot(O.y01, O.x01), Ot(O.y11, O.x11), !b), s.arc(0, 0, c, Ot(O.cy + O.y11, O.cx + O.x11), Ot(D.cy + D.y11, D.cx + D.x11), b), s.arc(D.cx, D.cy, S, Ot(D.y11, D.x11), Ot(D.y01, D.x01), !b))) : s.arc(0, 0, c, x, w, b);
    }
    if (s.closePath(), f) return s = null, f + "" || null;
  }
  return d.centroid = function() {
    var f = (+e.apply(this, arguments) + +t.apply(this, arguments)) / 2, u = (+a.apply(this, arguments) + +o.apply(this, arguments)) / 2 - Zs / 2;
    return [Qo(u) * f, $n(u) * f];
  }, d.innerRadius = function(f) {
    return arguments.length ? (e = typeof f == "function" ? f : we(+f), d) : e;
  }, d.outerRadius = function(f) {
    return arguments.length ? (t = typeof f == "function" ? f : we(+f), d) : t;
  }, d.cornerRadius = function(f) {
    return arguments.length ? (i = typeof f == "function" ? f : we(+f), d) : i;
  }, d.padRadius = function(f) {
    return arguments.length ? (n = f == null ? null : typeof f == "function" ? f : we(+f), d) : n;
  }, d.startAngle = function(f) {
    return arguments.length ? (a = typeof f == "function" ? f : we(+f), d) : a;
  }, d.endAngle = function(f) {
    return arguments.length ? (o = typeof f == "function" ? f : we(+f), d) : o;
  }, d.padAngle = function(f) {
    return arguments.length ? (r = typeof f == "function" ? f : we(+f), d) : r;
  }, d.context = function(f) {
    return arguments.length ? (s = f ?? null, d) : s;
  }, d;
}
function wF(e) {
  return typeof e == "object" && "length" in e ? e : Array.from(e);
}
function $F(e) {
  this._context = e;
}
$F.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(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2;
      default:
        this._context.lineTo(e, t);
        break;
    }
  }
};
function t_(e) {
  return new $F(e);
}
function kF(e) {
  return e[0];
}
function AF(e) {
  return e[1];
}
function OF(e, t) {
  var i = we(!0), n = null, a = t_, o = null, r = Bp(s);
  e = typeof e == "function" ? e : e === void 0 ? kF : we(e), t = typeof t == "function" ? t : t === void 0 ? AF : we(t);
  function s(l) {
    var d, f = (l = wF(l)).length, u, c = !1, h;
    for (n == null && (o = a(h = r())), d = 0; d <= f; ++d)
      !(d < f && i(u = l[d], d, l)) === c && ((c = !c) ? o.lineStart() : o.lineEnd()), c && o.point(+e(u, d, l), +t(u, d, l));
    if (h) return o = null, h + "" || null;
  }
  return s.x = function(l) {
    return arguments.length ? (e = typeof l == "function" ? l : we(+l), s) : e;
  }, s.y = function(l) {
    return arguments.length ? (t = typeof l == "function" ? l : we(+l), s) : t;
  }, s.defined = function(l) {
    return arguments.length ? (i = typeof l == "function" ? l : we(!!l), s) : i;
  }, s.curve = function(l) {
    return arguments.length ? (a = l, n != null && (o = a(n)), s) : a;
  }, s.context = function(l) {
    return arguments.length ? (l == null ? n = o = null : o = a(n = l), s) : n;
  }, s;
}
function EF(e, t, i) {
  var n = null, a = we(!0), o = null, r = t_, s = null, l = Bp(d);
  e = typeof e == "function" ? e : e === void 0 ? kF : we(+e), t = typeof t == "function" ? t : we(t === void 0 ? 0 : +t), i = typeof i == "function" ? i : i === void 0 ? AF : we(+i);
  function d(u) {
    var c, h, p, g = (u = wF(u)).length, m, b = !1, y, v = new Array(g), w = new Array(g);
    for (o == null && (s = r(y = l())), c = 0; c <= g; ++c) {
      if (!(c < g && a(m = u[c], c, u)) === b)
        if (b = !b)
          h = c, s.areaStart(), s.lineStart();
        else {
          for (s.lineEnd(), s.lineStart(), p = c - 1; p >= h; --p)
            s.point(v[p], w[p]);
          s.lineEnd(), s.areaEnd();
        }
      b && (v[c] = +e(m, c, u), w[c] = +t(m, c, u), s.point(n ? +n(m, c, u) : v[c], i ? +i(m, c, u) : w[c]));
    }
    if (y) return s = null, y + "" || null;
  }
  function f() {
    return OF().defined(a).curve(r).context(o);
  }
  return d.x = function(u) {
    return arguments.length ? (e = typeof u == "function" ? u : we(+u), n = null, d) : e;
  }, d.x0 = function(u) {
    return arguments.length ? (e = typeof u == "function" ? u : we(+u), d) : e;
  }, d.x1 = function(u) {
    return arguments.length ? (n = u == null ? null : typeof u == "function" ? u : we(+u), d) : n;
  }, d.y = function(u) {
    return arguments.length ? (t = typeof u == "function" ? u : we(+u), i = null, d) : t;
  }, d.y0 = function(u) {
    return arguments.length ? (t = typeof u == "function" ? u : we(+u), d) : t;
  }, d.y1 = function(u) {
    return arguments.length ? (i = u == null ? null : typeof u == "function" ? u : we(+u), d) : i;
  }, d.lineX0 = d.lineY0 = function() {
    return f().x(e).y(t);
  }, d.lineY1 = function() {
    return f().x(e).y(i);
  }, d.lineX1 = function() {
    return f().x(n).y(t);
  }, d.defined = function(u) {
    return arguments.length ? (a = typeof u == "function" ? u : we(!!u), d) : a;
  }, d.curve = function(u) {
    return arguments.length ? (r = u, o != null && (s = r(o)), d) : r;
  }, d.context = function(u) {
    return arguments.length ? (u == null ? o = s = null : s = r(o = u), d) : o;
  }, d;
}
const kU = {
  draw(e, t) {
    const i = _r(t / Zs);
    e.moveTo(i, 0), e.arc(0, 0, i, 0, _F);
  }
};
function AU(e, t) {
  let i = null, n = Bp(a);
  e = typeof e == "function" ? e : we(e || kU), t = typeof t == "function" ? t : we(t === void 0 ? 64 : +t);
  function a() {
    let o;
    if (i || (i = o = n()), e.apply(this, arguments).draw(i, +t.apply(this, arguments)), o) return i = null, o + "" || null;
  }
  return a.type = function(o) {
    return arguments.length ? (e = typeof o == "function" ? o : we(o), a) : e;
  }, a.size = function(o) {
    return arguments.length ? (t = typeof o == "function" ? o : we(+o), a) : t;
  }, a.context = function(o) {
    return arguments.length ? (i = o ?? null, a) : i;
  }, a;
}
function wo() {
}
function kh(e, t, i) {
  e._context.bezierCurveTo(
    (2 * e._x0 + e._x1) / 3,
    (2 * e._y0 + e._y1) / 3,
    (e._x0 + 2 * e._x1) / 3,
    (e._y0 + 2 * e._y1) / 3,
    (e._x0 + 4 * e._x1 + t) / 6,
    (e._y0 + 4 * e._y1 + i) / 6
  );
}
function Up(e) {
  this._context = e;
}
Up.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:
        kh(this, this._x1, this._y1);
      case 2:
        this._context.lineTo(this._x1, this._y1);
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        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:
        kh(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
  }
};
function OU(e) {
  return new Up(e);
}
function DF(e) {
  this._context = e;
}
DF.prototype = {
  areaStart: wo,
  areaEnd: wo,
  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);
        break;
      }
    }
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._x2 = e, this._y2 = t;
        break;
      case 1:
        this._point = 2, this._x3 = e, this._y3 = t;
        break;
      case 2:
        this._point = 3, this._x4 = e, this._y4 = t, this._context.moveTo((this._x0 + 4 * this._x1 + e) / 6, (this._y0 + 4 * this._y1 + t) / 6);
        break;
      default:
        kh(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
  }
};
function EU(e) {
  return new DF(e);
}
function SF(e) {
  this._context = e;
}
SF.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(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1;
        break;
      case 1:
        this._point = 2;
        break;
      case 2:
        this._point = 3;
        var i = (this._x0 + 4 * this._x1 + e) / 6, n = (this._y0 + 4 * this._y1 + t) / 6;
        this._line ? this._context.lineTo(i, n) : this._context.moveTo(i, n);
        break;
      case 3:
        this._point = 4;
      default:
        kh(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t;
  }
};
function DU(e) {
  return new SF(e);
}
function FF(e, t) {
  this._basis = new Up(e), this._beta = t;
}
FF.prototype = {
  lineStart: function() {
    this._x = [], this._y = [], this._basis.lineStart();
  },
  lineEnd: function() {
    var e = this._x, t = this._y, i = e.length - 1;
    if (i > 0)
      for (var n = e[0], a = t[0], o = e[i] - n, r = t[i] - a, s = -1, l; ++s <= i; )
        l = s / i, this._basis.point(
          this._beta * e[s] + (1 - this._beta) * (n + l * o),
          this._beta * t[s] + (1 - this._beta) * (a + l * r)
        );
    this._x = this._y = null, this._basis.lineEnd();
  },
  point: function(e, t) {
    this._x.push(+e), this._y.push(+t);
  }
};
const SU = function e(t) {
  function i(n) {
    return t === 1 ? new Up(n) : new FF(n, t);
  }
  return i.beta = function(n) {
    return e(+n);
  }, i;
}(0.85);
function Ah(e, t, i) {
  e._context.bezierCurveTo(
    e._x1 + e._k * (e._x2 - e._x0),
    e._y1 + e._k * (e._y2 - e._y0),
    e._x2 + e._k * (e._x1 - t),
    e._y2 + e._k * (e._y1 - i),
    e._x2,
    e._y2
  );
}
function i_(e, t) {
  this._context = e, this._k = (1 - t) / 6;
}
i_.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:
        Ah(this, this._x1, this._y1);
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2, this._x1 = e, this._y1 = t;
        break;
      case 2:
        this._point = 3;
      default:
        Ah(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const FU = function e(t) {
  function i(n) {
    return new i_(n, t);
  }
  return i.tension = function(n) {
    return e(+n);
  }, i;
}(0);
function n_(e, t) {
  this._context = e, this._k = (1 - t) / 6;
}
n_.prototype = {
  areaStart: wo,
  areaEnd: wo,
  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);
        break;
      }
    }
  },
  point: function(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._x3 = e, this._y3 = t;
        break;
      case 1:
        this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
        break;
      case 2:
        this._point = 3, this._x5 = e, this._y5 = t;
        break;
      default:
        Ah(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const TU = function e(t) {
  function i(n) {
    return new n_(n, t);
  }
  return i.tension = function(n) {
    return e(+n);
  }, i;
}(0);
function a_(e, t) {
  this._context = e, this._k = (1 - t) / 6;
}
a_.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(e, t) {
    switch (e = +e, t = +t, 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:
        Ah(this, e, t);
        break;
    }
    this._x0 = this._x1, this._x1 = this._x2, this._x2 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const CU = function e(t) {
  function i(n) {
    return new a_(n, t);
  }
  return i.tension = function(n) {
    return e(+n);
  }, i;
}(0);
function o_(e, t, i) {
  var n = e._x1, a = e._y1, o = e._x2, r = e._y2;
  if (e._l01_a > Dt) {
    var s = 2 * e._l01_2a + 3 * e._l01_a * e._l12_a + e._l12_2a, l = 3 * e._l01_a * (e._l01_a + e._l12_a);
    n = (n * s - e._x0 * e._l12_2a + e._x2 * e._l01_2a) / l, a = (a * s - e._y0 * e._l12_2a + e._y2 * e._l01_2a) / l;
  }
  if (e._l23_a > Dt) {
    var d = 2 * e._l23_2a + 3 * e._l23_a * e._l12_a + e._l12_2a, f = 3 * e._l23_a * (e._l23_a + e._l12_a);
    o = (o * d + e._x1 * e._l23_2a - t * e._l12_2a) / f, r = (r * d + e._y1 * e._l23_2a - i * e._l12_2a) / f;
  }
  e._context.bezierCurveTo(n, a, o, r, e._x2, e._y2);
}
function TF(e, t) {
  this._context = e, this._alpha = t;
}
TF.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);
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    if (e = +e, t = +t, this._point) {
      var i = this._x2 - e, n = this._y2 - t;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(i * i + n * n, this._alpha));
    }
    switch (this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2;
        break;
      case 2:
        this._point = 3;
      default:
        o_(this, e, t);
        break;
    }
    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 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const RU = function e(t) {
  function i(n) {
    return t ? new TF(n, t) : new i_(n, 0);
  }
  return i.alpha = function(n) {
    return e(+n);
  }, i;
}(0.5);
function CF(e, t) {
  this._context = e, this._alpha = t;
}
CF.prototype = {
  areaStart: wo,
  areaEnd: wo,
  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);
        break;
      }
    }
  },
  point: function(e, t) {
    if (e = +e, t = +t, this._point) {
      var i = this._x2 - e, n = this._y2 - t;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(i * i + n * n, this._alpha));
    }
    switch (this._point) {
      case 0:
        this._point = 1, this._x3 = e, this._y3 = t;
        break;
      case 1:
        this._point = 2, this._context.moveTo(this._x4 = e, this._y4 = t);
        break;
      case 2:
        this._point = 3, this._x5 = e, this._y5 = t;
        break;
      default:
        o_(this, e, t);
        break;
    }
    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 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const IU = function e(t) {
  function i(n) {
    return t ? new CF(n, t) : new n_(n, 0);
  }
  return i.alpha = function(n) {
    return e(+n);
  }, i;
}(0.5);
function RF(e, t) {
  this._context = e, this._alpha = t;
}
RF.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(e, t) {
    if (e = +e, t = +t, this._point) {
      var i = this._x2 - e, n = this._y2 - t;
      this._l23_a = Math.sqrt(this._l23_2a = Math.pow(i * i + n * n, 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:
        o_(this, e, t);
        break;
    }
    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 = e, this._y0 = this._y1, this._y1 = this._y2, this._y2 = t;
  }
};
const jU = function e(t) {
  function i(n) {
    return t ? new RF(n, t) : new a_(n, 0);
  }
  return i.alpha = function(n) {
    return e(+n);
  }, i;
}(0.5);
function IF(e) {
  this._context = e;
}
IF.prototype = {
  areaStart: wo,
  areaEnd: wo,
  lineStart: function() {
    this._point = 0;
  },
  lineEnd: function() {
    this._point && this._context.closePath();
  },
  point: function(e, t) {
    e = +e, t = +t, this._point ? this._context.lineTo(e, t) : (this._point = 1, this._context.moveTo(e, t));
  }
};
function zU(e) {
  return new IF(e);
}
function G$(e) {
  return e < 0 ? -1 : 1;
}
function H$(e, t, i) {
  var n = e._x1 - e._x0, a = t - e._x1, o = (e._y1 - e._y0) / (n || a < 0 && -0), r = (i - e._y1) / (a || n < 0 && -0), s = (o * a + r * n) / (n + a);
  return (G$(o) + G$(r)) * Math.min(Math.abs(o), Math.abs(r), 0.5 * Math.abs(s)) || 0;
}
function Y$(e, t) {
  var i = e._x1 - e._x0;
  return i ? (3 * (e._y1 - e._y0) / i - t) / 2 : t;
}
function Im(e, t, i) {
  var n = e._x0, a = e._y0, o = e._x1, r = e._y1, s = (o - n) / 3;
  e._context.bezierCurveTo(n + s, a + s * t, o - s, r - s * i, o, r);
}
function Oh(e) {
  this._context = e;
}
Oh.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:
        Im(this, this._t0, Y$(this, this._t0));
        break;
    }
    (this._line || this._line !== 0 && this._point === 1) && this._context.closePath(), this._line = 1 - this._line;
  },
  point: function(e, t) {
    var i = NaN;
    if (e = +e, t = +t, !(e === this._x1 && t === this._y1)) {
      switch (this._point) {
        case 0:
          this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
          break;
        case 1:
          this._point = 2;
          break;
        case 2:
          this._point = 3, Im(this, Y$(this, i = H$(this, e, t)), i);
          break;
        default:
          Im(this, this._t0, i = H$(this, e, t));
          break;
      }
      this._x0 = this._x1, this._x1 = e, this._y0 = this._y1, this._y1 = t, this._t0 = i;
    }
  }
};
function jF(e) {
  this._context = new zF(e);
}
(jF.prototype = Object.create(Oh.prototype)).point = function(e, t) {
  Oh.prototype.point.call(this, t, e);
};
function zF(e) {
  this._context = e;
}
zF.prototype = {
  moveTo: function(e, t) {
    this._context.moveTo(t, e);
  },
  closePath: function() {
    this._context.closePath();
  },
  lineTo: function(e, t) {
    this._context.lineTo(t, e);
  },
  bezierCurveTo: function(e, t, i, n, a, o) {
    this._context.bezierCurveTo(t, e, n, i, o, a);
  }
};
function PU(e) {
  return new Oh(e);
}
function NU(e) {
  return new jF(e);
}
function PF(e) {
  this._context = e;
}
PF.prototype = {
  areaStart: function() {
    this._line = 0;
  },
  areaEnd: function() {
    this._line = NaN;
  },
  lineStart: function() {
    this._x = [], this._y = [];
  },
  lineEnd: function() {
    var e = this._x, t = this._y, i = e.length;
    if (i)
      if (this._line ? this._context.lineTo(e[0], t[0]) : this._context.moveTo(e[0], t[0]), i === 2)
        this._context.lineTo(e[1], t[1]);
      else
        for (var n = X$(e), a = X$(t), o = 0, r = 1; r < i; ++o, ++r)
          this._context.bezierCurveTo(n[0][o], a[0][o], n[1][o], a[1][o], e[r], t[r]);
    (this._line || this._line !== 0 && i === 1) && this._context.closePath(), this._line = 1 - this._line, this._x = this._y = null;
  },
  point: function(e, t) {
    this._x.push(+e), this._y.push(+t);
  }
};
function X$(e) {
  var t, i = e.length - 1, n, a = new Array(i), o = new Array(i), r = new Array(i);
  for (a[0] = 0, o[0] = 2, r[0] = e[0] + 2 * e[1], t = 1; t < i - 1; ++t) a[t] = 1, o[t] = 4, r[t] = 4 * e[t] + 2 * e[t + 1];
  for (a[i - 1] = 2, o[i - 1] = 7, r[i - 1] = 8 * e[i - 1] + e[i], t = 1; t < i; ++t) n = a[t] / o[t - 1], o[t] -= n, r[t] -= n * r[t - 1];
  for (a[i - 1] = r[i - 1] / o[i - 1], t = i - 2; t >= 0; --t) a[t] = (r[t] - a[t + 1]) / o[t];
  for (o[i - 1] = (e[i] + a[i - 1]) / 2, t = 0; t < i - 1; ++t) o[t] = 2 * e[t + 1] - a[t + 1];
  return [a, o];
}
function qU(e) {
  return new PF(e);
}
function Mp(e, t) {
  this._context = e, this._t = t;
}
Mp.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(e, t) {
    switch (e = +e, t = +t, this._point) {
      case 0:
        this._point = 1, this._line ? this._context.lineTo(e, t) : this._context.moveTo(e, t);
        break;
      case 1:
        this._point = 2;
      default: {
        if (this._t <= 0)
          this._context.lineTo(this._x, t), this._context.lineTo(e, t);
        else {
          var i = this._x * (1 - this._t) + e * this._t;
          this._context.lineTo(i, this._y), this._context.lineTo(i, t);
        }
        break;
      }
    }
    this._x = e, this._y = t;
  }
};
function LU(e) {
  return new Mp(e, 0.5);
}
function BU(e) {
  return new Mp(e, 0);
}
function UU(e) {
  return new Mp(e, 1);
}
let NF = 0;
function MU() {
  NF = 0;
}
const Eh = "p_";
function r_(e) {
  return e && e.gradient;
}
function qF(e, t, i) {
  const n = e.gradient;
  let a = e.id, o = n === "radial" ? Eh : "";
  return a || (a = e.id = "gradient_" + NF++, n === "radial" ? (e.x1 = kn(e.x1, 0.5), e.y1 = kn(e.y1, 0.5), e.r1 = kn(e.r1, 0), e.x2 = kn(e.x2, 0.5), e.y2 = kn(e.y2, 0.5), e.r2 = kn(e.r2, 0.5), o = Eh) : (e.x1 = kn(e.x1, 0), e.y1 = kn(e.y1, 0), e.x2 = kn(e.x2, 1), e.y2 = kn(e.y2, 0))), t[a] = e, "url(" + (i || "") + "#" + o + a + ")";
}
function kn(e, t) {
  return e ?? t;
}
function LF(e, t) {
  var i = [], n;
  return n = {
    gradient: "linear",
    x1: e ? e[0] : 0,
    y1: e ? e[1] : 0,
    x2: t ? t[0] : 1,
    y2: t ? t[1] : 0,
    stops: i,
    stop: function(a, o) {
      return i.push({
        offset: a,
        color: o
      }), n;
    }
  };
}
const J$ = {
  basis: {
    curve: OU
  },
  "basis-closed": {
    curve: EU
  },
  "basis-open": {
    curve: DU
  },
  bundle: {
    curve: SU,
    tension: "beta",
    value: 0.85
  },
  cardinal: {
    curve: FU,
    tension: "tension",
    value: 0
  },
  "cardinal-open": {
    curve: CU,
    tension: "tension",
    value: 0
  },
  "cardinal-closed": {
    curve: TU,
    tension: "tension",
    value: 0
  },
  "catmull-rom": {
    curve: RU,
    tension: "alpha",
    value: 0.5
  },
  "catmull-rom-closed": {
    curve: IU,
    tension: "alpha",
    value: 0.5
  },
  "catmull-rom-open": {
    curve: jU,
    tension: "alpha",
    value: 0.5
  },
  linear: {
    curve: t_
  },
  "linear-closed": {
    curve: zU
  },
  monotone: {
    horizontal: NU,
    vertical: PU
  },
  natural: {
    curve: qU
  },
  step: {
    curve: LU
  },
  "step-after": {
    curve: UU
  },
  "step-before": {
    curve: BU
  }
};
function s_(e, t, i) {
  var n = _a(J$, e) && J$[e], a = null;
  return n && (a = n.curve || n[t || "vertical"], n.tension && i != null && (a = a[n.tension](i))), a;
}
const VU = {
  m: 2,
  l: 2,
  h: 1,
  v: 1,
  z: 0,
  c: 6,
  s: 4,
  q: 4,
  t: 2,
  a: 7
}, WU = /[mlhvzcsqta]([^mlhvzcsqta]+|$)/gi, GU = /^[+-]?(([0-9]*\.[0-9]+)|([0-9]+\.)|([0-9]+))([eE][+-]?[0-9]+)?/, HU = /^((\s+,?\s*)|(,\s*))/, YU = /^[01]/;
function Ks(e) {
  const t = [];
  return (e.match(WU) || []).forEach((n) => {
    let a = n[0];
    const o = a.toLowerCase(), r = VU[o], s = XU(o, r, n.slice(1).trim()), l = s.length;
    if (l < r || l && l % r !== 0)
      throw Error("Invalid SVG path, incorrect parameter count");
    if (t.push([a, ...s.slice(0, r)]), l !== r) {
      o === "m" && (a = a === "M" ? "L" : "l");
      for (let d = r; d < l; d += r)
        t.push([a, ...s.slice(d, d + r)]);
    }
  }), t;
}
function XU(e, t, i) {
  const n = [];
  for (let a = 0; t && a < i.length; )
    for (let o = 0; o < t; ++o) {
      const r = e === "a" && (o === 3 || o === 4) ? YU : GU, s = i.slice(a).match(r);
      if (s === null)
        throw Error("Invalid SVG path, incorrect parameter type");
      a += s[0].length, n.push(+s[0]);
      const l = i.slice(a).match(HU);
      l !== null && (a += l[0].length);
    }
  return n;
}
const $o = Math.PI / 180, JU = 1e-14, mr = Math.PI / 2, Fn = Math.PI * 2, xs = Math.sqrt(3) / 2;
var jm = {}, zm = {}, BF = [].join;
function ZU(e, t, i, n, a, o, r, s, l) {
  const d = BF.call(arguments);
  if (jm[d])
    return jm[d];
  const f = r * $o, u = Math.sin(f), c = Math.cos(f);
  i = Math.abs(i), n = Math.abs(n);
  const h = c * (s - e) * 0.5 + u * (l - t) * 0.5, p = c * (l - t) * 0.5 - u * (s - e) * 0.5;
  let g = h * h / (i * i) + p * p / (n * n);
  g > 1 && (g = Math.sqrt(g), i *= g, n *= g);
  const m = c / i, b = u / i, y = -u / n, v = c / n, w = m * s + b * l, x = y * s + v * l, $ = m * e + b * t, _ = y * e + v * t;
  let A = 1 / (($ - w) * ($ - w) + (_ - x) * (_ - x)) - 0.25;
  A < 0 && (A = 0);
  let E = Math.sqrt(A);
  o == a && (E = -E);
  const S = 0.5 * (w + $) - E * (_ - x), z = 0.5 * (x + _) + E * ($ - w), O = Math.atan2(x - z, w - S);
  let j = Math.atan2(_ - z, $ - S) - O;
  j < 0 && o === 1 ? j += Fn : j > 0 && o === 0 && (j -= Fn);
  const F = Math.ceil(Math.abs(j / (mr + 1e-3))), P = [];
  for (let N = 0; N < F; ++N) {
    const L = O + N * j / F, K = O + (N + 1) * j / F;
    P[N] = [S, z, L, K, i, n, u, c];
  }
  return jm[d] = P;
}
function KU(e) {
  const t = BF.call(e);
  if (zm[t])
    return zm[t];
  var i = e[0], n = e[1], a = e[2], o = e[3], r = e[4], s = e[5], l = e[6], d = e[7];
  const f = d * r, u = -l * s, c = l * r, h = d * s, p = Math.cos(a), g = Math.sin(a), m = Math.cos(o), b = Math.sin(o), y = 0.5 * (o - a), v = Math.sin(y * 0.5), w = 8 / 3 * v * v / Math.sin(y), x = i + p - w * g, $ = n + g + w * p, _ = i + m, k = n + b, A = _ + w * b, E = k - w * m;
  return zm[t] = [f * x + u * $, c * x + h * $, f * A + u * E, c * A + h * E, f * _ + u * k, c * _ + h * k];
}
const Ri = ["l", 0, 0, 0, 0, 0, 0, 0];
function QU(e, t, i) {
  const n = Ri[0] = e[0];
  if (n === "a" || n === "A")
    Ri[1] = t * e[1], Ri[2] = i * e[2], Ri[3] = e[3], Ri[4] = e[4], Ri[5] = e[5], Ri[6] = t * e[6], Ri[7] = i * e[7];
  else if (n === "h" || n === "H")
    Ri[1] = t * e[1];
  else if (n === "v" || n === "V")
    Ri[1] = i * e[1];
  else
    for (var a = 1, o = e.length; a < o; ++a)
      Ri[a] = (a % 2 == 1 ? t : i) * e[a];
  return Ri;
}
function gf(e, t, i, n, a, o) {
  var r, s = null, l = 0, d = 0, f = 0, u = 0, c, h, p, g, m = 0, b = 0;
  i == null && (i = 0), n == null && (n = 0), a == null && (a = 1), o == null && (o = a), e.beginPath && e.beginPath();
  for (var y = 0, v = t.length; y < v; ++y) {
    switch (r = t[y], (a !== 1 || o !== 1) && (r = QU(r, a, o)), r[0]) {
      case "l":
        l += r[1], d += r[2], e.lineTo(l + i, d + n);
        break;
      case "L":
        l = r[1], d = r[2], e.lineTo(l + i, d + n);
        break;
      case "h":
        l += r[1], e.lineTo(l + i, d + n);
        break;
      case "H":
        l = r[1], e.lineTo(l + i, d + n);
        break;
      case "v":
        d += r[1], e.lineTo(l + i, d + n);
        break;
      case "V":
        d = r[1], e.lineTo(l + i, d + n);
        break;
      case "m":
        l += r[1], d += r[2], m = l, b = d, e.moveTo(l + i, d + n);
        break;
      case "M":
        l = r[1], d = r[2], m = l, b = d, e.moveTo(l + i, d + n);
        break;
      case "c":
        c = l + r[5], h = d + r[6], f = l + r[3], u = d + r[4], e.bezierCurveTo(
          l + r[1] + i,
          // x1
          d + r[2] + n,
          // y1
          f + i,
          // x2
          u + n,
          // y2
          c + i,
          h + n
        ), l = c, d = h;
        break;
      case "C":
        l = r[5], d = r[6], f = r[3], u = r[4], e.bezierCurveTo(r[1] + i, r[2] + n, f + i, u + n, l + i, d + n);
        break;
      case "s":
        c = l + r[3], h = d + r[4], f = 2 * l - f, u = 2 * d - u, e.bezierCurveTo(f + i, u + n, l + r[1] + i, d + r[2] + n, c + i, h + n), f = l + r[1], u = d + r[2], l = c, d = h;
        break;
      case "S":
        c = r[3], h = r[4], f = 2 * l - f, u = 2 * d - u, e.bezierCurveTo(f + i, u + n, r[1] + i, r[2] + n, c + i, h + n), l = c, d = h, f = r[1], u = r[2];
        break;
      case "q":
        c = l + r[3], h = d + r[4], f = l + r[1], u = d + r[2], e.quadraticCurveTo(f + i, u + n, c + i, h + n), l = c, d = h;
        break;
      case "Q":
        c = r[3], h = r[4], e.quadraticCurveTo(r[1] + i, r[2] + n, c + i, h + n), l = c, d = h, f = r[1], u = r[2];
        break;
      case "t":
        c = l + r[1], h = d + r[2], s[0].match(/[QqTt]/) === null ? (f = l, u = d) : s[0] === "t" ? (f = 2 * l - p, u = 2 * d - g) : s[0] === "q" && (f = 2 * l - f, u = 2 * d - u), p = f, g = u, e.quadraticCurveTo(f + i, u + n, c + i, h + n), l = c, d = h, f = l + r[1], u = d + r[2];
        break;
      case "T":
        c = r[1], h = r[2], f = 2 * l - f, u = 2 * d - u, e.quadraticCurveTo(f + i, u + n, c + i, h + n), l = c, d = h;
        break;
      case "a":
        Z$(e, l + i, d + n, [r[1], r[2], r[3], r[4], r[5], r[6] + l + i, r[7] + d + n]), l += r[6], d += r[7];
        break;
      case "A":
        Z$(e, l + i, d + n, [r[1], r[2], r[3], r[4], r[5], r[6] + i, r[7] + n]), l = r[6], d = r[7];
        break;
      case "z":
      case "Z":
        l = m, d = b, e.closePath();
        break;
    }
    s = r;
  }
}
function Z$(e, t, i, n) {
  const a = ZU(
    n[5],
    // end x
    n[6],
    // end y
    n[0],
    // radius x
    n[1],
    // radius y
    n[3],
    // large flag
    n[4],
    // sweep flag
    n[2],
    // rotation
    t,
    i
  );
  for (let o = 0; o < a.length; ++o) {
    const r = KU(a[o]);
    e.bezierCurveTo(r[0], r[1], r[2], r[3], r[4], r[5]);
  }
}
const K$ = 0.5773502691896257, Q$ = {
  circle: {
    draw: function(e, t) {
      const i = Math.sqrt(t) / 2;
      e.moveTo(i, 0), e.arc(0, 0, i, 0, Fn);
    }
  },
  cross: {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = i / 2.5;
      e.moveTo(-i, -n), e.lineTo(-i, n), e.lineTo(-n, n), e.lineTo(-n, i), e.lineTo(n, i), e.lineTo(n, n), e.lineTo(i, n), e.lineTo(i, -n), e.lineTo(n, -n), e.lineTo(n, -i), e.lineTo(-n, -i), e.lineTo(-n, -n), e.closePath();
    }
  },
  diamond: {
    draw: function(e, t) {
      const i = Math.sqrt(t) / 2;
      e.moveTo(-i, 0), e.lineTo(0, -i), e.lineTo(i, 0), e.lineTo(0, i), e.closePath();
    }
  },
  square: {
    draw: function(e, t) {
      var i = Math.sqrt(t), n = -i / 2;
      e.rect(n, n, i, i);
    }
  },
  arrow: {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = i / 7, a = i / 2.5, o = i / 8;
      e.moveTo(-n, i), e.lineTo(n, i), e.lineTo(n, -o), e.lineTo(a, -o), e.lineTo(0, -i), e.lineTo(-a, -o), e.lineTo(-n, -o), e.closePath();
    }
  },
  wedge: {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = xs * i, a = n - i * K$, o = i / 4;
      e.moveTo(0, -n - a), e.lineTo(-o, n - a), e.lineTo(o, n - a), e.closePath();
    }
  },
  triangle: {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = xs * i, a = n - i * K$;
      e.moveTo(0, -n - a), e.lineTo(-i, n - a), e.lineTo(i, n - a), e.closePath();
    }
  },
  "triangle-up": {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = xs * i;
      e.moveTo(0, -n), e.lineTo(-i, n), e.lineTo(i, n), e.closePath();
    }
  },
  "triangle-down": {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = xs * i;
      e.moveTo(0, n), e.lineTo(-i, -n), e.lineTo(i, -n), e.closePath();
    }
  },
  "triangle-right": {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = xs * i;
      e.moveTo(n, 0), e.lineTo(-n, -i), e.lineTo(-n, i), e.closePath();
    }
  },
  "triangle-left": {
    draw: function(e, t) {
      var i = Math.sqrt(t) / 2, n = xs * i;
      e.moveTo(-n, 0), e.lineTo(n, -i), e.lineTo(n, i), e.closePath();
    }
  },
  stroke: {
    draw: function(e, t) {
      const i = Math.sqrt(t) / 2;
      e.moveTo(-i, 0), e.lineTo(i, 0);
    }
  }
};
function UF(e) {
  return _a(Q$, e) ? Q$[e] : eM(e);
}
var Pm = {};
function eM(e) {
  if (!_a(Pm, e)) {
    const t = Ks(e);
    Pm[e] = {
      draw: function(i, n) {
        gf(i, t, 0, 0, Math.sqrt(n) / 2);
      }
    };
  }
  return Pm[e];
}
const Ya = 0.448084975506;
function tM(e) {
  return e.x;
}
function iM(e) {
  return e.y;
}
function nM(e) {
  return e.width;
}
function aM(e) {
  return e.height;
}
function fa(e) {
  return typeof e == "function" ? e : () => +e;
}
function Gu(e, t, i) {
  return Math.max(t, Math.min(e, i));
}
function MF() {
  var e = tM, t = iM, i = nM, n = aM, a = fa(0), o = a, r = a, s = a, l = null;
  function d(f, u, c) {
    var h, p = u ?? +e.call(this, f), g = c ?? +t.call(this, f), m = +i.call(this, f), b = +n.call(this, f), y = Math.min(m, b) / 2, v = Gu(+a.call(this, f), 0, y), w = Gu(+o.call(this, f), 0, y), x = Gu(+r.call(this, f), 0, y), $ = Gu(+s.call(this, f), 0, y);
    if (l || (l = h = Lp()), v <= 0 && w <= 0 && x <= 0 && $ <= 0)
      l.rect(p, g, m, b);
    else {
      var _ = p + m, k = g + b;
      l.moveTo(p + v, g), l.lineTo(_ - w, g), l.bezierCurveTo(_ - Ya * w, g, _, g + Ya * w, _, g + w), l.lineTo(_, k - $), l.bezierCurveTo(_, k - Ya * $, _ - Ya * $, k, _ - $, k), l.lineTo(p + x, k), l.bezierCurveTo(p + Ya * x, k, p, k - Ya * x, p, k - x), l.lineTo(p, g + v), l.bezierCurveTo(p, g + Ya * v, p + Ya * v, g, p + v, g), l.closePath();
    }
    if (h)
      return l = null, h + "" || null;
  }
  return d.x = function(f) {
    return arguments.length ? (e = fa(f), d) : e;
  }, d.y = function(f) {
    return arguments.length ? (t = fa(f), d) : t;
  }, d.width = function(f) {
    return arguments.length ? (i = fa(f), d) : i;
  }, d.height = function(f) {
    return arguments.length ? (n = fa(f), d) : n;
  }, d.cornerRadius = function(f, u, c, h) {
    return arguments.length ? (a = fa(f), o = u != null ? fa(u) : a, s = c != null ? fa(c) : a, r = h != null ? fa(h) : o, d) : a;
  }, d.context = function(f) {
    return arguments.length ? (l = f ?? null, d) : l;
  }, d;
}
function VF() {
  var e, t, i, n, a = null, o, r, s, l;
  function d(u, c, h) {
    const p = h / 2;
    if (o) {
      var g = s - c, m = u - r;
      if (g || m) {
        var b = Math.hypot(g, m), y = (g /= b) * l, v = (m /= b) * l, w = Math.atan2(m, g);
        a.moveTo(r - y, s - v), a.lineTo(u - g * p, c - m * p), a.arc(u, c, p, w - Math.PI, w), a.lineTo(r + y, s + v), a.arc(r, s, l, w, w + Math.PI);
      } else
        a.arc(u, c, p, 0, Fn);
      a.closePath();
    } else
      o = 1;
    r = u, s = c, l = p;
  }
  function f(u) {
    var c, h = u.length, p, g = !1, m;
    for (a == null && (a = m = Lp()), c = 0; c <= h; ++c)
      !(c < h && n(p = u[c], c, u)) === g && (g = !g) && (o = 0), g && d(+e(p, c, u), +t(p, c, u), +i(p, c, u));
    if (m)
      return a = null, m + "" || null;
  }
  return f.x = function(u) {
    return arguments.length ? (e = u, f) : e;
  }, f.y = function(u) {
    return arguments.length ? (t = u, f) : t;
  }, f.size = function(u) {
    return arguments.length ? (i = u, f) : i;
  }, f.defined = function(u) {
    return arguments.length ? (n = u, f) : n;
  }, f.context = function(u) {
    return arguments.length ? (u == null ? a = null : a = u, f) : a;
  }, f;
}
function Jf(e, t) {
  return e ?? t;
}
const Zf = (e) => e.x || 0, Kf = (e) => e.y || 0, oM = (e) => e.width || 0, rM = (e) => e.height || 0, sM = (e) => (e.x || 0) + (e.width || 0), lM = (e) => (e.y || 0) + (e.height || 0), dM = (e) => e.startAngle || 0, fM = (e) => e.endAngle || 0, uM = (e) => e.padAngle || 0, cM = (e) => e.innerRadius || 0, hM = (e) => e.outerRadius || 0, pM = (e) => e.cornerRadius || 0, gM = (e) => Jf(e.cornerRadiusTopLeft, e.cornerRadius) || 0, mM = (e) => Jf(e.cornerRadiusTopRight, e.cornerRadius) || 0, bM = (e) => Jf(e.cornerRadiusBottomRight, e.cornerRadius) || 0, yM = (e) => Jf(e.cornerRadiusBottomLeft, e.cornerRadius) || 0, vM = (e) => Jf(e.size, 64), _M = (e) => e.size || 1, Vp = (e) => e.defined !== !1, xM = (e) => UF(e.shape || "circle"), wM = $U().startAngle(dM).endAngle(fM).padAngle(uM).innerRadius(cM).outerRadius(hM).cornerRadius(pM), $M = EF().x(Zf).y1(Kf).y0(lM).defined(Vp), kM = EF().y(Kf).x1(Zf).x0(sM).defined(Vp), AM = OF().x(Zf).y(Kf).defined(Vp), OM = MF().x(Zf).y(Kf).width(oM).height(rM).cornerRadius(gM, mM, bM, yM), EM = AU().type(xM).size(vM), DM = VF().x(Zf).y(Kf).defined(Vp).size(_M);
function l_(e) {
  return e.cornerRadius || e.cornerRadiusTopLeft || e.cornerRadiusTopRight || e.cornerRadiusBottomRight || e.cornerRadiusBottomLeft;
}
function SM(e, t) {
  return wM.context(e)(t);
}
function FM(e, t) {
  const i = t[0], n = i.interpolate || "linear";
  return (i.orient === "horizontal" ? kM : $M).curve(s_(n, i.orient, i.tension)).context(e)(t);
}
function TM(e, t) {
  const i = t[0], n = i.interpolate || "linear";
  return AM.curve(s_(n, i.orient, i.tension)).context(e)(t);
}
function wl(e, t, i, n) {
  return OM.context(e)(t, i, n);
}
function CM(e, t) {
  return (t.mark.shape || t.shape).context(e)(t);
}
function RM(e, t) {
  return EM.context(e)(t);
}
function IM(e, t) {
  return DM.context(e)(t);
}
var WF = 1;
function GF() {
  WF = 1;
}
function d_(e, t, i) {
  var n = t.clip, a = e._defs, o = t.clip_id || (t.clip_id = "clip" + WF++), r = a.clipping[o] || (a.clipping[o] = {
    id: o
  });
  return Q0(n) ? r.path = n(null) : l_(i) ? r.path = wl(null, i, 0, 0) : (r.width = i.width || 0, r.height = i.height || 0), "url(#" + o + ")";
}
function it(e) {
  this.clear(), e && this.union(e);
}
it.prototype = {
  clone() {
    return new it(this);
  },
  clear() {
    return this.x1 = +Number.MAX_VALUE, this.y1 = +Number.MAX_VALUE, this.x2 = -Number.MAX_VALUE, this.y2 = -Number.MAX_VALUE, this;
  },
  empty() {
    return this.x1 === +Number.MAX_VALUE && this.y1 === +Number.MAX_VALUE && this.x2 === -Number.MAX_VALUE && this.y2 === -Number.MAX_VALUE;
  },
  equals(e) {
    return this.x1 === e.x1 && this.y1 === e.y1 && this.x2 === e.x2 && this.y2 === e.y2;
  },
  set(e, t, i, n) {
    return i < e ? (this.x2 = e, this.x1 = i) : (this.x1 = e, this.x2 = i), n < t ? (this.y2 = t, this.y1 = n) : (this.y1 = t, this.y2 = n), this;
  },
  add(e, t) {
    return e < this.x1 && (this.x1 = e), t < this.y1 && (this.y1 = t), e > this.x2 && (this.x2 = e), t > this.y2 && (this.y2 = t), this;
  },
  expand(e) {
    return this.x1 -= e, this.y1 -= e, this.x2 += e, this.y2 += e, this;
  },
  round() {
    return this.x1 = Math.floor(this.x1), this.y1 = Math.floor(this.y1), this.x2 = Math.ceil(this.x2), this.y2 = Math.ceil(this.y2), this;
  },
  scale(e) {
    return this.x1 *= e, this.y1 *= e, this.x2 *= e, this.y2 *= e, this;
  },
  translate(e, t) {
    return this.x1 += e, this.x2 += e, this.y1 += t, this.y2 += t, this;
  },
  rotate(e, t, i) {
    const n = this.rotatedPoints(e, t, i);
    return this.clear().add(n[0], n[1]).add(n[2], n[3]).add(n[4], n[5]).add(n[6], n[7]);
  },
  rotatedPoints(e, t, i) {
    var {
      x1: n,
      y1: a,
      x2: o,
      y2: r
    } = this, s = Math.cos(e), l = Math.sin(e), d = t - t * s + i * l, f = i - t * l - i * s;
    return [s * n - l * a + d, l * n + s * a + f, s * n - l * r + d, l * n + s * r + f, s * o - l * a + d, l * o + s * a + f, s * o - l * r + d, l * o + s * r + f];
  },
  union(e) {
    return e.x1 < this.x1 && (this.x1 = e.x1), e.y1 < this.y1 && (this.y1 = e.y1), e.x2 > this.x2 && (this.x2 = e.x2), e.y2 > this.y2 && (this.y2 = e.y2), this;
  },
  intersect(e) {
    return e.x1 > this.x1 && (this.x1 = e.x1), e.y1 > this.y1 && (this.y1 = e.y1), e.x2 < this.x2 && (this.x2 = e.x2), e.y2 < this.y2 && (this.y2 = e.y2), this;
  },
  encloses(e) {
    return e && this.x1 <= e.x1 && this.x2 >= e.x2 && this.y1 <= e.y1 && this.y2 >= e.y2;
  },
  alignsWith(e) {
    return e && (this.x1 == e.x1 || this.x2 == e.x2 || this.y1 == e.y1 || this.y2 == e.y2);
  },
  intersects(e) {
    return e && !(this.x2 < e.x1 || this.x1 > e.x2 || this.y2 < e.y1 || this.y1 > e.y2);
  },
  contains(e, t) {
    return !(e < this.x1 || e > this.x2 || t < this.y1 || t > this.y2);
  },
  width() {
    return this.x2 - this.x1;
  },
  height() {
    return this.y2 - this.y1;
  }
};
function Wp(e) {
  this.mark = e, this.bounds = this.bounds || new it();
}
function Gp(e) {
  Wp.call(this, e), this.items = this.items || [];
}
dU(Gp, Wp);
class HF {
  constructor(t) {
    this._pending = 0, this._loader = t || Rp();
  }
  pending() {
    return this._pending;
  }
  sanitizeURL(t) {
    const i = this;
    return ek(i), i._loader.sanitize(t, {
      context: "href"
    }).then((n) => (od(i), n)).catch(() => (od(i), null));
  }
  loadImage(t) {
    const i = this, n = T3();
    return ek(i), i._loader.sanitize(t, {
      context: "image"
    }).then((a) => {
      const o = a.href;
      if (!o || !n) throw {
        url: o
      };
      const r = new n(), s = _a(a, "crossOrigin") ? a.crossOrigin : "anonymous";
      return s != null && (r.crossOrigin = s), r.onload = () => od(i), r.onerror = () => od(i), r.src = o, r;
    }).catch((a) => (od(i), {
      complete: !1,
      width: 0,
      height: 0,
      src: a && a.url || ""
    }));
  }
  ready() {
    const t = this;
    return new Promise((i) => {
      function n(a) {
        t.pending() ? setTimeout(() => {
          n(!0);
        }, 10) : i(a);
      }
      n(!1);
    });
  }
}
function ek(e) {
  e._pending += 1;
}
function od(e) {
  e._pending -= 1;
}
function Na(e, t, i) {
  if (t.stroke && t.opacity !== 0 && t.strokeOpacity !== 0) {
    const n = t.strokeWidth != null ? +t.strokeWidth : 1;
    e.expand(n + (i ? jM(t, n) : 0));
  }
  return e;
}
function jM(e, t) {
  return e.strokeJoin && e.strokeJoin !== "miter" ? 0 : t;
}
const zM = Fn - 1e-8;
let Hp, Ec, Dc, xr, ky, Sc, Ay, Oy;
const no = (e, t) => Hp.add(e, t), Fc = (e, t) => no(Ec = e, Dc = t), tk = (e) => no(e, Hp.y1), ik = (e) => no(Hp.x1, e), br = (e, t) => ky * e + Ay * t, yr = (e, t) => Sc * e + Oy * t, Nm = (e, t) => no(br(e, t), yr(e, t)), qm = (e, t) => Fc(br(e, t), yr(e, t));
function Qf(e, t) {
  return Hp = e, t ? (xr = t * $o, ky = Oy = Math.cos(xr), Sc = Math.sin(xr), Ay = -Sc) : (ky = Oy = 1, xr = Sc = Ay = 0), PM;
}
const PM = {
  beginPath() {
  },
  closePath() {
  },
  moveTo: qm,
  lineTo: qm,
  rect(e, t, i, n) {
    xr ? (Nm(e + i, t), Nm(e + i, t + n), Nm(e, t + n), qm(e, t)) : (no(e + i, t + n), Fc(e, t));
  },
  quadraticCurveTo(e, t, i, n) {
    const a = br(e, t), o = yr(e, t), r = br(i, n), s = yr(i, n);
    nk(Ec, a, r, tk), nk(Dc, o, s, ik), Fc(r, s);
  },
  bezierCurveTo(e, t, i, n, a, o) {
    const r = br(e, t), s = yr(e, t), l = br(i, n), d = yr(i, n), f = br(a, o), u = yr(a, o);
    ak(Ec, r, l, f, tk), ak(Dc, s, d, u, ik), Fc(f, u);
  },
  arc(e, t, i, n, a, o) {
    if (n += xr, a += xr, Ec = i * Math.cos(a) + e, Dc = i * Math.sin(a) + t, Math.abs(a - n) > zM)
      no(e - i, t - i), no(e + i, t + i);
    else {
      const r = (d) => no(i * Math.cos(d) + e, i * Math.sin(d) + t);
      let s, l;
      if (r(n), r(a), a !== n)
        if (n = n % Fn, n < 0 && (n += Fn), a = a % Fn, a < 0 && (a += Fn), a < n && (o = !o, s = n, n = a, a = s), o)
          for (a -= Fn, s = n - n % mr, l = 0; l < 4 && s > a; ++l, s -= mr) r(s);
        else
          for (s = n - n % mr + mr, l = 0; l < 4 && s < a; ++l, s = s + mr) r(s);
    }
  }
};
function nk(e, t, i, n) {
  const a = (e - t) / (e + i - 2 * t);
  0 < a && a < 1 && n(e + (t - e) * a);
}
function ak(e, t, i, n, a) {
  const o = n - e + 3 * t - 3 * i, r = e + i - 2 * t, s = e - t;
  let l = 0, d = 0, f;
  Math.abs(o) > JU ? (f = r * r + s * o, f >= 0 && (f = Math.sqrt(f), l = (-r + f) / o, d = (-r - f) / o)) : l = 0.5 * s / r, 0 < l && l < 1 && a(ok(l, e, t, i, n)), 0 < d && d < 1 && a(ok(d, e, t, i, n));
}
function ok(e, t, i, n, a) {
  const o = 1 - e, r = o * o, s = e * e;
  return r * o * t + 3 * r * e * i + 3 * o * s * n + s * e * a;
}
var bo = (bo = po(1, 1)) ? bo.getContext("2d") : null;
const Ey = new it();
function f_(e) {
  return function(t, i) {
    if (!bo) return !0;
    e(bo, t), Ey.clear().union(t.bounds).intersect(i).round();
    const {
      x1: n,
      y1: a,
      x2: o,
      y2: r
    } = Ey;
    for (let s = a; s <= r; ++s)
      for (let l = n; l <= o; ++l)
        if (bo.isPointInPath(l, s))
          return !0;
    return !1;
  };
}
function u_(e, t) {
  return t.contains(e.x || 0, e.y || 0);
}
function YF(e, t) {
  const i = e.x || 0, n = e.y || 0, a = e.width || 0, o = e.height || 0;
  return t.intersects(Ey.set(i, n, i + a, n + o));
}
function XF(e, t) {
  const i = e.x || 0, n = e.y || 0, a = e.x2 != null ? e.x2 : i, o = e.y2 != null ? e.y2 : n;
  return Rs(t, i, n, a, o);
}
function Rs(e, t, i, n, a) {
  const {
    x1: o,
    y1: r,
    x2: s,
    y2: l
  } = e, d = n - t, f = a - i;
  let u = 0, c = 1, h, p, g, m;
  for (m = 0; m < 4; ++m) {
    if (m === 0 && (h = -d, p = -(o - t)), m === 1 && (h = d, p = s - t), m === 2 && (h = -f, p = -(r - i)), m === 3 && (h = f, p = l - i), Math.abs(h) < 1e-10 && p < 0) return !1;
    if (g = p / h, h < 0) {
      if (g > c) return !1;
      g > u && (u = g);
    } else if (h > 0) {
      if (g < u) return !1;
      g < c && (c = g);
    }
  }
  return !0;
}
function Qs(e, t) {
  e.globalCompositeOperation = t.blend || "source-over";
}
function Xi(e, t) {
  return e ?? t;
}
function rk(e, t) {
  const i = t.length;
  for (let n = 0; n < i; ++n)
    e.addColorStop(t[n].offset, t[n].color);
  return e;
}
function NM(e, t, i) {
  const n = i.width(), a = i.height();
  let o;
  if (t.gradient === "radial")
    o = e.createRadialGradient(i.x1 + Xi(t.x1, 0.5) * n, i.y1 + Xi(t.y1, 0.5) * a, Math.max(n, a) * Xi(t.r1, 0), i.x1 + Xi(t.x2, 0.5) * n, i.y1 + Xi(t.y2, 0.5) * a, Math.max(n, a) * Xi(t.r2, 0.5));
  else {
    const r = Xi(t.x1, 0), s = Xi(t.y1, 0), l = Xi(t.x2, 1), d = Xi(t.y2, 0);
    if (r === l || s === d || n === a)
      o = e.createLinearGradient(i.x1 + r * n, i.y1 + s * a, i.x1 + l * n, i.y1 + d * a);
    else {
      const f = po(Math.ceil(n), Math.ceil(a)), u = f.getContext("2d");
      return u.scale(n, a), u.fillStyle = rk(u.createLinearGradient(r, s, l, d), t.stops), u.fillRect(0, 0, n, a), e.createPattern(f, "no-repeat");
    }
  }
  return rk(o, t.stops);
}
function JF(e, t, i) {
  return r_(i) ? NM(e, i, t.bounds) : i;
}
function Dh(e, t, i) {
  return i *= t.fillOpacity == null ? 1 : t.fillOpacity, i > 0 ? (e.globalAlpha = i, e.fillStyle = JF(e, t, t.fill), !0) : !1;
}
var qM = [];
function el(e, t, i) {
  var n = (n = t.strokeWidth) != null ? n : 1;
  return n <= 0 ? !1 : (i *= t.strokeOpacity == null ? 1 : t.strokeOpacity, i > 0 ? (e.globalAlpha = i, e.strokeStyle = JF(e, t, t.stroke), e.lineWidth = n, e.lineCap = t.strokeCap || "butt", e.lineJoin = t.strokeJoin || "miter", e.miterLimit = t.strokeMiterLimit || 10, e.setLineDash && (e.setLineDash(t.strokeDash || qM), e.lineDashOffset = t.strokeDashOffset || 0), !0) : !1);
}
function LM(e, t) {
  return e.zindex - t.zindex || e.index - t.index;
}
function c_(e) {
  if (!e.zdirty) return e.zitems;
  var t = e.items, i = [], n, a, o;
  for (a = 0, o = t.length; a < o; ++a)
    n = t[a], n.index = a, n.zindex && i.push(n);
  return e.zdirty = !1, e.zitems = i.sort(LM);
}
function un(e, t) {
  var i = e.items, n, a;
  if (!i || !i.length) return;
  const o = c_(e);
  if (o && o.length) {
    for (n = 0, a = i.length; n < a; ++n)
      i[n].zindex || t(i[n]);
    i = o;
  }
  for (n = 0, a = i.length; n < a; ++n)
    t(i[n]);
}
function Sh(e, t) {
  var i = e.items, n, a;
  if (!i || !i.length) return null;
  const o = c_(e);
  for (o && o.length && (i = o), a = i.length; --a >= 0; )
    if (n = t(i[a])) return n;
  if (i === o) {
    for (i = e.items, a = i.length; --a >= 0; )
      if (!i[a].zindex && (n = t(i[a])))
        return n;
  }
  return null;
}
function h_(e) {
  return function(t, i, n) {
    un(i, (a) => {
      (!n || n.intersects(a.bounds)) && ZF(e, t, a, a);
    });
  };
}
function BM(e) {
  return function(t, i, n) {
    i.items.length && (!n || n.intersects(i.bounds)) && ZF(e, t, i.items[0], i.items);
  };
}
function ZF(e, t, i, n) {
  var a = i.opacity == null ? 1 : i.opacity;
  a !== 0 && (e(t, n) || (Qs(t, i), i.fill && Dh(t, i, a) && t.fill(), i.stroke && el(t, i, a) && t.stroke()));
}
function Yp(e) {
  return e = e || mF, function(t, i, n, a, o, r) {
    return n *= t.pixelRatio, a *= t.pixelRatio, Sh(i, (s) => {
      const l = s.bounds;
      if (!(l && !l.contains(o, r) || !l) && e(t, s, n, a, o, r))
        return s;
    });
  };
}
function eu(e, t) {
  return function(i, n, a, o) {
    var r = Array.isArray(n) ? n[0] : n, s = t ?? r.fill, l = r.stroke && i.isPointInStroke, d, f;
    return l && (d = r.strokeWidth, f = r.strokeCap, i.lineWidth = d ?? 1, i.lineCap = f ?? "butt"), e(i, n) ? !1 : s && i.isPointInPath(a, o) || l && i.isPointInStroke(a, o);
  };
}
function p_(e) {
  return Yp(eu(e));
}
function Or(e, t) {
  return "translate(" + e + "," + t + ")";
}
function g_(e) {
  return "rotate(" + e + ")";
}
function UM(e, t) {
  return "scale(" + e + "," + t + ")";
}
function KF(e) {
  return Or(e.x || 0, e.y || 0);
}
function MM(e) {
  return Or(e.x || 0, e.y || 0) + (e.angle ? " " + g_(e.angle) : "");
}
function VM(e) {
  return Or(e.x || 0, e.y || 0) + (e.angle ? " " + g_(e.angle) : "") + (e.scaleX || e.scaleY ? " " + UM(e.scaleX || 1, e.scaleY || 1) : "");
}
function m_(e, t, i) {
  function n(r, s) {
    r("transform", MM(s)), r("d", t(null, s));
  }
  function a(r, s) {
    return t(Qf(r, s.angle), s), Na(r, s).translate(s.x || 0, s.y || 0);
  }
  function o(r, s) {
    var l = s.x || 0, d = s.y || 0, f = s.angle || 0;
    r.translate(l, d), f && r.rotate(f *= $o), r.beginPath(), t(r, s), f && r.rotate(-f), r.translate(-l, -d);
  }
  return {
    type: e,
    tag: "path",
    nested: !1,
    attr: n,
    bound: a,
    draw: h_(o),
    pick: p_(o),
    isect: i || f_(o)
  };
}
var WM = m_("arc", SM);
function GM(e, t) {
  for (var i = e[0].orient === "horizontal" ? t[1] : t[0], n = e[0].orient === "horizontal" ? "y" : "x", a = e.length, o = 1 / 0, r, s; --a >= 0; )
    e[a].defined !== !1 && (s = Math.abs(e[a][n] - i), s < o && (o = s, r = e[a]));
  return r;
}
function HM(e, t) {
  for (var i = Math.pow(e[0].strokeWidth || 1, 2), n = e.length, a, o, r; --n >= 0; )
    if (e[n].defined !== !1 && (a = e[n].x - t[0], o = e[n].y - t[1], r = a * a + o * o, r < i))
      return e[n];
  return null;
}
function YM(e, t) {
  for (var i = e.length, n, a, o; --i >= 0; )
    if (e[i].defined !== !1 && (n = e[i].x - t[0], a = e[i].y - t[1], o = n * n + a * a, n = e[i].size || 1, o < n * n))
      return e[i];
  return null;
}
function b_(e, t, i) {
  function n(l, d) {
    var f = d.mark.items;
    f.length && l("d", t(null, f));
  }
  function a(l, d) {
    var f = d.items;
    return f.length === 0 ? l : (t(Qf(l), f), Na(l, f[0]));
  }
  function o(l, d) {
    l.beginPath(), t(l, d);
  }
  const r = eu(o);
  function s(l, d, f, u, c, h) {
    var p = d.items, g = d.bounds;
    return !p || !p.length || g && !g.contains(c, h) ? null : (f *= l.pixelRatio, u *= l.pixelRatio, r(l, p, f, u) ? p[0] : null);
  }
  return {
    type: e,
    tag: "path",
    nested: !0,
    attr: n,
    bound: a,
    draw: BM(o),
    pick: s,
    isect: u_,
    tip: i
  };
}
var XM = b_("area", FM, GM);
function JM(e, t) {
  var i = t.clip;
  e.save(), Q0(i) ? (e.beginPath(), i(e), e.clip()) : QF(e, t.group);
}
function QF(e, t) {
  e.beginPath(), l_(t) ? wl(e, t, 0, 0) : e.rect(0, 0, t.width || 0, t.height || 0), e.clip();
}
function eT(e) {
  const t = Xi(e.strokeWidth, 1);
  return e.strokeOffset != null ? e.strokeOffset : e.stroke && t > 0.5 && t < 1.5 ? 0.5 - Math.abs(t - 1) : 0;
}
function ZM(e, t) {
  e("transform", KF(t));
}
function tT(e, t) {
  const i = eT(t);
  e("d", wl(null, t, i, i));
}
function KM(e, t) {
  e("class", "background"), e("aria-hidden", !0), tT(e, t);
}
function QM(e, t) {
  e("class", "foreground"), e("aria-hidden", !0), t.strokeForeground ? tT(e, t) : e("d", "");
}
function e7(e, t, i) {
  const n = t.clip ? d_(i, t, t) : null;
  e("clip-path", n);
}
function t7(e, t) {
  if (!t.clip && t.items) {
    const i = t.items, n = i.length;
    for (let a = 0; a < n; ++a)
      e.union(i[a].bounds);
  }
  return (t.clip || t.width || t.height) && !t.noBound && e.add(0, 0).add(t.width || 0, t.height || 0), Na(e, t), e.translate(t.x || 0, t.y || 0);
}
function mf(e, t, i, n) {
  const a = eT(t);
  e.beginPath(), wl(e, t, (i || 0) + a, (n || 0) + a);
}
const i7 = eu(mf), n7 = eu(mf, !1), a7 = eu(mf, !0);
function o7(e, t, i, n) {
  un(t, (a) => {
    const o = a.x || 0, r = a.y || 0, s = a.strokeForeground, l = a.opacity == null ? 1 : a.opacity;
    (a.stroke || a.fill) && l && (mf(e, a, o, r), Qs(e, a), a.fill && Dh(e, a, l) && e.fill(), a.stroke && !s && el(e, a, l) && e.stroke()), e.save(), e.translate(o, r), a.clip && QF(e, a), i && i.translate(-o, -r), un(a, (d) => {
      (d.marktype === "group" || n == null || n.includes(d.marktype)) && this.draw(e, d, i, n);
    }), i && i.translate(o, r), e.restore(), s && a.stroke && l && (mf(e, a, o, r), Qs(e, a), el(e, a, l) && e.stroke());
  });
}
function r7(e, t, i, n, a, o) {
  if (t.bounds && !t.bounds.contains(a, o) || !t.items)
    return null;
  const r = i * e.pixelRatio, s = n * e.pixelRatio;
  return Sh(t, (l) => {
    let d, f, u;
    const c = l.bounds;
    if (c && !c.contains(a, o)) return;
    f = l.x || 0, u = l.y || 0;
    const h = f + (l.width || 0), p = u + (l.height || 0), g = l.clip;
    if (g && (a < f || a > h || o < u || o > p)) return;
    if (e.save(), e.translate(f, u), f = a - f, u = o - u, g && l_(l) && !a7(e, l, r, s))
      return e.restore(), null;
    const m = l.strokeForeground, b = t.interactive !== !1;
    return b && m && l.stroke && n7(e, l, r, s) ? (e.restore(), l) : (d = Sh(l, (y) => s7(y, f, u) ? this.pick(y, i, n, f, u) : null), !d && b && (l.fill || !m && l.stroke) && i7(e, l, r, s) && (d = l), e.restore(), d || null);
  });
}
function s7(e, t, i) {
  return (e.interactive !== !1 || e.marktype === "group") && e.bounds && e.bounds.contains(t, i);
}
var l7 = {
  type: "group",
  tag: "g",
  nested: !1,
  attr: ZM,
  bound: t7,
  draw: o7,
  pick: r7,
  isect: YF,
  content: e7,
  background: KM,
  foreground: QM
}, bf = {
  xmlns: "http://www.w3.org/2000/svg",
  "xmlns:xlink": "http://www.w3.org/1999/xlink",
  version: "1.1"
};
function y_(e, t) {
  var i = e.image;
  return (!i || e.url && e.url !== i.url) && (i = {
    complete: !1,
    width: 0,
    height: 0
  }, t.loadImage(e.url).then((n) => {
    e.image = n, e.image.url = e.url;
  })), i;
}
function v_(e, t) {
  return e.width != null ? e.width : !t || !t.width ? 0 : e.aspect !== !1 && e.height ? e.height * t.width / t.height : t.width;
}
function __(e, t) {
  return e.height != null ? e.height : !t || !t.height ? 0 : e.aspect !== !1 && e.width ? e.width * t.height / t.width : t.height;
}
function Xp(e, t) {
  return e === "center" ? t / 2 : e === "right" ? t : 0;
}
function Jp(e, t) {
  return e === "middle" ? t / 2 : e === "bottom" ? t : 0;
}
function d7(e, t, i) {
  const n = y_(t, i), a = v_(t, n), o = __(t, n), r = (t.x || 0) - Xp(t.align, a), s = (t.y || 0) - Jp(t.baseline, o), l = !n.src && n.toDataURL ? n.toDataURL() : n.src || "";
  e("href", l, bf["xmlns:xlink"], "xlink:href"), e("transform", Or(r, s)), e("width", a), e("height", o), e("preserveAspectRatio", t.aspect === !1 ? "none" : "xMidYMid");
}
function f7(e, t) {
  const i = t.image, n = v_(t, i), a = __(t, i), o = (t.x || 0) - Xp(t.align, n), r = (t.y || 0) - Jp(t.baseline, a);
  return e.set(o, r, o + n, r + a);
}
function u7(e, t, i) {
  un(t, (n) => {
    if (i && !i.intersects(n.bounds)) return;
    const a = y_(n, this);
    let o = v_(n, a), r = __(n, a);
    if (o === 0 || r === 0) return;
    let s = (n.x || 0) - Xp(n.align, o), l = (n.y || 0) - Jp(n.baseline, r), d, f, u, c;
    n.aspect !== !1 && (f = a.width / a.height, u = n.width / n.height, f === f && u === u && f !== u && (u < f ? (c = o / f, l += (r - c) / 2, r = c) : (c = r * f, s += (o - c) / 2, o = c))), (a.complete || a.toDataURL) && (Qs(e, n), e.globalAlpha = (d = n.opacity) != null ? d : 1, e.imageSmoothingEnabled = n.smooth !== !1, e.drawImage(a, s, l, o, r));
  });
}
var c7 = {
  type: "image",
  tag: "image",
  nested: !1,
  attr: d7,
  bound: f7,
  draw: u7,
  pick: Yp(),
  isect: mF,
  // bounds check is sufficient
  get: y_,
  xOffset: Xp,
  yOffset: Jp
}, h7 = b_("line", TM, HM);
function p7(e, t) {
  var i = t.scaleX || 1, n = t.scaleY || 1;
  (i !== 1 || n !== 1) && e("vector-effect", "non-scaling-stroke"), e("transform", VM(t)), e("d", t.path);
}
function Tc(e, t) {
  var i = t.path;
  if (i == null) return !0;
  var n = t.x || 0, a = t.y || 0, o = t.scaleX || 1, r = t.scaleY || 1, s = (t.angle || 0) * $o, l = t.pathCache;
  (!l || l.path !== i) && ((t.pathCache = l = Ks(i)).path = i), s && e.rotate && e.translate ? (e.translate(n, a), e.rotate(s), gf(e, l, 0, 0, o, r), e.rotate(-s), e.translate(-n, -a)) : gf(e, l, n, a, o, r);
}
function g7(e, t) {
  return Tc(Qf(e, t.angle), t) ? e.set(0, 0, 0, 0) : Na(e, t, !0);
}
var m7 = {
  type: "path",
  tag: "path",
  nested: !1,
  attr: p7,
  bound: g7,
  draw: h_(Tc),
  pick: p_(Tc),
  isect: f_(Tc)
};
function b7(e, t) {
  e("d", wl(null, t));
}
function y7(e, t) {
  var i, n;
  return Na(e.set(i = t.x || 0, n = t.y || 0, i + t.width || 0, n + t.height || 0), t);
}
function sk(e, t) {
  e.beginPath(), wl(e, t);
}
var v7 = {
  type: "rect",
  tag: "path",
  nested: !1,
  attr: b7,
  bound: y7,
  draw: h_(sk),
  pick: p_(sk),
  isect: YF
};
function _7(e, t) {
  e("transform", KF(t)), e("x2", t.x2 != null ? t.x2 - (t.x || 0) : 0), e("y2", t.y2 != null ? t.y2 - (t.y || 0) : 0);
}
function x7(e, t) {
  var i, n;
  return Na(e.set(i = t.x || 0, n = t.y || 0, t.x2 != null ? t.x2 : i, t.y2 != null ? t.y2 : n), t);
}
function iT(e, t, i) {
  var n, a, o, r;
  return t.stroke && el(e, t, i) ? (n = t.x || 0, a = t.y || 0, o = t.x2 != null ? t.x2 : n, r = t.y2 != null ? t.y2 : a, e.beginPath(), e.moveTo(n, a), e.lineTo(o, r), !0) : !1;
}
function w7(e, t, i) {
  un(t, (n) => {
    if (!(i && !i.intersects(n.bounds))) {
      var a = n.opacity == null ? 1 : n.opacity;
      a && iT(e, n, a) && (Qs(e, n), e.stroke());
    }
  });
}
function $7(e, t, i, n) {
  return e.isPointInStroke ? iT(e, t, 1) && e.isPointInStroke(i, n) : !1;
}
var k7 = {
  type: "rule",
  tag: "line",
  nested: !1,
  attr: _7,
  bound: x7,
  draw: w7,
  pick: Yp($7),
  isect: XF
}, A7 = m_("shape", CM), O7 = m_("symbol", RM, u_);
const lk = uU();
var ki = {
  height: Hn,
  measureWidth: x_,
  estimateWidth: Fh,
  width: Fh,
  canvas: nT
};
nT(!0);
function nT(e) {
  ki.width = e && bo ? x_ : Fh;
}
function Fh(e, t) {
  return aT(Ao(e, t), Hn(e));
}
function aT(e, t) {
  return ~~(0.8 * e.length * t);
}
function x_(e, t) {
  return Hn(e) <= 0 || !(t = Ao(e, t)) ? 0 : oT(t, Zp(e));
}
function oT(e, t) {
  const i = `(${t}) ${e}`;
  let n = lk.get(i);
  return n === void 0 && (bo.font = t, n = bo.measureText(e).width, lk.set(i, n)), n;
}
function Hn(e) {
  return e.fontSize != null ? +e.fontSize || 0 : 11;
}
function ko(e) {
  return e.lineHeight != null ? e.lineHeight : Hn(e) + 2;
}
function E7(e) {
  return Io(e) ? e.length > 1 ? e : e[0] : e;
}
function tu(e) {
  return E7(e.lineBreak && e.text && !Io(e.text) ? e.text.split(e.lineBreak) : e.text);
}
function w_(e) {
  const t = tu(e);
  return (Io(t) ? t.length - 1 : 0) * ko(e);
}
function Ao(e, t) {
  const i = t == null ? "" : (t + "").trim();
  return e.limit > 0 && i.length ? S7(e, i) : i;
}
function D7(e) {
  if (ki.width === x_) {
    const t = Zp(e);
    return (i) => oT(i, t);
  } else if (ki.width === Fh) {
    const t = Hn(e);
    return (i) => aT(i, t);
  } else
    return (t) => ki.width(e, t);
}
function S7(e, t) {
  var i = +e.limit, n = D7(e);
  if (n(t) < i) return t;
  var a = e.ellipsis || "…", o = e.dir === "rtl", r = 0, s = t.length, l;
  if (i -= n(a), o) {
    for (; r < s; )
      l = r + s >>> 1, n(t.slice(l)) > i ? r = l + 1 : s = l;
    return a + t.slice(r);
  } else {
    for (; r < s; )
      l = 1 + (r + s >>> 1), n(t.slice(0, l)) < i ? r = l : s = l - 1;
    return t.slice(0, r) + a;
  }
}
function iu(e, t) {
  var i = e.font;
  return (t && i ? String(i).replace(/"/g, "'") : i) || "sans-serif";
}
function Zp(e, t) {
  return (e.fontStyle ? e.fontStyle + " " : "") + (e.fontVariant ? e.fontVariant + " " : "") + (e.fontWeight ? e.fontWeight + " " : "") + Hn(e) + "px " + iu(e, t);
}
function $_(e) {
  var t = e.baseline, i = Hn(e);
  return Math.round(t === "top" ? 0.79 * i : t === "middle" ? 0.3 * i : t === "bottom" ? -0.21 * i : t === "line-top" ? 0.29 * i + 0.5 * ko(e) : t === "line-bottom" ? 0.29 * i - 0.5 * ko(e) : 0);
}
const F7 = {
  left: "start",
  center: "middle",
  right: "end"
}, Ud = new it();
function Kp(e) {
  var t = e.x || 0, i = e.y || 0, n = e.radius || 0, a;
  return n && (a = (e.theta || 0) - mr, t += n * Math.cos(a), i += n * Math.sin(a)), Ud.x1 = t, Ud.y1 = i, Ud;
}
function T7(e, t) {
  var i = t.dx || 0, n = (t.dy || 0) + $_(t), a = Kp(t), o = a.x1, r = a.y1, s = t.angle || 0, l;
  e("text-anchor", F7[t.align] || "start"), s ? (l = Or(o, r) + " " + g_(s), (i || n) && (l += " " + Or(i, n))) : l = Or(o + i, r + n), e("transform", l);
}
function k_(e, t, i) {
  var n = ki.height(t), a = t.align, o = Kp(t), r = o.x1, s = o.y1, l = t.dx || 0, d = (t.dy || 0) + $_(t) - Math.round(0.8 * n), f = tu(t), u;
  if (Io(f) ? (n += ko(t) * (f.length - 1), u = f.reduce((c, h) => Math.max(c, ki.width(t, h)), 0)) : u = ki.width(t, f), a === "center" ? l -= u / 2 : a === "right" && (l -= u), e.set(l += r, d += s, l + u, d + n), t.angle && !i)
    e.rotate(t.angle * $o, r, s);
  else if (i === 2)
    return e.rotatedPoints(t.angle * $o, r, s);
  return e;
}
function C7(e, t, i) {
  un(t, (n) => {
    var a = n.opacity == null ? 1 : n.opacity, o, r, s, l, d, f, u;
    if (!(i && !i.intersects(n.bounds) || // bounds check
    a === 0 || n.fontSize <= 0 || n.text == null || n.text.length === 0)) {
      if (e.font = Zp(n), e.textAlign = n.align || "left", o = Kp(n), r = o.x1, s = o.y1, n.angle && (e.save(), e.translate(r, s), e.rotate(n.angle * $o), r = s = 0), r += n.dx || 0, s += (n.dy || 0) + $_(n), f = tu(n), Qs(e, n), Io(f))
        for (d = ko(n), l = 0; l < f.length; ++l)
          u = Ao(n, f[l]), n.fill && Dh(e, n, a) && e.fillText(u, r, s), n.stroke && el(e, n, a) && e.strokeText(u, r, s), s += d;
      else
        u = Ao(n, f), n.fill && Dh(e, n, a) && e.fillText(u, r, s), n.stroke && el(e, n, a) && e.strokeText(u, r, s);
      n.angle && e.restore();
    }
  });
}
function R7(e, t, i, n, a, o) {
  if (t.fontSize <= 0) return !1;
  if (!t.angle) return !0;
  var r = Kp(t), s = r.x1, l = r.y1, d = k_(Ud, t, 1), f = -t.angle * $o, u = Math.cos(f), c = Math.sin(f), h = u * a - c * o + (s - u * s + c * l), p = c * a + u * o + (l - c * s - u * l);
  return d.contains(h, p);
}
function I7(e, t) {
  const i = k_(Ud, e, 2);
  return Rs(t, i[0], i[1], i[2], i[3]) || Rs(t, i[0], i[1], i[4], i[5]) || Rs(t, i[4], i[5], i[6], i[7]) || Rs(t, i[2], i[3], i[6], i[7]);
}
var j7 = {
  type: "text",
  tag: "text",
  nested: !1,
  attr: T7,
  bound: k_,
  draw: C7,
  pick: Yp(R7),
  isect: I7
}, z7 = b_("trail", IM, YM), Ti = {
  arc: WM,
  area: XM,
  group: l7,
  image: c7,
  line: h7,
  path: m7,
  rect: v7,
  rule: k7,
  shape: A7,
  symbol: O7,
  text: j7,
  trail: z7
};
function Dy(e, t, i) {
  var n = Ti[e.mark.marktype], a = t || n.bound;
  return n.nested && (e = e.mark), a(e.bounds || (e.bounds = new it()), e, i);
}
var dk = {
  mark: null
};
function rT(e, t, i) {
  var n = Ti[e.marktype], a = n.bound, o = e.items, r = o && o.length, s, l, d, f;
  if (n.nested)
    return r ? d = o[0] : (dk.mark = e, d = dk), f = Dy(d, a, i), t = t && t.union(f) || f, t;
  if (t = t || e.bounds && e.bounds.clear() || new it(), r)
    for (s = 0, l = o.length; s < l; ++s)
      t.union(Dy(o[s], a, i));
  return e.bounds = t;
}
const P7 = [
  "marktype",
  "name",
  "role",
  "interactive",
  "clip",
  "items",
  "zindex",
  "x",
  "y",
  "width",
  "height",
  "align",
  "baseline",
  // layout
  "fill",
  "fillOpacity",
  "opacity",
  "blend",
  // fill
  "stroke",
  "strokeOpacity",
  "strokeWidth",
  "strokeCap",
  // stroke
  "strokeDash",
  "strokeDashOffset",
  // stroke dash
  "strokeForeground",
  "strokeOffset",
  // group
  "startAngle",
  "endAngle",
  "innerRadius",
  "outerRadius",
  // arc
  "cornerRadius",
  "padAngle",
  // arc, rect
  "cornerRadiusTopLeft",
  "cornerRadiusTopRight",
  // rect, group
  "cornerRadiusBottomLeft",
  "cornerRadiusBottomRight",
  "interpolate",
  "tension",
  "orient",
  "defined",
  // area, line
  "url",
  "aspect",
  "smooth",
  // image
  "path",
  "scaleX",
  "scaleY",
  // path
  "x2",
  "y2",
  // rule
  "size",
  "shape",
  // symbol
  "text",
  "angle",
  "theta",
  "radius",
  "dir",
  "dx",
  "dy",
  // text
  "ellipsis",
  "limit",
  "lineBreak",
  "lineHeight",
  "font",
  "fontSize",
  "fontWeight",
  "fontStyle",
  "fontVariant",
  // font
  "description",
  "aria",
  "ariaRole",
  "ariaRoleDescription"
  // aria
];
function sT(e, t) {
  return JSON.stringify(e, P7, t);
}
function lT(e) {
  const t = typeof e == "string" ? JSON.parse(e) : e;
  return dT(t);
}
function dT(e) {
  var t = e.marktype, i = e.items, n, a, o;
  if (i)
    for (a = 0, o = i.length; a < o; ++a)
      n = t ? "mark" : "group", i[a][n] = e, i[a].zindex && (i[a][n].zdirty = !0), (t || n) === "group" && dT(i[a]);
  return t && rT(e), e;
}
class fT {
  constructor(t) {
    arguments.length ? this.root = lT(t) : (this.root = fk({
      marktype: "group",
      name: "root",
      role: "frame"
    }), this.root.items = [new Gp(this.root)]);
  }
  toJSON(t) {
    return sT(this.root, t || 0);
  }
  mark(t, i, n) {
    i = i || this.root.items[0];
    const a = fk(t, i);
    return i.items[n] = a, a.zindex && (a.group.zdirty = !0), a;
  }
}
function fk(e, t) {
  const i = {
    bounds: new it(),
    clip: !!e.clip,
    group: t,
    interactive: e.interactive !== !1,
    items: [],
    marktype: e.marktype,
    name: e.name || void 0,
    role: e.role || void 0,
    zindex: e.zindex || 0
  };
  return e.aria != null && (i.aria = e.aria), e.description && (i.description = e.description), i;
}
function ao(e, t, i) {
  return !e && typeof document < "u" && document.createElement && (e = document), e ? i ? e.createElementNS(i, t) : e.createElement(t) : null;
}
function A_(e, t) {
  t = t.toLowerCase();
  for (var i = e.childNodes, n = 0, a = i.length; n < a; ++n) if (i[n].tagName.toLowerCase() === t)
    return i[n];
}
function ot(e, t, i, n) {
  var a = e.childNodes[t], o;
  return (!a || a.tagName.toLowerCase() !== i.toLowerCase()) && (o = a || null, a = ao(e.ownerDocument, i, n), e.insertBefore(a, o)), a;
}
function zi(e, t) {
  for (var i = e.childNodes, n = i.length; n > t; ) e.removeChild(i[--n]);
  return e;
}
function uT(e) {
  return "mark-" + e.marktype + (e.role ? " role-" + e.role : "") + (e.name ? " " + e.name : "");
}
function Qp(e, t) {
  const i = t.getBoundingClientRect();
  return [e.clientX - i.left - (t.clientLeft || 0), e.clientY - i.top - (t.clientTop || 0)];
}
function N7(e, t, i, n) {
  var a = e && e.mark, o, r;
  if (a && (o = Ti[a.marktype]).tip) {
    for (r = Qp(t, i), r[0] -= n[0], r[1] -= n[1]; e = e.mark.group; )
      r[0] -= e.x || 0, r[1] -= e.y || 0;
    e = o.tip(a.items, r);
  }
  return e;
}
let O_ = class {
  /**
   * Create a new Handler instance.
   * @param {object} [customLoader] - Optional loader instance for
   *   href URL sanitization. If not specified, a standard loader
   *   instance will be generated.
   * @param {function} [customTooltip] - Optional tooltip handler
   *   function for custom tooltip display.
   * @constructor
   */
  constructor(t, i) {
    this._active = null, this._handlers = {}, this._loader = t || Rp(), this._tooltip = i || q7;
  }
  /**
   * Initialize a new Handler instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {object} [obj] - Optional context object that should serve as
   *   the "this" context for event callbacks.
   * @return {Handler} - This handler instance.
   */
  initialize(t, i, n) {
    return this._el = t, this._obj = n || null, this.origin(i);
  }
  /**
   * Returns the parent container element for a visualization.
   * @return {DOMElement} - The containing DOM element.
   */
  element() {
    return this._el;
  }
  /**
   * Returns the scene element (e.g., canvas or SVG) of the visualization
   * Subclasses must override if the first child is not the scene element.
   * @return {DOMElement} - The scene (e.g., canvas or SVG) element.
   */
  canvas() {
    return this._el && this._el.firstChild;
  }
  /**
   * Get / set the origin coordinates of the visualization.
   */
  origin(t) {
    return arguments.length ? (this._origin = t || [0, 0], this) : this._origin.slice();
  }
  /**
   * Get / set the scenegraph root.
   */
  scene(t) {
    return arguments.length ? (this._scene = t, this) : this._scene;
  }
  /**
   * Add an event handler. Subclasses should override this method.
   */
  on() {
  }
  /**
   * Remove an event handler. Subclasses should override this method.
   */
  off() {
  }
  /**
   * Utility method for finding the array index of an event handler.
   * @param {Array} h - An array of registered event handlers.
   * @param {string} type - The event type.
   * @param {function} handler - The event handler instance to find.
   * @return {number} - The handler's array index or -1 if not registered.
   */
  _handlerIndex(t, i, n) {
    for (let a = t ? t.length : 0; --a >= 0; )
      if (t[a].type === i && (!n || t[a].handler === n))
        return a;
    return -1;
  }
  /**
   * Returns an array with registered event handlers.
   * @param {string} [type] - The event type to query. Any annotations
   *   are ignored; for example, for the argument "click.foo", ".foo" will
   *   be ignored and the method returns all "click" handlers. If type is
   *   null or unspecified, this method returns handlers for all types.
   * @return {Array} - A new array containing all registered event handlers.
   */
  handlers(t) {
    const i = this._handlers, n = [];
    if (t)
      n.push(...i[this.eventName(t)]);
    else
      for (const a in i)
        n.push(...i[a]);
    return n;
  }
  /**
   * Parses an event name string to return the specific event type.
   * For example, given "click.foo" returns "click"
   * @param {string} name - The input event type string.
   * @return {string} - A string with the event type only.
   */
  eventName(t) {
    const i = t.indexOf(".");
    return i < 0 ? t : t.slice(0, i);
  }
  /**
   * Handle hyperlink navigation in response to an item.href value.
   * @param {Event} event - The event triggering hyperlink navigation.
   * @param {Item} item - The scenegraph item.
   * @param {string} href - The URL to navigate to.
   */
  handleHref(t, i, n) {
    this._loader.sanitize(n, {
      context: "href"
    }).then((a) => {
      const o = new MouseEvent(t.type, t), r = ao(null, "a");
      for (const s in a) r.setAttribute(s, a[s]);
      r.dispatchEvent(o);
    }).catch(() => {
    });
  }
  /**
   * Handle tooltip display in response to an item.tooltip value.
   * @param {Event} event - The event triggering tooltip display.
   * @param {Item} item - The scenegraph item.
   * @param {boolean} show - A boolean flag indicating whether
   *   to show or hide a tooltip for the given item.
   */
  handleTooltip(t, i, n) {
    if (i && i.tooltip != null) {
      i = N7(i, t, this.canvas(), this._origin);
      const a = n && i && i.tooltip || null;
      this._tooltip.call(this._obj, this, t, i, a);
    }
  }
  /**
   * Returns the size of a scenegraph item and its position relative
   * to the viewport.
   * @param {Item} item - The scenegraph item.
   * @return {object} - A bounding box object (compatible with the
   *   DOMRect type) consisting of x, y, width, heigh, top, left,
   *   right, and bottom properties.
   */
  getItemBoundingClientRect(t) {
    const i = this.canvas();
    if (!i) return;
    const n = i.getBoundingClientRect(), a = this._origin, o = t.bounds, r = o.width(), s = o.height();
    let l = o.x1 + a[0] + n.left, d = o.y1 + a[1] + n.top;
    for (; t.mark && (t = t.mark.group); )
      l += t.x || 0, d += t.y || 0;
    return {
      x: l,
      y: d,
      width: r,
      height: s,
      left: l,
      top: d,
      right: l + r,
      bottom: d + s
    };
  }
};
function q7(e, t, i, n) {
  e.element().setAttribute("title", n || "");
}
class nu {
  /**
   * Create a new Renderer instance.
   * @param {object} [loader] - Optional loader instance for
   *   image and href URL sanitization. If not specified, a
   *   standard loader instance will be generated.
   * @constructor
   */
  constructor(t) {
    this._el = null, this._bgcolor = null, this._loader = new HF(t);
  }
  /**
   * Initialize a new Renderer instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {number} width - The coordinate width of the display, in pixels.
   * @param {number} height - The coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {Renderer} - This renderer instance.
   */
  initialize(t, i, n, a, o) {
    return this._el = t, this.resize(i, n, a, o);
  }
  /**
   * Returns the parent container element for a visualization.
   * @return {DOMElement} - The containing DOM element.
   */
  element() {
    return this._el;
  }
  /**
   * Returns the scene element (e.g., canvas or SVG) of the visualization
   * Subclasses must override if the first child is not the scene element.
   * @return {DOMElement} - The scene (e.g., canvas or SVG) element.
   */
  canvas() {
    return this._el && this._el.firstChild;
  }
  /**
   * Get / set the background color.
   */
  background(t) {
    return arguments.length === 0 ? this._bgcolor : (this._bgcolor = t, this);
  }
  /**
   * Resize the display.
   * @param {number} width - The new coordinate width of the display, in pixels.
   * @param {number} height - The new coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The new origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {Renderer} - This renderer instance;
   */
  resize(t, i, n, a) {
    return this._width = t, this._height = i, this._origin = n || [0, 0], this._scale = a || 1, this;
  }
  /**
   * Report a dirty item whose bounds should be redrawn.
   * This base class method does nothing. Subclasses that perform
   * incremental should implement this method.
   * @param {Item} item - The dirty item whose bounds should be redrawn.
   */
  dirty() {
  }
  /**
   * Render an input scenegraph, potentially with a set of dirty items.
   * This method will perform an immediate rendering with available resources.
   * The renderer may also need to perform image loading to perform a complete
   * render. This process can lead to asynchronous re-rendering of the scene
   * after this method returns. To receive notification when rendering is
   * complete, use the renderAsync method instead.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   * @return {Renderer} - This renderer instance.
   */
  render(t, i) {
    const n = this;
    return n._call = function() {
      n._render(t, i);
    }, n._call(), n._call = null, n;
  }
  /**
   * Internal rendering method. Renderer subclasses should override this
   * method to actually perform rendering.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  _render() {
  }
  /**
   * Asynchronous rendering method. Similar to render, but returns a Promise
   * that resolves when all rendering is completed. Sometimes a renderer must
   * perform image loading to get a complete rendering. The returned
   * Promise will not resolve until this process completes.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   * @return {Promise} - A Promise that resolves when rendering is complete.
   */
  renderAsync(t, i) {
    const n = this.render(t, i);
    return this._ready ? this._ready.then(() => n) : Promise.resolve(n);
  }
  /**
   * Internal method for asynchronous resource loading.
   * Proxies method calls to the ImageLoader, and tracks loading
   * progress to invoke a re-render once complete.
   * @param {string} method - The method name to invoke on the ImageLoader.
   * @param {string} uri - The URI for the requested resource.
   * @return {Promise} - A Promise that resolves to the requested resource.
   */
  _load(t, i) {
    var n = this, a = n._loader[t](i);
    if (!n._ready) {
      const o = n._call;
      n._ready = n._loader.ready().then((r) => {
        r && o(), n._ready = null;
      });
    }
    return a;
  }
  /**
   * Sanitize a URL to include as a hyperlink in the rendered scene.
   * This method proxies a call to ImageLoader.sanitizeURL, but also tracks
   * image loading progress and invokes a re-render once complete.
   * @param {string} uri - The URI string to sanitize.
   * @return {Promise} - A Promise that resolves to the sanitized URL.
   */
  sanitizeURL(t) {
    return this._load("sanitizeURL", t);
  }
  /**
   * Requests an image to include in the rendered scene.
   * This method proxies a call to ImageLoader.loadImage, but also tracks
   * image loading progress and invokes a re-render once complete.
   * @param {string} uri - The URI string of the image.
   * @return {Promise} - A Promise that resolves to the loaded Image.
   */
  loadImage(t) {
    return this._load("loadImage", t);
  }
}
const L7 = "keydown", B7 = "keypress", U7 = "keyup", cT = "dragenter", Cc = "dragleave", hT = "dragover", Sy = "pointerdown", M7 = "pointerup", Th = "pointermove", Rc = "pointerout", pT = "pointerover", Fy = "mousedown", V7 = "mouseup", gT = "mousemove", Ch = "mouseout", mT = "mouseover", Rh = "click", W7 = "dblclick", G7 = "wheel", bT = "mousewheel", Ih = "touchstart", jh = "touchmove", zh = "touchend", H7 = [L7, B7, U7, cT, Cc, hT, Sy, M7, Th, Rc, pT, Fy, V7, gT, Ch, mT, Rh, W7, G7, bT, Ih, jh, zh], Ty = Th, Md = Ch, Cy = Rh;
class au extends O_ {
  constructor(t, i) {
    super(t, i), this._down = null, this._touch = null, this._first = !0, this._events = {}, this.events = H7, this.pointermove = ck([Th, gT], [pT, mT], [Rc, Ch]), this.dragover = ck([hT], [cT], [Cc]), this.pointerout = hk([Rc, Ch]), this.dragleave = hk([Cc]);
  }
  initialize(t, i, n) {
    return this._canvas = t && A_(t, "canvas"), [Rh, Fy, Sy, Th, Rc, Cc].forEach((a) => uk(this, a)), super.initialize(t, i, n);
  }
  // return the backing canvas instance
  canvas() {
    return this._canvas;
  }
  // retrieve the current canvas context
  context() {
    return this._canvas.getContext("2d");
  }
  // to keep old versions of firefox happy
  DOMMouseScroll(t) {
    this.fire(bT, t);
  }
  pointerdown(t) {
    this._down = this._active, this.fire(Sy, t);
  }
  mousedown(t) {
    this._down = this._active, this.fire(Fy, t);
  }
  click(t) {
    this._down === this._active && (this.fire(Rh, t), this._down = null);
  }
  touchstart(t) {
    this._touch = this.pickEvent(t.changedTouches[0]), this._first && (this._active = this._touch, this._first = !1), this.fire(Ih, t, !0);
  }
  touchmove(t) {
    this.fire(jh, t, !0);
  }
  touchend(t) {
    this.fire(zh, t, !0), this._touch = null;
  }
  // fire an event
  fire(t, i, n) {
    const a = n ? this._touch : this._active, o = this._handlers[t];
    if (i.vegaType = t, t === Cy && a && a.href ? this.handleHref(i, a, a.href) : (t === Ty || t === Md) && this.handleTooltip(i, a, t !== Md), o)
      for (let r = 0, s = o.length; r < s; ++r)
        o[r].handler.call(this._obj, i, a);
  }
  // add an event handler
  on(t, i) {
    const n = this.eventName(t), a = this._handlers;
    return this._handlerIndex(a[n], t, i) < 0 && (uk(this, t), (a[n] || (a[n] = [])).push({
      type: t,
      handler: i
    })), this;
  }
  // remove an event handler
  off(t, i) {
    const n = this.eventName(t), a = this._handlers[n], o = this._handlerIndex(a, t, i);
    return o >= 0 && a.splice(o, 1), this;
  }
  pickEvent(t) {
    const i = Qp(t, this._canvas), n = this._origin;
    return this.pick(this._scene, i[0], i[1], i[0] - n[0], i[1] - n[1]);
  }
  // find the scenegraph item at the current pointer position
  // x, y -- the absolute x, y pointer coordinates on the canvas element
  // gx, gy -- the relative coordinates within the current group
  pick(t, i, n, a, o) {
    const r = this.context();
    return Ti[t.marktype].pick.call(this, r, t, i, n, a, o);
  }
}
const Y7 = (e) => e === Ih || e === jh || e === zh ? [Ih, jh, zh] : [e];
function uk(e, t) {
  Y7(t).forEach((i) => X7(e, i));
}
function X7(e, t) {
  const i = e.canvas();
  i && !e._events[t] && (e._events[t] = 1, i.addEventListener(t, e[t] ? (n) => e[t](n) : (n) => e.fire(t, n)));
}
function Ad(e, t, i) {
  t.forEach((n) => e.fire(n, i));
}
function ck(e, t, i) {
  return function(n) {
    const a = this._active, o = this.pickEvent(n);
    o === a ? Ad(this, e, n) : ((!a || !a.exit) && Ad(this, i, n), this._active = o, Ad(this, t, n), Ad(this, e, n));
  };
}
function hk(e) {
  return function(t) {
    Ad(this, e, t), this._active = null;
  };
}
function J7() {
  return typeof window < "u" && window.devicePixelRatio || 1;
}
function Z7(e, t, i, n, a, o) {
  const r = typeof HTMLElement < "u" && e instanceof HTMLElement && e.parentNode != null, s = e.getContext("2d"), l = r ? J7() : a;
  e.width = t * l, e.height = i * l;
  for (const d in o)
    s[d] = o[d];
  return r && l !== 1 && (e.style.width = t + "px", e.style.height = i + "px"), s.pixelRatio = l, s.setTransform(l, 0, 0, l, l * n[0], l * n[1]), e;
}
class Ph extends nu {
  constructor(t) {
    super(t), this._options = {}, this._redraw = !1, this._dirty = new it(), this._tempb = new it();
  }
  initialize(t, i, n, a, o, r) {
    return this._options = r || {}, this._canvas = this._options.externalContext ? null : po(1, 1, this._options.type), t && this._canvas && (zi(t, 0).appendChild(this._canvas), this._canvas.setAttribute("class", "marks")), super.initialize(t, i, n, a, o);
  }
  resize(t, i, n, a) {
    if (super.resize(t, i, n, a), this._canvas)
      Z7(this._canvas, this._width, this._height, this._origin, this._scale, this._options.context);
    else {
      const o = this._options.externalContext;
      o || Bd("CanvasRenderer is missing a valid canvas or context"), o.scale(this._scale, this._scale), o.translate(this._origin[0], this._origin[1]);
    }
    return this._redraw = !0, this;
  }
  canvas() {
    return this._canvas;
  }
  context() {
    return this._options.externalContext || (this._canvas ? this._canvas.getContext("2d") : null);
  }
  dirty(t) {
    const i = this._tempb.clear().union(t.bounds);
    let n = t.mark.group;
    for (; n; )
      i.translate(n.x || 0, n.y || 0), n = n.mark.group;
    this._dirty.union(i);
  }
  _render(t, i) {
    const n = this.context(), a = this._origin, o = this._width, r = this._height, s = this._dirty, l = K7(a, o, r);
    n.save();
    const d = this._redraw || s.empty() ? (this._redraw = !1, l.expand(1)) : Q7(n, l.intersect(s), a);
    return this.clear(-a[0], -a[1], o, r), this.draw(n, t, d, i), n.restore(), s.clear(), this;
  }
  draw(t, i, n, a) {
    if (i.marktype !== "group" && a != null && !a.includes(i.marktype))
      return;
    const o = Ti[i.marktype];
    i.clip && JM(t, i), o.draw.call(this, t, i, n, a), i.clip && t.restore();
  }
  clear(t, i, n, a) {
    const o = this._options, r = this.context();
    o.type !== "pdf" && !o.externalContext && r.clearRect(t, i, n, a), this._bgcolor != null && (r.fillStyle = this._bgcolor, r.fillRect(t, i, n, a));
  }
}
const K7 = (e, t, i) => new it().set(0, 0, t, i).translate(-e[0], -e[1]);
function Q7(e, t, i) {
  return t.expand(1).round(), e.pixelRatio % 1 && t.scale(e.pixelRatio).round().scale(1 / e.pixelRatio), t.translate(-(i[0] % 1), -(i[1] % 1)), e.beginPath(), e.rect(t.x1, t.y1, t.width(), t.height()), e.clip(), t;
}
class yT extends O_ {
  constructor(t, i) {
    super(t, i);
    const n = this;
    n._hrefHandler = Lm(n, (a, o) => {
      o && o.href && n.handleHref(a, o, o.href);
    }), n._tooltipHandler = Lm(n, (a, o) => {
      n.handleTooltip(a, o, a.type !== Md);
    });
  }
  initialize(t, i, n) {
    let a = this._svg;
    return a && (a.removeEventListener(Cy, this._hrefHandler), a.removeEventListener(Ty, this._tooltipHandler), a.removeEventListener(Md, this._tooltipHandler)), this._svg = a = t && A_(t, "svg"), a && (a.addEventListener(Cy, this._hrefHandler), a.addEventListener(Ty, this._tooltipHandler), a.addEventListener(Md, this._tooltipHandler)), super.initialize(t, i, n);
  }
  canvas() {
    return this._svg;
  }
  // add an event handler
  on(t, i) {
    const n = this.eventName(t), a = this._handlers;
    if (this._handlerIndex(a[n], t, i) < 0) {
      const r = {
        type: t,
        handler: i,
        listener: Lm(this, i)
      };
      (a[n] || (a[n] = [])).push(r), this._svg && this._svg.addEventListener(n, r.listener);
    }
    return this;
  }
  // remove an event handler
  off(t, i) {
    const n = this.eventName(t), a = this._handlers[n], o = this._handlerIndex(a, t, i);
    return o >= 0 && (this._svg && this._svg.removeEventListener(n, a[o].listener), a.splice(o, 1)), this;
  }
}
const Lm = (e, t) => (i) => {
  let n = i.target.__data__;
  n = Array.isArray(n) ? n[0] : n, i.vegaType = i.type, t.call(e._obj, i, n);
}, vT = "aria-hidden", E_ = "aria-label", D_ = "role", S_ = "aria-roledescription", _T = "graphics-object", F_ = "graphics-symbol", xT = (e, t, i) => ({
  [D_]: e,
  [S_]: t,
  [E_]: i || void 0
}), e6 = cU(["axis-domain", "axis-grid", "axis-label", "axis-tick", "axis-title", "legend-band", "legend-entry", "legend-gradient", "legend-label", "legend-title", "legend-symbol", "title"]), pk = {
  axis: {
    desc: "axis",
    caption: n6
  },
  legend: {
    desc: "legend",
    caption: a6
  },
  "title-text": {
    desc: "title",
    caption: (e) => `Title text '${mk(e)}'`
  },
  "title-subtitle": {
    desc: "subtitle",
    caption: (e) => `Subtitle text '${mk(e)}'`
  }
}, gk = {
  ariaRole: D_,
  ariaRoleDescription: S_,
  description: E_
};
function wT(e, t) {
  const i = t.aria === !1;
  if (e(vT, i || void 0), i || t.description == null)
    for (const n in gk)
      e(gk[n], void 0);
  else {
    const n = t.mark.marktype;
    e(E_, t.description), e(D_, t.ariaRole || (n === "group" ? _T : F_)), e(S_, t.ariaRoleDescription || `${n} mark`);
  }
}
function $T(e) {
  return e.aria === !1 ? {
    [vT]: !0
  } : e6[e.role] ? null : pk[e.role] ? i6(e, pk[e.role]) : t6(e);
}
function t6(e) {
  const t = e.marktype, i = t === "group" || t === "text" || e.items.some((n) => n.description != null && n.aria !== !1);
  return xT(i ? _T : F_, `${t} mark container`, e.description);
}
function i6(e, t) {
  try {
    const i = e.items[0], n = t.caption || (() => "");
    return xT(t.role || F_, t.desc, i.description || n(i));
  } catch {
    return null;
  }
}
function mk(e) {
  return yF(e.text).join(" ");
}
function n6(e) {
  const t = e.datum, i = e.orient, n = t.title ? kT(e) : null, a = e.context, o = a.scales[t.scale].value, r = a.dataflow.locale(), s = o.type;
  return `${i === "left" || i === "right" ? "Y" : "X"}-axis` + (n ? ` titled '${n}'` : "") + ` for a ${nf(s) ? "discrete" : s} scale with ${$E(r, o, e)}`;
}
function a6(e) {
  const t = e.datum, i = t.title ? kT(e) : null, n = `${t.type || ""} legend`.trim(), a = t.scales, o = Object.keys(a), r = e.context, s = r.scales[a[o[0]]].value, l = r.dataflow.locale();
  return r6(n) + (i ? ` titled '${i}'` : "") + ` for ${o6(o)} with ${$E(l, s, e)}`;
}
function kT(e) {
  try {
    return yF(bF(e.items).items[0].text).join(" ");
  } catch {
    return null;
  }
}
function o6(e) {
  return e = e.map((t) => t + (t === "fill" || t === "stroke" ? " color" : "")), e.length < 2 ? e[0] : e.slice(0, -1).join(", ") + " and " + bF(e);
}
function r6(e) {
  return e.length ? e[0].toUpperCase() + e.slice(1) : e;
}
const AT = (e) => (e + "").replace(/&/g, "&amp;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), s6 = (e) => AT(e).replace(/"/g, "&quot;").replace(/\t/g, "&#x9;").replace(/\n/g, "&#xA;").replace(/\r/g, "&#xD;");
function T_() {
  let e = "", t = "", i = "";
  const n = [], a = () => t = i = "", o = (l) => {
    t && (e += `${t}>${i}`, a()), n.push(l);
  }, r = (l, d) => (d != null && (t += ` ${l}="${s6(d)}"`), s), s = {
    open(l) {
      o(l), t = "<" + l;
      for (var d = arguments.length, f = new Array(d > 1 ? d - 1 : 0), u = 1; u < d; u++)
        f[u - 1] = arguments[u];
      for (const c of f)
        for (const h in c) r(h, c[h]);
      return s;
    },
    close() {
      const l = n.pop();
      return t ? e += t + (i ? `>${i}</${l}>` : "/>") : e += `</${l}>`, a(), s;
    },
    attr: r,
    text: (l) => (i += AT(l), s),
    toString: () => e
  };
  return s;
}
const OT = (e) => ET(T_(), e) + "";
function ET(e, t) {
  if (e.open(t.tagName), t.hasAttributes()) {
    const i = t.attributes, n = i.length;
    for (let a = 0; a < n; ++a)
      e.attr(i[a].name, i[a].value);
  }
  if (t.hasChildNodes()) {
    const i = t.childNodes;
    for (const n of i)
      n.nodeType === 3 ? e.text(n.nodeValue) : ET(e, n);
  }
  return e.close();
}
const Nh = {
  fill: "fill",
  fillOpacity: "fill-opacity",
  stroke: "stroke",
  strokeOpacity: "stroke-opacity",
  strokeWidth: "stroke-width",
  strokeCap: "stroke-linecap",
  strokeJoin: "stroke-linejoin",
  strokeDash: "stroke-dasharray",
  strokeDashOffset: "stroke-dashoffset",
  strokeMiterLimit: "stroke-miterlimit",
  opacity: "opacity"
}, qh = {
  blend: "mix-blend-mode"
}, DT = {
  fill: "none",
  "stroke-miterlimit": 10
}, rd = 0, bk = "http://www.w3.org/2000/xmlns/", at = bf.xmlns;
class C_ extends nu {
  constructor(t) {
    super(t), this._dirtyID = 0, this._dirty = [], this._svg = null, this._root = null, this._defs = null;
  }
  /**
   * Initialize a new SVGRenderer instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {number} width - The coordinate width of the display, in pixels.
   * @param {number} height - The coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {SVGRenderer} - This renderer instance.
   */
  initialize(t, i, n, a, o) {
    return this._defs = {}, this._clearDefs(), t && (this._svg = ot(t, 0, "svg", at), this._svg.setAttributeNS(bk, "xmlns", at), this._svg.setAttributeNS(bk, "xmlns:xlink", bf["xmlns:xlink"]), this._svg.setAttribute("version", bf.version), this._svg.setAttribute("class", "marks"), zi(t, 1), this._root = ot(this._svg, rd, "g", at), oo(this._root, DT), zi(this._svg, rd + 1)), this.background(this._bgcolor), super.initialize(t, i, n, a, o);
  }
  /**
   * Get / set the background color.
   */
  background(t) {
    return arguments.length && this._svg && this._svg.style.setProperty("background-color", t), super.background(...arguments);
  }
  /**
   * Resize the display.
   * @param {number} width - The new coordinate width of the display, in pixels.
   * @param {number} height - The new coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The new origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {SVGRenderer} - This renderer instance;
   */
  resize(t, i, n, a) {
    return super.resize(t, i, n, a), this._svg && (oo(this._svg, {
      width: this._width * this._scale,
      height: this._height * this._scale,
      viewBox: `0 0 ${this._width} ${this._height}`
    }), this._root.setAttribute("transform", `translate(${this._origin})`)), this._dirty = [], this;
  }
  /**
   * Returns the SVG element of the visualization.
   * @return {DOMElement} - The SVG element.
   */
  canvas() {
    return this._svg;
  }
  /**
   * Returns an SVG text string for the rendered content,
   * or null if this renderer is currently headless.
   */
  svg() {
    const t = this._svg, i = this._bgcolor;
    if (!t) return null;
    let n;
    i && (t.removeAttribute("style"), n = ot(t, rd, "rect", at), oo(n, {
      width: this._width,
      height: this._height,
      fill: i
    }));
    const a = OT(t);
    return i && (t.removeChild(n), this._svg.style.setProperty("background-color", i)), a;
  }
  /**
   * Internal rendering method.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  _render(t, i) {
    return this._dirtyCheck() && (this._dirtyAll && this._clearDefs(), this.mark(this._root, t, void 0, i), zi(this._root, 1)), this.defs(), this._dirty = [], ++this._dirtyID, this;
  }
  // -- Manage rendering of items marked as dirty --
  /**
   * Flag a mark item as dirty.
   * @param {Item} item - The mark item.
   */
  dirty(t) {
    t.dirty !== this._dirtyID && (t.dirty = this._dirtyID, this._dirty.push(t));
  }
  /**
   * Check if a mark item is considered dirty.
   * @param {Item} item - The mark item.
   */
  isDirty(t) {
    return this._dirtyAll || !t._svg || !t._svg.ownerSVGElement || t.dirty === this._dirtyID;
  }
  /**
   * Internal method to check dirty status and, if possible,
   * make targetted updates without a full rendering pass.
   */
  _dirtyCheck() {
    this._dirtyAll = !0;
    const t = this._dirty;
    if (!t.length || !this._dirtyID) return !0;
    const i = ++this._dirtyID;
    let n, a, o, r, s, l, d;
    for (s = 0, l = t.length; s < l; ++s)
      if (n = t[s], a = n.mark, a.marktype !== o && (o = a.marktype, r = Ti[o]), a.zdirty && a.dirty !== i && (this._dirtyAll = !1, yk(n, i), a.items.forEach((f) => {
        f.dirty = i;
      })), !a.zdirty) {
        if (n.exit) {
          r.nested && a.items.length ? (d = a.items[0], d._svg && this._update(r, d._svg, d)) : n._svg && (d = n._svg.parentNode, d && d.removeChild(n._svg)), n._svg = null;
          continue;
        }
        n = r.nested ? a.items[0] : n, n._update !== i && (!n._svg || !n._svg.ownerSVGElement ? (this._dirtyAll = !1, yk(n, i)) : this._update(r, n._svg, n), n._update = i);
      }
    return !this._dirtyAll;
  }
  // -- Construct & maintain scenegraph to SVG mapping ---
  /**
   * Render a set of mark items.
   * @param {SVGElement} el - The parent element in the SVG tree.
   * @param {object} scene - The mark parent to render.
   * @param {SVGElement} prev - The previous sibling in the SVG tree.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  mark(t, i, n, a) {
    if (!this.isDirty(i))
      return i._svg;
    const o = this._svg, r = i.marktype, s = Ti[r], l = i.interactive === !1 ? "none" : null, d = s.tag === "g", f = vk(i, t, n, "g", o);
    if (r !== "group" && a != null && !a.includes(r))
      return zi(f, 0), i._svg;
    f.setAttribute("class", uT(i));
    const u = $T(i);
    for (const g in u) Wt(f, g, u[g]);
    d || Wt(f, "pointer-events", l), Wt(f, "clip-path", i.clip ? d_(this, i, i.group) : null);
    let c = null, h = 0;
    const p = (g) => {
      const m = this.isDirty(g), b = vk(g, f, c, s.tag, o);
      m && (this._update(s, b, g), d && f6(this, b, g, a)), c = b, ++h;
    };
    return s.nested ? i.items.length && p(i.items[0]) : un(i, p), zi(f, h), f;
  }
  /**
   * Update the attributes of an SVG element for a mark item.
   * @param {object} mdef - The mark definition object
   * @param {SVGElement} el - The SVG element.
   * @param {Item} item - The mark item.
   */
  _update(t, i, n) {
    xa = i, Ft = i.__values__, wT(Vd, n), t.attr(Vd, n, this);
    const a = c6[t.type];
    a && a.call(this, t, i, n), xa && this.style(xa, n);
  }
  /**
   * Update the presentation attributes of an SVG element for a mark item.
   * @param {SVGElement} el - The SVG element.
   * @param {Item} item - The mark item.
   */
  style(t, i) {
    if (i != null) {
      for (const n in Nh) {
        let a = n === "font" ? iu(i) : i[n];
        if (a === Ft[n]) continue;
        const o = Nh[n];
        a == null ? t.removeAttribute(o) : (r_(a) && (a = qF(a, this._defs.gradient, ST())), t.setAttribute(o, a + "")), Ft[n] = a;
      }
      for (const n in qh)
        Ic(t, qh[n], i[n]);
    }
  }
  /**
   * Render SVG defs, as needed.
   * Must be called *after* marks have been processed to ensure the
   * collected state is current and accurate.
   */
  defs() {
    const t = this._svg, i = this._defs;
    let n = i.el, a = 0;
    for (const o in i.gradient)
      n || (i.el = n = ot(t, rd + 1, "defs", at)), a = l6(n, i.gradient[o], a);
    for (const o in i.clipping)
      n || (i.el = n = ot(t, rd + 1, "defs", at)), a = d6(n, i.clipping[o], a);
    n && (a === 0 ? (t.removeChild(n), i.el = null) : zi(n, a));
  }
  /**
   * Clear defs caches.
   */
  _clearDefs() {
    const t = this._defs;
    t.gradient = {}, t.clipping = {};
  }
}
function yk(e, t) {
  for (; e && e.dirty !== t; e = e.mark.group)
    if (e.dirty = t, e.mark && e.mark.dirty !== t)
      e.mark.dirty = t;
    else return;
}
function l6(e, t, i) {
  let n, a, o;
  if (t.gradient === "radial") {
    let r = ot(e, i++, "pattern", at);
    oo(r, {
      id: Eh + t.id,
      viewBox: "0,0,1,1",
      width: "100%",
      height: "100%",
      preserveAspectRatio: "xMidYMid slice"
    }), r = ot(r, 0, "rect", at), oo(r, {
      width: 1,
      height: 1,
      fill: `url(${ST()}#${t.id})`
    }), e = ot(e, i++, "radialGradient", at), oo(e, {
      id: t.id,
      fx: t.x1,
      fy: t.y1,
      fr: t.r1,
      cx: t.x2,
      cy: t.y2,
      r: t.r2
    });
  } else
    e = ot(e, i++, "linearGradient", at), oo(e, {
      id: t.id,
      x1: t.x1,
      x2: t.x2,
      y1: t.y1,
      y2: t.y2
    });
  for (n = 0, a = t.stops.length; n < a; ++n)
    o = ot(e, n, "stop", at), o.setAttribute("offset", t.stops[n].offset), o.setAttribute("stop-color", t.stops[n].color);
  return zi(e, n), i;
}
function d6(e, t, i) {
  let n;
  return e = ot(e, i, "clipPath", at), e.setAttribute("id", t.id), t.path ? (n = ot(e, 0, "path", at), n.setAttribute("d", t.path)) : (n = ot(e, 0, "rect", at), oo(n, {
    x: 0,
    y: 0,
    width: t.width,
    height: t.height
  })), zi(e, 1), i + 1;
}
function f6(e, t, i, n) {
  t = t.lastChild.previousSibling;
  let a, o = 0;
  un(i, (r) => {
    a = e.mark(t, r, a, n), ++o;
  }), zi(t, 1 + o);
}
function vk(e, t, i, n, a) {
  let o = e._svg, r;
  if (!o && (r = t.ownerDocument, o = ao(r, n, at), e._svg = o, e.mark && (o.__data__ = e, o.__values__ = {
    fill: "default"
  }, n === "g"))) {
    const s = ao(r, "path", at);
    o.appendChild(s), s.__data__ = e;
    const l = ao(r, "g", at);
    o.appendChild(l), l.__data__ = e;
    const d = ao(r, "path", at);
    o.appendChild(d), d.__data__ = e, d.__values__ = {
      fill: "default"
    };
  }
  return (o.ownerSVGElement !== a || u6(o, i)) && t.insertBefore(o, i ? i.nextSibling : t.firstChild), o;
}
function u6(e, t) {
  return e.parentNode && e.parentNode.childNodes.length > 1 && e.previousSibling != t;
}
let xa = null, Ft = null;
const c6 = {
  group(e, t, i) {
    const n = xa = t.childNodes[2];
    Ft = n.__values__, e.foreground(Vd, i, this), Ft = t.__values__, xa = t.childNodes[1], e.content(Vd, i, this);
    const a = xa = t.childNodes[0];
    e.background(Vd, i, this);
    const o = i.mark.interactive === !1 ? "none" : null;
    if (o !== Ft.events && (Wt(n, "pointer-events", o), Wt(a, "pointer-events", o), Ft.events = o), i.strokeForeground && i.stroke) {
      const r = i.fill;
      Wt(n, "display", null), this.style(a, i), Wt(a, "stroke", null), r && (i.fill = null), Ft = n.__values__, this.style(n, i), r && (i.fill = r), xa = null;
    } else
      Wt(n, "display", "none");
  },
  image(e, t, i) {
    i.smooth === !1 ? (Ic(t, "image-rendering", "optimizeSpeed"), Ic(t, "image-rendering", "pixelated")) : Ic(t, "image-rendering", null);
  },
  text(e, t, i) {
    const n = tu(i);
    let a, o, r, s;
    Io(n) ? (o = n.map((l) => Ao(i, l)), a = o.join(`
`), a !== Ft.text && (zi(t, 0), r = t.ownerDocument, s = ko(i), o.forEach((l, d) => {
      const f = ao(r, "tspan", at);
      f.__data__ = i, f.textContent = l, d && (f.setAttribute("x", 0), f.setAttribute("dy", s)), t.appendChild(f);
    }), Ft.text = a)) : (o = Ao(i, n), o !== Ft.text && (t.textContent = o, Ft.text = o)), Wt(t, "font-family", iu(i)), Wt(t, "font-size", Hn(i) + "px"), Wt(t, "font-style", i.fontStyle), Wt(t, "font-variant", i.fontVariant), Wt(t, "font-weight", i.fontWeight);
  }
};
function Vd(e, t, i) {
  t !== Ft[e] && (i ? h6(xa, e, t, i) : Wt(xa, e, t), Ft[e] = t);
}
function Ic(e, t, i) {
  i !== Ft[t] && (i == null ? e.style.removeProperty(t) : e.style.setProperty(t, i + ""), Ft[t] = i);
}
function oo(e, t) {
  for (const i in t)
    Wt(e, i, t[i]);
}
function Wt(e, t, i) {
  i != null ? e.setAttribute(t, i) : e.removeAttribute(t);
}
function h6(e, t, i, n) {
  i != null ? e.setAttributeNS(n, t, i) : e.removeAttributeNS(n, t);
}
function ST() {
  let e;
  return typeof window > "u" ? "" : (e = window.location).hash ? e.href.slice(0, -e.hash.length) : e.href;
}
class FT extends nu {
  constructor(t) {
    super(t), this._text = null, this._defs = {
      gradient: {},
      clipping: {}
    };
  }
  /**
   * Returns the rendered SVG text string,
   * or null if rendering has not yet occurred.
   */
  svg() {
    return this._text;
  }
  /**
   * Internal rendering method.
   * @param {object} scene - The root mark of a scenegraph to render.
   */
  _render(t) {
    const i = T_();
    i.open("svg", vF({}, bf, {
      class: "marks",
      width: this._width * this._scale,
      height: this._height * this._scale,
      viewBox: `0 0 ${this._width} ${this._height}`
    }));
    const n = this._bgcolor;
    return n && n !== "transparent" && n !== "none" && i.open("rect", {
      width: this._width,
      height: this._height,
      fill: n
    }).close(), i.open("g", DT, {
      transform: "translate(" + this._origin + ")"
    }), this.mark(i, t), i.close(), this.defs(i), this._text = i.close() + "", this;
  }
  /**
   * Render a set of mark items.
   * @param {object} m - The markup context.
   * @param {object} scene - The mark parent to render.
   */
  mark(t, i) {
    const n = Ti[i.marktype], a = n.tag, o = [wT, n.attr];
    t.open("g", {
      class: uT(i),
      "clip-path": i.clip ? d_(this, i, i.group) : null
    }, $T(i), {
      "pointer-events": a !== "g" && i.interactive === !1 ? "none" : null
    });
    const r = (s) => {
      const l = this.href(s);
      if (l && t.open("a", l), t.open(a, this.attr(i, s, o, a !== "g" ? a : null)), a === "text") {
        const d = tu(s);
        if (Io(d)) {
          const f = {
            x: 0,
            dy: ko(s)
          };
          for (let u = 0; u < d.length; ++u)
            t.open("tspan", u ? f : null).text(Ao(s, d[u])).close();
        } else
          t.text(Ao(s, d));
      } else if (a === "g") {
        const d = s.strokeForeground, f = s.fill, u = s.stroke;
        d && u && (s.stroke = null), t.open("path", this.attr(i, s, n.background, "bgrect")).close(), t.open("g", this.attr(i, s, n.content)), un(s, (c) => this.mark(t, c)), t.close(), d && u ? (f && (s.fill = null), s.stroke = u, t.open("path", this.attr(i, s, n.foreground, "bgrect")).close(), f && (s.fill = f)) : t.open("path", this.attr(i, s, n.foreground, "bgfore")).close();
      }
      t.close(), l && t.close();
    };
    return n.nested ? i.items && i.items.length && r(i.items[0]) : un(i, r), t.close();
  }
  /**
   * Get href attributes for a hyperlinked mark item.
   * @param {Item} item - The mark item.
   */
  href(t) {
    const i = t.href;
    let n;
    if (i) {
      if (n = this._hrefs && this._hrefs[i])
        return n;
      this.sanitizeURL(i).then((a) => {
        a["xlink:href"] = a.href, a.href = null, (this._hrefs || (this._hrefs = {}))[i] = a;
      });
    }
    return null;
  }
  /**
   * Get an object of SVG attributes for a mark item.
   * @param {object} scene - The mark parent.
   * @param {Item} item - The mark item.
   * @param {array|function} attrs - One or more attribute emitters.
   * @param {string} tag - The tag being rendered.
   */
  attr(t, i, n, a) {
    const o = {}, r = (s, l, d, f) => {
      o[f || s] = l;
    };
    return Array.isArray(n) ? n.forEach((s) => s(r, i, this)) : n(r, i, this), a && p6(o, i, t, a, this._defs), o;
  }
  /**
   * Render SVG defs, as needed.
   * Must be called *after* marks have been processed to ensure the
   * collected state is current and accurate.
   * @param {object} m - The markup context.
   */
  defs(t) {
    const i = this._defs.gradient, n = this._defs.clipping;
    if (Object.keys(i).length + Object.keys(n).length !== 0) {
      t.open("defs");
      for (const o in i) {
        const r = i[o], s = r.stops;
        r.gradient === "radial" ? (t.open("pattern", {
          id: Eh + o,
          viewBox: "0,0,1,1",
          width: "100%",
          height: "100%",
          preserveAspectRatio: "xMidYMid slice"
        }), t.open("rect", {
          width: "1",
          height: "1",
          fill: "url(#" + o + ")"
        }).close(), t.close(), t.open("radialGradient", {
          id: o,
          fx: r.x1,
          fy: r.y1,
          fr: r.r1,
          cx: r.x2,
          cy: r.y2,
          r: r.r2
        })) : t.open("linearGradient", {
          id: o,
          x1: r.x1,
          x2: r.x2,
          y1: r.y1,
          y2: r.y2
        });
        for (let l = 0; l < s.length; ++l)
          t.open("stop", {
            offset: s[l].offset,
            "stop-color": s[l].color
          }).close();
        t.close();
      }
      for (const o in n) {
        const r = n[o];
        t.open("clipPath", {
          id: o
        }), r.path ? t.open("path", {
          d: r.path
        }).close() : t.open("rect", {
          x: 0,
          y: 0,
          width: r.width,
          height: r.height
        }).close(), t.close();
      }
      t.close();
    }
  }
}
function p6(e, t, i, n, a) {
  let o;
  if (t == null || (n === "bgrect" && i.interactive === !1 && (e["pointer-events"] = "none"), n === "bgfore" && (i.interactive === !1 && (e["pointer-events"] = "none"), e.display = "none", t.fill !== null)))
    return e;
  n === "image" && t.smooth === !1 && (o = ["image-rendering: optimizeSpeed;", "image-rendering: pixelated;"]), n === "text" && (e["font-family"] = iu(t), e["font-size"] = Hn(t) + "px", e["font-style"] = t.fontStyle, e["font-variant"] = t.fontVariant, e["font-weight"] = t.fontWeight);
  for (const r in Nh) {
    let s = t[r];
    const l = Nh[r];
    s === "transparent" && (l === "fill" || l === "stroke") || s != null && (r_(s) && (s = qF(s, a.gradient, "")), e[l] = s);
  }
  for (const r in qh) {
    const s = t[r];
    s != null && (o = o || [], o.push(`${qh[r]}: ${s};`));
  }
  return o && (e.style = o.join(" ")), e;
}
const Zi = {
  svgMarkTypes: ["text"],
  svgOnTop: !0,
  debug: !1
};
function g6(e) {
  Zi.svgMarkTypes = e.svgMarkTypes ?? ["text"], Zi.svgOnTop = e.svgOnTop ?? !0, Zi.debug = e.debug ?? !1;
}
class Ry extends nu {
  constructor(t) {
    super(t), this._svgRenderer = new C_(t), this._canvasRenderer = new Ph(t);
  }
  /**
   * Initialize a new HybridRenderer instance.
   * @param {DOMElement} el - The containing DOM element for the display.
   * @param {number} width - The coordinate width of the display, in pixels.
   * @param {number} height - The coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {HybridRenderer} - This renderer instance.
   */
  initialize(t, i, n, a, o) {
    this._root_el = ot(t, 0, "div");
    const r = ot(this._root_el, 0, "div"), s = ot(this._root_el, 1, "div");
    return this._root_el.style.position = "relative", Zi.debug || (r.style.height = "100%", s.style.position = "absolute", s.style.top = "0", s.style.left = "0", s.style.height = "100%", s.style.width = "100%"), this._svgEl = Zi.svgOnTop ? s : r, this._canvasEl = Zi.svgOnTop ? r : s, this._svgEl.style.pointerEvents = "none", this._canvasRenderer.initialize(this._canvasEl, i, n, a, o), this._svgRenderer.initialize(this._svgEl, i, n, a, o), super.initialize(t, i, n, a, o);
  }
  /**
   * Flag a mark item as dirty.
   * @param {Item} item - The mark item.
   */
  dirty(t) {
    return Zi.svgMarkTypes.includes(t.mark.marktype) ? this._svgRenderer.dirty(t) : this._canvasRenderer.dirty(t), this;
  }
  /**
   * Internal rendering method.
   * @param {object} scene - The root mark of a scenegraph to render.
   * @param {Array} markTypes - Array of the mark types to render.
   *                            If undefined, render all mark types
   */
  _render(t, i) {
    const a = (i ?? ["arc", "area", "image", "line", "path", "rect", "rule", "shape", "symbol", "text", "trail"]).filter((o) => !Zi.svgMarkTypes.includes(o));
    this._svgRenderer.render(t, Zi.svgMarkTypes), this._canvasRenderer.render(t, a);
  }
  /**
   * Resize the display.
   * @param {number} width - The new coordinate width of the display, in pixels.
   * @param {number} height - The new coordinate height of the display, in pixels.
   * @param {Array<number>} origin - The new origin of the display, in pixels.
   *   The coordinate system will be translated to this point.
   * @param {number} [scaleFactor=1] - Optional scaleFactor by which to multiply
   *   the width and height to determine the final pixel size.
   * @return {SVGRenderer} - This renderer instance;
   */
  resize(t, i, n, a) {
    return super.resize(t, i, n, a), this._svgRenderer.resize(t, i, n, a), this._canvasRenderer.resize(t, i, n, a), this;
  }
  background(t) {
    return Zi.svgOnTop ? this._canvasRenderer.background(t) : this._svgRenderer.background(t), this;
  }
}
class TT extends au {
  constructor(t, i) {
    super(t, i);
  }
  initialize(t, i, n) {
    const a = ot(ot(t, 0, "div"), Zi.svgOnTop ? 0 : 1, "div");
    return super.initialize(a, i, n);
  }
}
const CT = "canvas", RT = "hybrid", IT = "png", jT = "svg", zT = "none", ro = {
  Canvas: CT,
  PNG: IT,
  SVG: jT,
  Hybrid: RT,
  None: zT
}, Pr = {};
Pr[CT] = Pr[IT] = {
  renderer: Ph,
  headless: Ph,
  handler: au
};
Pr[jT] = {
  renderer: C_,
  headless: FT,
  handler: yT
};
Pr[RT] = {
  renderer: Ry,
  headless: Ry,
  handler: TT
};
Pr[zT] = {};
function eg(e, t) {
  return e = String(e || "").toLowerCase(), arguments.length > 1 ? (Pr[e] = t, this) : Pr[e];
}
function PT(e, t, i) {
  const n = [], a = new it().union(t), o = e.marktype;
  return o ? NT(e, a, i, n) : o === "group" ? qT(e, a, i, n) : Bd("Intersect scene must be mark node or group item.");
}
function NT(e, t, i, n) {
  if (m6(e, t, i)) {
    const a = e.items, o = e.marktype, r = a.length;
    let s = 0;
    if (o === "group")
      for (; s < r; ++s)
        qT(a[s], t, i, n);
    else
      for (const l = Ti[o].isect; s < r; ++s) {
        const d = a[s];
        LT(d, t, l) && n.push(d);
      }
  }
  return n;
}
function m6(e, t, i) {
  return e.bounds && t.intersects(e.bounds) && (e.marktype === "group" || e.interactive !== !1 && (!i || i(e)));
}
function qT(e, t, i, n) {
  i && i(e.mark) && LT(e, t, Ti.group.isect) && n.push(e);
  const a = e.items, o = a && a.length;
  if (o) {
    const r = e.x || 0, s = e.y || 0;
    t.translate(-r, -s);
    for (let l = 0; l < o; ++l)
      NT(a[l], t, i, n);
    t.translate(r, s);
  }
  return n;
}
function LT(e, t, i) {
  const n = e.bounds;
  return t.encloses(n) || t.intersects(n) && i(e, t);
}
const Bm = new it();
function BT(e) {
  const t = e.clip;
  if (Q0(t))
    t(Qf(Bm.clear()));
  else if (t)
    Bm.set(0, 0, e.group.width, e.group.height);
  else return;
  e.bounds.intersect(Bm);
}
const b6 = 1e-9;
function R_(e, t, i) {
  return e === t ? !0 : i === "path" ? UT(e, t) : e instanceof Date && t instanceof Date ? +e == +t : M$(e) && M$(t) ? Math.abs(e - t) <= b6 : !e || !t || !U$(e) && !U$(t) ? e == t : y6(e, t);
}
function UT(e, t) {
  return R_(Ks(e), Ks(t));
}
function y6(e, t) {
  var i = Object.keys(e), n = Object.keys(t), a, o;
  if (i.length !== n.length) return !1;
  for (i.sort(), n.sort(), o = i.length - 1; o >= 0; o--)
    if (i[o] != n[o]) return !1;
  for (o = i.length - 1; o >= 0; o--)
    if (a = i[o], !R_(e[a], t[a], a)) return !1;
  return typeof e == typeof t;
}
function v6() {
  GF(), MU();
}
function $l(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function _6(e) {
  return e.length === 1 ? x6(e[0]) : w6(e);
}
const x6 = (e) => function(t) {
  return t[e];
}, w6 = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Um(e) {
  throw Error(e);
}
function $6(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Um("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Um("Access path missing closing bracket: " + e), n && Um("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function k6(e, t, i) {
  const n = $6(e);
  return e = n.length === 1 ? n[0] : e, $l(_6(n), [e], e);
}
k6("id");
$l((e) => e, [], "identity");
$l(() => 0, [], "zero");
$l(() => 1, [], "one");
$l(() => !0, [], "true");
$l(() => !1, [], "false");
function A6(e) {
  return e === Object(e);
}
function Mm(e) {
  return e[e.length - 1];
}
function O6(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function kl(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), O6(n, i);
}
const tl = "top", nn = "left", rn = "right", Oo = "bottom", E6 = "top-left", D6 = "top-right", S6 = "bottom-left", F6 = "bottom-right", I_ = "start", Iy = "middle", Gt = "end", T6 = "x", C6 = "y", tg = "group", j_ = "axis", z_ = "title", R6 = "frame", I6 = "scope", P_ = "legend", MT = "row-header", VT = "row-footer", WT = "row-title", GT = "column-header", HT = "column-footer", YT = "column-title", j6 = "padding", z6 = "symbol", XT = "fit", JT = "fit-x", ZT = "fit-y", P6 = "pad", N_ = "none", Hu = "all", jy = "each", q_ = "flush", so = "column", lo = "row";
function KT(e) {
  T.call(this, null, e);
}
kl(KT, T, {
  transform(e, t) {
    const i = t.dataflow, n = e.mark, a = n.marktype, o = Ti[a], r = o.bound;
    let s = n.bounds, l;
    if (o.nested)
      n.items.length && i.dirty(n.items[0]), s = Yu(n, r), n.items.forEach((d) => {
        d.bounds.clear().union(s);
      });
    else if (a === tg || e.modified())
      switch (t.visit(t.MOD, (d) => i.dirty(d)), s.clear(), n.items.forEach((d) => s.union(Yu(d, r))), n.role) {
        case j_:
        case P_:
        case z_:
          t.reflow();
      }
    else
      l = t.changed(t.REM), t.visit(t.ADD, (d) => {
        s.union(Yu(d, r));
      }), t.visit(t.MOD, (d) => {
        l = l || s.alignsWith(d.bounds), i.dirty(d), s.union(Yu(d, r));
      }), l && (s.clear(), n.items.forEach((d) => s.union(d.bounds)));
    return BT(n), t.modifies("bounds");
  }
});
function Yu(e, t, i) {
  return t(e.bounds.clear(), e, i);
}
const _k = ":vega_identifier:";
function L_(e) {
  T.call(this, 0, e);
}
L_.Definition = {
  type: "Identifier",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "as",
    type: "string",
    required: !0
  }]
};
kl(L_, T, {
  transform(e, t) {
    const i = N6(t.dataflow), n = e.as;
    let a = i.value;
    return t.visit(t.ADD, (o) => o[n] = o[n] || ++a), i.set(this.value = a), t;
  }
});
function N6(e) {
  return e._signals[_k] || (e._signals[_k] = e.add(0));
}
function QT(e) {
  T.call(this, null, e);
}
kl(QT, T, {
  transform(e, t) {
    let i = this.value;
    i || (i = t.dataflow.scenegraph().mark(e.markdef, q6(e), e.index), i.group.context = e.context, e.context.group || (e.context.group = i.group), i.source = this.source, i.clip = e.clip, i.interactive = e.interactive, this.value = i);
    const n = i.marktype === tg ? Gp : Wp;
    return t.visit(t.ADD, (a) => n.call(a, i)), (e.modified("clip") || e.modified("interactive")) && (i.clip = e.clip, i.interactive = !!e.interactive, i.zdirty = !0, t.reflow()), i.items = t.source, t;
  }
});
function q6(e) {
  const t = e.groups, i = e.parent;
  return t && t.size === 1 ? t.get(Object.keys(t.object)[0]) : t && i ? t.lookup(i) : null;
}
function eC(e) {
  T.call(this, null, e);
}
const xk = {
  parity: (e) => e.filter((t, i) => i % 2 ? t.opacity = 0 : 1),
  greedy: (e, t) => {
    let i;
    return e.filter((n, a) => !a || !tC(i.bounds, n.bounds, t) ? (i = n, 1) : n.opacity = 0);
  }
}, tC = (e, t, i) => i > Math.max(t.x1 - e.x2, e.x1 - t.x2, t.y1 - e.y2, e.y1 - t.y2), wk = (e, t) => {
  for (var i = 1, n = e.length, a = e[0].bounds, o; i < n; a = o, ++i)
    if (tC(a, o = e[i].bounds, t)) return !0;
}, L6 = (e) => {
  const t = e.bounds;
  return t.width() > 1 && t.height() > 1;
}, B6 = (e, t, i) => {
  var n = e.range(), a = new it();
  return t === tl || t === Oo ? a.set(n[0], -1 / 0, n[1], 1 / 0) : a.set(-1 / 0, n[0], 1 / 0, n[1]), a.expand(i || 1), (o) => a.encloses(o.bounds);
}, $k = (e) => (e.forEach((t) => t.opacity = 1), e), kk = (e, t) => e.reflow(t.modified()).modifies("opacity");
kl(eC, T, {
  transform(e, t) {
    const i = xk[e.method] || xk.parity, n = e.separation || 0;
    let a = t.materialize(t.SOURCE).source, o, r;
    if (!a || !a.length) return;
    if (!e.method)
      return e.modified("method") && ($k(a), t = kk(t, e)), t;
    if (a = a.filter(L6), !a.length) return;
    if (e.sort && (a = a.slice().sort(e.sort)), o = $k(a), t = kk(t, e), o.length >= 3 && wk(o, n)) {
      do
        o = i(o, n);
      while (o.length >= 3 && wk(o, n));
      o.length < 3 && !Mm(a).opacity && (o.length > 1 && (Mm(o).opacity = 0), Mm(a).opacity = 1);
    }
    e.boundScale && e.boundTolerance >= 0 && (r = B6(e.boundScale, e.boundOrient, +e.boundTolerance), a.forEach((l) => {
      r(l) || (l.opacity = 0);
    }));
    const s = o[0].mark.bounds.clear();
    return a.forEach((l) => {
      l.opacity && s.union(l.bounds);
    }), t;
  }
});
function iC(e) {
  T.call(this, null, e);
}
kl(iC, T, {
  transform(e, t) {
    const i = t.dataflow;
    if (t.visit(t.ALL, (n) => i.dirty(n)), t.fields && t.fields.zindex) {
      const n = t.source && t.source[0];
      n && (n.mark.zdirty = !0);
    }
  }
});
const St = new it();
function Is(e, t, i) {
  return e[t] === i ? 0 : (e[t] = i, 1);
}
function U6(e) {
  var t = e.items[0].orient;
  return t === nn || t === rn;
}
function M6(e) {
  let t = +e.grid;
  return [
    e.ticks ? t++ : -1,
    // ticks index
    e.labels ? t++ : -1,
    // labels index
    t + +e.domain
    // title index
  ];
}
function V6(e, t, i, n) {
  var a = t.items[0], o = a.datum, r = a.translate != null ? a.translate : 0.5, s = a.orient, l = M6(o), d = a.range, f = a.offset, u = a.position, c = a.minExtent, h = a.maxExtent, p = o.title && a.items[l[2]].items[0], g = a.titlePadding, m = a.bounds, b = p && w_(p), y = 0, v = 0, w, x;
  switch (St.clear().union(m), m.clear(), (w = l[0]) > -1 && m.union(a.items[w].bounds), (w = l[1]) > -1 && m.union(a.items[w].bounds), s) {
    case tl:
      y = u || 0, v = -f, x = Math.max(c, Math.min(h, -m.y1)), m.add(0, -x).add(d, 0), p && Xu(e, p, x, g, b, 0, -1, m);
      break;
    case nn:
      y = -f, v = u || 0, x = Math.max(c, Math.min(h, -m.x1)), m.add(-x, 0).add(0, d), p && Xu(e, p, x, g, b, 1, -1, m);
      break;
    case rn:
      y = i + f, v = u || 0, x = Math.max(c, Math.min(h, m.x2)), m.add(0, 0).add(x, d), p && Xu(e, p, x, g, b, 1, 1, m);
      break;
    case Oo:
      y = u || 0, v = n + f, x = Math.max(c, Math.min(h, m.y2)), m.add(0, 0).add(d, x), p && Xu(e, p, x, g, 0, 0, 1, m);
      break;
    default:
      y = a.x, v = a.y;
  }
  return Na(m.translate(y, v), a), Is(a, "x", y + r) | Is(a, "y", v + r) && (a.bounds = St, e.dirty(a), a.bounds = m, e.dirty(a)), a.mark.bounds.clear().union(m);
}
function Xu(e, t, i, n, a, o, r, s) {
  const l = t.bounds;
  if (t.auto) {
    const d = r * (i + a + n);
    let f = 0, u = 0;
    e.dirty(t), o ? f = (t.x || 0) - (t.x = d) : u = (t.y || 0) - (t.y = d), t.mark.bounds.clear().union(l.translate(-f, -u)), e.dirty(t);
  }
  s.union(l);
}
const Ak = (e, t) => Math.floor(Math.min(e, t)), Ok = (e, t) => Math.ceil(Math.max(e, t));
function W6(e) {
  var t = e.items, i = t.length, n = 0, a, o;
  const r = {
    marks: [],
    rowheaders: [],
    rowfooters: [],
    colheaders: [],
    colfooters: [],
    rowtitle: null,
    coltitle: null
  };
  for (; n < i; ++n)
    if (a = t[n], o = a.items, a.marktype === tg)
      switch (a.role) {
        case j_:
        case P_:
        case z_:
          break;
        case MT:
          r.rowheaders.push(...o);
          break;
        case VT:
          r.rowfooters.push(...o);
          break;
        case GT:
          r.colheaders.push(...o);
          break;
        case HT:
          r.colfooters.push(...o);
          break;
        case WT:
          r.rowtitle = o[0];
          break;
        case YT:
          r.coltitle = o[0];
          break;
        default:
          r.marks.push(...o);
      }
  return r;
}
function G6(e) {
  return new it().set(0, 0, e.width || 0, e.height || 0);
}
function H6(e) {
  const t = e.bounds.clone();
  return t.empty() ? t.set(0, 0, 0, 0) : t.translate(-(e.x || 0), -(e.y || 0));
}
function Le(e, t, i) {
  const n = A6(e) ? e[t] : e;
  return n ?? (i !== void 0 ? i : 0);
}
function Ek(e) {
  return e < 0 ? Math.ceil(-e) : 0;
}
function nC(e, t, i) {
  var n = !i.nodirty, a = i.bounds === q_ ? G6 : H6, o = St.set(0, 0, 0, 0), r = Le(i.align, so), s = Le(i.align, lo), l = Le(i.padding, so), d = Le(i.padding, lo), f = i.columns || t.length, u = f <= 0 ? 1 : Math.ceil(t.length / f), c = t.length, h = Array(c), p = Array(f), g = 0, m = Array(c), b = Array(u), y = 0, v = Array(c), w = Array(c), x = Array(c), $, _, k, A, E, S, z, O, D, j, F;
  for (_ = 0; _ < f; ++_) p[_] = 0;
  for (_ = 0; _ < u; ++_) b[_] = 0;
  for (_ = 0; _ < c; ++_)
    S = t[_], E = x[_] = a(S), S.x = S.x || 0, v[_] = 0, S.y = S.y || 0, w[_] = 0, k = _ % f, A = ~~(_ / f), g = Math.max(g, z = Math.ceil(E.x2)), y = Math.max(y, O = Math.ceil(E.y2)), p[k] = Math.max(p[k], z), b[A] = Math.max(b[A], O), h[_] = l + Ek(E.x1), m[_] = d + Ek(E.y1), n && e.dirty(t[_]);
  for (_ = 0; _ < c; ++_)
    _ % f === 0 && (h[_] = 0), _ < f && (m[_] = 0);
  if (r === jy)
    for (k = 1; k < f; ++k) {
      for (F = 0, _ = k; _ < c; _ += f)
        F < h[_] && (F = h[_]);
      for (_ = k; _ < c; _ += f)
        h[_] = F + p[k - 1];
    }
  else if (r === Hu) {
    for (F = 0, _ = 0; _ < c; ++_)
      _ % f && F < h[_] && (F = h[_]);
    for (_ = 0; _ < c; ++_)
      _ % f && (h[_] = F + g);
  } else
    for (r = !1, k = 1; k < f; ++k)
      for (_ = k; _ < c; _ += f)
        h[_] += p[k - 1];
  if (s === jy)
    for (A = 1; A < u; ++A) {
      for (F = 0, _ = A * f, $ = _ + f; _ < $; ++_)
        F < m[_] && (F = m[_]);
      for (_ = A * f; _ < $; ++_)
        m[_] = F + b[A - 1];
    }
  else if (s === Hu) {
    for (F = 0, _ = f; _ < c; ++_)
      F < m[_] && (F = m[_]);
    for (_ = f; _ < c; ++_)
      m[_] = F + y;
  } else
    for (s = !1, A = 1; A < u; ++A)
      for (_ = A * f, $ = _ + f; _ < $; ++_)
        m[_] += b[A - 1];
  for (D = 0, _ = 0; _ < c; ++_)
    D = h[_] + (_ % f ? D : 0), v[_] += D - t[_].x;
  for (k = 0; k < f; ++k)
    for (j = 0, _ = k; _ < c; _ += f)
      j += m[_], w[_] += j - t[_].y;
  if (r && Le(i.center, so) && u > 1)
    for (_ = 0; _ < c; ++_)
      E = r === Hu ? g : p[_ % f], D = E - x[_].x2 - t[_].x - v[_], D > 0 && (v[_] += D / 2);
  if (s && Le(i.center, lo) && f !== 1)
    for (_ = 0; _ < c; ++_)
      E = s === Hu ? y : b[~~(_ / f)], j = E - x[_].y2 - t[_].y - w[_], j > 0 && (w[_] += j / 2);
  for (_ = 0; _ < c; ++_)
    o.union(x[_].translate(v[_], w[_]));
  switch (D = Le(i.anchor, T6), j = Le(i.anchor, C6), Le(i.anchor, so)) {
    case Gt:
      D -= o.width();
      break;
    case Iy:
      D -= o.width() / 2;
  }
  switch (Le(i.anchor, lo)) {
    case Gt:
      j -= o.height();
      break;
    case Iy:
      j -= o.height() / 2;
  }
  for (D = Math.round(D), j = Math.round(j), o.clear(), _ = 0; _ < c; ++_)
    t[_].mark.bounds.clear();
  for (_ = 0; _ < c; ++_)
    S = t[_], S.x += v[_] += D, S.y += w[_] += j, o.union(S.mark.bounds.union(S.bounds.translate(v[_], w[_]))), n && e.dirty(S);
  return o;
}
function Y6(e, t, i) {
  var n = W6(t), a = n.marks, o = i.bounds === q_ ? X6 : J6, r = i.offset, s = i.columns || a.length, l = s <= 0 ? 1 : Math.ceil(a.length / s), d = l * s, f, u, c, h, p, g, m;
  const b = nC(e, a, i);
  b.empty() && b.set(0, 0, 0, 0), n.rowheaders && (g = Le(i.headerBand, lo, null), f = Ju(e, n.rowheaders, a, s, l, -Le(r, "rowHeader"), Ak, 0, o, "x1", 0, s, 1, g)), n.colheaders && (g = Le(i.headerBand, so, null), u = Ju(e, n.colheaders, a, s, s, -Le(r, "columnHeader"), Ak, 1, o, "y1", 0, 1, s, g)), n.rowfooters && (g = Le(i.footerBand, lo, null), c = Ju(e, n.rowfooters, a, s, l, Le(r, "rowFooter"), Ok, 0, o, "x2", s - 1, s, 1, g)), n.colfooters && (g = Le(i.footerBand, so, null), h = Ju(e, n.colfooters, a, s, s, Le(r, "columnFooter"), Ok, 1, o, "y2", d - s, 1, s, g)), n.rowtitle && (p = Le(i.titleAnchor, lo), m = Le(r, "rowTitle"), m = p === Gt ? c + m : f - m, g = Le(i.titleBand, lo, 0.5), Dk(e, n.rowtitle, m, 0, b, g)), n.coltitle && (p = Le(i.titleAnchor, so), m = Le(r, "columnTitle"), m = p === Gt ? h + m : u - m, g = Le(i.titleBand, so, 0.5), Dk(e, n.coltitle, m, 1, b, g));
}
function X6(e, t) {
  return t === "x1" ? e.x || 0 : t === "y1" ? e.y || 0 : t === "x2" ? (e.x || 0) + (e.width || 0) : t === "y2" ? (e.y || 0) + (e.height || 0) : void 0;
}
function J6(e, t) {
  return e.bounds[t];
}
function Ju(e, t, i, n, a, o, r, s, l, d, f, u, c, h) {
  var p = i.length, g = 0, m = 0, b, y, v, w, x, $, _, k, A;
  if (!p) return g;
  for (b = f; b < p; b += u)
    i[b] && (g = r(g, l(i[b], d)));
  if (!t.length) return g;
  for (t.length > a && (e.warn("Grid headers exceed limit: " + a), t = t.slice(0, a)), g += o, y = 0, w = t.length; y < w; ++y)
    e.dirty(t[y]), t[y].mark.bounds.clear();
  for (b = f, y = 0, w = t.length; y < w; ++y, b += u) {
    for ($ = t[y], x = $.mark.bounds, v = b; v >= 0 && (_ = i[v]) == null; v -= c) ;
    s ? (k = h == null ? _.x : Math.round(_.bounds.x1 + h * _.bounds.width()), A = g) : (k = g, A = h == null ? _.y : Math.round(_.bounds.y1 + h * _.bounds.height())), x.union($.bounds.translate(k - ($.x || 0), A - ($.y || 0))), $.x = k, $.y = A, e.dirty($), m = r(m, x[d]);
  }
  return m;
}
function Dk(e, t, i, n, a, o) {
  if (t) {
    e.dirty(t);
    var r = i, s = i;
    n ? r = Math.round(a.x1 + o * a.width()) : s = Math.round(a.y1 + o * a.height()), t.bounds.translate(r - (t.x || 0), s - (t.y || 0)), t.mark.bounds.clear().union(t.bounds), t.x = r, t.y = s, e.dirty(t);
  }
}
function Z6(e, t) {
  const i = e[t] || {};
  return (n, a) => i[n] != null ? i[n] : e[n] != null ? e[n] : a;
}
function K6(e, t) {
  let i = -1 / 0;
  return e.forEach((n) => {
    n.offset != null && (i = Math.max(i, n.offset));
  }), i > -1 / 0 ? i : t;
}
function Q6(e, t, i, n, a, o, r) {
  const s = Z6(i, t), l = K6(e, s("offset", 0)), d = s("anchor", I_), f = d === Gt ? 1 : d === Iy ? 0.5 : 0, u = {
    align: jy,
    bounds: s("bounds", q_),
    columns: s("direction") === "vertical" ? 1 : e.length,
    padding: s("margin", 8),
    center: s("center"),
    nodirty: !0
  };
  switch (t) {
    case nn:
      u.anchor = {
        x: Math.floor(n.x1) - l,
        column: Gt,
        y: f * (r || n.height() + 2 * n.y1),
        row: d
      };
      break;
    case rn:
      u.anchor = {
        x: Math.ceil(n.x2) + l,
        y: f * (r || n.height() + 2 * n.y1),
        row: d
      };
      break;
    case tl:
      u.anchor = {
        y: Math.floor(a.y1) - l,
        row: Gt,
        x: f * (o || a.width() + 2 * a.x1),
        column: d
      };
      break;
    case Oo:
      u.anchor = {
        y: Math.ceil(a.y2) + l,
        x: f * (o || a.width() + 2 * a.x1),
        column: d
      };
      break;
    case E6:
      u.anchor = {
        x: l,
        y: l
      };
      break;
    case D6:
      u.anchor = {
        x: o - l,
        y: l,
        column: Gt
      };
      break;
    case S6:
      u.anchor = {
        x: l,
        y: r - l,
        row: Gt
      };
      break;
    case F6:
      u.anchor = {
        x: o - l,
        y: r - l,
        column: Gt,
        row: Gt
      };
      break;
  }
  return u;
}
function e8(e, t) {
  var i = t.items[0], n = i.datum, a = i.orient, o = i.bounds, r = i.x, s = i.y, l, d;
  return i._bounds ? i._bounds.clear().union(o) : i._bounds = o.clone(), o.clear(), i8(e, i, i.items[0].items[0]), o = t8(i, o), l = 2 * i.padding, d = 2 * i.padding, o.empty() || (l = Math.ceil(o.width() + l), d = Math.ceil(o.height() + d)), n.type === z6 && n8(i.items[0].items[0].items[0].items), a !== N_ && (i.x = r = 0, i.y = s = 0), i.width = l, i.height = d, Na(o.set(r, s, r + l, s + d), i), i.mark.bounds.clear().union(o), i;
}
function t8(e, t) {
  return e.items.forEach((i) => t.union(i.bounds)), t.x1 = e.padding, t.y1 = e.padding, t;
}
function i8(e, t, i) {
  var n = t.padding, a = n - i.x, o = n - i.y;
  if (!t.datum.title)
    (a || o) && sd(e, i, a, o);
  else {
    var r = t.items[1].items[0], s = r.anchor, l = t.titlePadding || 0, d = n - r.x, f = n - r.y;
    switch (r.orient) {
      case nn:
        a += Math.ceil(r.bounds.width()) + l;
        break;
      case rn:
      case Oo:
        break;
      default:
        o += r.bounds.height() + l;
    }
    switch ((a || o) && sd(e, i, a, o), r.orient) {
      case nn:
        f += ws(t, i, r, s, 1, 1);
        break;
      case rn:
        d += ws(t, i, r, Gt, 0, 0) + l, f += ws(t, i, r, s, 1, 1);
        break;
      case Oo:
        d += ws(t, i, r, s, 0, 0), f += ws(t, i, r, Gt, -1, 0, 1) + l;
        break;
      default:
        d += ws(t, i, r, s, 0, 0);
    }
    (d || f) && sd(e, r, d, f), (d = Math.round(r.bounds.x1 - n)) < 0 && (sd(e, i, -d, 0), sd(e, r, -d, 0));
  }
}
function ws(e, t, i, n, a, o, r) {
  const s = e.datum.type !== "symbol", l = i.datum.vgrad, d = s && (o || !l) && !r ? t.items[0] : t, f = d.bounds[a ? "y2" : "x2"] - e.padding, u = l && o ? f : 0, c = l && o ? 0 : f, h = a <= 0 ? 0 : w_(i);
  return Math.round(n === I_ ? u : n === Gt ? c - h : 0.5 * (f - h));
}
function sd(e, t, i, n) {
  t.x += i, t.y += n, t.bounds.translate(i, n), t.mark.bounds.translate(i, n), e.dirty(t);
}
function n8(e) {
  const t = e.reduce((i, n) => (i[n.column] = Math.max(n.bounds.x2 - n.x, i[n.column] || 0), i), {});
  e.forEach((i) => {
    i.width = t[i.column], i.height = i.bounds.y2 - i.y;
  });
}
function a8(e, t, i, n, a) {
  var o = t.items[0], r = o.frame, s = o.orient, l = o.anchor, d = o.offset, f = o.padding, u = o.items[0].items[0], c = o.items[1] && o.items[1].items[0], h = s === nn || s === rn ? n : i, p = 0, g = 0, m = 0, b = 0, y = 0, v;
  if (r !== tg ? s === nn ? (p = a.y2, h = a.y1) : s === rn ? (p = a.y1, h = a.y2) : (p = a.x1, h = a.x2) : s === nn && (p = n, h = 0), v = l === I_ ? p : l === Gt ? h : (p + h) / 2, c && c.text) {
    switch (s) {
      case tl:
      case Oo:
        y = u.bounds.height() + f;
        break;
      case nn:
        b = u.bounds.width() + f;
        break;
      case rn:
        b = -u.bounds.width() - f;
        break;
    }
    St.clear().union(c.bounds), St.translate(b - (c.x || 0), y - (c.y || 0)), Is(c, "x", b) | Is(c, "y", y) && (e.dirty(c), c.bounds.clear().union(St), c.mark.bounds.clear().union(St), e.dirty(c)), St.clear().union(c.bounds);
  } else
    St.clear();
  switch (St.union(u.bounds), s) {
    case tl:
      g = v, m = a.y1 - St.height() - d;
      break;
    case nn:
      g = a.x1 - St.width() - d, m = v;
      break;
    case rn:
      g = a.x2 + St.width() + d, m = v;
      break;
    case Oo:
      g = v, m = a.y2 + d;
      break;
    default:
      g = o.x, m = o.y;
  }
  return Is(o, "x", g) | Is(o, "y", m) && (St.translate(g, m), e.dirty(o), o.bounds.clear().union(St), t.bounds.clear().union(St), e.dirty(o)), o.bounds;
}
function aC(e) {
  T.call(this, null, e);
}
kl(aC, T, {
  transform(e, t) {
    const i = t.dataflow;
    return e.mark.items.forEach((n) => {
      e.layout && Y6(i, n, e.layout), r8(i, n, e);
    }), o8(e.mark.group) ? t.reflow() : t;
  }
});
function o8(e) {
  return e && e.mark.role !== "legend-entry";
}
function r8(e, t, i) {
  var n = t.items, a = Math.max(0, t.width || 0), o = Math.max(0, t.height || 0), r = new it().set(0, 0, a, o), s = r.clone(), l = r.clone(), d = [], f, u, c, h, p, g;
  for (p = 0, g = n.length; p < g; ++p)
    switch (u = n[p], u.role) {
      case j_:
        h = U6(u) ? s : l, h.union(V6(e, u, a, o));
        break;
      case z_:
        f = u;
        break;
      case P_:
        d.push(e8(e, u));
        break;
      case R6:
      case I6:
      case MT:
      case VT:
      case WT:
      case GT:
      case HT:
      case YT:
        s.union(u.bounds), l.union(u.bounds);
        break;
      default:
        r.union(u.bounds);
    }
  if (d.length) {
    const m = {};
    d.forEach((b) => {
      c = b.orient || rn, c !== N_ && (m[c] || (m[c] = [])).push(b);
    });
    for (const b in m) {
      const y = m[b];
      nC(e, y, Q6(y, b, i.legends, s, l, a, o));
    }
    d.forEach((b) => {
      const y = b.bounds;
      if (y.equals(b._bounds) || (b.bounds = b._bounds, e.dirty(b), b.bounds = y, e.dirty(b)), i.autosize && (i.autosize.type === XT || i.autosize.type === JT || i.autosize.type === ZT))
        switch (b.orient) {
          case nn:
          case rn:
            r.add(y.x1, 0).add(y.x2, 0);
            break;
          case tl:
          case Oo:
            r.add(0, y.y1).add(0, y.y2);
        }
      else
        r.union(y);
    });
  }
  r.union(s).union(l), f && r.union(a8(e, f, a, o, r)), t.clip && r.set(0, 0, t.width || 0, t.height || 0), s8(e, t, r, i);
}
function s8(e, t, i, n) {
  const a = n.autosize || {}, o = a.type;
  if (e._autosize < 1 || !o) return;
  let r = e._width, s = e._height, l = Math.max(0, t.width || 0), d = Math.max(0, Math.ceil(-i.x1)), f = Math.max(0, t.height || 0), u = Math.max(0, Math.ceil(-i.y1));
  const c = Math.max(0, Math.ceil(i.x2 - l)), h = Math.max(0, Math.ceil(i.y2 - f));
  if (a.contains === j6) {
    const p = e.padding();
    r -= p.left + p.right, s -= p.top + p.bottom;
  }
  o === N_ ? (d = 0, u = 0, l = r, f = s) : o === XT ? (l = Math.max(0, r - d - c), f = Math.max(0, s - u - h)) : o === JT ? (l = Math.max(0, r - d - c), s = f + u + h) : o === ZT ? (r = l + d + c, f = Math.max(0, s - u - h)) : o === P6 && (r = l + d + c, s = f + u + h), e._resizeView(r, s, l, f, [d, u], a.resize);
}
const l8 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  bound: KT,
  identifier: L_,
  mark: QT,
  overlap: eC,
  render: iC,
  viewlayout: aC
}, Symbol.toStringTag, { value: "Module" }));
function Al(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function d8(e) {
  return e.length === 1 ? f8(e[0]) : u8(e);
}
const f8 = (e) => function(t) {
  return t[e];
}, u8 = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function $a(e) {
  throw Error(e);
}
function c8(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || $a("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && $a("Access path missing closing bracket: " + e), n && $a("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function h8(e, t, i) {
  const n = c8(e);
  return e = n.length === 1 ? n[0] : e, Al(d8(n), [e], e);
}
h8("id");
const p8 = Al((e) => e, [], "identity");
Al(() => 0, [], "zero");
const oC = Al(() => 1, [], "one");
Al(() => !0, [], "true");
const er = Al(() => !1, [], "false");
var ou = Array.isArray;
function g8(e) {
  return e === Object(e);
}
function Er(e) {
  return e[e.length - 1];
}
function m8(e) {
  return e == null || e === "" ? null : +e;
}
const b8 = (e) => (t) => e * Math.exp(t), y8 = (e) => (t) => Math.log(e * t), v8 = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), _8 = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, Sk = (e) => (t) => t < 0 ? -Math.pow(-t, e) : Math.pow(t, e);
function ig(e, t, i, n, a) {
  const o = n(e[0]), r = n(Er(e)), s = (o + r) / 2;
  return [a(s + (o - s) * i), a(s + (r - s) * i)];
}
function x8(e, t, i) {
  return ig(e, t, i, m8, p8);
}
function w8(e, t, i) {
  const n = Math.sign(e[0]);
  return ig(e, t, i, y8(n), b8(n));
}
function Fk(e, t, i, n) {
  return ig(e, t, i, Sk(n), Sk(1 / n));
}
function $8(e, t, i, n) {
  return ig(e, t, i, v8(n), _8(n));
}
function yo(e) {
  return typeof e == "function";
}
function k8(e) {
  return yo(e) ? e : () => e;
}
function A8(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const O8 = Object.prototype.hasOwnProperty;
function E8(e, t) {
  return O8.call(e, t);
}
const Zu = {};
function rC(e) {
  let t = {}, i;
  function n(o) {
    return E8(t, o) && t[o] !== Zu;
  }
  const a = {
    size: 0,
    empty: 0,
    object: t,
    has: n,
    get(o) {
      return n(o) ? t[o] : void 0;
    },
    set(o, r) {
      return n(o) || (++a.size, t[o] === Zu && --a.empty), t[o] = r, this;
    },
    delete(o) {
      return n(o) && (--a.size, ++a.empty, t[o] = Zu), this;
    },
    clear() {
      a.size = a.empty = 0, a.object = t = {};
    },
    test(o) {
      return arguments.length ? (i = o, a) : i;
    },
    clean() {
      const o = {};
      let r = 0;
      for (const s in t) {
        const l = t[s];
        l !== Zu && (!i || !i(l)) && (o[s] = l, ++r);
      }
      a.size = r, a.empty = 0, a.object = t = o;
    }
  };
  return e && Object.keys(e).forEach((o) => {
    a.set(o, e[o]);
  }), a;
}
function qa(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), A8(n, i);
}
function sC(e) {
  return typeof e == "string";
}
function lC(e) {
  return ou(e) ? "[" + e.map(lC) + "]" : g8(e) || sC(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function D8(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
function dC(e) {
  T.call(this, null, e);
}
qa(dC, T, {
  transform(e, t) {
    if (this.value && !e.modified())
      return t.StopPropagation;
    var i = t.dataflow.locale(), n = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = this.value, o = e.scale, r = e.count == null ? e.values ? e.values.length : 10 : e.count, s = Zv(o, r, e.minstep), l = e.format || C3(i, o, s, e.formatSpecifier, e.formatType, !!e.values), d = e.values ? R3(o, e.values, s) : I3(o, s);
    return a && (n.rem = a), a = d.map((f, u) => xe({
      index: u / (d.length - 1 || 1),
      value: f,
      label: l(f)
    })), e.extra && a.length && a.push(xe({
      index: -1,
      extra: {
        value: a[0].value
      },
      label: ""
    })), n.source = a, n.add = a, this.value = a, n;
  }
});
function fC(e) {
  T.call(this, null, e);
}
function S8() {
  return xe({});
}
function F8(e) {
  const t = rC().test((i) => i.exit);
  return t.lookup = (i) => t.get(e(i)), t;
}
qa(fC, T, {
  transform(e, t) {
    var i = t.dataflow, n = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = e.item || S8, o = e.key || Z, r = this.value;
    return ou(n.encode) && (n.encode = null), r && (e.modified("key") || t.modified(o)) && $a("DataJoin does not support modified key function or fields."), r || (t = t.addAll(), this.value = r = F8(o)), t.visit(t.ADD, (s) => {
      const l = o(s);
      let d = r.get(l);
      d ? d.exit ? (r.empty--, n.add.push(d)) : n.mod.push(d) : (d = a(s), r.set(l, d), n.add.push(d)), d.datum = s, d.exit = !1;
    }), t.visit(t.MOD, (s) => {
      const l = o(s), d = r.get(l);
      d && (d.datum = s, n.mod.push(d));
    }), t.visit(t.REM, (s) => {
      const l = o(s), d = r.get(l);
      s === d.datum && !d.exit && (n.rem.push(d), d.exit = !0, ++r.empty);
    }), t.changed(t.ADD_MOD) && n.modifies("datum"), (t.clean() || e.clean && r.empty > i.cleanThreshold) && i.runAfter(r.clean), n;
  }
});
function uC(e) {
  T.call(this, null, e);
}
qa(uC, T, {
  transform(e, t) {
    var i = t.fork(t.ADD_REM), n = e.mod || !1, a = e.encoders, o = t.encode;
    if (ou(o))
      if (i.changed() || o.every((u) => a[u]))
        o = o[0], i.encode = null;
      else
        return t.StopPropagation;
    var r = o === "enter", s = a.update || er, l = a.enter || er, d = a.exit || er, f = (o && !r ? a[o] : s) || er;
    if (t.changed(t.ADD) && (t.visit(t.ADD, (u) => {
      l(u, e), s(u, e);
    }), i.modifies(l.output), i.modifies(s.output), f !== er && f !== s && (t.visit(t.ADD, (u) => {
      f(u, e);
    }), i.modifies(f.output))), t.changed(t.REM) && d !== er && (t.visit(t.REM, (u) => {
      d(u, e);
    }), i.modifies(d.output)), r || f !== er) {
      const u = t.MOD | (e.modified() ? t.REFLOW : 0);
      r ? (t.visit(u, (c) => {
        const h = l(c, e) || n;
        (f(c, e) || h) && i.mod.push(c);
      }), i.mod.length && i.modifies(l.output)) : t.visit(u, (c) => {
        (f(c, e) || n) && i.mod.push(c);
      }), i.mod.length && i.modifies(f.output);
    }
    return i.changed() ? i : t.StopPropagation;
  }
});
function cC(e) {
  T.call(this, [], e);
}
qa(cC, T, {
  transform(e, t) {
    if (this.value != null && !e.modified())
      return t.StopPropagation;
    var i = t.dataflow.locale(), n = t.fork(t.NO_SOURCE | t.NO_FIELDS), a = this.value, o = e.type || xm, r = e.scale, s = +e.limit, l = Zv(r, e.count == null ? 5 : e.count, e.minstep), d = !!e.values || o === xm, f = e.format || j3(i, r, l, o, e.formatSpecifier, e.formatType, d), u = e.values || z3(r, l), c, h, p, g, m;
    return a && (n.rem = a), o === xm ? (s && u.length > s ? (t.dataflow.warn("Symbol legend count exceeds limit, filtering items."), a = u.slice(0, s - 1), m = !0) : a = u, yo(p = e.size) ? (!e.values && r(a[0]) === 0 && (a = a.slice(1)), g = a.reduce((b, y) => Math.max(b, p(y, e)), 0)) : p = k8(g = p || 8), a = a.map((b, y) => xe({
      index: y,
      label: f(b, y, a),
      value: b,
      offset: g,
      size: p(b, e)
    })), m && (m = u[a.length], a.push(xe({
      index: a.length,
      label: `…${u.length - a.length} entries`,
      value: m,
      offset: g,
      size: p(m, e)
    })))) : o === P3 ? (c = r.domain(), h = kE(r, c[0], Er(c)), u.length < 3 && !e.values && c[0] !== Er(c) && (u = [c[0], Er(c)]), a = u.map((b, y) => xe({
      index: y,
      label: f(b, y, u),
      value: b,
      perc: h(b)
    }))) : (p = u.length - 1, h = N3(r), a = u.map((b, y) => xe({
      index: y,
      label: f(b, y, u),
      value: b,
      perc: y ? h(b) : 0,
      perc2: y === p ? 1 : h(u[y + 1])
    }))), n.source = a, n.add = a, this.value = a, n;
  }
});
const T8 = (e) => e.source.x, C8 = (e) => e.source.y, R8 = (e) => e.target.x, I8 = (e) => e.target.y;
function B_(e) {
  T.call(this, {}, e);
}
B_.Definition = {
  type: "LinkPath",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "sourceX",
    type: "field",
    default: "source.x"
  }, {
    name: "sourceY",
    type: "field",
    default: "source.y"
  }, {
    name: "targetX",
    type: "field",
    default: "target.x"
  }, {
    name: "targetY",
    type: "field",
    default: "target.y"
  }, {
    name: "orient",
    type: "enum",
    default: "vertical",
    values: ["horizontal", "vertical", "radial"]
  }, {
    name: "shape",
    type: "enum",
    default: "line",
    values: ["line", "arc", "curve", "diagonal", "orthogonal"]
  }, {
    name: "require",
    type: "signal"
  }, {
    name: "as",
    type: "string",
    default: "path"
  }]
};
qa(B_, T, {
  transform(e, t) {
    var i = e.sourceX || T8, n = e.sourceY || C8, a = e.targetX || R8, o = e.targetY || I8, r = e.as || "path", s = e.orient || "vertical", l = e.shape || "line", d = Tk.get(l + "-" + s) || Tk.get(l);
    return d || $a("LinkPath unsupported type: " + e.shape + (e.orient ? "-" + e.orient : "")), t.visit(t.SOURCE, (f) => {
      f[r] = d(i(f), n(f), a(f), o(f));
    }), t.reflow(e.modified()).modifies(r);
  }
});
const hC = (e, t, i, n) => "M" + e + "," + t + "L" + i + "," + n, j8 = (e, t, i, n) => hC(t * Math.cos(e), t * Math.sin(e), n * Math.cos(i), n * Math.sin(i)), pC = (e, t, i, n) => {
  var a = i - e, o = n - t, r = Math.hypot(a, o) / 2, s = 180 * Math.atan2(o, a) / Math.PI;
  return "M" + e + "," + t + "A" + r + "," + r + " " + s + " 0 1 " + i + "," + n;
}, z8 = (e, t, i, n) => pC(t * Math.cos(e), t * Math.sin(e), n * Math.cos(i), n * Math.sin(i)), gC = (e, t, i, n) => {
  const a = i - e, o = n - t, r = 0.2 * (a + o), s = 0.2 * (o - a);
  return "M" + e + "," + t + "C" + (e + r) + "," + (t + s) + " " + (i + s) + "," + (n - r) + " " + i + "," + n;
}, P8 = (e, t, i, n) => gC(t * Math.cos(e), t * Math.sin(e), n * Math.cos(i), n * Math.sin(i)), N8 = (e, t, i, n) => "M" + e + "," + t + "V" + n + "H" + i, q8 = (e, t, i, n) => "M" + e + "," + t + "H" + i + "V" + n, L8 = (e, t, i, n) => {
  const a = Math.cos(e), o = Math.sin(e), r = Math.cos(i), s = Math.sin(i), l = Math.abs(i - e) > Math.PI ? i <= e : i > e;
  return "M" + t * a + "," + t * o + "A" + t + "," + t + " 0 0," + (l ? 1 : 0) + " " + t * r + "," + t * s + "L" + n * r + "," + n * s;
}, B8 = (e, t, i, n) => {
  const a = (e + i) / 2;
  return "M" + e + "," + t + "C" + a + "," + t + " " + a + "," + n + " " + i + "," + n;
}, U8 = (e, t, i, n) => {
  const a = (t + n) / 2;
  return "M" + e + "," + t + "C" + e + "," + a + " " + i + "," + a + " " + i + "," + n;
}, M8 = (e, t, i, n) => {
  const a = Math.cos(e), o = Math.sin(e), r = Math.cos(i), s = Math.sin(i), l = (t + n) / 2;
  return "M" + t * a + "," + t * o + "C" + l * a + "," + l * o + " " + l * r + "," + l * s + " " + n * r + "," + n * s;
}, Tk = rC({
  line: hC,
  "line-radial": j8,
  arc: pC,
  "arc-radial": z8,
  curve: gC,
  "curve-radial": P8,
  "orthogonal-horizontal": N8,
  "orthogonal-vertical": q8,
  "orthogonal-radial": L8,
  "diagonal-horizontal": B8,
  "diagonal-vertical": U8,
  "diagonal-radial": M8
});
function U_(e) {
  T.call(this, null, e);
}
U_.Definition = {
  type: "Pie",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "startAngle",
    type: "number",
    default: 0
  }, {
    name: "endAngle",
    type: "number",
    default: 6.283185307179586
  }, {
    name: "sort",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["startAngle", "endAngle"]
  }]
};
qa(U_, T, {
  transform(e, t) {
    var i = e.as || ["startAngle", "endAngle"], n = i[0], a = i[1], o = e.field || oC, r = e.startAngle || 0, s = e.endAngle != null ? e.endAngle : 2 * Math.PI, l = t.source, d = l.map(o), f = d.length, u = r, c = (s - r) / pD(d), h = Pi(f), p, g, m;
    for (e.sort && h.sort((b, y) => d[b] - d[y]), p = 0; p < f; ++p)
      m = d[h[p]], g = l[h[p]], g[n] = u, g[a] = u += m * c;
    return this.value = d, t.reflow(e.modified()).modifies(i);
  }
});
const V8 = 5;
function W8(e) {
  const t = e.type;
  return !e.bins && (t === iy || t === EE || t === OE);
}
function mC(e) {
  return Kv(e) && e !== $c;
}
const G8 = D8(["set", "modified", "clear", "type", "scheme", "schemeExtent", "schemeCount", "domain", "domainMin", "domainMid", "domainMax", "domainRaw", "domainImplicit", "nice", "zero", "bins", "range", "rangeStep", "round", "reverse", "interpolate", "interpolateGamma"]);
function bC(e) {
  T.call(this, null, e), this.modified(!0);
}
qa(bC, T, {
  transform(e, t) {
    var i = t.dataflow, n = this.value, a = H8(e);
    (!n || a !== n.type) && (this.value = n = af(a)());
    for (a in e) if (!G8[a]) {
      if (a === "padding" && mC(n.type)) continue;
      yo(n[a]) ? n[a](e[a]) : i.warn("Unsupported scale property: " + a);
    }
    return Q8(n, e, K8(n, e, X8(n, e, i))), t.fork(t.NO_SOURCE | t.NO_FIELDS);
  }
});
function H8(e) {
  var t = e.type, i = "", n;
  return t === $c ? $c + "-" + iy : (Y8(e) && (n = e.rawDomain ? e.rawDomain.length : e.domain ? e.domain.length + +(e.domainMid != null) : 0, i = n === 2 ? $c + "-" : n === 3 ? Z3 + "-" : ""), (i + t || iy).toLowerCase());
}
function Y8(e) {
  const t = e.type;
  return Kv(t) && t !== q3 && t !== L3 && (e.scheme || e.range && e.range.length && e.range.every(sC));
}
function X8(e, t, i) {
  const n = J8(e, t.domainRaw, i);
  if (n > -1) return n;
  var a = t.domain, o = e.type, r = t.zero || t.zero === void 0 && W8(e), s, l;
  if (!a) return 0;
  if ((r || t.domainMin != null || t.domainMax != null || t.domainMid != null) && (s = (a = a.slice()).length - 1 || 1, r && (a[0] > 0 && (a[0] = 0), a[s] < 0 && (a[s] = 0)), t.domainMin != null && (a[0] = t.domainMin), t.domainMax != null && (a[s] = t.domainMax), t.domainMid != null)) {
    l = t.domainMid;
    const d = l > a[s] ? s + 1 : l < a[0] ? 0 : s;
    d !== s && i.warn("Scale domainMid exceeds domain min or max.", l), a.splice(d, 0, l);
  }
  return mC(o) && t.padding && a[0] !== Er(a) && (a = Z8(o, a, t.range, t.padding, t.exponent, t.constant)), e.domain(yC(o, a, i)), o === AE && e.unknown(t.domainImplicit ? B3 : void 0), t.nice && e.nice && e.nice(t.nice !== !0 && Zv(e, t.nice) || null), a.length;
}
function J8(e, t, i) {
  return t ? (e.domain(yC(e.type, t, i)), t.length) : -1;
}
function Z8(e, t, i, n, a, o) {
  var r = Math.abs(Er(i) - i[0]), s = r / (r - 2 * n), l = e === U3 ? w8(t, null, s) : e === OE ? Fk(t, null, s, 0.5) : e === EE ? Fk(t, null, s, a || 1) : e === M3 ? $8(t, null, s, o || 1) : x8(t, null, s);
  return t = t.slice(), t[0] = l[0], t[t.length - 1] = l[1], t;
}
function yC(e, t, i) {
  if (V3(e)) {
    var n = Math.abs(t.reduce((a, o) => a + (o < 0 ? -1 : o > 0 ? 1 : 0), 0));
    n !== t.length && i.warn("Log scale domain includes zero: " + lC(t));
  }
  return t;
}
function K8(e, t, i) {
  let n = t.bins;
  if (n && !ou(n)) {
    const a = e.domain(), o = a[0], r = Er(a), s = n.step;
    let l = n.start == null ? o : n.start, d = n.stop == null ? r : n.stop;
    s || $a("Scale bins parameter missing step property."), l < o && (l = s * Math.ceil(o / s)), d > r && (d = s * Math.floor(r / s)), n = Pi(l, d + s / 2, s);
  }
  return n ? e.bins = n : e.bins && delete e.bins, e.type === DE && (n ? !t.domain && !t.domainRaw && (e.domain(n), i = n.length) : e.bins = e.domain()), i;
}
function Q8(e, t, i) {
  var n = e.type, a = t.round || !1, o = t.range;
  if (t.rangeStep != null)
    o = eV(n, t, i);
  else if (t.scheme && (o = tV(n, t, i), yo(o))) {
    if (e.interpolator)
      return e.interpolator(o);
    $a(`Scale type ${n} does not support interpolating color schemes.`);
  }
  if (o && SE(n))
    return e.interpolator(Qv(zy(o, t.reverse), t.interpolate, t.interpolateGamma));
  o && t.interpolate && e.interpolate ? e.interpolate(FE(t.interpolate, t.interpolateGamma)) : yo(e.round) ? e.round(a) : yo(e.rangeRound) && e.interpolate(a ? W3 : G3), o && e.range(zy(o, t.reverse));
}
function eV(e, t, i) {
  e !== H3 && e !== e$ && $a("Only band and point scales support rangeStep.");
  var n = (t.paddingOuter != null ? t.paddingOuter : t.padding) || 0, a = e === e$ ? 1 : (t.paddingInner != null ? t.paddingInner : t.padding) || 0;
  return [0, t.rangeStep * TE(i, a, n)];
}
function tV(e, t, i) {
  var n = t.schemeExtent, a, o;
  return ou(t.scheme) ? o = Qv(t.scheme, t.interpolate, t.interpolateGamma) : (a = t.scheme.toLowerCase(), o = CE(a), o || $a(`Unrecognized scheme name: ${t.scheme}`)), i = e === Y3 ? i + 1 : e === DE ? i - 1 : e === X3 || e === J3 ? +t.schemeCount || V8 : i, SE(e) ? Ck(o, n, t.reverse) : yo(o) ? RE(Ck(o, n), i) : e === AE ? o : o.slice(0, i);
}
function Ck(e, t, i) {
  return yo(e) && (t || i) ? IE(e, zy(t || [0, 1], i)) : e;
}
function zy(e, t) {
  return t ? e.slice().reverse() : e;
}
function vC(e) {
  T.call(this, null, e);
}
qa(vC, T, {
  transform(e, t) {
    const i = e.modified("sort") || t.changed(t.ADD) || t.modified(e.sort.fields) || t.modified("datum");
    return i && t.source.sort(is(e.sort)), this.modified(i), t;
  }
});
const Rk = "zero", _C = "center", xC = "normalize", wC = ["y0", "y1"];
function M_(e) {
  T.call(this, null, e);
}
M_.Definition = {
  type: "Stack",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "offset",
    type: "enum",
    default: Rk,
    values: [Rk, _C, xC]
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: wC
  }]
};
qa(M_, T, {
  transform(e, t) {
    var i = e.as || wC, n = i[0], a = i[1], o = is(e.sort), r = e.field || oC, s = e.offset === _C ? iV : e.offset === xC ? nV : aV, l, d, f, u;
    for (l = oV(t.source, e.groupby, o, r), d = 0, f = l.length, u = l.max; d < f; ++d)
      s(l[d], u, r, n, a);
    return t.reflow(e.modified()).modifies(i);
  }
});
function iV(e, t, i, n, a) {
  for (var o = (t - e.sum) / 2, r = e.length, s = 0, l; s < r; ++s)
    l = e[s], l[n] = o, l[a] = o += Math.abs(i(l));
}
function nV(e, t, i, n, a) {
  for (var o = 1 / e.sum, r = 0, s = e.length, l = 0, d = 0, f; l < s; ++l)
    f = e[l], f[n] = r, f[a] = r = o * (d += Math.abs(i(f)));
}
function aV(e, t, i, n, a) {
  for (var o = 0, r = 0, s = e.length, l = 0, d, f; l < s; ++l)
    f = e[l], d = +i(f), d < 0 ? (f[n] = r, f[a] = r += d) : (f[n] = o, f[a] = o += d);
}
function oV(e, t, i, n) {
  var a = [], o = (g) => g(f), r, s, l, d, f, u, c, h, p;
  if (t == null)
    a.push(e.slice());
  else
    for (r = {}, s = 0, l = e.length; s < l; ++s)
      f = e[s], u = t.map(o), c = r[u], c || (r[u] = c = [], a.push(c)), c.push(f);
  for (u = 0, p = 0, d = a.length; u < d; ++u) {
    for (c = a[u], s = 0, h = 0, l = c.length; s < l; ++s)
      h += Math.abs(n(c[s]));
    c.sum = h, h > p && (p = h), i && c.sort(i);
  }
  return a.max = p, a;
}
const rV = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  axisticks: dC,
  datajoin: fC,
  encode: uC,
  legendentries: cC,
  linkpath: B_,
  pie: U_,
  scale: bC,
  sortitems: vC,
  stack: M_
}, Symbol.toStringTag, { value: "Module" }));
function Ol(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function sV(e) {
  return e == null ? null : e.fname;
}
function jc(e) {
  return e == null ? null : e.fields;
}
function lV(e) {
  return e.length === 1 ? dV(e[0]) : fV(e);
}
const dV = (e) => function(t) {
  return t[e];
}, fV = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function vo(e) {
  throw Error(e);
}
function uV(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || vo("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && vo("Access path missing closing bracket: " + e), n && vo("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function $C(e, t, i) {
  const n = uV(e);
  return e = n.length === 1 ? n[0] : e, Ol(lV(n), [e], e);
}
$C("id");
const yf = Ol((e) => e, [], "identity"), cV = Ol(() => 0, [], "zero"), hV = Ol(() => 1, [], "one");
Ol(() => !0, [], "true");
Ol(() => !1, [], "false");
var V_ = Array.isArray;
function W_(e) {
  return e != null ? V_(e) ? e : [e] : [];
}
function Ca(e) {
  return typeof e == "function";
}
function vf(e) {
  return Ca(e) ? e : () => e;
}
function kC(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function pV(e, t) {
  let i = 0, n, a, o, r;
  if (e && (n = e.length)) {
    for (a = e[i]; i < n && (a == null || a !== a); a = e[++i]) ;
    for (o = r = a; i < n; ++i)
      a = e[i], a != null && (a < o && (o = a), a > r && (r = a));
  }
  return [o, r];
}
function Yn(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), kC(n, i);
}
function Ik(e) {
  return typeof e == "number";
}
function gV(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
function mV() {
}
const ua = [[], [[[1, 1.5], [0.5, 1]]], [[[1.5, 1], [1, 1.5]]], [[[1.5, 1], [0.5, 1]]], [[[1, 0.5], [1.5, 1]]], [[[1, 1.5], [0.5, 1]], [[1, 0.5], [1.5, 1]]], [[[1, 0.5], [1, 1.5]]], [[[1, 0.5], [0.5, 1]]], [[[0.5, 1], [1, 0.5]]], [[[1, 1.5], [1, 0.5]]], [[[0.5, 1], [1, 0.5]], [[1.5, 1], [1, 1.5]]], [[[1.5, 1], [1, 0.5]]], [[[0.5, 1], [1.5, 1]]], [[[1, 1.5], [1.5, 1]]], [[[0.5, 1], [1, 1.5]]], []];
function AC() {
  var e = 1, t = 1, i = s;
  function n(l, d) {
    return d.map((f) => a(l, f));
  }
  function a(l, d) {
    var f = [], u = [];
    return o(l, d, (c) => {
      i(c, l, d), bV(c) > 0 ? f.push([c]) : u.push(c);
    }), u.forEach((c) => {
      for (var h = 0, p = f.length, g; h < p; ++h)
        if (yV((g = f[h])[0], c) !== -1) {
          g.push(c);
          return;
        }
    }), {
      type: "MultiPolygon",
      value: d,
      coordinates: f
    };
  }
  function o(l, d, f) {
    var u = [], c = [], h, p, g, m, b, y;
    for (h = p = -1, m = l[0] >= d, ua[m << 1].forEach(v); ++h < e - 1; )
      g = m, m = l[h + 1] >= d, ua[g | m << 1].forEach(v);
    for (ua[m << 0].forEach(v); ++p < t - 1; ) {
      for (h = -1, m = l[p * e + e] >= d, b = l[p * e] >= d, ua[m << 1 | b << 2].forEach(v); ++h < e - 1; )
        g = m, m = l[p * e + e + h + 1] >= d, y = b, b = l[p * e + h + 1] >= d, ua[g | m << 1 | b << 2 | y << 3].forEach(v);
      ua[m | b << 3].forEach(v);
    }
    for (h = -1, b = l[p * e] >= d, ua[b << 2].forEach(v); ++h < e - 1; )
      y = b, b = l[p * e + h + 1] >= d, ua[b << 2 | y << 3].forEach(v);
    ua[b << 3].forEach(v);
    function v(w) {
      var x = [w[0][0] + h, w[0][1] + p], $ = [w[1][0] + h, w[1][1] + p], _ = r(x), k = r($), A, E;
      (A = c[_]) ? (E = u[k]) ? (delete c[A.end], delete u[E.start], A === E ? (A.ring.push($), f(A.ring)) : u[A.start] = c[E.end] = {
        start: A.start,
        end: E.end,
        ring: A.ring.concat(E.ring)
      }) : (delete c[A.end], A.ring.push($), c[A.end = k] = A) : (A = u[k]) ? (E = c[_]) ? (delete u[A.start], delete c[E.end], A === E ? (A.ring.push($), f(A.ring)) : u[E.start] = c[A.end] = {
        start: E.start,
        end: A.end,
        ring: E.ring.concat(A.ring)
      }) : (delete u[A.start], A.ring.unshift(x), u[A.start = _] = A) : u[_] = c[k] = {
        start: _,
        end: k,
        ring: [x, $]
      };
    }
  }
  function r(l) {
    return l[0] * 2 + l[1] * (e + 1) * 4;
  }
  function s(l, d, f) {
    l.forEach((u) => {
      var c = u[0], h = u[1], p = c | 0, g = h | 0, m, b = d[g * e + p];
      c > 0 && c < e && p === c && (m = d[g * e + p - 1], u[0] = c + (f - m) / (b - m) - 0.5), h > 0 && h < t && g === h && (m = d[(g - 1) * e + p], u[1] = h + (f - m) / (b - m) - 0.5);
    });
  }
  return n.contour = a, n.size = function(l) {
    if (!arguments.length) return [e, t];
    var d = Math.floor(l[0]), f = Math.floor(l[1]);
    return d >= 0 && f >= 0 || vo("invalid size"), e = d, t = f, n;
  }, n.smooth = function(l) {
    return arguments.length ? (i = l ? s : mV, n) : i === s;
  }, n;
}
function bV(e) {
  for (var t = 0, i = e.length, n = e[i - 1][1] * e[0][0] - e[i - 1][0] * e[0][1]; ++t < i; ) n += e[t - 1][1] * e[t][0] - e[t - 1][0] * e[t][1];
  return n;
}
function yV(e, t) {
  for (var i = -1, n = t.length, a; ++i < n; ) if (a = vV(e, t[i])) return a;
  return 0;
}
function vV(e, t) {
  for (var i = t[0], n = t[1], a = -1, o = 0, r = e.length, s = r - 1; o < r; s = o++) {
    var l = e[o], d = l[0], f = l[1], u = e[s], c = u[0], h = u[1];
    if (_V(l, u, t)) return 0;
    f > n != h > n && i < (c - d) * (n - f) / (h - f) + d && (a = -a);
  }
  return a;
}
function _V(e, t, i) {
  var n;
  return xV(e, t, i) && wV(e[n = +(e[0] === t[0])], i[n], t[n]);
}
function xV(e, t, i) {
  return (t[0] - e[0]) * (i[1] - e[1]) === (i[0] - e[0]) * (t[1] - e[1]);
}
function wV(e, t, i) {
  return e <= t && t <= i || i <= t && t <= e;
}
function OC(e, t, i) {
  return function(n) {
    var a = pV(n), o = i ? Math.min(a[0], 0) : a[0], r = a[1], s = r - o, l = t ? Hv(o, r, e) : s / (e + 1);
    return Pi(o + l, r, l);
  };
}
function G_(e) {
  T.call(this, null, e);
}
G_.Definition = {
  type: "Isocontour",
  metadata: {
    generates: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "thresholds",
    type: "number",
    array: !0
  }, {
    name: "levels",
    type: "number"
  }, {
    name: "nice",
    type: "boolean",
    default: !1
  }, {
    name: "resolve",
    type: "enum",
    values: ["shared", "independent"],
    default: "independent"
  }, {
    name: "zero",
    type: "boolean",
    default: !0
  }, {
    name: "smooth",
    type: "boolean",
    default: !0
  }, {
    name: "scale",
    type: "number",
    expr: !0
  }, {
    name: "translate",
    type: "number",
    array: !0,
    expr: !0
  }, {
    name: "as",
    type: "string",
    null: !0,
    default: "contour"
  }]
};
Yn(G_, T, {
  transform(e, t) {
    if (this.value && !t.changed() && !e.modified())
      return t.StopPropagation;
    var i = t.fork(t.NO_SOURCE | t.NO_FIELDS), n = t.materialize(t.SOURCE).source, a = e.field || yf, o = AC().smooth(e.smooth !== !1), r = e.thresholds || $V(n, a, e), s = e.as === null ? null : e.as || "contour", l = [];
    return n.forEach((d) => {
      const f = a(d), u = o.size([f.width, f.height])(f.values, V_(r) ? r : r(f.values));
      kV(u, f, d, e), u.forEach((c) => {
        l.push(zp(d, xe(s != null ? {
          [s]: c
        } : c)));
      });
    }), this.value && (i.rem = this.value), this.value = i.source = i.add = l, i;
  }
});
function $V(e, t, i) {
  const n = OC(i.levels || 10, i.nice, i.zero !== !1);
  return i.resolve !== "shared" ? n : n(e.map((a) => Nd(t(a).values)));
}
function kV(e, t, i, n) {
  let a = n.scale || t.scale, o = n.translate || t.translate;
  if (Ca(a) && (a = a(i, n)), Ca(o) && (o = o(i, n)), (a === 1 || a == null) && !o) return;
  const r = (Ik(a) ? a : a[0]) || 1, s = (Ik(a) ? a : a[1]) || 1, l = o && o[0] || 0, d = o && o[1] || 0;
  e.forEach(EC(t, r, s, l, d));
}
function EC(e, t, i, n, a) {
  const o = e.x1 || 0, r = e.y1 || 0, s = t * i < 0;
  function l(u) {
    u.forEach(d);
  }
  function d(u) {
    s && u.reverse(), u.forEach(f);
  }
  function f(u) {
    u[0] = (u[0] - o) * t + n, u[1] = (u[1] - r) * i + a;
  }
  return function(u) {
    return u.coordinates.forEach(l), u;
  };
}
function jk(e, t, i) {
  const n = e >= 0 ? e : PE(t, i);
  return Math.round((Math.sqrt(4 * n * n + 1) - 1) / 2);
}
function Vm(e) {
  return Ca(e) ? e : vf(+e);
}
function DC() {
  var e = (l) => l[0], t = (l) => l[1], i = hV, n = [-1, -1], a = 960, o = 500, r = 2;
  function s(l, d) {
    const f = jk(n[0], l, e) >> r, u = jk(n[1], l, t) >> r, c = f ? f + 2 : 0, h = u ? u + 2 : 0, p = 2 * c + (a >> r), g = 2 * h + (o >> r), m = new Float32Array(p * g), b = new Float32Array(p * g);
    let y = m;
    l.forEach((w) => {
      const x = c + (+e(w) >> r), $ = h + (+t(w) >> r);
      x >= 0 && x < p && $ >= 0 && $ < g && (m[x + $ * p] += +i(w));
    }), f > 0 && u > 0 ? ($s(p, g, m, b, f), ks(p, g, b, m, u), $s(p, g, m, b, f), ks(p, g, b, m, u), $s(p, g, m, b, f), ks(p, g, b, m, u)) : f > 0 ? ($s(p, g, m, b, f), $s(p, g, b, m, f), $s(p, g, m, b, f), y = b) : u > 0 && (ks(p, g, m, b, u), ks(p, g, b, m, u), ks(p, g, m, b, u), y = b);
    const v = d ? Math.pow(2, -2 * r) : 1 / pD(y);
    for (let w = 0, x = p * g; w < x; ++w) y[w] *= v;
    return {
      values: y,
      scale: 1 << r,
      width: p,
      height: g,
      x1: c,
      y1: h,
      x2: c + (a >> r),
      y2: h + (o >> r)
    };
  }
  return s.x = function(l) {
    return arguments.length ? (e = Vm(l), s) : e;
  }, s.y = function(l) {
    return arguments.length ? (t = Vm(l), s) : t;
  }, s.weight = function(l) {
    return arguments.length ? (i = Vm(l), s) : i;
  }, s.size = function(l) {
    if (!arguments.length) return [a, o];
    var d = +l[0], f = +l[1];
    return d >= 0 && f >= 0 || vo("invalid size"), a = d, o = f, s;
  }, s.cellSize = function(l) {
    return arguments.length ? ((l = +l) >= 1 || vo("invalid cell size"), r = Math.floor(Math.log(l) / Math.LN2), s) : 1 << r;
  }, s.bandwidth = function(l) {
    return arguments.length ? (l = W_(l), l.length === 1 && (l = [+l[0], +l[0]]), l.length !== 2 && vo("invalid bandwidth"), n = l, s) : n;
  }, s;
}
function $s(e, t, i, n, a) {
  const o = (a << 1) + 1;
  for (let r = 0; r < t; ++r)
    for (let s = 0, l = 0; s < e + a; ++s)
      s < e && (l += i[s + r * e]), s >= a && (s >= o && (l -= i[s - o + r * e]), n[s - a + r * e] = l / Math.min(s + 1, e - 1 + o - s, o));
}
function ks(e, t, i, n, a) {
  const o = (a << 1) + 1;
  for (let r = 0; r < e; ++r)
    for (let s = 0, l = 0; s < t + a; ++s)
      s < t && (l += i[r + s * e]), s >= a && (s >= o && (l -= i[r + (s - o) * e]), n[r + (s - a) * e] = l / Math.min(s + 1, t - 1 + o - s, o));
}
function H_(e) {
  T.call(this, null, e);
}
H_.Definition = {
  type: "KDE2D",
  metadata: {
    generates: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "weight",
    type: "field"
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "cellSize",
    type: "number"
  }, {
    name: "bandwidth",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "counts",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    default: "grid"
  }]
};
const AV = ["x", "y", "weight", "size", "cellSize", "bandwidth"];
function SC(e, t) {
  return AV.forEach((i) => t[i] != null ? e[i](t[i]) : 0), e;
}
Yn(H_, T, {
  transform(e, t) {
    if (this.value && !t.changed() && !e.modified()) return t.StopPropagation;
    var i = t.fork(t.NO_SOURCE | t.NO_FIELDS), n = t.materialize(t.SOURCE).source, a = OV(n, e.groupby), o = (e.groupby || []).map(sV), r = SC(DC(), e), s = e.as || "grid", l = [];
    function d(f, u) {
      for (let c = 0; c < o.length; ++c) f[o[c]] = u[c];
      return f;
    }
    return l = a.map((f) => xe(d({
      [s]: r(f, e.counts)
    }, f.dims))), this.value && (i.rem = this.value), this.value = i.source = i.add = l, i;
  }
});
function OV(e, t) {
  var i = [], n = (f) => f(s), a, o, r, s, l, d;
  if (t == null)
    i.push(e);
  else
    for (a = {}, o = 0, r = e.length; o < r; ++o)
      s = e[o], l = t.map(n), d = a[l], d || (a[l] = d = [], d.dims = l, i.push(d)), d.push(s);
  return i;
}
function Y_(e) {
  T.call(this, null, e);
}
Y_.Definition = {
  type: "Contour",
  metadata: {
    generates: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "values",
    type: "number",
    array: !0
  }, {
    name: "x",
    type: "field"
  }, {
    name: "y",
    type: "field"
  }, {
    name: "weight",
    type: "field"
  }, {
    name: "cellSize",
    type: "number"
  }, {
    name: "bandwidth",
    type: "number"
  }, {
    name: "count",
    type: "number"
  }, {
    name: "nice",
    type: "boolean",
    default: !1
  }, {
    name: "thresholds",
    type: "number",
    array: !0
  }, {
    name: "smooth",
    type: "boolean",
    default: !0
  }]
};
Yn(Y_, T, {
  transform(e, t) {
    if (this.value && !t.changed() && !e.modified())
      return t.StopPropagation;
    var i = t.fork(t.NO_SOURCE | t.NO_FIELDS), n = AC().smooth(e.smooth !== !1), a = e.values, o = e.thresholds || OC(e.count || 10, e.nice, !!a), r = e.size, s, l;
    return a || (a = t.materialize(t.SOURCE).source, s = SC(DC(), e)(a, !0), l = EC(s, s.scale || 1, s.scale || 1, 0, 0), r = [s.width, s.height], a = s.values), o = V_(o) ? o : o(a), a = n.size(r)(a, o), l && a.forEach(l), this.value && (i.rem = this.value), this.value = i.source = i.add = (a || []).map(xe), i;
  }
});
const Py = "Feature", X_ = "FeatureCollection", EV = "MultiPoint";
function J_(e) {
  T.call(this, null, e);
}
J_.Definition = {
  type: "GeoJSON",
  metadata: {},
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    length: 2
  }, {
    name: "geojson",
    type: "field"
  }]
};
Yn(J_, T, {
  transform(e, t) {
    var i = this._features, n = this._points, a = e.fields, o = a && a[0], r = a && a[1], s = e.geojson || !a && yf, l = t.ADD, d;
    d = e.modified() || t.changed(t.REM) || t.modified(jc(s)) || o && t.modified(jc(o)) || r && t.modified(jc(r)), (!this.value || d) && (l = t.SOURCE, this._features = i = [], this._points = n = []), s && t.visit(l, (f) => i.push(s(f))), o && r && (t.visit(l, (f) => {
      var u = o(f), c = r(f);
      u != null && c != null && (u = +u) === u && (c = +c) === c && n.push([u, c]);
    }), i = i.concat({
      type: Py,
      geometry: {
        type: EV,
        coordinates: n
      }
    })), this.value = {
      type: X_,
      features: i
    };
  }
});
function Z_(e) {
  T.call(this, null, e);
}
Z_.Definition = {
  type: "GeoPath",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "projection",
    type: "projection"
  }, {
    name: "field",
    type: "field"
  }, {
    name: "pointRadius",
    type: "number",
    expr: !0
  }, {
    name: "as",
    type: "string",
    default: "path"
  }]
};
Yn(Z_, T, {
  transform(e, t) {
    var i = t.fork(t.ALL), n = this.value, a = e.field || yf, o = e.as || "path", r = i.SOURCE;
    !n || e.modified() ? (this.value = n = jE(e.projection), i.materialize().reflow()) : r = a === yf || t.modified(a.fields) ? i.ADD_MOD : i.ADD;
    const s = DV(n, e.pointRadius);
    return i.visit(r, (l) => l[o] = n(a(l))), n.pointRadius(s), i.modifies(o);
  }
});
function DV(e, t) {
  const i = e.pointRadius();
  return e.context(null), t != null && e.pointRadius(t), i;
}
function K_(e) {
  T.call(this, null, e);
}
K_.Definition = {
  type: "GeoPoint",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "projection",
    type: "projection",
    required: !0
  }, {
    name: "fields",
    type: "field",
    array: !0,
    required: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 2,
    default: ["x", "y"]
  }]
};
Yn(K_, T, {
  transform(e, t) {
    var i = e.projection, n = e.fields[0], a = e.fields[1], o = e.as || ["x", "y"], r = o[0], s = o[1], l;
    function d(f) {
      const u = i([n(f), a(f)]);
      u ? (f[r] = u[0], f[s] = u[1]) : (f[r] = void 0, f[s] = void 0);
    }
    return e.modified() ? t = t.materialize().reflow(!0).visit(t.SOURCE, d) : (l = t.modified(n.fields) || t.modified(a.fields), t.visit(l ? t.ADD_MOD : t.ADD, d)), t.modifies(o);
  }
});
function Q_(e) {
  T.call(this, null, e);
}
Q_.Definition = {
  type: "GeoShape",
  metadata: {
    modifies: !0,
    nomod: !0
  },
  params: [{
    name: "projection",
    type: "projection"
  }, {
    name: "field",
    type: "field",
    default: "datum"
  }, {
    name: "pointRadius",
    type: "number",
    expr: !0
  }, {
    name: "as",
    type: "string",
    default: "shape"
  }]
};
Yn(Q_, T, {
  transform(e, t) {
    var i = t.fork(t.ALL), n = this.value, a = e.as || "shape", o = i.ADD;
    return (!n || e.modified()) && (this.value = n = SV(jE(e.projection), e.field || $C("datum"), e.pointRadius), i.materialize().reflow(), o = i.SOURCE), i.visit(o, (r) => r[a] = n), i.modifies(a);
  }
});
function SV(e, t, i) {
  const n = i == null ? (a) => e(t(a)) : (a) => {
    var o = e.pointRadius(), r = e.pointRadius(i)(t(a));
    return e.pointRadius(o), r;
  };
  return n.context = (a) => (e.context(a), n), n;
}
function ex(e) {
  T.call(this, [], e), this.generator = SN();
}
ex.Definition = {
  type: "Graticule",
  metadata: {
    changes: !0,
    generates: !0
  },
  params: [{
    name: "extent",
    type: "array",
    array: !0,
    length: 2,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "extentMajor",
    type: "array",
    array: !0,
    length: 2,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "extentMinor",
    type: "array",
    array: !0,
    length: 2,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "step",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "stepMajor",
    type: "number",
    array: !0,
    length: 2,
    default: [90, 360]
  }, {
    name: "stepMinor",
    type: "number",
    array: !0,
    length: 2,
    default: [10, 10]
  }, {
    name: "precision",
    type: "number",
    default: 2.5
  }]
};
Yn(ex, T, {
  transform(e, t) {
    var i = this.value, n = this.generator, a;
    if (!i.length || e.modified())
      for (const o in e)
        Ca(n[o]) && n[o](e[o]);
    return a = n(), i.length ? t.mod.push(FS(i[0], a)) : t.add.push(xe(a)), i[0] = a, t;
  }
});
function tx(e) {
  T.call(this, null, e);
}
tx.Definition = {
  type: "heatmap",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "color",
    type: "string",
    expr: !0
  }, {
    name: "opacity",
    type: "number",
    expr: !0
  }, {
    name: "resolve",
    type: "enum",
    values: ["shared", "independent"],
    default: "independent"
  }, {
    name: "as",
    type: "string",
    default: "image"
  }]
};
Yn(tx, T, {
  transform(e, t) {
    if (!t.changed() && !e.modified())
      return t.StopPropagation;
    var i = t.materialize(t.SOURCE).source, n = e.resolve === "shared", a = e.field || yf, o = TV(e.opacity, e), r = FV(e.color, e), s = e.as || "image", l = {
      $x: 0,
      $y: 0,
      $value: 0,
      $max: n ? Nd(i.map((d) => Nd(a(d).values))) : 0
    };
    return i.forEach((d) => {
      const f = a(d), u = kC({}, d, l);
      n || (u.$max = Nd(f.values || [])), d[s] = CV(f, u, r.dep ? r : vf(r(u)), o.dep ? o : vf(o(u)));
    }), t.reflow(!0).modifies(s);
  }
});
function FV(e, t) {
  let i;
  return Ca(e) ? (i = (n) => ah(e(n, t)), i.dep = FC(e)) : i = vf(ah(e || "#888")), i;
}
function TV(e, t) {
  let i;
  return Ca(e) ? (i = (n) => e(n, t), i.dep = FC(e)) : e ? i = vf(e) : (i = (n) => n.$value / n.$max || 0, i.dep = !0), i;
}
function FC(e) {
  if (!Ca(e)) return !1;
  const t = gV(jc(e));
  return t.$x || t.$y || t.$value || t.$max;
}
function CV(e, t, i, n) {
  const a = e.width, o = e.height, r = e.x1 || 0, s = e.y1 || 0, l = e.x2 || a, d = e.y2 || o, f = e.values, u = f ? (m) => f[m] : cV, c = po(l - r, d - s), h = c.getContext("2d"), p = h.getImageData(0, 0, l - r, d - s), g = p.data;
  for (let m = s, b = 0; m < d; ++m) {
    t.$y = m - s;
    for (let y = r, v = m * a; y < l; ++y, b += 4) {
      t.$x = y - r, t.$value = u(y + v);
      const w = i(t);
      g[b + 0] = w.r, g[b + 1] = w.g, g[b + 2] = w.b, g[b + 3] = ~~(255 * n(t));
    }
  }
  return h.putImageData(p, 0, 0), c;
}
function TC(e) {
  T.call(this, null, e), this.modified(!0);
}
Yn(TC, T, {
  transform(e, t) {
    let i = this.value;
    return !i || e.modified("type") ? (this.value = i = IV(e.type), t$.forEach((n) => {
      e[n] != null && zk(i, n, e[n]);
    })) : t$.forEach((n) => {
      e.modified(n) && zk(i, n, e[n]);
    }), e.pointRadius != null && i.path.pointRadius(e.pointRadius), e.fit && RV(i, e), t.fork(t.NO_SOURCE | t.NO_FIELDS);
  }
});
function RV(e, t) {
  const i = jV(t.fit);
  t.extent ? e.fitExtent(t.extent, i) : t.size && e.fitSize(t.size, i);
}
function IV(e) {
  const t = zE((e || "mercator").toLowerCase());
  return t || vo("Unrecognized projection type: " + e), t();
}
function zk(e, t, i) {
  Ca(e[t]) && e[t](i);
}
function jV(e) {
  return e = W_(e), e.length === 1 ? e[0] : {
    type: X_,
    features: e.reduce((t, i) => t.concat(zV(i)), [])
  };
}
function zV(e) {
  return e.type === X_ ? e.features : W_(e).filter((t) => t != null).map((t) => t.type === Py ? t : {
    type: Py,
    geometry: t
  });
}
const PV = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  contour: Y_,
  geojson: J_,
  geopath: Z_,
  geopoint: K_,
  geoshape: Q_,
  graticule: ex,
  heatmap: tx,
  isocontour: G_,
  kde2d: H_,
  projection: TC
}, Symbol.toStringTag, { value: "Module" }));
function El(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function NV(e) {
  return e == null ? null : e.fields;
}
function qV(e) {
  return e.length === 1 ? LV(e[0]) : BV(e);
}
const LV = (e) => function(t) {
  return t[e];
}, BV = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function zc(e) {
  throw Error(e);
}
function UV(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || zc("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && zc("Access path missing closing bracket: " + e), n && zc("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function MV(e, t, i) {
  const n = UV(e);
  return e = n.length === 1 ? n[0] : e, El(qV(n), [e], e);
}
MV("id");
El((e) => e, [], "identity");
El(() => 0, [], "zero");
El(() => 1, [], "one");
El(() => !0, [], "true");
El(() => !1, [], "false");
var VV = Array.isArray;
function WV(e) {
  return e != null ? VV(e) ? e : [e] : [];
}
function ix(e) {
  return typeof e == "function";
}
function GV(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const HV = Object.prototype.hasOwnProperty;
function YV(e, t) {
  return HV.call(e, t);
}
function XV(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), GV(n, i);
}
function JV(e, t) {
  var i, n = 1;
  e == null && (e = 0), t == null && (t = 0);
  function a() {
    var o, r = i.length, s, l = 0, d = 0;
    for (o = 0; o < r; ++o)
      s = i[o], l += s.x, d += s.y;
    for (l = (l / r - e) * n, d = (d / r - t) * n, o = 0; o < r; ++o)
      s = i[o], s.x -= l, s.y -= d;
  }
  return a.initialize = function(o) {
    i = o;
  }, a.x = function(o) {
    return arguments.length ? (e = +o, a) : e;
  }, a.y = function(o) {
    return arguments.length ? (t = +o, a) : t;
  }, a.strength = function(o) {
    return arguments.length ? (n = +o, a) : n;
  }, a;
}
function ZV(e) {
  const t = +this._x.call(null, e), i = +this._y.call(null, e);
  return CC(this.cover(t, i), t, i, e);
}
function CC(e, t, i, n) {
  if (isNaN(t) || isNaN(i)) return e;
  var a, o = e._root, r = { data: n }, s = e._x0, l = e._y0, d = e._x1, f = e._y1, u, c, h, p, g, m, b, y;
  if (!o) return e._root = r, e;
  for (; o.length; )
    if ((g = t >= (u = (s + d) / 2)) ? s = u : d = u, (m = i >= (c = (l + f) / 2)) ? l = c : f = c, a = o, !(o = o[b = m << 1 | g])) return a[b] = r, e;
  if (h = +e._x.call(null, o.data), p = +e._y.call(null, o.data), t === h && i === p) return r.next = o, a ? a[b] = r : e._root = r, e;
  do
    a = a ? a[b] = new Array(4) : e._root = new Array(4), (g = t >= (u = (s + d) / 2)) ? s = u : d = u, (m = i >= (c = (l + f) / 2)) ? l = c : f = c;
  while ((b = m << 1 | g) === (y = (p >= c) << 1 | h >= u));
  return a[y] = o, a[b] = r, e;
}
function KV(e) {
  var t, i, n = e.length, a, o, r = new Array(n), s = new Array(n), l = 1 / 0, d = 1 / 0, f = -1 / 0, u = -1 / 0;
  for (i = 0; i < n; ++i)
    isNaN(a = +this._x.call(null, t = e[i])) || isNaN(o = +this._y.call(null, t)) || (r[i] = a, s[i] = o, a < l && (l = a), a > f && (f = a), o < d && (d = o), o > u && (u = o));
  if (l > f || d > u) return this;
  for (this.cover(l, d).cover(f, u), i = 0; i < n; ++i)
    CC(this, r[i], s[i], e[i]);
  return this;
}
function QV(e, t) {
  if (isNaN(e = +e) || isNaN(t = +t)) return this;
  var i = this._x0, n = this._y0, a = this._x1, o = this._y1;
  if (isNaN(i))
    a = (i = Math.floor(e)) + 1, o = (n = Math.floor(t)) + 1;
  else {
    for (var r = a - i || 1, s = this._root, l, d; i > e || e >= a || n > t || t >= o; )
      switch (d = (t < n) << 1 | e < i, l = new Array(4), l[d] = s, s = l, r *= 2, d) {
        case 0:
          a = i + r, o = n + r;
          break;
        case 1:
          i = a - r, o = n + r;
          break;
        case 2:
          a = i + r, n = o - r;
          break;
        case 3:
          i = a - r, n = o - r;
          break;
      }
    this._root && this._root.length && (this._root = s);
  }
  return this._x0 = i, this._y0 = n, this._x1 = a, this._y1 = o, this;
}
function eW() {
  var e = [];
  return this.visit(function(t) {
    if (!t.length) do
      e.push(t.data);
    while (t = t.next);
  }), e;
}
function tW(e) {
  return arguments.length ? this.cover(+e[0][0], +e[0][1]).cover(+e[1][0], +e[1][1]) : isNaN(this._x0) ? void 0 : [[this._x0, this._y0], [this._x1, this._y1]];
}
function Kt(e, t, i, n, a) {
  this.node = e, this.x0 = t, this.y0 = i, this.x1 = n, this.y1 = a;
}
function iW(e, t, i) {
  var n, a = this._x0, o = this._y0, r, s, l, d, f = this._x1, u = this._y1, c = [], h = this._root, p, g;
  for (h && c.push(new Kt(h, a, o, f, u)), i == null ? i = 1 / 0 : (a = e - i, o = t - i, f = e + i, u = t + i, i *= i); p = c.pop(); )
    if (!(!(h = p.node) || (r = p.x0) > f || (s = p.y0) > u || (l = p.x1) < a || (d = p.y1) < o))
      if (h.length) {
        var m = (r + l) / 2, b = (s + d) / 2;
        c.push(
          new Kt(h[3], m, b, l, d),
          new Kt(h[2], r, b, m, d),
          new Kt(h[1], m, s, l, b),
          new Kt(h[0], r, s, m, b)
        ), (g = (t >= b) << 1 | e >= m) && (p = c[c.length - 1], c[c.length - 1] = c[c.length - 1 - g], c[c.length - 1 - g] = p);
      } else {
        var y = e - +this._x.call(null, h.data), v = t - +this._y.call(null, h.data), w = y * y + v * v;
        if (w < i) {
          var x = Math.sqrt(i = w);
          a = e - x, o = t - x, f = e + x, u = t + x, n = h.data;
        }
      }
  return n;
}
function nW(e) {
  if (isNaN(f = +this._x.call(null, e)) || isNaN(u = +this._y.call(null, e))) return this;
  var t, i = this._root, n, a, o, r = this._x0, s = this._y0, l = this._x1, d = this._y1, f, u, c, h, p, g, m, b;
  if (!i) return this;
  if (i.length) for (; ; ) {
    if ((p = f >= (c = (r + l) / 2)) ? r = c : l = c, (g = u >= (h = (s + d) / 2)) ? s = h : d = h, t = i, !(i = i[m = g << 1 | p])) return this;
    if (!i.length) break;
    (t[m + 1 & 3] || t[m + 2 & 3] || t[m + 3 & 3]) && (n = t, b = m);
  }
  for (; i.data !== e; ) if (a = i, !(i = i.next)) return this;
  return (o = i.next) && delete i.next, a ? (o ? a.next = o : delete a.next, this) : t ? (o ? t[m] = o : delete t[m], (i = t[0] || t[1] || t[2] || t[3]) && i === (t[3] || t[2] || t[1] || t[0]) && !i.length && (n ? n[b] = i : this._root = i), this) : (this._root = o, this);
}
function aW(e) {
  for (var t = 0, i = e.length; t < i; ++t) this.remove(e[t]);
  return this;
}
function oW() {
  return this._root;
}
function rW() {
  var e = 0;
  return this.visit(function(t) {
    if (!t.length) do
      ++e;
    while (t = t.next);
  }), e;
}
function sW(e) {
  var t = [], i, n = this._root, a, o, r, s, l;
  for (n && t.push(new Kt(n, this._x0, this._y0, this._x1, this._y1)); i = t.pop(); )
    if (!e(n = i.node, o = i.x0, r = i.y0, s = i.x1, l = i.y1) && n.length) {
      var d = (o + s) / 2, f = (r + l) / 2;
      (a = n[3]) && t.push(new Kt(a, d, f, s, l)), (a = n[2]) && t.push(new Kt(a, o, f, d, l)), (a = n[1]) && t.push(new Kt(a, d, r, s, f)), (a = n[0]) && t.push(new Kt(a, o, r, d, f));
    }
  return this;
}
function lW(e) {
  var t = [], i = [], n;
  for (this._root && t.push(new Kt(this._root, this._x0, this._y0, this._x1, this._y1)); n = t.pop(); ) {
    var a = n.node;
    if (a.length) {
      var o, r = n.x0, s = n.y0, l = n.x1, d = n.y1, f = (r + l) / 2, u = (s + d) / 2;
      (o = a[0]) && t.push(new Kt(o, r, s, f, u)), (o = a[1]) && t.push(new Kt(o, f, s, l, u)), (o = a[2]) && t.push(new Kt(o, r, u, f, d)), (o = a[3]) && t.push(new Kt(o, f, u, l, d));
    }
    i.push(n);
  }
  for (; n = i.pop(); )
    e(n.node, n.x0, n.y0, n.x1, n.y1);
  return this;
}
function dW(e) {
  return e[0];
}
function fW(e) {
  return arguments.length ? (this._x = e, this) : this._x;
}
function uW(e) {
  return e[1];
}
function cW(e) {
  return arguments.length ? (this._y = e, this) : this._y;
}
function nx(e, t, i) {
  var n = new ax(t ?? dW, i ?? uW, NaN, NaN, NaN, NaN);
  return e == null ? n : n.addAll(e);
}
function ax(e, t, i, n, a, o) {
  this._x = e, this._y = t, this._x0 = i, this._y0 = n, this._x1 = a, this._y1 = o, this._root = void 0;
}
function Pk(e) {
  for (var t = { data: e.data }, i = t; e = e.next; ) i = i.next = { data: e.data };
  return t;
}
var ai = nx.prototype = ax.prototype;
ai.copy = function() {
  var e = new ax(this._x, this._y, this._x0, this._y0, this._x1, this._y1), t = this._root, i, n;
  if (!t) return e;
  if (!t.length) return e._root = Pk(t), e;
  for (i = [{ source: t, target: e._root = new Array(4) }]; t = i.pop(); )
    for (var a = 0; a < 4; ++a)
      (n = t.source[a]) && (n.length ? i.push({ source: n, target: t.target[a] = new Array(4) }) : t.target[a] = Pk(n));
  return e;
};
ai.add = ZV;
ai.addAll = KV;
ai.cover = QV;
ai.data = eW;
ai.extent = tW;
ai.find = iW;
ai.remove = nW;
ai.removeAll = aW;
ai.root = oW;
ai.size = rW;
ai.visit = sW;
ai.visitAfter = lW;
ai.x = fW;
ai.y = cW;
function ei(e) {
  return function() {
    return e;
  };
}
function fo(e) {
  return (e() - 0.5) * 1e-6;
}
function hW(e) {
  return e.x + e.vx;
}
function pW(e) {
  return e.y + e.vy;
}
function gW(e) {
  var t, i, n, a = 1, o = 1;
  typeof e != "function" && (e = ei(e == null ? 1 : +e));
  function r() {
    for (var d, f = t.length, u, c, h, p, g, m, b = 0; b < o; ++b)
      for (u = nx(t, hW, pW).visitAfter(s), d = 0; d < f; ++d)
        c = t[d], g = i[c.index], m = g * g, h = c.x + c.vx, p = c.y + c.vy, u.visit(y);
    function y(v, w, x, $, _) {
      var k = v.data, A = v.r, E = g + A;
      if (k) {
        if (k.index > c.index) {
          var S = h - k.x - k.vx, z = p - k.y - k.vy, O = S * S + z * z;
          O < E * E && (S === 0 && (S = fo(n), O += S * S), z === 0 && (z = fo(n), O += z * z), O = (E - (O = Math.sqrt(O))) / O * a, c.vx += (S *= O) * (E = (A *= A) / (m + A)), c.vy += (z *= O) * E, k.vx -= S * (E = 1 - E), k.vy -= z * E);
        }
        return;
      }
      return w > h + E || $ < h - E || x > p + E || _ < p - E;
    }
  }
  function s(d) {
    if (d.data) return d.r = i[d.data.index];
    for (var f = d.r = 0; f < 4; ++f)
      d[f] && d[f].r > d.r && (d.r = d[f].r);
  }
  function l() {
    if (t) {
      var d, f = t.length, u;
      for (i = new Array(f), d = 0; d < f; ++d) u = t[d], i[u.index] = +e(u, d, t);
    }
  }
  return r.initialize = function(d, f) {
    t = d, n = f, l();
  }, r.iterations = function(d) {
    return arguments.length ? (o = +d, r) : o;
  }, r.strength = function(d) {
    return arguments.length ? (a = +d, r) : a;
  }, r.radius = function(d) {
    return arguments.length ? (e = typeof d == "function" ? d : ei(+d), l(), r) : e;
  }, r;
}
function mW(e) {
  return e.index;
}
function Nk(e, t) {
  var i = e.get(t);
  if (!i) throw new Error("node not found: " + t);
  return i;
}
function bW(e) {
  var t = mW, i = u, n, a = ei(30), o, r, s, l, d, f = 1;
  e == null && (e = []);
  function u(m) {
    return 1 / Math.min(s[m.source.index], s[m.target.index]);
  }
  function c(m) {
    for (var b = 0, y = e.length; b < f; ++b)
      for (var v = 0, w, x, $, _, k, A, E; v < y; ++v)
        w = e[v], x = w.source, $ = w.target, _ = $.x + $.vx - x.x - x.vx || fo(d), k = $.y + $.vy - x.y - x.vy || fo(d), A = Math.sqrt(_ * _ + k * k), A = (A - o[v]) / A * m * n[v], _ *= A, k *= A, $.vx -= _ * (E = l[v]), $.vy -= k * E, x.vx += _ * (E = 1 - E), x.vy += k * E;
  }
  function h() {
    if (r) {
      var m, b = r.length, y = e.length, v = new Map(r.map((x, $) => [t(x, $, r), x])), w;
      for (m = 0, s = new Array(b); m < y; ++m)
        w = e[m], w.index = m, typeof w.source != "object" && (w.source = Nk(v, w.source)), typeof w.target != "object" && (w.target = Nk(v, w.target)), s[w.source.index] = (s[w.source.index] || 0) + 1, s[w.target.index] = (s[w.target.index] || 0) + 1;
      for (m = 0, l = new Array(y); m < y; ++m)
        w = e[m], l[m] = s[w.source.index] / (s[w.source.index] + s[w.target.index]);
      n = new Array(y), p(), o = new Array(y), g();
    }
  }
  function p() {
    if (r)
      for (var m = 0, b = e.length; m < b; ++m)
        n[m] = +i(e[m], m, e);
  }
  function g() {
    if (r)
      for (var m = 0, b = e.length; m < b; ++m)
        o[m] = +a(e[m], m, e);
  }
  return c.initialize = function(m, b) {
    r = m, d = b, h();
  }, c.links = function(m) {
    return arguments.length ? (e = m, h(), c) : e;
  }, c.id = function(m) {
    return arguments.length ? (t = m, c) : t;
  }, c.iterations = function(m) {
    return arguments.length ? (f = +m, c) : f;
  }, c.strength = function(m) {
    return arguments.length ? (i = typeof m == "function" ? m : ei(+m), p(), c) : i;
  }, c.distance = function(m) {
    return arguments.length ? (a = typeof m == "function" ? m : ei(+m), g(), c) : a;
  }, c;
}
var yW = { value: () => {
} };
function RC() {
  for (var e = 0, t = arguments.length, i = {}, n; e < t; ++e) {
    if (!(n = arguments[e] + "") || n in i || /[\s.]/.test(n)) throw new Error("illegal type: " + n);
    i[n] = [];
  }
  return new Pc(i);
}
function Pc(e) {
  this._ = e;
}
function vW(e, t) {
  return e.trim().split(/^|\s+/).map(function(i) {
    var n = "", a = i.indexOf(".");
    if (a >= 0 && (n = i.slice(a + 1), i = i.slice(0, a)), i && !t.hasOwnProperty(i)) throw new Error("unknown type: " + i);
    return { type: i, name: n };
  });
}
Pc.prototype = RC.prototype = {
  constructor: Pc,
  on: function(e, t) {
    var i = this._, n = vW(e + "", i), a, o = -1, r = n.length;
    if (arguments.length < 2) {
      for (; ++o < r; ) if ((a = (e = n[o]).type) && (a = _W(i[a], e.name))) return a;
      return;
    }
    if (t != null && typeof t != "function") throw new Error("invalid callback: " + t);
    for (; ++o < r; )
      if (a = (e = n[o]).type) i[a] = qk(i[a], e.name, t);
      else if (t == null) for (a in i) i[a] = qk(i[a], e.name, null);
    return this;
  },
  copy: function() {
    var e = {}, t = this._;
    for (var i in t) e[i] = t[i].slice();
    return new Pc(e);
  },
  call: function(e, t) {
    if ((a = arguments.length - 2) > 0) for (var i = new Array(a), n = 0, a, o; n < a; ++n) i[n] = arguments[n + 2];
    if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e);
    for (o = this._[e], n = 0, a = o.length; n < a; ++n) o[n].value.apply(t, i);
  },
  apply: function(e, t, i) {
    if (!this._.hasOwnProperty(e)) throw new Error("unknown type: " + e);
    for (var n = this._[e], a = 0, o = n.length; a < o; ++a) n[a].value.apply(t, i);
  }
};
function _W(e, t) {
  for (var i = 0, n = e.length, a; i < n; ++i)
    if ((a = e[i]).name === t)
      return a.value;
}
function qk(e, t, i) {
  for (var n = 0, a = e.length; n < a; ++n)
    if (e[n].name === t) {
      e[n] = yW, e = e.slice(0, n).concat(e.slice(n + 1));
      break;
    }
  return i != null && e.push({ name: t, value: i }), e;
}
var il = 0, Od = 0, ld = 0, IC = 1e3, Lh, Ed, Bh = 0, Nr = 0, ng = 0, _f = typeof performance == "object" && performance.now ? performance : Date, jC = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
  setTimeout(e, 17);
};
function ox() {
  return Nr || (jC(xW), Nr = _f.now() + ng);
}
function xW() {
  Nr = 0;
}
function Uh() {
  this._call = this._time = this._next = null;
}
Uh.prototype = zC.prototype = {
  constructor: Uh,
  restart: function(e, t, i) {
    if (typeof e != "function") throw new TypeError("callback is not a function");
    i = (i == null ? ox() : +i) + (t == null ? 0 : +t), !this._next && Ed !== this && (Ed ? Ed._next = this : Lh = this, Ed = this), this._call = e, this._time = i, Ny();
  },
  stop: function() {
    this._call && (this._call = null, this._time = 1 / 0, Ny());
  }
};
function zC(e, t, i) {
  var n = new Uh();
  return n.restart(e, t, i), n;
}
function wW() {
  ox(), ++il;
  for (var e = Lh, t; e; )
    (t = Nr - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
  --il;
}
function Lk() {
  Nr = (Bh = _f.now()) + ng, il = Od = 0;
  try {
    wW();
  } finally {
    il = 0, kW(), Nr = 0;
  }
}
function $W() {
  var e = _f.now(), t = e - Bh;
  t > IC && (ng -= t, Bh = e);
}
function kW() {
  for (var e, t = Lh, i, n = 1 / 0; t; )
    t._call ? (n > t._time && (n = t._time), e = t, t = t._next) : (i = t._next, t._next = null, t = e ? e._next = i : Lh = i);
  Ed = e, Ny(n);
}
function Ny(e) {
  if (!il) {
    Od && (Od = clearTimeout(Od));
    var t = e - Nr;
    t > 24 ? (e < 1 / 0 && (Od = setTimeout(Lk, e - _f.now() - ng)), ld && (ld = clearInterval(ld))) : (ld || (Bh = _f.now(), ld = setInterval($W, IC)), il = 1, jC(Lk));
  }
}
function AW(e, t, i) {
  var n = new Uh(), a = t;
  return t == null ? (n.restart(e, t, i), n) : (n._restart = n.restart, n.restart = function(o, r, s) {
    r = +r, s = s == null ? ox() : +s, n._restart(function l(d) {
      d += a, n._restart(l, a += r, s), o(d);
    }, r, s);
  }, n.restart(e, t, i), n);
}
const OW = 1664525, EW = 1013904223, Bk = 4294967296;
function DW() {
  let e = 1;
  return () => (e = (OW * e + EW) % Bk) / Bk;
}
function SW(e) {
  return e.x;
}
function FW(e) {
  return e.y;
}
var TW = 10, CW = Math.PI * (3 - Math.sqrt(5));
function RW(e) {
  var t, i = 1, n = 1e-3, a = 1 - Math.pow(n, 1 / 300), o = 0, r = 0.6, s = /* @__PURE__ */ new Map(), l = zC(u), d = RC("tick", "end"), f = DW();
  e == null && (e = []);
  function u() {
    c(), d.call("tick", t), i < n && (l.stop(), d.call("end", t));
  }
  function c(g) {
    var m, b = e.length, y;
    g === void 0 && (g = 1);
    for (var v = 0; v < g; ++v)
      for (i += (o - i) * a, s.forEach(function(w) {
        w(i);
      }), m = 0; m < b; ++m)
        y = e[m], y.fx == null ? y.x += y.vx *= r : (y.x = y.fx, y.vx = 0), y.fy == null ? y.y += y.vy *= r : (y.y = y.fy, y.vy = 0);
    return t;
  }
  function h() {
    for (var g = 0, m = e.length, b; g < m; ++g) {
      if (b = e[g], b.index = g, b.fx != null && (b.x = b.fx), b.fy != null && (b.y = b.fy), isNaN(b.x) || isNaN(b.y)) {
        var y = TW * Math.sqrt(0.5 + g), v = g * CW;
        b.x = y * Math.cos(v), b.y = y * Math.sin(v);
      }
      (isNaN(b.vx) || isNaN(b.vy)) && (b.vx = b.vy = 0);
    }
  }
  function p(g) {
    return g.initialize && g.initialize(e, f), g;
  }
  return h(), t = {
    tick: c,
    restart: function() {
      return l.restart(u), t;
    },
    stop: function() {
      return l.stop(), t;
    },
    nodes: function(g) {
      return arguments.length ? (e = g, h(), s.forEach(p), t) : e;
    },
    alpha: function(g) {
      return arguments.length ? (i = +g, t) : i;
    },
    alphaMin: function(g) {
      return arguments.length ? (n = +g, t) : n;
    },
    alphaDecay: function(g) {
      return arguments.length ? (a = +g, t) : +a;
    },
    alphaTarget: function(g) {
      return arguments.length ? (o = +g, t) : o;
    },
    velocityDecay: function(g) {
      return arguments.length ? (r = 1 - g, t) : 1 - r;
    },
    randomSource: function(g) {
      return arguments.length ? (f = g, s.forEach(p), t) : f;
    },
    force: function(g, m) {
      return arguments.length > 1 ? (m == null ? s.delete(g) : s.set(g, p(m)), t) : s.get(g);
    },
    find: function(g, m, b) {
      var y = 0, v = e.length, w, x, $, _, k;
      for (b == null ? b = 1 / 0 : b *= b, y = 0; y < v; ++y)
        _ = e[y], w = g - _.x, x = m - _.y, $ = w * w + x * x, $ < b && (k = _, b = $);
      return k;
    },
    on: function(g, m) {
      return arguments.length > 1 ? (d.on(g, m), t) : d.on(g);
    }
  };
}
function IW() {
  var e, t, i, n, a = ei(-30), o, r = 1, s = 1 / 0, l = 0.81;
  function d(h) {
    var p, g = e.length, m = nx(e, SW, FW).visitAfter(u);
    for (n = h, p = 0; p < g; ++p) t = e[p], m.visit(c);
  }
  function f() {
    if (e) {
      var h, p = e.length, g;
      for (o = new Array(p), h = 0; h < p; ++h) g = e[h], o[g.index] = +a(g, h, e);
    }
  }
  function u(h) {
    var p = 0, g, m, b = 0, y, v, w;
    if (h.length) {
      for (y = v = w = 0; w < 4; ++w)
        (g = h[w]) && (m = Math.abs(g.value)) && (p += g.value, b += m, y += m * g.x, v += m * g.y);
      h.x = y / b, h.y = v / b;
    } else {
      g = h, g.x = g.data.x, g.y = g.data.y;
      do
        p += o[g.data.index];
      while (g = g.next);
    }
    h.value = p;
  }
  function c(h, p, g, m) {
    if (!h.value) return !0;
    var b = h.x - t.x, y = h.y - t.y, v = m - p, w = b * b + y * y;
    if (v * v / l < w)
      return w < s && (b === 0 && (b = fo(i), w += b * b), y === 0 && (y = fo(i), w += y * y), w < r && (w = Math.sqrt(r * w)), t.vx += b * h.value * n / w, t.vy += y * h.value * n / w), !0;
    if (h.length || w >= s) return;
    (h.data !== t || h.next) && (b === 0 && (b = fo(i), w += b * b), y === 0 && (y = fo(i), w += y * y), w < r && (w = Math.sqrt(r * w)));
    do
      h.data !== t && (v = o[h.data.index] * n / w, t.vx += b * v, t.vy += y * v);
    while (h = h.next);
  }
  return d.initialize = function(h, p) {
    e = h, i = p, f();
  }, d.strength = function(h) {
    return arguments.length ? (a = typeof h == "function" ? h : ei(+h), f(), d) : a;
  }, d.distanceMin = function(h) {
    return arguments.length ? (r = h * h, d) : Math.sqrt(r);
  }, d.distanceMax = function(h) {
    return arguments.length ? (s = h * h, d) : Math.sqrt(s);
  }, d.theta = function(h) {
    return arguments.length ? (l = h * h, d) : Math.sqrt(l);
  }, d;
}
function jW(e) {
  var t = ei(0.1), i, n, a;
  typeof e != "function" && (e = ei(e == null ? 0 : +e));
  function o(s) {
    for (var l = 0, d = i.length, f; l < d; ++l)
      f = i[l], f.vx += (a[l] - f.x) * n[l] * s;
  }
  function r() {
    if (i) {
      var s, l = i.length;
      for (n = new Array(l), a = new Array(l), s = 0; s < l; ++s)
        n[s] = isNaN(a[s] = +e(i[s], s, i)) ? 0 : +t(i[s], s, i);
    }
  }
  return o.initialize = function(s) {
    i = s, r();
  }, o.strength = function(s) {
    return arguments.length ? (t = typeof s == "function" ? s : ei(+s), r(), o) : t;
  }, o.x = function(s) {
    return arguments.length ? (e = typeof s == "function" ? s : ei(+s), r(), o) : e;
  }, o;
}
function zW(e) {
  var t = ei(0.1), i, n, a;
  typeof e != "function" && (e = ei(e == null ? 0 : +e));
  function o(s) {
    for (var l = 0, d = i.length, f; l < d; ++l)
      f = i[l], f.vy += (a[l] - f.y) * n[l] * s;
  }
  function r() {
    if (i) {
      var s, l = i.length;
      for (n = new Array(l), a = new Array(l), s = 0; s < l; ++s)
        n[s] = isNaN(a[s] = +e(i[s], s, i)) ? 0 : +t(i[s], s, i);
    }
  }
  return o.initialize = function(s) {
    i = s, r();
  }, o.strength = function(s) {
    return arguments.length ? (t = typeof s == "function" ? s : ei(+s), r(), o) : t;
  }, o.y = function(s) {
    return arguments.length ? (e = typeof s == "function" ? s : ei(+s), r(), o) : e;
  }, o;
}
const Uk = {
  center: JV,
  collide: gW,
  nbody: IW,
  link: bW,
  x: jW,
  y: zW
}, Dd = "forces", qy = ["alpha", "alphaMin", "alphaTarget", "velocityDecay", "forces"], PW = ["static", "iterations"], PC = ["x", "y", "vx", "vy"];
function rx(e) {
  T.call(this, null, e);
}
rx.Definition = {
  type: "Force",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "static",
    type: "boolean",
    default: !1
  }, {
    name: "restart",
    type: "boolean",
    default: !1
  }, {
    name: "iterations",
    type: "number",
    default: 300
  }, {
    name: "alpha",
    type: "number",
    default: 1
  }, {
    name: "alphaMin",
    type: "number",
    default: 1e-3
  }, {
    name: "alphaTarget",
    type: "number",
    default: 0
  }, {
    name: "velocityDecay",
    type: "number",
    default: 0.4
  }, {
    name: "forces",
    type: "param",
    array: !0,
    params: [{
      key: {
        force: "center"
      },
      params: [{
        name: "x",
        type: "number",
        default: 0
      }, {
        name: "y",
        type: "number",
        default: 0
      }]
    }, {
      key: {
        force: "collide"
      },
      params: [{
        name: "radius",
        type: "number",
        expr: !0
      }, {
        name: "strength",
        type: "number",
        default: 0.7
      }, {
        name: "iterations",
        type: "number",
        default: 1
      }]
    }, {
      key: {
        force: "nbody"
      },
      params: [{
        name: "strength",
        type: "number",
        default: -30,
        expr: !0
      }, {
        name: "theta",
        type: "number",
        default: 0.9
      }, {
        name: "distanceMin",
        type: "number",
        default: 1
      }, {
        name: "distanceMax",
        type: "number"
      }]
    }, {
      key: {
        force: "link"
      },
      params: [{
        name: "links",
        type: "data"
      }, {
        name: "id",
        type: "field"
      }, {
        name: "distance",
        type: "number",
        default: 30,
        expr: !0
      }, {
        name: "strength",
        type: "number",
        expr: !0
      }, {
        name: "iterations",
        type: "number",
        default: 1
      }]
    }, {
      key: {
        force: "x"
      },
      params: [{
        name: "strength",
        type: "number",
        default: 0.1
      }, {
        name: "x",
        type: "field"
      }]
    }, {
      key: {
        force: "y"
      },
      params: [{
        name: "strength",
        type: "number",
        default: 0.1
      }, {
        name: "y",
        type: "field"
      }]
    }]
  }, {
    name: "as",
    type: "string",
    array: !0,
    modify: !1,
    default: PC
  }]
};
XV(rx, T, {
  transform(e, t) {
    var i = this.value, n = t.changed(t.ADD_REM), a = e.modified(qy), o = e.iterations || 300;
    if (i ? (n && (t.modifies("index"), i.nodes(t.source)), (a || t.changed(t.MOD)) && NC(i, e, 0, t)) : (this.value = i = qW(t.source, e), i.on("tick", NW(t.dataflow, this)), e.static || (n = !0, i.tick()), t.modifies("index")), a || n || e.modified(PW) || t.changed() && e.restart) {
      if (i.alpha(Math.max(i.alpha(), e.alpha || 1)).alphaDecay(1 - Math.pow(i.alphaMin(), 1 / o)), e.static)
        for (i.stop(); --o >= 0; ) i.tick();
      else if (i.stopped() && i.restart(), !n) return t.StopPropagation;
    }
    return this.finish(e, t);
  },
  finish(e, t) {
    const i = t.dataflow;
    for (let s = this._argops, l = 0, d = s.length, f; l < d; ++l)
      if (f = s[l], !(f.name !== Dd || f.op._argval.force !== "link")) {
        for (var n = f.op._argops, a = 0, o = n.length, r; a < o; ++a)
          if (n[a].name === "links" && (r = n[a].op.source)) {
            i.pulse(r, i.changeset().reflow());
            break;
          }
      }
    return t.reflow(e.modified()).modifies(PC);
  }
});
function NW(e, t) {
  return () => e.touch(t).run();
}
function qW(e, t) {
  const i = RW(e), n = i.stop, a = i.restart;
  let o = !1;
  return i.stopped = () => o, i.restart = () => (o = !1, a()), i.stop = () => (o = !0, n()), NC(i, t, !0).on("end", () => o = !0);
}
function NC(e, t, i, n) {
  var a = WV(t.forces), o, r, s, l;
  for (o = 0, r = qy.length; o < r; ++o)
    s = qy[o], s !== Dd && t.modified(s) && e[s](t[s]);
  for (o = 0, r = a.length; o < r; ++o)
    l = Dd + o, s = i || t.modified(Dd, o) ? BW(a[o]) : n && LW(a[o], n) ? e.force(l) : null, s && e.force(l, s);
  for (r = e.numForces || 0; o < r; ++o)
    e.force(Dd + o, null);
  return e.numForces = a.length, e;
}
function LW(e, t) {
  var i, n;
  for (i in e)
    if (ix(n = e[i]) && t.modified(NV(n))) return 1;
  return 0;
}
function BW(e) {
  var t, i;
  YV(Uk, e.force) || zc("Unrecognized force: " + e.force), t = Uk[e.force]();
  for (i in e)
    ix(t[i]) && UW(t[i], e[i], e);
  return t;
}
function UW(e, t, i) {
  e(ix(t) ? (n) => t(n, i) : t);
}
const MW = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  force: rx
}, Symbol.toStringTag, { value: "Module" }));
function Dl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function VW(e) {
  return e.length === 1 ? WW(e[0]) : GW(e);
}
const WW = (e) => function(t) {
  return t[e];
}, GW = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function In(e) {
  throw Error(e);
}
function HW(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || In("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && In("Access path missing closing bracket: " + e), n && In("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function YW(e, t, i) {
  const n = HW(e);
  return e = n.length === 1 ? n[0] : e, Dl(VW(n), [e], e);
}
YW("id");
Dl((e) => e, [], "identity");
Dl(() => 0, [], "zero");
const XW = Dl(() => 1, [], "one"), JW = Dl(() => !0, [], "true");
Dl(() => !1, [], "false");
var ZW = Array.isArray;
function KW(e) {
  return e != null ? ZW(e) ? e : [e] : [];
}
function QW(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const e4 = Object.prototype.hasOwnProperty;
function qC(e, t) {
  return e4.call(e, t);
}
function jo(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), QW(n, i);
}
function t4(e, t) {
  return e.parent === t.parent ? 1 : 2;
}
function i4(e) {
  return e.reduce(n4, 0) / e.length;
}
function n4(e, t) {
  return e + t.x;
}
function a4(e) {
  return 1 + e.reduce(o4, 0);
}
function o4(e, t) {
  return Math.max(e, t.y);
}
function r4(e) {
  for (var t; t = e.children; ) e = t[0];
  return e;
}
function s4(e) {
  for (var t; t = e.children; ) e = t[t.length - 1];
  return e;
}
function l4() {
  var e = t4, t = 1, i = 1, n = !1;
  function a(o) {
    var r, s = 0;
    o.eachAfter(function(c) {
      var h = c.children;
      h ? (c.x = i4(h), c.y = a4(h)) : (c.x = r ? s += e(c, r) : 0, c.y = 0, r = c);
    });
    var l = r4(o), d = s4(o), f = l.x - e(l, d) / 2, u = d.x + e(d, l) / 2;
    return o.eachAfter(n ? function(c) {
      c.x = (c.x - o.x) * t, c.y = (o.y - c.y) * i;
    } : function(c) {
      c.x = (c.x - f) / (u - f) * t, c.y = (1 - (o.y ? c.y / o.y : 1)) * i;
    });
  }
  return a.separation = function(o) {
    return arguments.length ? (e = o, a) : e;
  }, a.size = function(o) {
    return arguments.length ? (n = !1, t = +o[0], i = +o[1], a) : n ? null : [t, i];
  }, a.nodeSize = function(o) {
    return arguments.length ? (n = !0, t = +o[0], i = +o[1], a) : n ? [t, i] : null;
  }, a;
}
function d4(e) {
  var t = 0, i = e.children, n = i && i.length;
  if (!n) t = 1;
  else for (; --n >= 0; ) t += i[n].value;
  e.value = t;
}
function f4() {
  return this.eachAfter(d4);
}
function u4(e, t) {
  let i = -1;
  for (const n of this)
    e.call(t, n, ++i, this);
  return this;
}
function c4(e, t) {
  for (var i = this, n = [i], a, o, r = -1; i = n.pop(); )
    if (e.call(t, i, ++r, this), a = i.children)
      for (o = a.length - 1; o >= 0; --o)
        n.push(a[o]);
  return this;
}
function h4(e, t) {
  for (var i = this, n = [i], a = [], o, r, s, l = -1; i = n.pop(); )
    if (a.push(i), o = i.children)
      for (r = 0, s = o.length; r < s; ++r)
        n.push(o[r]);
  for (; i = a.pop(); )
    e.call(t, i, ++l, this);
  return this;
}
function p4(e, t) {
  let i = -1;
  for (const n of this)
    if (e.call(t, n, ++i, this))
      return n;
}
function g4(e) {
  return this.eachAfter(function(t) {
    for (var i = +e(t.data) || 0, n = t.children, a = n && n.length; --a >= 0; ) i += n[a].value;
    t.value = i;
  });
}
function m4(e) {
  return this.eachBefore(function(t) {
    t.children && t.children.sort(e);
  });
}
function b4(e) {
  for (var t = this, i = y4(t, e), n = [t]; t !== i; )
    t = t.parent, n.push(t);
  for (var a = n.length; e !== i; )
    n.splice(a, 0, e), e = e.parent;
  return n;
}
function y4(e, t) {
  if (e === t) return e;
  var i = e.ancestors(), n = t.ancestors(), a = null;
  for (e = i.pop(), t = n.pop(); e === t; )
    a = e, e = i.pop(), t = n.pop();
  return a;
}
function v4() {
  for (var e = this, t = [e]; e = e.parent; )
    t.push(e);
  return t;
}
function _4() {
  return Array.from(this);
}
function x4() {
  var e = [];
  return this.eachBefore(function(t) {
    t.children || e.push(t);
  }), e;
}
function w4() {
  var e = this, t = [];
  return e.each(function(i) {
    i !== e && t.push({ source: i.parent, target: i });
  }), t;
}
function* $4() {
  var e = this, t, i = [e], n, a, o;
  do
    for (t = i.reverse(), i = []; e = t.pop(); )
      if (yield e, n = e.children)
        for (a = 0, o = n.length; a < o; ++a)
          i.push(n[a]);
  while (i.length);
}
function sx(e, t) {
  e instanceof Map ? (e = [void 0, e], t === void 0 && (t = O4)) : t === void 0 && (t = A4);
  for (var i = new nl(e), n, a = [i], o, r, s, l; n = a.pop(); )
    if ((r = t(n.data)) && (l = (r = Array.from(r)).length))
      for (n.children = r, s = l - 1; s >= 0; --s)
        a.push(o = r[s] = new nl(r[s])), o.parent = n, o.depth = n.depth + 1;
  return i.eachBefore(LC);
}
function k4() {
  return sx(this).eachBefore(E4);
}
function A4(e) {
  return e.children;
}
function O4(e) {
  return Array.isArray(e) ? e[1] : null;
}
function E4(e) {
  e.data.value !== void 0 && (e.value = e.data.value), e.data = e.data.data;
}
function LC(e) {
  var t = 0;
  do
    e.height = t;
  while ((e = e.parent) && e.height < ++t);
}
function nl(e) {
  this.data = e, this.depth = this.height = 0, this.parent = null;
}
nl.prototype = sx.prototype = {
  constructor: nl,
  count: f4,
  each: u4,
  eachAfter: h4,
  eachBefore: c4,
  find: p4,
  sum: g4,
  sort: m4,
  path: b4,
  ancestors: v4,
  descendants: _4,
  leaves: x4,
  links: w4,
  copy: k4,
  [Symbol.iterator]: $4
};
function Nc(e) {
  return e == null ? null : BC(e);
}
function BC(e) {
  if (typeof e != "function") throw new Error();
  return e;
}
function vr() {
  return 0;
}
function Fs(e) {
  return function() {
    return e;
  };
}
const D4 = 1664525, S4 = 1013904223, Mk = 4294967296;
function F4() {
  let e = 1;
  return () => (e = (D4 * e + S4) % Mk) / Mk;
}
function T4(e) {
  return typeof e == "object" && "length" in e ? e : Array.from(e);
}
function C4(e, t) {
  let i = e.length, n, a;
  for (; i; )
    a = t() * i-- | 0, n = e[i], e[i] = e[a], e[a] = n;
  return e;
}
function R4(e, t) {
  for (var i = 0, n = (e = C4(Array.from(e), t)).length, a = [], o, r; i < n; )
    o = e[i], r && UC(r, o) ? ++i : (r = j4(a = I4(a, o)), i = 0);
  return r;
}
function I4(e, t) {
  var i, n;
  if (Wm(t, e)) return [t];
  for (i = 0; i < e.length; ++i)
    if (Ku(t, e[i]) && Wm(Sd(e[i], t), e))
      return [e[i], t];
  for (i = 0; i < e.length - 1; ++i)
    for (n = i + 1; n < e.length; ++n)
      if (Ku(Sd(e[i], e[n]), t) && Ku(Sd(e[i], t), e[n]) && Ku(Sd(e[n], t), e[i]) && Wm(MC(e[i], e[n], t), e))
        return [e[i], e[n], t];
  throw new Error();
}
function Ku(e, t) {
  var i = e.r - t.r, n = t.x - e.x, a = t.y - e.y;
  return i < 0 || i * i < n * n + a * a;
}
function UC(e, t) {
  var i = e.r - t.r + Math.max(e.r, t.r, 1) * 1e-9, n = t.x - e.x, a = t.y - e.y;
  return i > 0 && i * i > n * n + a * a;
}
function Wm(e, t) {
  for (var i = 0; i < t.length; ++i)
    if (!UC(e, t[i]))
      return !1;
  return !0;
}
function j4(e) {
  switch (e.length) {
    case 1:
      return z4(e[0]);
    case 2:
      return Sd(e[0], e[1]);
    case 3:
      return MC(e[0], e[1], e[2]);
  }
}
function z4(e) {
  return {
    x: e.x,
    y: e.y,
    r: e.r
  };
}
function Sd(e, t) {
  var i = e.x, n = e.y, a = e.r, o = t.x, r = t.y, s = t.r, l = o - i, d = r - n, f = s - a, u = Math.sqrt(l * l + d * d);
  return {
    x: (i + o + l / u * f) / 2,
    y: (n + r + d / u * f) / 2,
    r: (u + a + s) / 2
  };
}
function MC(e, t, i) {
  var n = e.x, a = e.y, o = e.r, r = t.x, s = t.y, l = t.r, d = i.x, f = i.y, u = i.r, c = n - r, h = n - d, p = a - s, g = a - f, m = l - o, b = u - o, y = n * n + a * a - o * o, v = y - r * r - s * s + l * l, w = y - d * d - f * f + u * u, x = h * p - c * g, $ = (p * w - g * v) / (x * 2) - n, _ = (g * m - p * b) / x, k = (h * v - c * w) / (x * 2) - a, A = (c * b - h * m) / x, E = _ * _ + A * A - 1, S = 2 * (o + $ * _ + k * A), z = $ * $ + k * k - o * o, O = -(Math.abs(E) > 1e-6 ? (S + Math.sqrt(S * S - 4 * E * z)) / (2 * E) : z / S);
  return {
    x: n + $ + _ * O,
    y: a + k + A * O,
    r: O
  };
}
function Vk(e, t, i) {
  var n = e.x - t.x, a, o, r = e.y - t.y, s, l, d = n * n + r * r;
  d ? (o = t.r + i.r, o *= o, l = e.r + i.r, l *= l, o > l ? (a = (d + l - o) / (2 * d), s = Math.sqrt(Math.max(0, l / d - a * a)), i.x = e.x - a * n - s * r, i.y = e.y - a * r + s * n) : (a = (d + o - l) / (2 * d), s = Math.sqrt(Math.max(0, o / d - a * a)), i.x = t.x + a * n - s * r, i.y = t.y + a * r + s * n)) : (i.x = t.x + i.r, i.y = t.y);
}
function Wk(e, t) {
  var i = e.r + t.r - 1e-6, n = t.x - e.x, a = t.y - e.y;
  return i > 0 && i * i > n * n + a * a;
}
function Gk(e) {
  var t = e._, i = e.next._, n = t.r + i.r, a = (t.x * i.r + i.x * t.r) / n, o = (t.y * i.r + i.y * t.r) / n;
  return a * a + o * o;
}
function Qu(e) {
  this._ = e, this.next = null, this.previous = null;
}
function P4(e, t) {
  if (!(o = (e = T4(e)).length)) return 0;
  var i, n, a, o, r, s, l, d, f, u, c;
  if (i = e[0], i.x = 0, i.y = 0, !(o > 1)) return i.r;
  if (n = e[1], i.x = -n.r, n.x = i.r, n.y = 0, !(o > 2)) return i.r + n.r;
  Vk(n, i, a = e[2]), i = new Qu(i), n = new Qu(n), a = new Qu(a), i.next = a.previous = n, n.next = i.previous = a, a.next = n.previous = i;
  e: for (l = 3; l < o; ++l) {
    Vk(i._, n._, a = e[l]), a = new Qu(a), d = n.next, f = i.previous, u = n._.r, c = i._.r;
    do
      if (u <= c) {
        if (Wk(d._, a._)) {
          n = d, i.next = n, n.previous = i, --l;
          continue e;
        }
        u += d._.r, d = d.next;
      } else {
        if (Wk(f._, a._)) {
          i = f, i.next = n, n.previous = i, --l;
          continue e;
        }
        c += f._.r, f = f.previous;
      }
    while (d !== f.next);
    for (a.previous = i, a.next = n, i.next = n.previous = n = a, r = Gk(i); (a = a.next) !== n; )
      (s = Gk(a)) < r && (i = a, r = s);
    n = i.next;
  }
  for (i = [n._], a = n; (a = a.next) !== n; ) i.push(a._);
  for (a = R4(i, t), l = 0; l < o; ++l) i = e[l], i.x -= a.x, i.y -= a.y;
  return a.r;
}
function N4(e) {
  return Math.sqrt(e.value);
}
function q4() {
  var e = null, t = 1, i = 1, n = vr;
  function a(o) {
    const r = F4();
    return o.x = t / 2, o.y = i / 2, e ? o.eachBefore(Hk(e)).eachAfter(Gm(n, 0.5, r)).eachBefore(Yk(1)) : o.eachBefore(Hk(N4)).eachAfter(Gm(vr, 1, r)).eachAfter(Gm(n, o.r / Math.min(t, i), r)).eachBefore(Yk(Math.min(t, i) / (2 * o.r))), o;
  }
  return a.radius = function(o) {
    return arguments.length ? (e = Nc(o), a) : e;
  }, a.size = function(o) {
    return arguments.length ? (t = +o[0], i = +o[1], a) : [t, i];
  }, a.padding = function(o) {
    return arguments.length ? (n = typeof o == "function" ? o : Fs(+o), a) : n;
  }, a;
}
function Hk(e) {
  return function(t) {
    t.children || (t.r = Math.max(0, +e(t) || 0));
  };
}
function Gm(e, t, i) {
  return function(n) {
    if (a = n.children) {
      var a, o, r = a.length, s = e(n) * t || 0, l;
      if (s) for (o = 0; o < r; ++o) a[o].r += s;
      if (l = P4(a, i), s) for (o = 0; o < r; ++o) a[o].r -= s;
      n.r = l + s;
    }
  };
}
function Yk(e) {
  return function(t) {
    var i = t.parent;
    t.r *= e, i && (t.x = i.x + e * t.x, t.y = i.y + e * t.y);
  };
}
function VC(e) {
  e.x0 = Math.round(e.x0), e.y0 = Math.round(e.y0), e.x1 = Math.round(e.x1), e.y1 = Math.round(e.y1);
}
function ru(e, t, i, n, a) {
  for (var o = e.children, r, s = -1, l = o.length, d = e.value && (n - t) / e.value; ++s < l; )
    r = o[s], r.y0 = i, r.y1 = a, r.x0 = t, r.x1 = t += r.value * d;
}
function L4() {
  var e = 1, t = 1, i = 0, n = !1;
  function a(r) {
    var s = r.height + 1;
    return r.x0 = r.y0 = i, r.x1 = e, r.y1 = t / s, r.eachBefore(o(t, s)), n && r.eachBefore(VC), r;
  }
  function o(r, s) {
    return function(l) {
      l.children && ru(l, l.x0, r * (l.depth + 1) / s, l.x1, r * (l.depth + 2) / s);
      var d = l.x0, f = l.y0, u = l.x1 - i, c = l.y1 - i;
      u < d && (d = u = (d + u) / 2), c < f && (f = c = (f + c) / 2), l.x0 = d, l.y0 = f, l.x1 = u, l.y1 = c;
    };
  }
  return a.round = function(r) {
    return arguments.length ? (n = !!r, a) : n;
  }, a.size = function(r) {
    return arguments.length ? (e = +r[0], t = +r[1], a) : [e, t];
  }, a.padding = function(r) {
    return arguments.length ? (i = +r, a) : i;
  }, a;
}
var B4 = { depth: -1 }, Xk = {}, Hm = {};
function U4(e) {
  return e.id;
}
function M4(e) {
  return e.parentId;
}
function Jk() {
  var e = U4, t = M4, i;
  function n(a) {
    var o = Array.from(a), r = e, s = t, l, d, f, u, c, h, p, g, m = /* @__PURE__ */ new Map();
    if (i != null) {
      const b = o.map((w, x) => V4(i(w, x, a))), y = b.map(Zk), v = new Set(b).add("");
      for (const w of y)
        v.has(w) || (v.add(w), b.push(w), y.push(Zk(w)), o.push(Hm));
      r = (w, x) => b[x], s = (w, x) => y[x];
    }
    for (f = 0, l = o.length; f < l; ++f)
      d = o[f], h = o[f] = new nl(d), (p = r(d, f, a)) != null && (p += "") && (g = h.id = p, m.set(g, m.has(g) ? Xk : h)), (p = s(d, f, a)) != null && (p += "") && (h.parent = p);
    for (f = 0; f < l; ++f)
      if (h = o[f], p = h.parent) {
        if (c = m.get(p), !c) throw new Error("missing: " + p);
        if (c === Xk) throw new Error("ambiguous: " + p);
        c.children ? c.children.push(h) : c.children = [h], h.parent = c;
      } else {
        if (u) throw new Error("multiple roots");
        u = h;
      }
    if (!u) throw new Error("no root");
    if (i != null) {
      for (; u.data === Hm && u.children.length === 1; )
        u = u.children[0], --l;
      for (let b = o.length - 1; b >= 0 && (h = o[b], h.data === Hm); --b)
        h.data = null;
    }
    if (u.parent = B4, u.eachBefore(function(b) {
      b.depth = b.parent.depth + 1, --l;
    }).eachBefore(LC), u.parent = null, l > 0) throw new Error("cycle");
    return u;
  }
  return n.id = function(a) {
    return arguments.length ? (e = Nc(a), n) : e;
  }, n.parentId = function(a) {
    return arguments.length ? (t = Nc(a), n) : t;
  }, n.path = function(a) {
    return arguments.length ? (i = Nc(a), n) : i;
  }, n;
}
function V4(e) {
  e = `${e}`;
  let t = e.length;
  return Ly(e, t - 1) && !Ly(e, t - 2) && (e = e.slice(0, -1)), e[0] === "/" ? e : `/${e}`;
}
function Zk(e) {
  let t = e.length;
  if (t < 2) return "";
  for (; --t > 1 && !Ly(e, t); ) ;
  return e.slice(0, t);
}
function Ly(e, t) {
  if (e[t] === "/") {
    let i = 0;
    for (; t > 0 && e[--t] === "\\"; ) ++i;
    if (!(i & 1)) return !0;
  }
  return !1;
}
function W4(e, t) {
  return e.parent === t.parent ? 1 : 2;
}
function Ym(e) {
  var t = e.children;
  return t ? t[0] : e.t;
}
function Xm(e) {
  var t = e.children;
  return t ? t[t.length - 1] : e.t;
}
function G4(e, t, i) {
  var n = i / (t.i - e.i);
  t.c -= n, t.s += i, e.c += n, t.z += i, t.m += i;
}
function H4(e) {
  for (var t = 0, i = 0, n = e.children, a = n.length, o; --a >= 0; )
    o = n[a], o.z += t, o.m += t, t += o.s + (i += o.c);
}
function Y4(e, t, i) {
  return e.a.parent === t.parent ? e.a : i;
}
function qc(e, t) {
  this._ = e, 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 = t;
}
qc.prototype = Object.create(nl.prototype);
function X4(e) {
  for (var t = new qc(e, 0), i, n = [t], a, o, r, s; i = n.pop(); )
    if (o = i._.children)
      for (i.children = new Array(s = o.length), r = s - 1; r >= 0; --r)
        n.push(a = i.children[r] = new qc(o[r], r)), a.parent = i;
  return (t.parent = new qc(null, 0)).children = [t], t;
}
function J4() {
  var e = W4, t = 1, i = 1, n = null;
  function a(d) {
    var f = X4(d);
    if (f.eachAfter(o), f.parent.m = -f.z, f.eachBefore(r), n) d.eachBefore(l);
    else {
      var u = d, c = d, h = d;
      d.eachBefore(function(y) {
        y.x < u.x && (u = y), y.x > c.x && (c = y), y.depth > h.depth && (h = y);
      });
      var p = u === c ? 1 : e(u, c) / 2, g = p - u.x, m = t / (c.x + p + g), b = i / (h.depth || 1);
      d.eachBefore(function(y) {
        y.x = (y.x + g) * m, y.y = y.depth * b;
      });
    }
    return d;
  }
  function o(d) {
    var f = d.children, u = d.parent.children, c = d.i ? u[d.i - 1] : null;
    if (f) {
      H4(d);
      var h = (f[0].z + f[f.length - 1].z) / 2;
      c ? (d.z = c.z + e(d._, c._), d.m = d.z - h) : d.z = h;
    } else c && (d.z = c.z + e(d._, c._));
    d.parent.A = s(d, c, d.parent.A || u[0]);
  }
  function r(d) {
    d._.x = d.z + d.parent.m, d.m += d.parent.m;
  }
  function s(d, f, u) {
    if (f) {
      for (var c = d, h = d, p = f, g = c.parent.children[0], m = c.m, b = h.m, y = p.m, v = g.m, w; p = Xm(p), c = Ym(c), p && c; )
        g = Ym(g), h = Xm(h), h.a = d, w = p.z + y - c.z - m + e(p._, c._), w > 0 && (G4(Y4(p, d, u), d, w), m += w, b += w), y += p.m, m += c.m, v += g.m, b += h.m;
      p && !Xm(h) && (h.t = p, h.m += y - b), c && !Ym(g) && (g.t = c, g.m += m - v, u = d);
    }
    return u;
  }
  function l(d) {
    d.x *= t, d.y = d.depth * i;
  }
  return a.separation = function(d) {
    return arguments.length ? (e = d, a) : e;
  }, a.size = function(d) {
    return arguments.length ? (n = !1, t = +d[0], i = +d[1], a) : n ? null : [t, i];
  }, a.nodeSize = function(d) {
    return arguments.length ? (n = !0, t = +d[0], i = +d[1], a) : n ? [t, i] : null;
  }, a;
}
function ag(e, t, i, n, a) {
  for (var o = e.children, r, s = -1, l = o.length, d = e.value && (a - i) / e.value; ++s < l; )
    r = o[s], r.x0 = t, r.x1 = n, r.y0 = i, r.y1 = i += r.value * d;
}
var WC = (1 + Math.sqrt(5)) / 2;
function GC(e, t, i, n, a, o) {
  for (var r = [], s = t.children, l, d, f = 0, u = 0, c = s.length, h, p, g = t.value, m, b, y, v, w, x, $; f < c; ) {
    h = a - i, p = o - n;
    do
      m = s[u++].value;
    while (!m && u < c);
    for (b = y = m, x = Math.max(p / h, h / p) / (g * e), $ = m * m * x, w = Math.max(y / $, $ / b); u < c; ++u) {
      if (m += d = s[u].value, d < b && (b = d), d > y && (y = d), $ = m * m * x, v = Math.max(y / $, $ / b), v > w) {
        m -= d;
        break;
      }
      w = v;
    }
    r.push(l = { value: m, dice: h < p, children: s.slice(f, u) }), l.dice ? ru(l, i, n, a, g ? n += p * m / g : o) : ag(l, i, n, g ? i += h * m / g : a, o), g -= m, f = u;
  }
  return r;
}
const HC = function e(t) {
  function i(n, a, o, r, s) {
    GC(t, n, a, o, r, s);
  }
  return i.ratio = function(n) {
    return e((n = +n) > 1 ? n : 1);
  }, i;
}(WC);
function Z4() {
  var e = HC, t = !1, i = 1, n = 1, a = [0], o = vr, r = vr, s = vr, l = vr, d = vr;
  function f(c) {
    return c.x0 = c.y0 = 0, c.x1 = i, c.y1 = n, c.eachBefore(u), a = [0], t && c.eachBefore(VC), c;
  }
  function u(c) {
    var h = a[c.depth], p = c.x0 + h, g = c.y0 + h, m = c.x1 - h, b = c.y1 - h;
    m < p && (p = m = (p + m) / 2), b < g && (g = b = (g + b) / 2), c.x0 = p, c.y0 = g, c.x1 = m, c.y1 = b, c.children && (h = a[c.depth + 1] = o(c) / 2, p += d(c) - h, g += r(c) - h, m -= s(c) - h, b -= l(c) - h, m < p && (p = m = (p + m) / 2), b < g && (g = b = (g + b) / 2), e(c, p, g, m, b));
  }
  return f.round = function(c) {
    return arguments.length ? (t = !!c, f) : t;
  }, f.size = function(c) {
    return arguments.length ? (i = +c[0], n = +c[1], f) : [i, n];
  }, f.tile = function(c) {
    return arguments.length ? (e = BC(c), f) : e;
  }, f.padding = function(c) {
    return arguments.length ? f.paddingInner(c).paddingOuter(c) : f.paddingInner();
  }, f.paddingInner = function(c) {
    return arguments.length ? (o = typeof c == "function" ? c : Fs(+c), f) : o;
  }, f.paddingOuter = function(c) {
    return arguments.length ? f.paddingTop(c).paddingRight(c).paddingBottom(c).paddingLeft(c) : f.paddingTop();
  }, f.paddingTop = function(c) {
    return arguments.length ? (r = typeof c == "function" ? c : Fs(+c), f) : r;
  }, f.paddingRight = function(c) {
    return arguments.length ? (s = typeof c == "function" ? c : Fs(+c), f) : s;
  }, f.paddingBottom = function(c) {
    return arguments.length ? (l = typeof c == "function" ? c : Fs(+c), f) : l;
  }, f.paddingLeft = function(c) {
    return arguments.length ? (d = typeof c == "function" ? c : Fs(+c), f) : d;
  }, f;
}
function K4(e, t, i, n, a) {
  var o = e.children, r, s = o.length, l, d = new Array(s + 1);
  for (d[0] = l = r = 0; r < s; ++r)
    d[r + 1] = l += o[r].value;
  f(0, s, e.value, t, i, n, a);
  function f(u, c, h, p, g, m, b) {
    if (u >= c - 1) {
      var y = o[u];
      y.x0 = p, y.y0 = g, y.x1 = m, y.y1 = b;
      return;
    }
    for (var v = d[u], w = h / 2 + v, x = u + 1, $ = c - 1; x < $; ) {
      var _ = x + $ >>> 1;
      d[_] < w ? x = _ + 1 : $ = _;
    }
    w - d[x - 1] < d[x] - w && u + 1 < x && --x;
    var k = d[x] - v, A = h - k;
    if (m - p > b - g) {
      var E = h ? (p * A + m * k) / h : m;
      f(u, x, k, p, g, E, b), f(x, c, A, E, g, m, b);
    } else {
      var S = h ? (g * A + b * k) / h : b;
      f(u, x, k, p, g, m, S), f(x, c, A, p, S, m, b);
    }
  }
}
function Q4(e, t, i, n, a) {
  (e.depth & 1 ? ag : ru)(e, t, i, n, a);
}
const eG = function e(t) {
  function i(n, a, o, r, s) {
    if ((l = n._squarify) && l.ratio === t)
      for (var l, d, f, u, c = -1, h, p = l.length, g = n.value; ++c < p; ) {
        for (d = l[c], f = d.children, u = d.value = 0, h = f.length; u < h; ++u) d.value += f[u].value;
        d.dice ? ru(d, a, o, r, g ? o += (s - o) * d.value / g : s) : ag(d, a, o, g ? a += (r - a) * d.value / g : r, s), g -= d.value;
      }
    else
      n._squarify = l = GC(t, n, a, o, r, s), l.ratio = t;
  }
  return i.ratio = function(n) {
    return e((n = +n) > 1 ? n : 1);
  }, i;
}(WC);
function By(e, t, i) {
  const n = {};
  return e.each((a) => {
    const o = a.data;
    i(o) && (n[t(o)] = a);
  }), e.lookup = n, e;
}
function lx(e) {
  T.call(this, null, e);
}
lx.Definition = {
  type: "Nest",
  metadata: {
    treesource: !0,
    changes: !0
  },
  params: [{
    name: "keys",
    type: "field",
    array: !0
  }, {
    name: "generate",
    type: "boolean"
  }]
};
const tG = (e) => e.values;
jo(lx, T, {
  transform(e, t) {
    t.source || In("Nest transform requires an upstream data source.");
    var i = e.generate, n = e.modified(), a = t.clone(), o = this.value;
    return (!o || n || t.changed()) && (o && o.each((r) => {
      r.children && jp(r.data) && a.rem.push(r.data);
    }), this.value = o = sx({
      values: KW(e.keys).reduce((r, s) => (r.key(s), r), iG()).entries(a.source)
    }, tG), i && o.each((r) => {
      r.children && (r = xe(r.data), a.add.push(r), a.source.push(r));
    }), By(o, Z, Z)), a.source.root = o, a;
  }
});
function iG() {
  const e = [], t = {
    entries: (a) => n(i(a, 0), 0),
    key: (a) => (e.push(a), t)
  };
  function i(a, o) {
    if (o >= e.length)
      return a;
    const r = a.length, s = e[o++], l = {}, d = {};
    let f = -1, u, c, h;
    for (; ++f < r; )
      u = s(c = a[f]) + "", (h = l[u]) ? h.push(c) : l[u] = [c];
    for (u in l)
      d[u] = i(l[u], o);
    return d;
  }
  function n(a, o) {
    if (++o > e.length) return a;
    const r = [];
    for (const s in a)
      r.push({
        key: s,
        values: n(a[s], o)
      });
    return r;
  }
  return t;
}
function La(e) {
  T.call(this, null, e);
}
const nG = (e, t) => e.parent === t.parent ? 1 : 2;
jo(La, T, {
  transform(e, t) {
    (!t.source || !t.source.root) && In(this.constructor.name + " transform requires a backing tree data source.");
    const i = this.layout(e.method), n = this.fields, a = t.source.root, o = e.as || n;
    e.field ? a.sum(e.field) : a.count(), e.sort && a.sort(is(e.sort, (r) => r.data)), aG(i, this.params, e), i.separation && i.separation(e.separation !== !1 ? nG : XW);
    try {
      this.value = i(a);
    } catch (r) {
      In(r);
    }
    return a.each((r) => oG(r, n, o)), t.reflow(e.modified()).modifies(o).modifies("leaf");
  }
});
function aG(e, t, i) {
  for (let n, a = 0, o = t.length; a < o; ++a)
    n = t[a], n in i && e[n](i[n]);
}
function oG(e, t, i) {
  const n = e.data, a = t.length - 1;
  for (let o = 0; o < a; ++o)
    n[i[o]] = e[t[o]];
  n[i[a]] = e.children ? e.children.length : 0;
}
const Uy = ["x", "y", "r", "depth", "children"];
function dx(e) {
  La.call(this, e);
}
dx.Definition = {
  type: "Pack",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "padding",
    type: "number",
    default: 0
  }, {
    name: "radius",
    type: "field",
    default: null
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: Uy.length,
    default: Uy
  }]
};
jo(dx, La, {
  layout: q4,
  params: ["radius", "size", "padding"],
  fields: Uy
});
const My = ["x0", "y0", "x1", "y1", "depth", "children"];
function fx(e) {
  La.call(this, e);
}
fx.Definition = {
  type: "Partition",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "padding",
    type: "number",
    default: 0
  }, {
    name: "round",
    type: "boolean",
    default: !1
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: My.length,
    default: My
  }]
};
jo(fx, La, {
  layout: L4,
  params: ["size", "round", "padding"],
  fields: My
});
function ux(e) {
  T.call(this, null, e);
}
ux.Definition = {
  type: "Stratify",
  metadata: {
    treesource: !0
  },
  params: [{
    name: "key",
    type: "field",
    required: !0
  }, {
    name: "parentKey",
    type: "field",
    required: !0
  }]
};
jo(ux, T, {
  transform(e, t) {
    t.source || In("Stratify transform requires an upstream data source.");
    let i = this.value;
    const n = e.modified(), a = t.fork(t.ALL).materialize(t.SOURCE), o = !i || n || t.changed(t.ADD_REM) || t.modified(e.key.fields) || t.modified(e.parentKey.fields);
    return a.source = a.source.slice(), o && (i = a.source.length ? By(Jk().id(e.key).parentId(e.parentKey)(a.source), e.key, JW) : By(Jk()([{}]), e.key, e.key)), a.source.root = this.value = i, a;
  }
});
const Kk = {
  tidy: J4,
  cluster: l4
}, Vy = ["x", "y", "depth", "children"];
function cx(e) {
  La.call(this, e);
}
cx.Definition = {
  type: "Tree",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "method",
    type: "enum",
    default: "tidy",
    values: ["tidy", "cluster"]
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "nodeSize",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "separation",
    type: "boolean",
    default: !0
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: Vy.length,
    default: Vy
  }]
};
jo(cx, La, {
  /**
   * Tree layout generator. Supports both 'tidy' and 'cluster' layouts.
   */
  layout(e) {
    const t = e || "tidy";
    if (qC(Kk, t)) return Kk[t]();
    In("Unrecognized Tree layout method: " + t);
  },
  params: ["size", "nodeSize"],
  fields: Vy
});
function hx(e) {
  T.call(this, [], e);
}
hx.Definition = {
  type: "TreeLinks",
  metadata: {
    tree: !0,
    generates: !0,
    changes: !0
  },
  params: []
};
jo(hx, T, {
  transform(e, t) {
    const i = this.value, n = t.source && t.source.root, a = t.fork(t.NO_SOURCE), o = {};
    return n || In("TreeLinks transform requires a tree data source."), t.changed(t.ADD_REM) ? (a.rem = i, t.visit(t.SOURCE, (r) => o[Z(r)] = 1), n.each((r) => {
      const s = r.data, l = r.parent && r.parent.data;
      l && o[Z(s)] && o[Z(l)] && a.add.push(xe({
        source: l,
        target: s
      }));
    }), this.value = a.add) : t.changed(t.MOD) && (t.visit(t.MOD, (r) => o[Z(r)] = 1), i.forEach((r) => {
      (o[Z(r.source)] || o[Z(r.target)]) && a.mod.push(r);
    })), a;
  }
});
const Qk = {
  binary: K4,
  dice: ru,
  slice: ag,
  slicedice: Q4,
  squarify: HC,
  resquarify: eG
}, Wy = ["x0", "y0", "x1", "y1", "depth", "children"];
function px(e) {
  La.call(this, e);
}
px.Definition = {
  type: "Treemap",
  metadata: {
    tree: !0,
    modifies: !0
  },
  params: [{
    name: "field",
    type: "field"
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "method",
    type: "enum",
    default: "squarify",
    values: ["squarify", "resquarify", "binary", "dice", "slice", "slicedice"]
  }, {
    name: "padding",
    type: "number",
    default: 0
  }, {
    name: "paddingInner",
    type: "number",
    default: 0
  }, {
    name: "paddingOuter",
    type: "number",
    default: 0
  }, {
    name: "paddingTop",
    type: "number",
    default: 0
  }, {
    name: "paddingRight",
    type: "number",
    default: 0
  }, {
    name: "paddingBottom",
    type: "number",
    default: 0
  }, {
    name: "paddingLeft",
    type: "number",
    default: 0
  }, {
    name: "ratio",
    type: "number",
    default: 1.618033988749895
  }, {
    name: "round",
    type: "boolean",
    default: !1
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: Wy.length,
    default: Wy
  }]
};
jo(px, La, {
  /**
   * Treemap layout generator. Adds 'method' and 'ratio' parameters
   * to configure the underlying tile method.
   */
  layout() {
    const e = Z4();
    return e.ratio = (t) => {
      const i = e.tile();
      i.ratio && e.tile(i.ratio(t));
    }, e.method = (t) => {
      qC(Qk, t) ? e.tile(Qk[t]) : In("Unrecognized Treemap layout method: " + t);
    }, e;
  },
  params: ["method", "ratio", "size", "round", "padding", "paddingInner", "paddingOuter", "paddingTop", "paddingRight", "paddingBottom", "paddingLeft"],
  fields: Wy
});
const rG = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  nest: lx,
  pack: dx,
  partition: fx,
  stratify: ux,
  tree: cx,
  treelinks: hx,
  treemap: px
}, Symbol.toStringTag, { value: "Module" }));
function Sl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function sG(e) {
  return e.length === 1 ? lG(e[0]) : dG(e);
}
const lG = (e) => function(t) {
  return t[e];
}, dG = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Lc(e) {
  throw Error(e);
}
function fG(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Lc("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Lc("Access path missing closing bracket: " + e), n && Lc("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function uG(e, t, i) {
  const n = fG(e);
  return e = n.length === 1 ? n[0] : e, Sl(sG(n), [e], e);
}
uG("id");
Sl((e) => e, [], "identity");
Sl(() => 0, [], "zero");
Sl(() => 1, [], "one");
Sl(() => !0, [], "true");
Sl(() => !1, [], "false");
var cG = Array.isArray;
function eA(e) {
  return e != null ? cG(e) ? e : [e] : [];
}
function hG(e) {
  return typeof e == "function";
}
function pG(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function gG(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), pG(n, i);
}
const Jm = 4278190080;
function mG(e, t) {
  const i = e.bitmap();
  return (t || []).forEach((n) => i.set(e(n.boundary[0]), e(n.boundary[3]))), [i, void 0];
}
function bG(e, t, i, n, a) {
  const o = e.width, r = e.height, s = n || a, l = po(o, r).getContext("2d"), d = po(o, r).getContext("2d"), f = s && po(o, r).getContext("2d");
  i.forEach((k) => Bc(l, k, !1)), Bc(d, t, !1), s && Bc(f, t, !0);
  const u = Zm(l, o, r), c = Zm(d, o, r), h = s && Zm(f, o, r), p = e.bitmap(), g = s && e.bitmap();
  let m, b, y, v, w, x, $, _;
  for (b = 0; b < r; ++b)
    for (m = 0; m < o; ++m)
      w = b * o + m, x = u[w] & Jm, _ = c[w] & Jm, $ = s && h[w] & Jm, (x || $ || _) && (y = e(m), v = e(b), !a && (x || _) && p.set(y, v), s && (x || $) && g.set(y, v));
  return [p, g];
}
function Zm(e, t, i) {
  return new Uint32Array(e.getImageData(0, 0, t, i).data.buffer);
}
function Bc(e, t, i) {
  if (!t.length) return;
  const n = t[0].mark.marktype;
  n === "group" ? t.forEach((a) => {
    a.items.forEach((o) => Bc(e, o.items, i));
  }) : Ti[n].draw(e, {
    items: i ? t.map(yG) : t
  });
}
function yG(e) {
  const t = zp(e, {});
  return t.stroke && t.strokeOpacity !== 0 || t.fill && t.fillOpacity !== 0 ? {
    ...t,
    strokeOpacity: 1,
    stroke: "#000",
    fillOpacity: 0
  } : t;
}
const ca = 5, Mt = 31, xf = 32, eo = new Uint32Array(xf + 1), Qi = new Uint32Array(xf + 1);
Qi[0] = 0;
eo[0] = ~Qi[0];
for (let e = 1; e <= xf; ++e)
  Qi[e] = Qi[e - 1] << 1 | 1, eo[e] = ~Qi[e];
function vG(e, t) {
  const i = new Uint32Array(~~((e * t + xf) / xf));
  function n(o, r) {
    i[o] |= r;
  }
  function a(o, r) {
    i[o] &= r;
  }
  return {
    array: i,
    get: (o, r) => {
      const s = r * e + o;
      return i[s >>> ca] & 1 << (s & Mt);
    },
    set: (o, r) => {
      const s = r * e + o;
      n(s >>> ca, 1 << (s & Mt));
    },
    clear: (o, r) => {
      const s = r * e + o;
      a(s >>> ca, ~(1 << (s & Mt)));
    },
    getRange: (o, r, s, l) => {
      let d = l, f, u, c, h;
      for (; d >= r; --d)
        if (f = d * e + o, u = d * e + s, c = f >>> ca, h = u >>> ca, c === h) {
          if (i[c] & eo[f & Mt] & Qi[(u & Mt) + 1])
            return !0;
        } else {
          if (i[c] & eo[f & Mt] || i[h] & Qi[(u & Mt) + 1]) return !0;
          for (let p = c + 1; p < h; ++p)
            if (i[p]) return !0;
        }
      return !1;
    },
    setRange: (o, r, s, l) => {
      let d, f, u, c, h;
      for (; r <= l; ++r)
        if (d = r * e + o, f = r * e + s, u = d >>> ca, c = f >>> ca, u === c)
          n(u, eo[d & Mt] & Qi[(f & Mt) + 1]);
        else
          for (n(u, eo[d & Mt]), n(c, Qi[(f & Mt) + 1]), h = u + 1; h < c; ++h) n(h, 4294967295);
    },
    clearRange: (o, r, s, l) => {
      let d, f, u, c, h;
      for (; r <= l; ++r)
        if (d = r * e + o, f = r * e + s, u = d >>> ca, c = f >>> ca, u === c)
          a(u, Qi[d & Mt] | eo[(f & Mt) + 1]);
        else
          for (a(u, Qi[d & Mt]), a(c, eo[(f & Mt) + 1]), h = u + 1; h < c; ++h) a(h, 0);
    },
    outOfBounds: (o, r, s, l) => o < 0 || r < 0 || l >= t || s >= e
  };
}
function _G(e, t, i) {
  const n = Math.max(1, Math.sqrt(e * t / 1e6)), a = ~~((e + 2 * i + n) / n), o = ~~((t + 2 * i + n) / n), r = (s) => ~~((s + i) / n);
  return r.invert = (s) => s * n - i, r.bitmap = () => vG(a, o), r.ratio = n, r.padding = i, r.width = e, r.height = t, r;
}
function xG(e, t, i, n) {
  const a = e.width, o = e.height;
  return function(r) {
    const s = r.datum.datum.items[n].items, l = s.length, d = r.datum.fontSize, f = ki.width(r.datum, r.datum.text);
    let u = 0, c, h, p, g, m, b, y;
    for (let v = 0; v < l; ++v)
      c = s[v].x, p = s[v].y, h = s[v].x2 === void 0 ? c : s[v].x2, g = s[v].y2 === void 0 ? p : s[v].y2, m = (c + h) / 2, b = (p + g) / 2, y = Math.abs(h - c + g - p), y >= u && (u = y, r.x = m, r.y = b);
    return m = f / 2, b = d / 2, c = r.x - m, h = r.x + m, p = r.y - b, g = r.y + b, r.align = "center", c < 0 && h <= a ? r.align = "left" : 0 <= c && a < h && (r.align = "right"), r.baseline = "middle", p < 0 && g <= o ? r.baseline = "top" : 0 <= p && o < g && (r.baseline = "bottom"), !0;
  };
}
function Mh(e, t, i, n, a, o) {
  let r = i / 2;
  return e - r < 0 || e + r > a || t - (r = n / 2) < 0 || t + r > o;
}
function uo(e, t, i, n, a, o, r, s) {
  const l = a * o / (n * 2), d = e(t - l), f = e(t + l), u = e(i - (o = o / 2)), c = e(i + o);
  return r.outOfBounds(d, u, f, c) || r.getRange(d, u, f, c) || s && s.getRange(d, u, f, c);
}
function wG(e, t, i, n) {
  const a = e.width, o = e.height, r = t[0], s = t[1];
  function l(d, f, u, c, h) {
    const p = e.invert(d), g = e.invert(f);
    let m = u, b = o, y;
    if (!Mh(p, g, c, h, a, o) && !uo(e, p, g, h, c, m, r, s) && !uo(e, p, g, h, c, h, r, null)) {
      for (; b - m >= 1; )
        y = (m + b) / 2, uo(e, p, g, h, c, y, r, s) ? b = y : m = y;
      if (m > u)
        return [p, g, m, !0];
    }
  }
  return function(d) {
    const f = d.datum.datum.items[n].items, u = f.length, c = d.datum.fontSize, h = ki.width(d.datum, d.datum.text);
    let p = i ? c : 0, g = !1, m = !1, b = 0, y, v, w, x, $, _, k, A, E, S, z, O, D, j, F, P, N;
    for (let L = 0; L < u; ++L) {
      for (y = f[L].x, w = f[L].y, v = f[L].x2 === void 0 ? y : f[L].x2, x = f[L].y2 === void 0 ? w : f[L].y2, y > v && (N = y, y = v, v = N), w > x && (N = w, w = x, x = N), E = e(y), z = e(v), S = ~~((E + z) / 2), O = e(w), j = e(x), D = ~~((O + j) / 2), k = S; k >= E; --k)
        for (A = D; A >= O; --A)
          P = l(k, A, p, h, c), P && ([d.x, d.y, p, g] = P);
      for (k = S; k <= z; ++k)
        for (A = D; A <= j; ++A)
          P = l(k, A, p, h, c), P && ([d.x, d.y, p, g] = P);
      !g && !i && (F = Math.abs(v - y + x - w), $ = (y + v) / 2, _ = (w + x) / 2, F >= b && !Mh($, _, h, c, a, o) && !uo(e, $, _, c, h, c, r, null) && (b = F, d.x = $, d.y = _, m = !0));
    }
    return g || m ? ($ = h / 2, _ = c / 2, r.setRange(e(d.x - $), e(d.y - _), e(d.x + $), e(d.y + _)), d.align = "center", d.baseline = "middle", !0) : !1;
  };
}
const $G = [-1, -1, 1, 1], kG = [-1, 1, -1, 1];
function AG(e, t, i, n) {
  const a = e.width, o = e.height, r = t[0], s = t[1], l = e.bitmap();
  return function(d) {
    const f = d.datum.datum.items[n].items, u = f.length, c = d.datum.fontSize, h = ki.width(d.datum, d.datum.text), p = [];
    let g = i ? c : 0, m = !1, b = !1, y = 0, v, w, x, $, _, k, A, E, S, z, O, D;
    for (let j = 0; j < u; ++j) {
      for (v = f[j].x, x = f[j].y, w = f[j].x2 === void 0 ? v : f[j].x2, $ = f[j].y2 === void 0 ? x : f[j].y2, p.push([e((v + w) / 2), e((x + $) / 2)]); p.length; )
        if ([A, E] = p.pop(), !(r.get(A, E) || s.get(A, E) || l.get(A, E))) {
          l.set(A, E);
          for (let F = 0; F < 4; ++F)
            _ = A + $G[F], k = E + kG[F], l.outOfBounds(_, k, _, k) || p.push([_, k]);
          if (_ = e.invert(A), k = e.invert(E), S = g, z = o, !Mh(_, k, h, c, a, o) && !uo(e, _, k, c, h, S, r, s) && !uo(e, _, k, c, h, c, r, null)) {
            for (; z - S >= 1; )
              O = (S + z) / 2, uo(e, _, k, c, h, O, r, s) ? z = O : S = O;
            S > g && (d.x = _, d.y = k, g = S, m = !0);
          }
        }
      !m && !i && (D = Math.abs(w - v + $ - x), _ = (v + w) / 2, k = (x + $) / 2, D >= y && !Mh(_, k, h, c, a, o) && !uo(e, _, k, c, h, c, r, null) && (y = D, d.x = _, d.y = k, b = !0));
    }
    return m || b ? (_ = h / 2, k = c / 2, r.setRange(e(d.x - _), e(d.y - k), e(d.x + _), e(d.y + k)), d.align = "center", d.baseline = "middle", !0) : !1;
  };
}
const OG = ["right", "center", "left"], EG = ["bottom", "middle", "top"];
function DG(e, t, i, n) {
  const a = e.width, o = e.height, r = t[0], s = t[1], l = n.length;
  return function(d) {
    const f = d.boundary, u = d.datum.fontSize;
    if (f[2] < 0 || f[5] < 0 || f[0] > a || f[3] > o)
      return !1;
    let c = d.textWidth ?? 0, h, p, g, m, b, y, v, w, x, $, _, k, A, E, S;
    for (let z = 0; z < l; ++z) {
      if (h = (i[z] & 3) - 1, p = (i[z] >>> 2 & 3) - 1, g = h === 0 && p === 0 || n[z] < 0, m = h && p ? Math.SQRT1_2 : 1, b = n[z] < 0 ? -1 : 1, y = f[1 + h] + n[z] * h * m, _ = f[4 + p] + b * u * p / 2 + n[z] * p * m, w = _ - u / 2, x = _ + u / 2, k = e(y), E = e(w), S = e(x), !c)
        if (tA(k, k, E, S, r, s, y, y, w, x, f, g))
          c = ki.width(d.datum, d.datum.text);
        else
          continue;
      if ($ = y + b * c * h / 2, y = $ - c / 2, v = $ + c / 2, k = e(y), A = e(v), tA(k, A, E, S, r, s, y, v, w, x, f, g))
        return d.x = h ? h * b < 0 ? v : y : $, d.y = p ? p * b < 0 ? x : w : _, d.align = OG[h * b + 1], d.baseline = EG[p * b + 1], r.setRange(k, E, A, S), !0;
    }
    return !1;
  };
}
function tA(e, t, i, n, a, o, r, s, l, d, f, u) {
  return !(a.outOfBounds(e, i, t, n) || (u && o || a).getRange(e, i, t, n));
}
const Km = 0, Qm = 4, eb = 8, tb = 0, ib = 1, nb = 2, SG = {
  "top-left": Km + tb,
  top: Km + ib,
  "top-right": Km + nb,
  left: Qm + tb,
  middle: Qm + ib,
  right: Qm + nb,
  "bottom-left": eb + tb,
  bottom: eb + ib,
  "bottom-right": eb + nb
}, FG = {
  naive: xG,
  "reduced-search": wG,
  floodfill: AG
};
function TG(e, t, i, n, a, o, r, s, l, d, f) {
  if (!e.length) return e;
  const u = Math.max(n.length, a.length), c = CG(n, u), h = RG(a, u), p = IG(e[0].datum), g = p === "group" && e[0].datum.items[l].marktype, m = g === "area", b = jG(p, g, s, l), y = d === null || d === 1 / 0, v = m && f === "naive";
  let w = -1, x = -1;
  const $ = e.map((E) => {
    const S = y ? ki.width(E, E.text) : void 0;
    return w = Math.max(w, S), x = Math.max(x, E.fontSize), {
      datum: E,
      opacity: 0,
      x: void 0,
      y: void 0,
      align: void 0,
      baseline: void 0,
      boundary: b(E),
      textWidth: S
    };
  });
  d = d === null || d === 1 / 0 ? Math.max(w, x) + Math.max(...n) : d;
  const _ = _G(t[0], t[1], d);
  let k;
  if (!v) {
    i && $.sort((z, O) => i(z.datum, O.datum));
    let E = !1;
    for (let z = 0; z < h.length && !E; ++z)
      E = h[z] === 5 || c[z] < 0;
    const S = (p && r || m) && e.map((z) => z.datum);
    k = o.length || S ? bG(_, S || [], o, E, m) : mG(_, r && $);
  }
  const A = m ? FG[f](_, k, r, l) : DG(_, k, h, c);
  return $.forEach((E) => E.opacity = +A(E)), $;
}
function CG(e, t) {
  const i = new Float64Array(t), n = e.length;
  for (let a = 0; a < n; ++a) i[a] = e[a] || 0;
  for (let a = n; a < t; ++a) i[a] = i[n - 1];
  return i;
}
function RG(e, t) {
  const i = new Int8Array(t), n = e.length;
  for (let a = 0; a < n; ++a) i[a] |= SG[e[a]];
  for (let a = n; a < t; ++a) i[a] = i[n - 1];
  return i;
}
function IG(e) {
  return e && e.mark && e.mark.marktype;
}
function jG(e, t, i, n) {
  const a = (o) => [o.x, o.x, o.x, o.y, o.y, o.y];
  return e ? e === "line" || e === "area" ? (o) => a(o.datum) : t === "line" ? (o) => {
    const r = o.datum.items[n].items;
    return a(r.length ? r[i === "start" ? 0 : r.length - 1] : {
      x: NaN,
      y: NaN
    });
  } : (o) => {
    const r = o.datum.bounds;
    return [r.x1, (r.x1 + r.x2) / 2, r.x2, r.y1, (r.y1 + r.y2) / 2, r.y2];
  } : a;
}
const Gy = ["x", "y", "opacity", "align", "baseline"], YC = ["top-left", "left", "bottom-left", "top", "bottom", "top-right", "right", "bottom-right"];
function gx(e) {
  T.call(this, null, e);
}
gx.Definition = {
  type: "Label",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2,
    required: !0
  }, {
    name: "sort",
    type: "compare"
  }, {
    name: "anchor",
    type: "string",
    array: !0,
    default: YC
  }, {
    name: "offset",
    type: "number",
    array: !0,
    default: [1]
  }, {
    name: "padding",
    type: "number",
    default: 0,
    null: !0
  }, {
    name: "lineAnchor",
    type: "string",
    values: ["start", "end"],
    default: "end"
  }, {
    name: "markIndex",
    type: "number",
    default: 0
  }, {
    name: "avoidBaseMark",
    type: "boolean",
    default: !0
  }, {
    name: "avoidMarks",
    type: "data",
    array: !0
  }, {
    name: "method",
    type: "string",
    default: "naive"
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: Gy.length,
    default: Gy
  }]
};
gG(gx, T, {
  transform(e, t) {
    function i(o) {
      const r = e[o];
      return hG(r) && t.modified(r.fields);
    }
    const n = e.modified();
    if (!(n || t.changed(t.ADD_REM) || i("sort"))) return;
    (!e.size || e.size.length !== 2) && Lc("Size parameter should be specified as a [width, height] array.");
    const a = e.as || Gy;
    return TG(t.materialize(t.SOURCE).source || [], e.size, e.sort, eA(e.offset == null ? 1 : e.offset), eA(e.anchor || YC), e.avoidMarks || [], e.avoidBaseMark !== !1, e.lineAnchor || "end", e.markIndex || 0, e.padding === void 0 ? 0 : e.padding, e.method || "naive").forEach((o) => {
      const r = o.datum;
      r[a[0]] = o.x, r[a[1]] = o.y, r[a[2]] = o.opacity, r[a[3]] = o.align, r[a[4]] = o.baseline;
    }), t.reflow(n).modifies(a);
  }
});
const zG = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  label: gx
}, Symbol.toStringTag, { value: "Module" }));
function Fl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function Ls(e) {
  return e == null ? null : e.fname;
}
function PG(e) {
  return e.length === 1 ? NG(e[0]) : qG(e);
}
const NG = (e) => function(t) {
  return t[e];
}, qG = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Uc(e) {
  throw Error(e);
}
function LG(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Uc("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Uc("Access path missing closing bracket: " + e), n && Uc("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function BG(e, t, i) {
  const n = LG(e);
  return e = n.length === 1 ? n[0] : e, Fl(PG(n), [e], e);
}
BG("id");
Fl((e) => e, [], "identity");
Fl(() => 0, [], "zero");
Fl(() => 1, [], "one");
Fl(() => !0, [], "true");
Fl(() => !1, [], "false");
function UG(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function MG(e, t) {
  let i = 0, n, a, o, r;
  if (e && (n = e.length))
    if (t == null) {
      for (a = e[i]; i < n && (a == null || a !== a); a = e[++i]) ;
      for (o = r = a; i < n; ++i)
        a = e[i], a != null && (a < o && (o = a), a > r && (r = a));
    } else {
      for (a = t(e[i]); i < n && (a == null || a !== a); a = t(e[++i])) ;
      for (o = r = a; i < n; ++i)
        a = t(e[i]), a != null && (a < o && (o = a), a > r && (r = a));
    }
  return [o, r];
}
const VG = Object.prototype.hasOwnProperty;
function WG(e, t) {
  return VG.call(e, t);
}
function XC(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), UG(n, i);
}
function JC(e, t) {
  var i = [], n = function(f) {
    return f(s);
  }, a, o, r, s, l, d;
  if (t == null)
    i.push(e);
  else
    for (a = {}, o = 0, r = e.length; o < r; ++o)
      s = e[o], l = t.map(n), d = a[l], d || (a[l] = d = [], d.dims = l, i.push(d)), d.push(s);
  return i;
}
function mx(e) {
  T.call(this, null, e);
}
mx.Definition = {
  type: "Loess",
  metadata: {
    generates: !0
  },
  params: [{
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "bandwidth",
    type: "number",
    default: 0.3
  }, {
    name: "as",
    type: "string",
    array: !0
  }]
};
XC(mx, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const n = t.materialize(t.SOURCE).source, a = JC(n, e.groupby), o = (e.groupby || []).map(Ls), r = o.length, s = e.as || [Ls(e.x), Ls(e.y)], l = [];
      a.forEach((d) => {
        NE(d, e.x, e.y, e.bandwidth || 0.3).forEach((f) => {
          const u = {};
          for (let c = 0; c < r; ++c)
            u[o[c]] = d.dims[c];
          u[s[0]] = f[0], u[s[1]] = f[1], l.push(xe(u));
        });
      }), this.value && (i.rem = this.value), this.value = i.add = i.source = l;
    }
    return i;
  }
});
const Hy = {
  constant: qE,
  linear: LE,
  log: BE,
  exp: UE,
  pow: ME,
  quad: VE,
  poly: WE
}, GG = (e, t) => e === "poly" ? t : e === "quad" ? 2 : 1;
function bx(e) {
  T.call(this, null, e);
}
bx.Definition = {
  type: "Regression",
  metadata: {
    generates: !0
  },
  params: [{
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "groupby",
    type: "field",
    array: !0
  }, {
    name: "method",
    type: "string",
    default: "linear",
    values: Object.keys(Hy)
  }, {
    name: "order",
    type: "number",
    default: 3
  }, {
    name: "extent",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "params",
    type: "boolean",
    default: !1
  }, {
    name: "as",
    type: "string",
    array: !0
  }]
};
XC(bx, T, {
  transform(e, t) {
    const i = t.fork(t.NO_SOURCE | t.NO_FIELDS);
    if (!this.value || t.changed() || e.modified()) {
      const n = t.materialize(t.SOURCE).source, a = JC(n, e.groupby), o = (e.groupby || []).map(Ls), r = e.method || "linear", s = e.order == null ? 3 : e.order, l = GG(r, s), d = e.as || [Ls(e.x), Ls(e.y)], f = Hy[r], u = [];
      let c = e.extent;
      WG(Hy, r) || Uc("Invalid regression method: " + r), c != null && r === "log" && c[0] <= 0 && (t.dataflow.warn("Ignoring extent with values <= 0 for log regression."), c = null), a.forEach((h) => {
        if (h.length <= l) {
          t.dataflow.warn("Skipping regression with more parameters than data points.");
          return;
        }
        const g = f(h, e.x, e.y, s);
        if (e.params) {
          u.push(xe({
            keys: h.dims,
            coef: g.coef,
            rSquared: g.rSquared
          }));
          return;
        }
        const m = c || MG(h, e.x), b = (y) => {
          const v = {};
          for (let w = 0; w < o.length; ++w)
            v[o[w]] = h.dims[w];
          v[d[0]] = y[0], v[d[1]] = y[1], u.push(xe(v));
        };
        r === "linear" || r === "constant" ? m.forEach((y) => b([y, g.predict(y)])) : Ap(g.predict, m, 25, 200).forEach(b);
      }), this.value && (i.rem = this.value), this.value = i.add = i.source = u;
    }
    return i;
  }
});
const HG = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  loess: mx,
  regression: bx
}, Symbol.toStringTag, { value: "Module" }));
function Tl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function YG(e) {
  return e.length === 1 ? XG(e[0]) : JG(e);
}
const XG = (e) => function(t) {
  return t[e];
}, JG = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function ab(e) {
  throw Error(e);
}
function ZG(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || ab("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && ab("Access path missing closing bracket: " + e), n && ab("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function KG(e, t, i) {
  const n = ZG(e);
  return e = n.length === 1 ? n[0] : e, Tl(YG(n), [e], e);
}
KG("id");
Tl((e) => e, [], "identity");
Tl(() => 0, [], "zero");
Tl(() => 1, [], "one");
Tl(() => !0, [], "true");
Tl(() => !1, [], "false");
function QG(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function eH(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), QG(n, i);
}
const ka = 11102230246251565e-32, Et = 134217729, tH = (3 + 8 * ka) * ka;
function ob(e, t, i, n, a) {
  let o, r, s, l, d = t[0], f = n[0], u = 0, c = 0;
  f > d == f > -d ? (o = d, d = t[++u]) : (o = f, f = n[++c]);
  let h = 0;
  if (u < e && c < i)
    for (f > d == f > -d ? (r = d + o, s = o - (r - d), d = t[++u]) : (r = f + o, s = o - (r - f), f = n[++c]), o = r, s !== 0 && (a[h++] = s); u < e && c < i; )
      f > d == f > -d ? (r = o + d, l = r - o, s = o - (r - l) + (d - l), d = t[++u]) : (r = o + f, l = r - o, s = o - (r - l) + (f - l), f = n[++c]), o = r, s !== 0 && (a[h++] = s);
  for (; u < e; )
    r = o + d, l = r - o, s = o - (r - l) + (d - l), d = t[++u], o = r, s !== 0 && (a[h++] = s);
  for (; c < i; )
    r = o + f, l = r - o, s = o - (r - l) + (f - l), f = n[++c], o = r, s !== 0 && (a[h++] = s);
  return (o !== 0 || h === 0) && (a[h++] = o), h;
}
function iH(e, t) {
  let i = t[0];
  for (let n = 1; n < e; n++) i += t[n];
  return i;
}
function su(e) {
  return new Float64Array(e);
}
const nH = (3 + 16 * ka) * ka, aH = (2 + 12 * ka) * ka, oH = (9 + 64 * ka) * ka * ka, As = su(4), iA = su(8), nA = su(12), aA = su(16), Vt = su(4);
function rH(e, t, i, n, a, o, r) {
  let s, l, d, f, u, c, h, p, g, m, b, y, v, w, x, $, _, k;
  const A = e - a, E = i - a, S = t - o, z = n - o;
  w = A * z, c = Et * A, h = c - (c - A), p = A - h, c = Et * z, g = c - (c - z), m = z - g, x = p * m - (w - h * g - p * g - h * m), $ = S * E, c = Et * S, h = c - (c - S), p = S - h, c = Et * E, g = c - (c - E), m = E - g, _ = p * m - ($ - h * g - p * g - h * m), b = x - _, u = x - b, As[0] = x - (b + u) + (u - _), y = w + b, u = y - w, v = w - (y - u) + (b - u), b = v - $, u = v - b, As[1] = v - (b + u) + (u - $), k = y + b, u = k - y, As[2] = y - (k - u) + (b - u), As[3] = k;
  let O = iH(4, As), D = aH * r;
  if (O >= D || -O >= D || (u = e - A, s = e - (A + u) + (u - a), u = i - E, d = i - (E + u) + (u - a), u = t - S, l = t - (S + u) + (u - o), u = n - z, f = n - (z + u) + (u - o), s === 0 && l === 0 && d === 0 && f === 0) || (D = oH * r + tH * Math.abs(O), O += A * f + z * s - (S * d + E * l), O >= D || -O >= D)) return O;
  w = s * z, c = Et * s, h = c - (c - s), p = s - h, c = Et * z, g = c - (c - z), m = z - g, x = p * m - (w - h * g - p * g - h * m), $ = l * E, c = Et * l, h = c - (c - l), p = l - h, c = Et * E, g = c - (c - E), m = E - g, _ = p * m - ($ - h * g - p * g - h * m), b = x - _, u = x - b, Vt[0] = x - (b + u) + (u - _), y = w + b, u = y - w, v = w - (y - u) + (b - u), b = v - $, u = v - b, Vt[1] = v - (b + u) + (u - $), k = y + b, u = k - y, Vt[2] = y - (k - u) + (b - u), Vt[3] = k;
  const j = ob(4, As, 4, Vt, iA);
  w = A * f, c = Et * A, h = c - (c - A), p = A - h, c = Et * f, g = c - (c - f), m = f - g, x = p * m - (w - h * g - p * g - h * m), $ = S * d, c = Et * S, h = c - (c - S), p = S - h, c = Et * d, g = c - (c - d), m = d - g, _ = p * m - ($ - h * g - p * g - h * m), b = x - _, u = x - b, Vt[0] = x - (b + u) + (u - _), y = w + b, u = y - w, v = w - (y - u) + (b - u), b = v - $, u = v - b, Vt[1] = v - (b + u) + (u - $), k = y + b, u = k - y, Vt[2] = y - (k - u) + (b - u), Vt[3] = k;
  const F = ob(j, iA, 4, Vt, nA);
  w = s * f, c = Et * s, h = c - (c - s), p = s - h, c = Et * f, g = c - (c - f), m = f - g, x = p * m - (w - h * g - p * g - h * m), $ = l * d, c = Et * l, h = c - (c - l), p = l - h, c = Et * d, g = c - (c - d), m = d - g, _ = p * m - ($ - h * g - p * g - h * m), b = x - _, u = x - b, Vt[0] = x - (b + u) + (u - _), y = w + b, u = y - w, v = w - (y - u) + (b - u), b = v - $, u = v - b, Vt[1] = v - (b + u) + (u - $), k = y + b, u = k - y, Vt[2] = y - (k - u) + (b - u), Vt[3] = k;
  const P = ob(F, nA, 4, Vt, aA);
  return aA[P - 1];
}
function ec(e, t, i, n, a, o) {
  const r = (t - o) * (i - a), s = (e - a) * (n - o), l = r - s, d = Math.abs(r + s);
  return Math.abs(l) >= nH * d ? l : -rH(e, t, i, n, a, o, d);
}
const oA = Math.pow(2, -52), tc = new Uint32Array(512);
class Vh {
  static from(t, i = uH, n = cH) {
    const a = t.length, o = new Float64Array(a * 2);
    for (let r = 0; r < a; r++) {
      const s = t[r];
      o[2 * r] = i(s), o[2 * r + 1] = n(s);
    }
    return new Vh(o);
  }
  constructor(t) {
    const i = t.length >> 1;
    if (i > 0 && typeof t[0] != "number") throw new Error("Expected coords to contain numbers.");
    this.coords = t;
    const n = Math.max(2 * i - 5, 0);
    this._triangles = new Uint32Array(n * 3), this._halfedges = new Int32Array(n * 3), this._hashSize = Math.ceil(Math.sqrt(i)), this._hullPrev = new Uint32Array(i), this._hullNext = new Uint32Array(i), this._hullTri = new Uint32Array(i), this._hullHash = new Int32Array(this._hashSize), this._ids = new Uint32Array(i), this._dists = new Float64Array(i), this.update();
  }
  update() {
    const { coords: t, _hullPrev: i, _hullNext: n, _hullTri: a, _hullHash: o } = this, r = t.length >> 1;
    let s = 1 / 0, l = 1 / 0, d = -1 / 0, f = -1 / 0;
    for (let A = 0; A < r; A++) {
      const E = t[2 * A], S = t[2 * A + 1];
      E < s && (s = E), S < l && (l = S), E > d && (d = E), S > f && (f = S), this._ids[A] = A;
    }
    const u = (s + d) / 2, c = (l + f) / 2;
    let h, p, g;
    for (let A = 0, E = 1 / 0; A < r; A++) {
      const S = rb(u, c, t[2 * A], t[2 * A + 1]);
      S < E && (h = A, E = S);
    }
    const m = t[2 * h], b = t[2 * h + 1];
    for (let A = 0, E = 1 / 0; A < r; A++) {
      if (A === h) continue;
      const S = rb(m, b, t[2 * A], t[2 * A + 1]);
      S < E && S > 0 && (p = A, E = S);
    }
    let y = t[2 * p], v = t[2 * p + 1], w = 1 / 0;
    for (let A = 0; A < r; A++) {
      if (A === h || A === p) continue;
      const E = dH(m, b, y, v, t[2 * A], t[2 * A + 1]);
      E < w && (g = A, w = E);
    }
    let x = t[2 * g], $ = t[2 * g + 1];
    if (w === 1 / 0) {
      for (let S = 0; S < r; S++)
        this._dists[S] = t[2 * S] - t[0] || t[2 * S + 1] - t[1];
      js(this._ids, this._dists, 0, r - 1);
      const A = new Uint32Array(r);
      let E = 0;
      for (let S = 0, z = -1 / 0; S < r; S++) {
        const O = this._ids[S], D = this._dists[O];
        D > z && (A[E++] = O, z = D);
      }
      this.hull = A.subarray(0, E), this.triangles = new Uint32Array(0), this.halfedges = new Uint32Array(0);
      return;
    }
    if (ec(m, b, y, v, x, $) < 0) {
      const A = p, E = y, S = v;
      p = g, y = x, v = $, g = A, x = E, $ = S;
    }
    const _ = fH(m, b, y, v, x, $);
    this._cx = _.x, this._cy = _.y;
    for (let A = 0; A < r; A++)
      this._dists[A] = rb(t[2 * A], t[2 * A + 1], _.x, _.y);
    js(this._ids, this._dists, 0, r - 1), this._hullStart = h;
    let k = 3;
    n[h] = i[g] = p, n[p] = i[h] = g, n[g] = i[p] = h, a[h] = 0, a[p] = 1, a[g] = 2, o.fill(-1), o[this._hashKey(m, b)] = h, o[this._hashKey(y, v)] = p, o[this._hashKey(x, $)] = g, this.trianglesLen = 0, this._addTriangle(h, p, g, -1, -1, -1);
    for (let A = 0, E, S; A < this._ids.length; A++) {
      const z = this._ids[A], O = t[2 * z], D = t[2 * z + 1];
      if (A > 0 && Math.abs(O - E) <= oA && Math.abs(D - S) <= oA || (E = O, S = D, z === h || z === p || z === g)) continue;
      let j = 0;
      for (let K = 0, te = this._hashKey(O, D); K < this._hashSize && (j = o[(te + K) % this._hashSize], !(j !== -1 && j !== n[j])); K++)
        ;
      j = i[j];
      let F = j, P;
      for (; P = n[F], ec(O, D, t[2 * F], t[2 * F + 1], t[2 * P], t[2 * P + 1]) >= 0; )
        if (F = P, F === j) {
          F = -1;
          break;
        }
      if (F === -1) continue;
      let N = this._addTriangle(F, z, n[F], -1, -1, a[F]);
      a[z] = this._legalize(N + 2), a[F] = N, k++;
      let L = n[F];
      for (; P = n[L], ec(O, D, t[2 * L], t[2 * L + 1], t[2 * P], t[2 * P + 1]) < 0; )
        N = this._addTriangle(L, z, P, a[z], -1, a[L]), a[z] = this._legalize(N + 2), n[L] = L, k--, L = P;
      if (F === j)
        for (; P = i[F], ec(O, D, t[2 * P], t[2 * P + 1], t[2 * F], t[2 * F + 1]) < 0; )
          N = this._addTriangle(P, z, F, -1, a[F], a[P]), this._legalize(N + 2), a[P] = N, n[F] = F, k--, F = P;
      this._hullStart = i[z] = F, n[F] = i[L] = z, n[z] = L, o[this._hashKey(O, D)] = z, o[this._hashKey(t[2 * F], t[2 * F + 1])] = F;
    }
    this.hull = new Uint32Array(k);
    for (let A = 0, E = this._hullStart; A < k; A++)
      this.hull[A] = E, E = n[E];
    this.triangles = this._triangles.subarray(0, this.trianglesLen), this.halfedges = this._halfedges.subarray(0, this.trianglesLen);
  }
  _hashKey(t, i) {
    return Math.floor(sH(t - this._cx, i - this._cy) * this._hashSize) % this._hashSize;
  }
  _legalize(t) {
    const { _triangles: i, _halfedges: n, coords: a } = this;
    let o = 0, r = 0;
    for (; ; ) {
      const s = n[t], l = t - t % 3;
      if (r = l + (t + 2) % 3, s === -1) {
        if (o === 0) break;
        t = tc[--o];
        continue;
      }
      const d = s - s % 3, f = l + (t + 1) % 3, u = d + (s + 2) % 3, c = i[r], h = i[t], p = i[f], g = i[u];
      if (lH(
        a[2 * c],
        a[2 * c + 1],
        a[2 * h],
        a[2 * h + 1],
        a[2 * p],
        a[2 * p + 1],
        a[2 * g],
        a[2 * g + 1]
      )) {
        i[t] = g, i[s] = c;
        const b = n[u];
        if (b === -1) {
          let v = this._hullStart;
          do {
            if (this._hullTri[v] === u) {
              this._hullTri[v] = t;
              break;
            }
            v = this._hullPrev[v];
          } while (v !== this._hullStart);
        }
        this._link(t, b), this._link(s, n[r]), this._link(r, u);
        const y = d + (s + 1) % 3;
        o < tc.length && (tc[o++] = y);
      } else {
        if (o === 0) break;
        t = tc[--o];
      }
    }
    return r;
  }
  _link(t, i) {
    this._halfedges[t] = i, i !== -1 && (this._halfedges[i] = t);
  }
  // add a new triangle given vertex indices and adjacent half-edge ids
  _addTriangle(t, i, n, a, o, r) {
    const s = this.trianglesLen;
    return this._triangles[s] = t, this._triangles[s + 1] = i, this._triangles[s + 2] = n, this._link(s, a), this._link(s + 1, o), this._link(s + 2, r), this.trianglesLen += 3, s;
  }
}
function sH(e, t) {
  const i = e / (Math.abs(e) + Math.abs(t));
  return (t > 0 ? 3 - i : 1 + i) / 4;
}
function rb(e, t, i, n) {
  const a = e - i, o = t - n;
  return a * a + o * o;
}
function lH(e, t, i, n, a, o, r, s) {
  const l = e - r, d = t - s, f = i - r, u = n - s, c = a - r, h = o - s, p = l * l + d * d, g = f * f + u * u, m = c * c + h * h;
  return l * (u * m - g * h) - d * (f * m - g * c) + p * (f * h - u * c) < 0;
}
function dH(e, t, i, n, a, o) {
  const r = i - e, s = n - t, l = a - e, d = o - t, f = r * r + s * s, u = l * l + d * d, c = 0.5 / (r * d - s * l), h = (d * f - s * u) * c, p = (r * u - l * f) * c;
  return h * h + p * p;
}
function fH(e, t, i, n, a, o) {
  const r = i - e, s = n - t, l = a - e, d = o - t, f = r * r + s * s, u = l * l + d * d, c = 0.5 / (r * d - s * l), h = e + (d * f - s * u) * c, p = t + (r * u - l * f) * c;
  return { x: h, y: p };
}
function js(e, t, i, n) {
  if (n - i <= 20)
    for (let a = i + 1; a <= n; a++) {
      const o = e[a], r = t[o];
      let s = a - 1;
      for (; s >= i && t[e[s]] > r; ) e[s + 1] = e[s--];
      e[s + 1] = o;
    }
  else {
    const a = i + n >> 1;
    let o = i + 1, r = n;
    dd(e, a, o), t[e[i]] > t[e[n]] && dd(e, i, n), t[e[o]] > t[e[n]] && dd(e, o, n), t[e[i]] > t[e[o]] && dd(e, i, o);
    const s = e[o], l = t[s];
    for (; ; ) {
      do
        o++;
      while (t[e[o]] < l);
      do
        r--;
      while (t[e[r]] > l);
      if (r < o) break;
      dd(e, o, r);
    }
    e[i + 1] = e[r], e[r] = s, n - o + 1 >= r - i ? (js(e, t, o, n), js(e, t, i, r - 1)) : (js(e, t, i, r - 1), js(e, t, o, n));
  }
}
function dd(e, t, i) {
  const n = e[t];
  e[t] = e[i], e[i] = n;
}
function uH(e) {
  return e[0];
}
function cH(e) {
  return e[1];
}
const rA = 1e-6;
class wr {
  constructor() {
    this._x0 = this._y0 = // start of current subpath
    this._x1 = this._y1 = null, this._ = "";
  }
  moveTo(t, i) {
    this._ += `M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}`;
  }
  closePath() {
    this._x1 !== null && (this._x1 = this._x0, this._y1 = this._y0, this._ += "Z");
  }
  lineTo(t, i) {
    this._ += `L${this._x1 = +t},${this._y1 = +i}`;
  }
  arc(t, i, n) {
    t = +t, i = +i, n = +n;
    const a = t + n, o = i;
    if (n < 0) throw new Error("negative radius");
    this._x1 === null ? this._ += `M${a},${o}` : (Math.abs(this._x1 - a) > rA || Math.abs(this._y1 - o) > rA) && (this._ += "L" + a + "," + o), n && (this._ += `A${n},${n},0,1,1,${t - n},${i}A${n},${n},0,1,1,${this._x1 = a},${this._y1 = o}`);
  }
  rect(t, i, n, a) {
    this._ += `M${this._x0 = this._x1 = +t},${this._y0 = this._y1 = +i}h${+n}v${+a}h${-n}Z`;
  }
  value() {
    return this._ || null;
  }
}
class Yy {
  constructor() {
    this._ = [];
  }
  moveTo(t, i) {
    this._.push([t, i]);
  }
  closePath() {
    this._.push(this._[0].slice());
  }
  lineTo(t, i) {
    this._.push([t, i]);
  }
  value() {
    return this._.length ? this._ : null;
  }
}
let hH = class {
  constructor(t, [i, n, a, o] = [0, 0, 960, 500]) {
    if (!((a = +a) >= (i = +i)) || !((o = +o) >= (n = +n))) throw new Error("invalid bounds");
    this.delaunay = t, this._circumcenters = new Float64Array(t.points.length * 2), this.vectors = new Float64Array(t.points.length * 2), this.xmax = a, this.xmin = i, this.ymax = o, this.ymin = n, this._init();
  }
  update() {
    return this.delaunay.update(), this._init(), this;
  }
  _init() {
    const { delaunay: { points: t, hull: i, triangles: n }, vectors: a } = this;
    let o, r;
    const s = this.circumcenters = this._circumcenters.subarray(0, n.length / 3 * 2);
    for (let g = 0, m = 0, b = n.length, y, v; g < b; g += 3, m += 2) {
      const w = n[g] * 2, x = n[g + 1] * 2, $ = n[g + 2] * 2, _ = t[w], k = t[w + 1], A = t[x], E = t[x + 1], S = t[$], z = t[$ + 1], O = A - _, D = E - k, j = S - _, F = z - k, P = (O * F - D * j) * 2;
      if (Math.abs(P) < 1e-9) {
        if (o === void 0) {
          o = r = 0;
          for (const L of i) o += t[L * 2], r += t[L * 2 + 1];
          o /= i.length, r /= i.length;
        }
        const N = 1e9 * Math.sign((o - _) * F - (r - k) * j);
        y = (_ + S) / 2 - N * F, v = (k + z) / 2 + N * j;
      } else {
        const N = 1 / P, L = O * O + D * D, K = j * j + F * F;
        y = _ + (F * L - D * K) * N, v = k + (O * K - j * L) * N;
      }
      s[m] = y, s[m + 1] = v;
    }
    let l = i[i.length - 1], d, f = l * 4, u, c = t[2 * l], h, p = t[2 * l + 1];
    a.fill(0);
    for (let g = 0; g < i.length; ++g)
      l = i[g], d = f, u = c, h = p, f = l * 4, c = t[2 * l], p = t[2 * l + 1], a[d + 2] = a[f] = h - p, a[d + 3] = a[f + 1] = c - u;
  }
  render(t) {
    const i = t == null ? t = new wr() : void 0, { delaunay: { halfedges: n, inedges: a, hull: o }, circumcenters: r, vectors: s } = this;
    if (o.length <= 1) return null;
    for (let f = 0, u = n.length; f < u; ++f) {
      const c = n[f];
      if (c < f) continue;
      const h = Math.floor(f / 3) * 2, p = Math.floor(c / 3) * 2, g = r[h], m = r[h + 1], b = r[p], y = r[p + 1];
      this._renderSegment(g, m, b, y, t);
    }
    let l, d = o[o.length - 1];
    for (let f = 0; f < o.length; ++f) {
      l = d, d = o[f];
      const u = Math.floor(a[d] / 3) * 2, c = r[u], h = r[u + 1], p = l * 4, g = this._project(c, h, s[p + 2], s[p + 3]);
      g && this._renderSegment(c, h, g[0], g[1], t);
    }
    return i && i.value();
  }
  renderBounds(t) {
    const i = t == null ? t = new wr() : void 0;
    return t.rect(this.xmin, this.ymin, this.xmax - this.xmin, this.ymax - this.ymin), i && i.value();
  }
  renderCell(t, i) {
    const n = i == null ? i = new wr() : void 0, a = this._clip(t);
    if (a === null || !a.length) return;
    i.moveTo(a[0], a[1]);
    let o = a.length;
    for (; a[0] === a[o - 2] && a[1] === a[o - 1] && o > 1; ) o -= 2;
    for (let r = 2; r < o; r += 2)
      (a[r] !== a[r - 2] || a[r + 1] !== a[r - 1]) && i.lineTo(a[r], a[r + 1]);
    return i.closePath(), n && n.value();
  }
  *cellPolygons() {
    const { delaunay: { points: t } } = this;
    for (let i = 0, n = t.length / 2; i < n; ++i) {
      const a = this.cellPolygon(i);
      a && (a.index = i, yield a);
    }
  }
  cellPolygon(t) {
    const i = new Yy();
    return this.renderCell(t, i), i.value();
  }
  _renderSegment(t, i, n, a, o) {
    let r;
    const s = this._regioncode(t, i), l = this._regioncode(n, a);
    s === 0 && l === 0 ? (o.moveTo(t, i), o.lineTo(n, a)) : (r = this._clipSegment(t, i, n, a, s, l)) && (o.moveTo(r[0], r[1]), o.lineTo(r[2], r[3]));
  }
  contains(t, i, n) {
    return i = +i, i !== i || (n = +n, n !== n) ? !1 : this.delaunay._step(t, i, n) === t;
  }
  *neighbors(t) {
    const i = this._clip(t);
    if (i) for (const n of this.delaunay.neighbors(t)) {
      const a = this._clip(n);
      if (a) {
        e: for (let o = 0, r = i.length; o < r; o += 2)
          for (let s = 0, l = a.length; s < l; s += 2)
            if (i[o] === a[s] && i[o + 1] === a[s + 1] && i[(o + 2) % r] === a[(s + l - 2) % l] && i[(o + 3) % r] === a[(s + l - 1) % l]) {
              yield n;
              break e;
            }
      }
    }
  }
  _cell(t) {
    const { circumcenters: i, delaunay: { inedges: n, halfedges: a, triangles: o } } = this, r = n[t];
    if (r === -1) return null;
    const s = [];
    let l = r;
    do {
      const d = Math.floor(l / 3);
      if (s.push(i[d * 2], i[d * 2 + 1]), l = l % 3 === 2 ? l - 2 : l + 1, o[l] !== t) break;
      l = a[l];
    } while (l !== r && l !== -1);
    return s;
  }
  _clip(t) {
    if (t === 0 && this.delaunay.hull.length === 1)
      return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
    const i = this._cell(t);
    if (i === null) return null;
    const { vectors: n } = this, a = t * 4;
    return this._simplify(n[a] || n[a + 1] ? this._clipInfinite(t, i, n[a], n[a + 1], n[a + 2], n[a + 3]) : this._clipFinite(t, i));
  }
  _clipFinite(t, i) {
    const n = i.length;
    let a = null, o, r, s = i[n - 2], l = i[n - 1], d, f = this._regioncode(s, l), u, c = 0;
    for (let h = 0; h < n; h += 2)
      if (o = s, r = l, s = i[h], l = i[h + 1], d = f, f = this._regioncode(s, l), d === 0 && f === 0)
        u = c, c = 0, a ? a.push(s, l) : a = [s, l];
      else {
        let p, g, m, b, y;
        if (d === 0) {
          if ((p = this._clipSegment(o, r, s, l, d, f)) === null) continue;
          [g, m, b, y] = p;
        } else {
          if ((p = this._clipSegment(s, l, o, r, f, d)) === null) continue;
          [b, y, g, m] = p, u = c, c = this._edgecode(g, m), u && c && this._edge(t, u, c, a, a.length), a ? a.push(g, m) : a = [g, m];
        }
        u = c, c = this._edgecode(b, y), u && c && this._edge(t, u, c, a, a.length), a ? a.push(b, y) : a = [b, y];
      }
    if (a)
      u = c, c = this._edgecode(a[0], a[1]), u && c && this._edge(t, u, c, a, a.length);
    else if (this.contains(t, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2))
      return [this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax, this.xmin, this.ymin];
    return a;
  }
  _clipSegment(t, i, n, a, o, r) {
    const s = o < r;
    for (s && ([t, i, n, a, o, r] = [n, a, t, i, r, o]); ; ) {
      if (o === 0 && r === 0) return s ? [n, a, t, i] : [t, i, n, a];
      if (o & r) return null;
      let l, d, f = o || r;
      f & 8 ? (l = t + (n - t) * (this.ymax - i) / (a - i), d = this.ymax) : f & 4 ? (l = t + (n - t) * (this.ymin - i) / (a - i), d = this.ymin) : f & 2 ? (d = i + (a - i) * (this.xmax - t) / (n - t), l = this.xmax) : (d = i + (a - i) * (this.xmin - t) / (n - t), l = this.xmin), o ? (t = l, i = d, o = this._regioncode(t, i)) : (n = l, a = d, r = this._regioncode(n, a));
    }
  }
  _clipInfinite(t, i, n, a, o, r) {
    let s = Array.from(i), l;
    if ((l = this._project(s[0], s[1], n, a)) && s.unshift(l[0], l[1]), (l = this._project(s[s.length - 2], s[s.length - 1], o, r)) && s.push(l[0], l[1]), s = this._clipFinite(t, s))
      for (let d = 0, f = s.length, u, c = this._edgecode(s[f - 2], s[f - 1]); d < f; d += 2)
        u = c, c = this._edgecode(s[d], s[d + 1]), u && c && (d = this._edge(t, u, c, s, d), f = s.length);
    else this.contains(t, (this.xmin + this.xmax) / 2, (this.ymin + this.ymax) / 2) && (s = [this.xmin, this.ymin, this.xmax, this.ymin, this.xmax, this.ymax, this.xmin, this.ymax]);
    return s;
  }
  _edge(t, i, n, a, o) {
    for (; i !== n; ) {
      let r, s;
      switch (i) {
        case 5:
          i = 4;
          continue;
        case 4:
          i = 6, r = this.xmax, s = this.ymin;
          break;
        case 6:
          i = 2;
          continue;
        case 2:
          i = 10, r = this.xmax, s = this.ymax;
          break;
        case 10:
          i = 8;
          continue;
        case 8:
          i = 9, r = this.xmin, s = this.ymax;
          break;
        case 9:
          i = 1;
          continue;
        case 1:
          i = 5, r = this.xmin, s = this.ymin;
          break;
      }
      (a[o] !== r || a[o + 1] !== s) && this.contains(t, r, s) && (a.splice(o, 0, r, s), o += 2);
    }
    return o;
  }
  _project(t, i, n, a) {
    let o = 1 / 0, r, s, l;
    if (a < 0) {
      if (i <= this.ymin) return null;
      (r = (this.ymin - i) / a) < o && (l = this.ymin, s = t + (o = r) * n);
    } else if (a > 0) {
      if (i >= this.ymax) return null;
      (r = (this.ymax - i) / a) < o && (l = this.ymax, s = t + (o = r) * n);
    }
    if (n > 0) {
      if (t >= this.xmax) return null;
      (r = (this.xmax - t) / n) < o && (s = this.xmax, l = i + (o = r) * a);
    } else if (n < 0) {
      if (t <= this.xmin) return null;
      (r = (this.xmin - t) / n) < o && (s = this.xmin, l = i + (o = r) * a);
    }
    return [s, l];
  }
  _edgecode(t, i) {
    return (t === this.xmin ? 1 : t === this.xmax ? 2 : 0) | (i === this.ymin ? 4 : i === this.ymax ? 8 : 0);
  }
  _regioncode(t, i) {
    return (t < this.xmin ? 1 : t > this.xmax ? 2 : 0) | (i < this.ymin ? 4 : i > this.ymax ? 8 : 0);
  }
  _simplify(t) {
    if (t && t.length > 4) {
      for (let i = 0; i < t.length; i += 2) {
        const n = (i + 2) % t.length, a = (i + 4) % t.length;
        (t[i] === t[n] && t[n] === t[a] || t[i + 1] === t[n + 1] && t[n + 1] === t[a + 1]) && (t.splice(n, 2), i -= 2);
      }
      t.length || (t = null);
    }
    return t;
  }
};
const pH = 2 * Math.PI, Os = Math.pow;
function gH(e) {
  return e[0];
}
function mH(e) {
  return e[1];
}
function bH(e) {
  const { triangles: t, coords: i } = e;
  for (let n = 0; n < t.length; n += 3) {
    const a = 2 * t[n], o = 2 * t[n + 1], r = 2 * t[n + 2];
    if ((i[r] - i[a]) * (i[o + 1] - i[a + 1]) - (i[o] - i[a]) * (i[r + 1] - i[a + 1]) > 1e-10) return !1;
  }
  return !0;
}
function yH(e, t, i) {
  return [e + Math.sin(e + t) * i, t + Math.cos(e - t) * i];
}
class yx {
  static from(t, i = gH, n = mH, a) {
    return new yx("length" in t ? vH(t, i, n, a) : Float64Array.from(_H(t, i, n, a)));
  }
  constructor(t) {
    this._delaunator = new Vh(t), this.inedges = new Int32Array(t.length / 2), this._hullIndex = new Int32Array(t.length / 2), this.points = this._delaunator.coords, this._init();
  }
  update() {
    return this._delaunator.update(), this._init(), this;
  }
  _init() {
    const t = this._delaunator, i = this.points;
    if (t.hull && t.hull.length > 2 && bH(t)) {
      this.collinear = Int32Array.from({ length: i.length / 2 }, (c, h) => h).sort((c, h) => i[2 * c] - i[2 * h] || i[2 * c + 1] - i[2 * h + 1]);
      const l = this.collinear[0], d = this.collinear[this.collinear.length - 1], f = [i[2 * l], i[2 * l + 1], i[2 * d], i[2 * d + 1]], u = 1e-8 * Math.hypot(f[3] - f[1], f[2] - f[0]);
      for (let c = 0, h = i.length / 2; c < h; ++c) {
        const p = yH(i[2 * c], i[2 * c + 1], u);
        i[2 * c] = p[0], i[2 * c + 1] = p[1];
      }
      this._delaunator = new Vh(i);
    } else
      delete this.collinear;
    const n = this.halfedges = this._delaunator.halfedges, a = this.hull = this._delaunator.hull, o = this.triangles = this._delaunator.triangles, r = this.inedges.fill(-1), s = this._hullIndex.fill(-1);
    for (let l = 0, d = n.length; l < d; ++l) {
      const f = o[l % 3 === 2 ? l - 2 : l + 1];
      (n[l] === -1 || r[f] === -1) && (r[f] = l);
    }
    for (let l = 0, d = a.length; l < d; ++l)
      s[a[l]] = l;
    a.length <= 2 && a.length > 0 && (this.triangles = new Int32Array(3).fill(-1), this.halfedges = new Int32Array(3).fill(-1), this.triangles[0] = a[0], r[a[0]] = 1, a.length === 2 && (r[a[1]] = 0, this.triangles[1] = a[1], this.triangles[2] = a[1]));
  }
  voronoi(t) {
    return new hH(this, t);
  }
  *neighbors(t) {
    const { inedges: i, hull: n, _hullIndex: a, halfedges: o, triangles: r, collinear: s } = this;
    if (s) {
      const u = s.indexOf(t);
      u > 0 && (yield s[u - 1]), u < s.length - 1 && (yield s[u + 1]);
      return;
    }
    const l = i[t];
    if (l === -1) return;
    let d = l, f = -1;
    do {
      if (yield f = r[d], d = d % 3 === 2 ? d - 2 : d + 1, r[d] !== t) return;
      if (d = o[d], d === -1) {
        const u = n[(a[t] + 1) % n.length];
        u !== f && (yield u);
        return;
      }
    } while (d !== l);
  }
  find(t, i, n = 0) {
    if (t = +t, t !== t || (i = +i, i !== i)) return -1;
    const a = n;
    let o;
    for (; (o = this._step(n, t, i)) >= 0 && o !== n && o !== a; ) n = o;
    return o;
  }
  _step(t, i, n) {
    const { inedges: a, hull: o, _hullIndex: r, halfedges: s, triangles: l, points: d } = this;
    if (a[t] === -1 || !d.length) return (t + 1) % (d.length >> 1);
    let f = t, u = Os(i - d[t * 2], 2) + Os(n - d[t * 2 + 1], 2);
    const c = a[t];
    let h = c;
    do {
      let p = l[h];
      const g = Os(i - d[p * 2], 2) + Os(n - d[p * 2 + 1], 2);
      if (g < u && (u = g, f = p), h = h % 3 === 2 ? h - 2 : h + 1, l[h] !== t) break;
      if (h = s[h], h === -1) {
        if (h = o[(r[t] + 1) % o.length], h !== p && Os(i - d[h * 2], 2) + Os(n - d[h * 2 + 1], 2) < u)
          return h;
        break;
      }
    } while (h !== c);
    return f;
  }
  render(t) {
    const i = t == null ? t = new wr() : void 0, { points: n, halfedges: a, triangles: o } = this;
    for (let r = 0, s = a.length; r < s; ++r) {
      const l = a[r];
      if (l < r) continue;
      const d = o[r] * 2, f = o[l] * 2;
      t.moveTo(n[d], n[d + 1]), t.lineTo(n[f], n[f + 1]);
    }
    return this.renderHull(t), i && i.value();
  }
  renderPoints(t, i) {
    i === void 0 && (!t || typeof t.moveTo != "function") && (i = t, t = null), i = i == null ? 2 : +i;
    const n = t == null ? t = new wr() : void 0, { points: a } = this;
    for (let o = 0, r = a.length; o < r; o += 2) {
      const s = a[o], l = a[o + 1];
      t.moveTo(s + i, l), t.arc(s, l, i, 0, pH);
    }
    return n && n.value();
  }
  renderHull(t) {
    const i = t == null ? t = new wr() : void 0, { hull: n, points: a } = this, o = n[0] * 2, r = n.length;
    t.moveTo(a[o], a[o + 1]);
    for (let s = 1; s < r; ++s) {
      const l = 2 * n[s];
      t.lineTo(a[l], a[l + 1]);
    }
    return t.closePath(), i && i.value();
  }
  hullPolygon() {
    const t = new Yy();
    return this.renderHull(t), t.value();
  }
  renderTriangle(t, i) {
    const n = i == null ? i = new wr() : void 0, { points: a, triangles: o } = this, r = o[t *= 3] * 2, s = o[t + 1] * 2, l = o[t + 2] * 2;
    return i.moveTo(a[r], a[r + 1]), i.lineTo(a[s], a[s + 1]), i.lineTo(a[l], a[l + 1]), i.closePath(), n && n.value();
  }
  *trianglePolygons() {
    const { triangles: t } = this;
    for (let i = 0, n = t.length / 3; i < n; ++i)
      yield this.trianglePolygon(i);
  }
  trianglePolygon(t) {
    const i = new Yy();
    return this.renderTriangle(t, i), i.value();
  }
}
function vH(e, t, i, n) {
  const a = e.length, o = new Float64Array(a * 2);
  for (let r = 0; r < a; ++r) {
    const s = e[r];
    o[r * 2] = t.call(n, s, r, e), o[r * 2 + 1] = i.call(n, s, r, e);
  }
  return o;
}
function* _H(e, t, i, n) {
  let a = 0;
  for (const o of e)
    yield t.call(n, o, a, e), yield i.call(n, o, a, e), ++a;
}
function vx(e) {
  T.call(this, null, e);
}
vx.Definition = {
  type: "Voronoi",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "x",
    type: "field",
    required: !0
  }, {
    name: "y",
    type: "field",
    required: !0
  }, {
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "extent",
    type: "array",
    array: !0,
    length: 2,
    default: [[-1e5, -1e5], [1e5, 1e5]],
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }, {
    name: "as",
    type: "string",
    default: "path"
  }]
};
const xH = [-1e5, -1e5, 1e5, 1e5];
eH(vx, T, {
  transform(e, t) {
    const i = e.as || "path", n = t.source;
    if (!n || !n.length) return t;
    let a = e.size;
    a = a ? [0, 0, a[0], a[1]] : (a = e.extent) ? [a[0][0], a[0][1], a[1][0], a[1][1]] : xH;
    const o = this.value = yx.from(n, e.x, e.y).voronoi(a);
    for (let r = 0, s = n.length; r < s; ++r) {
      const l = o.cellPolygon(r);
      n[r][i] = l && !$H(l) ? wH(l) : null;
    }
    return t.reflow(e.modified()).modifies(i);
  }
});
function wH(e) {
  const t = e[0][0], i = e[0][1];
  let n = e.length - 1;
  for (; e[n][0] === t && e[n][1] === i; --n) ;
  return "M" + e.slice(0, n + 1).join("L") + "Z";
}
function $H(e) {
  return e.length === 2 && e[0][0] === e[1][0] && e[0][1] === e[1][1];
}
const kH = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  voronoi: vx
}, Symbol.toStringTag, { value: "Module" }));
function Cl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function AH(e) {
  return e.length === 1 ? OH(e[0]) : EH(e);
}
const OH = (e) => function(t) {
  return t[e];
}, EH = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Mc(e) {
  throw Error(e);
}
function DH(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Mc("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Mc("Access path missing closing bracket: " + e), n && Mc("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function SH(e, t, i) {
  const n = DH(e);
  return e = n.length === 1 ? n[0] : e, Cl(AH(n), [e], e);
}
SH("id");
Cl((e) => e, [], "identity");
Cl(() => 0, [], "zero");
Cl(() => 1, [], "one");
Cl(() => !0, [], "true");
Cl(() => !1, [], "false");
function Xy(e) {
  return typeof e == "function";
}
function FH(e) {
  return Xy(e) ? e : () => e;
}
function TH(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function CH(e, t) {
  let i = 0, n, a, o, r;
  if (e && (n = e.length))
    if (t == null) {
      for (a = e[i]; i < n && (a == null || a !== a); a = e[++i]) ;
      for (o = r = a; i < n; ++i)
        a = e[i], a != null && (a < o && (o = a), a > r && (r = a));
    } else {
      for (a = t(e[i]); i < n && (a == null || a !== a); a = t(e[++i])) ;
      for (o = r = a; i < n; ++i)
        a = t(e[i]), a != null && (a < o && (o = a), a > r && (r = a));
    }
  return [o, r];
}
function RH(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), TH(n, i);
}
var sb = Math.PI / 180, Fd = 64, Vc = 2048;
function IH() {
  var e = [256, 256], t, i, n, a, o, r, s, l = ZC, d = [], f = Math.random, u = {};
  u.layout = function() {
    for (var p = c(po()), g = LH((e[0] >> 5) * e[1]), m = null, b = d.length, y = -1, v = [], w = d.map(($) => ({
      text: t($),
      font: i($),
      style: a($),
      weight: o($),
      rotate: r($),
      size: ~~(n($) + 1e-14),
      padding: s($),
      xoff: 0,
      yoff: 0,
      x1: 0,
      y1: 0,
      x0: 0,
      y0: 0,
      hasText: !1,
      sprite: null,
      datum: $
    })).sort(($, _) => _.size - $.size); ++y < b; ) {
      var x = w[y];
      x.x = e[0] * (f() + 0.5) >> 1, x.y = e[1] * (f() + 0.5) >> 1, jH(p, x, w, y), x.hasText && h(g, x, m) && (v.push(x), m ? PH(m, x) : m = [{
        x: x.x + x.x0,
        y: x.y + x.y0
      }, {
        x: x.x + x.x1,
        y: x.y + x.y1
      }], x.x -= e[0] >> 1, x.y -= e[1] >> 1);
    }
    return v;
  };
  function c(p) {
    p.width = p.height = 1;
    var g = Math.sqrt(p.getContext("2d").getImageData(0, 0, 1, 1).data.length >> 2);
    p.width = (Fd << 5) / g, p.height = Vc / g;
    var m = p.getContext("2d");
    return m.fillStyle = m.strokeStyle = "red", m.textAlign = "center", {
      context: m,
      ratio: g
    };
  }
  function h(p, g, m) {
    for (var b = g.x, y = g.y, v = Math.hypot(e[0], e[1]), w = l(e), x = f() < 0.5 ? 1 : -1, $ = -x, _, k, A; (_ = w($ += x)) && (k = ~~_[0], A = ~~_[1], !(Math.min(Math.abs(k), Math.abs(A)) >= v)); )
      if (g.x = b + k, g.y = y + A, !(g.x + g.x0 < 0 || g.y + g.y0 < 0 || g.x + g.x1 > e[0] || g.y + g.y1 > e[1]) && (!m || !zH(g, p, e[0])) && (!m || NH(g, m))) {
        for (var E = g.sprite, S = g.width >> 5, z = e[0] >> 5, O = g.x - (S << 4), D = O & 127, j = 32 - D, F = g.y1 - g.y0, P = (g.y + g.y0) * z + (O >> 5), N, L = 0; L < F; L++) {
          N = 0;
          for (var K = 0; K <= S; K++)
            p[P + K] |= N << j | (K < S ? (N = E[L * S + K]) >>> D : 0);
          P += z;
        }
        return g.sprite = null, !0;
      }
    return !1;
  }
  return u.words = function(p) {
    return arguments.length ? (d = p, u) : d;
  }, u.size = function(p) {
    return arguments.length ? (e = [+p[0], +p[1]], u) : e;
  }, u.font = function(p) {
    return arguments.length ? (i = tr(p), u) : i;
  }, u.fontStyle = function(p) {
    return arguments.length ? (a = tr(p), u) : a;
  }, u.fontWeight = function(p) {
    return arguments.length ? (o = tr(p), u) : o;
  }, u.rotate = function(p) {
    return arguments.length ? (r = tr(p), u) : r;
  }, u.text = function(p) {
    return arguments.length ? (t = tr(p), u) : t;
  }, u.spiral = function(p) {
    return arguments.length ? (l = BH[p] || p, u) : l;
  }, u.fontSize = function(p) {
    return arguments.length ? (n = tr(p), u) : n;
  }, u.padding = function(p) {
    return arguments.length ? (s = tr(p), u) : s;
  }, u.random = function(p) {
    return arguments.length ? (f = p, u) : f;
  }, u;
}
function jH(e, t, i, n) {
  if (!t.sprite) {
    var a = e.context, o = e.ratio;
    a.clearRect(0, 0, (Fd << 5) / o, Vc / o);
    var r = 0, s = 0, l = 0, d = i.length, f, u, c, h, p;
    for (--n; ++n < d; ) {
      if (t = i[n], a.save(), a.font = t.style + " " + t.weight + " " + ~~((t.size + 1) / o) + "px " + t.font, f = a.measureText(t.text + "m").width * o, c = t.size << 1, t.rotate) {
        var g = Math.sin(t.rotate * sb), m = Math.cos(t.rotate * sb), b = f * m, y = f * g, v = c * m, w = c * g;
        f = Math.max(Math.abs(b + w), Math.abs(b - w)) + 31 >> 5 << 5, c = ~~Math.max(Math.abs(y + v), Math.abs(y - v));
      } else
        f = f + 31 >> 5 << 5;
      if (c > l && (l = c), r + f >= Fd << 5 && (r = 0, s += l, l = 0), s + c >= Vc) break;
      a.translate((r + (f >> 1)) / o, (s + (c >> 1)) / o), t.rotate && a.rotate(t.rotate * sb), a.fillText(t.text, 0, 0), t.padding && (a.lineWidth = 2 * t.padding, a.strokeText(t.text, 0, 0)), a.restore(), t.width = f, t.height = c, t.xoff = r, t.yoff = s, t.x1 = f >> 1, t.y1 = c >> 1, t.x0 = -t.x1, t.y0 = -t.y1, t.hasText = !0, r += f;
    }
    for (var x = a.getImageData(0, 0, (Fd << 5) / o, Vc / o).data, $ = []; --n >= 0; )
      if (t = i[n], !!t.hasText) {
        for (f = t.width, u = f >> 5, c = t.y1 - t.y0, h = 0; h < c * u; h++) $[h] = 0;
        if (r = t.xoff, r == null) return;
        s = t.yoff;
        var _ = 0, k = -1;
        for (p = 0; p < c; p++) {
          for (h = 0; h < f; h++) {
            var A = u * p + (h >> 5), E = x[(s + p) * (Fd << 5) + (r + h) << 2] ? 1 << 31 - h % 32 : 0;
            $[A] |= E, _ |= E;
          }
          _ ? k = p : (t.y0++, c--, p--, s++);
        }
        t.y1 = t.y0 + k, t.sprite = $.slice(0, (t.y1 - t.y0) * u);
      }
  }
}
function zH(e, t, i) {
  i >>= 5;
  for (var n = e.sprite, a = e.width >> 5, o = e.x - (a << 4), r = o & 127, s = 32 - r, l = e.y1 - e.y0, d = (e.y + e.y0) * i + (o >> 5), f, u = 0; u < l; u++) {
    f = 0;
    for (var c = 0; c <= a; c++)
      if ((f << s | (c < a ? (f = n[u * a + c]) >>> r : 0)) & t[d + c]) return !0;
    d += i;
  }
  return !1;
}
function PH(e, t) {
  var i = e[0], n = e[1];
  t.x + t.x0 < i.x && (i.x = t.x + t.x0), t.y + t.y0 < i.y && (i.y = t.y + t.y0), t.x + t.x1 > n.x && (n.x = t.x + t.x1), t.y + t.y1 > n.y && (n.y = t.y + t.y1);
}
function NH(e, t) {
  return e.x + e.x1 > t[0].x && e.x + e.x0 < t[1].x && e.y + e.y1 > t[0].y && e.y + e.y0 < t[1].y;
}
function ZC(e) {
  var t = e[0] / e[1];
  return function(i) {
    return [t * (i *= 0.1) * Math.cos(i), i * Math.sin(i)];
  };
}
function qH(e) {
  var t = 4, i = t * e[0] / e[1], n = 0, a = 0;
  return function(o) {
    var r = o < 0 ? -1 : 1;
    switch (Math.sqrt(1 + 4 * r * o) - r & 3) {
      case 0:
        n += i;
        break;
      case 1:
        a += t;
        break;
      case 2:
        n -= i;
        break;
      default:
        a -= t;
        break;
    }
    return [n, a];
  };
}
function LH(e) {
  for (var t = [], i = -1; ++i < e; ) t[i] = 0;
  return t;
}
function tr(e) {
  return typeof e == "function" ? e : function() {
    return e;
  };
}
var BH = {
  archimedean: ZC,
  rectangular: qH
};
const KC = ["x", "y", "font", "fontSize", "fontStyle", "fontWeight", "angle"], UH = ["text", "font", "rotate", "fontSize", "fontStyle", "fontWeight"];
function _x(e) {
  T.call(this, IH(), e);
}
_x.Definition = {
  type: "Wordcloud",
  metadata: {
    modifies: !0
  },
  params: [{
    name: "size",
    type: "number",
    array: !0,
    length: 2
  }, {
    name: "font",
    type: "string",
    expr: !0,
    default: "sans-serif"
  }, {
    name: "fontStyle",
    type: "string",
    expr: !0,
    default: "normal"
  }, {
    name: "fontWeight",
    type: "string",
    expr: !0,
    default: "normal"
  }, {
    name: "fontSize",
    type: "number",
    expr: !0,
    default: 14
  }, {
    name: "fontSizeRange",
    type: "number",
    array: "nullable",
    default: [10, 50]
  }, {
    name: "rotate",
    type: "number",
    expr: !0,
    default: 0
  }, {
    name: "text",
    type: "field"
  }, {
    name: "spiral",
    type: "string",
    values: ["archimedean", "rectangular"]
  }, {
    name: "padding",
    type: "number",
    expr: !0
  }, {
    name: "as",
    type: "string",
    array: !0,
    length: 7,
    default: KC
  }]
};
RH(_x, T, {
  transform(e, t) {
    e.size && !(e.size[0] && e.size[1]) && Mc("Wordcloud size dimensions must be non-zero.");
    function i(p) {
      const g = e[p];
      return Xy(g) && t.modified(g.fields);
    }
    const n = e.modified();
    if (!(n || t.changed(t.ADD_REM) || UH.some(i))) return;
    const a = t.materialize(t.SOURCE).source, o = this.value, r = e.as || KC;
    let s = e.fontSize || 14, l;
    if (Xy(s) ? l = e.fontSizeRange : s = FH(s), l) {
      const p = s, g = af("sqrt")().domain(CH(a, p)).range(l);
      s = (m) => g(p(m));
    }
    a.forEach((p) => {
      p[r[0]] = NaN, p[r[1]] = NaN, p[r[3]] = 0;
    });
    const d = o.words(a).text(e.text).size(e.size || [500, 500]).padding(e.padding || 1).spiral(e.spiral || "archimedean").rotate(e.rotate || 0).font(e.font || "sans-serif").fontStyle(e.fontStyle || "normal").fontWeight(e.fontWeight || "normal").fontSize(s).random(Op).layout(), f = o.size(), u = f[0] >> 1, c = f[1] >> 1, h = d.length;
    for (let p = 0, g, m; p < h; ++p)
      g = d[p], m = g.datum, m[r[0]] = g.x + u, m[r[1]] = g.y + c, m[r[2]] = g.font, m[r[3]] = g.size, m[r[4]] = g.style, m[r[5]] = g.weight, m[r[6]] = g.rotate;
    return t.reflow(n).modifies(r);
  }
});
const MH = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  wordcloud: _x
}, Symbol.toStringTag, { value: "Module" }));
function Rl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function VH(e) {
  return e.length === 1 ? WH(e[0]) : GH(e);
}
const WH = (e) => function(t) {
  return t[e];
}, GH = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function lb(e) {
  throw Error(e);
}
function HH(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || lb("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && lb("Access path missing closing bracket: " + e), n && lb("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function YH(e, t, i) {
  const n = HH(e);
  return e = n.length === 1 ? n[0] : e, Rl(VH(n), [e], e);
}
YH("id");
Rl((e) => e, [], "identity");
Rl(() => 0, [], "zero");
Rl(() => 1, [], "one");
Rl(() => !0, [], "true");
Rl(() => !1, [], "false");
function XH(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function QC(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), XH(n, i);
}
const JH = (e) => new Uint8Array(e), ZH = (e) => new Uint16Array(e), Wd = (e) => new Uint32Array(e);
function KH() {
  let e = 8, t = [], i = Wd(0), n = ic(0, e), a = ic(0, e);
  return {
    data: () => t,
    seen: () => i = QH(i, t.length),
    add(o) {
      for (let r = 0, s = t.length, l = o.length, d; r < l; ++r)
        d = o[r], d._index = s++, t.push(d);
    },
    remove(o, r) {
      const s = t.length, l = Array(s - o), d = t;
      let f, u, c;
      for (u = 0; !r[u] && u < s; ++u)
        l[u] = t[u], d[u] = u;
      for (c = u; u < s; ++u)
        f = t[u], r[u] ? d[u] = -1 : (d[u] = c, n[c] = n[u], a[c] = a[u], l[c] = f, f._index = c++), n[u] = 0;
      return t = l, d;
    },
    size: () => t.length,
    curr: () => n,
    prev: () => a,
    reset: (o) => a[o] = n[o],
    all: () => e < 257 ? 255 : e < 65537 ? 65535 : 4294967295,
    set(o, r) {
      n[o] |= r;
    },
    clear(o, r) {
      n[o] &= ~r;
    },
    resize(o, r) {
      const s = n.length;
      (o > s || r > e) && (e = Math.max(r, e), n = ic(o, e, n), a = ic(o, e));
    }
  };
}
function QH(e, t, i) {
  return e.length >= t ? e : (i = i || new e.constructor(t), i.set(e), i);
}
function ic(e, t, i) {
  const n = (t < 257 ? JH : t < 65537 ? ZH : Wd)(e);
  return i && n.set(i), n;
}
function sA(e, t, i) {
  const n = 1 << t;
  return {
    one: n,
    zero: ~n,
    range: i.slice(),
    bisect: e.bisect,
    index: e.index,
    size: e.size,
    onAdd(a, o) {
      const r = this, s = r.bisect(r.range, a.value), l = a.index, d = s[0], f = s[1], u = l.length;
      let c;
      for (c = 0; c < d; ++c) o[l[c]] |= n;
      for (c = f; c < u; ++c) o[l[c]] |= n;
      return r;
    }
  };
}
function lA() {
  let e = Wd(0), t = [], i = 0;
  function n(s, l, d) {
    if (!l.length) return [];
    const f = i, u = l.length, c = Wd(u);
    let h = Array(u), p, g, m;
    for (m = 0; m < u; ++m)
      h[m] = s(l[m]), c[m] = m;
    if (h = eY(h, c), f)
      p = t, g = e, t = Array(f + u), e = Wd(f + u), tY(d, p, g, f, h, c, u, t, e);
    else {
      if (d > 0) for (m = 0; m < u; ++m)
        c[m] += d;
      t = h, e = c;
    }
    return i = f + u, {
      index: c,
      value: h
    };
  }
  function a(s, l) {
    const d = i;
    let f, u, c;
    for (u = 0; !l[e[u]] && u < d; ++u) ;
    for (c = u; u < d; ++u)
      l[f = e[u]] || (e[c] = f, t[c] = t[u], ++c);
    i = d - s;
  }
  function o(s) {
    for (let l = 0, d = i; l < d; ++l)
      e[l] = s[e[l]];
  }
  function r(s, l) {
    let d;
    return l ? d = l.length : (l = t, d = i), [K3(l, s[0], 0, d), Q3(l, s[1], 0, d)];
  }
  return {
    insert: n,
    remove: a,
    bisect: r,
    reindex: o,
    index: () => e,
    size: () => i
  };
}
function eY(e, t) {
  return e.sort.call(t, (i, n) => {
    const a = e[i], o = e[n];
    return a < o ? -1 : a > o ? 1 : 0;
  }), fN(e, t);
}
function tY(e, t, i, n, a, o, r, s, l) {
  let d = 0, f = 0, u;
  for (u = 0; d < n && f < r; ++u)
    t[d] < a[f] ? (s[u] = t[d], l[u] = i[d++]) : (s[u] = a[f], l[u] = o[f++] + e);
  for (; d < n; ++d, ++u)
    s[u] = t[d], l[u] = i[d];
  for (; f < r; ++f, ++u)
    s[u] = a[f], l[u] = o[f] + e;
}
function xx(e) {
  T.call(this, KH(), e), this._indices = null, this._dims = null;
}
xx.Definition = {
  type: "CrossFilter",
  metadata: {},
  params: [{
    name: "fields",
    type: "field",
    array: !0,
    required: !0
  }, {
    name: "query",
    type: "array",
    array: !0,
    required: !0,
    content: {
      type: "number",
      array: !0,
      length: 2
    }
  }]
};
QC(xx, T, {
  transform(e, t) {
    if (this._dims) {
      var i = e.modified("fields") || e.fields.some((n) => t.modified(n.fields));
      return i ? this.reinit(e, t) : this.eval(e, t);
    } else
      return this.init(e, t);
  },
  init(e, t) {
    const i = e.fields, n = e.query, a = this._indices = {}, o = this._dims = [], r = n.length;
    let s = 0, l, d;
    for (; s < r; ++s)
      l = i[s].fname, d = a[l] || (a[l] = lA()), o.push(sA(d, s, n[s]));
    return this.eval(e, t);
  },
  reinit(e, t) {
    const i = t.materialize().fork(), n = e.fields, a = e.query, o = this._indices, r = this._dims, s = this.value, l = s.curr(), d = s.prev(), f = s.all(), u = i.rem = i.add, c = i.mod, h = a.length, p = {};
    let g, m, b, y, v, w, x, $, _;
    if (d.set(l), t.rem.length && (v = this.remove(e, t, i)), t.add.length && s.add(t.add), t.mod.length)
      for (w = {}, y = t.mod, x = 0, $ = y.length; x < $; ++x)
        w[y[x]._index] = 1;
    for (x = 0; x < h; ++x)
      _ = n[x], (!r[x] || e.modified("fields", x) || t.modified(_.fields)) && (b = _.fname, (g = p[b]) || (o[b] = m = lA(), p[b] = g = m.insert(_, t.source, 0)), r[x] = sA(m, x, a[x]).onAdd(g, l));
    for (x = 0, $ = s.data().length; x < $; ++x)
      v[x] || (d[x] !== l[x] ? u.push(x) : w[x] && l[x] !== f && c.push(x));
    return s.mask = (1 << h) - 1, i;
  },
  eval(e, t) {
    const i = t.materialize().fork(), n = this._dims.length;
    let a = 0;
    return t.rem.length && (this.remove(e, t, i), a |= (1 << n) - 1), e.modified("query") && !e.modified("fields") && (a |= this.update(e, t, i)), t.add.length && (this.insert(e, t, i), a |= (1 << n) - 1), t.mod.length && (this.modify(t, i), a |= (1 << n) - 1), this.value.mask = a, i;
  },
  insert(e, t, i) {
    const n = t.add, a = this.value, o = this._dims, r = this._indices, s = e.fields, l = {}, d = i.add, f = a.size() + n.length, u = o.length;
    let c = a.size(), h, p, g;
    a.resize(f, u), a.add(n);
    const m = a.curr(), b = a.prev(), y = a.all();
    for (h = 0; h < u; ++h)
      p = s[h].fname, g = l[p] || (l[p] = r[p].insert(s[h], n, c)), o[h].onAdd(g, m);
    for (; c < f; ++c)
      b[c] = y, m[c] !== y && d.push(c);
  },
  modify(e, t) {
    const i = t.mod, n = this.value, a = n.curr(), o = n.all(), r = e.mod;
    let s, l, d;
    for (s = 0, l = r.length; s < l; ++s)
      d = r[s]._index, a[d] !== o && i.push(d);
  },
  remove(e, t, i) {
    const n = this._indices, a = this.value, o = a.curr(), r = a.prev(), s = a.all(), l = {}, d = i.rem, f = t.rem;
    let u, c, h, p;
    for (u = 0, c = f.length; u < c; ++u)
      h = f[u]._index, l[h] = 1, r[h] = p = o[h], o[h] = s, p !== s && d.push(h);
    for (h in n)
      n[h].remove(c, l);
    return this.reindex(t, c, l), l;
  },
  // reindex filters and indices after propagation completes
  reindex(e, t, i) {
    const n = this._indices, a = this.value;
    e.runAfter(() => {
      const o = a.remove(t, i);
      for (const r in n) n[r].reindex(o);
    });
  },
  update(e, t, i) {
    const n = this._dims, a = e.query, o = t.stamp, r = n.length;
    let s = 0, l, d;
    for (i.filters = 0, d = 0; d < r; ++d)
      e.modified("query", d) && (l = d, ++s);
    if (s === 1)
      s = n[l].one, this.incrementOne(n[l], a[l], i.add, i.rem);
    else
      for (d = 0, s = 0; d < r; ++d)
        e.modified("query", d) && (s |= n[d].one, this.incrementAll(n[d], a[d], o, i.add), i.rem = i.add);
    return s;
  },
  incrementAll(e, t, i, n) {
    const a = this.value, o = a.seen(), r = a.curr(), s = a.prev(), l = e.index(), d = e.bisect(e.range), f = e.bisect(t), u = f[0], c = f[1], h = d[0], p = d[1], g = e.one;
    let m, b, y;
    if (u < h)
      for (m = u, b = Math.min(h, c); m < b; ++m)
        y = l[m], o[y] !== i && (s[y] = r[y], o[y] = i, n.push(y)), r[y] ^= g;
    else if (u > h)
      for (m = h, b = Math.min(u, p); m < b; ++m)
        y = l[m], o[y] !== i && (s[y] = r[y], o[y] = i, n.push(y)), r[y] ^= g;
    if (c > p)
      for (m = Math.max(u, p), b = c; m < b; ++m)
        y = l[m], o[y] !== i && (s[y] = r[y], o[y] = i, n.push(y)), r[y] ^= g;
    else if (c < p)
      for (m = Math.max(h, c), b = p; m < b; ++m)
        y = l[m], o[y] !== i && (s[y] = r[y], o[y] = i, n.push(y)), r[y] ^= g;
    e.range = t.slice();
  },
  incrementOne(e, t, i, n) {
    const a = this.value, o = a.curr(), r = e.index(), s = e.bisect(e.range), l = e.bisect(t), d = l[0], f = l[1], u = s[0], c = s[1], h = e.one;
    let p, g, m;
    if (d < u)
      for (p = d, g = Math.min(u, f); p < g; ++p)
        m = r[p], o[m] ^= h, i.push(m);
    else if (d > u)
      for (p = u, g = Math.min(d, c); p < g; ++p)
        m = r[p], o[m] ^= h, n.push(m);
    if (f > c)
      for (p = Math.max(d, c), g = f; p < g; ++p)
        m = r[p], o[m] ^= h, i.push(m);
    else if (f < c)
      for (p = Math.max(u, f), g = c; p < g; ++p)
        m = r[p], o[m] ^= h, n.push(m);
    e.range = t.slice();
  }
});
function wx(e) {
  T.call(this, null, e);
}
wx.Definition = {
  type: "ResolveFilter",
  metadata: {},
  params: [{
    name: "ignore",
    type: "number",
    required: !0,
    description: "A bit mask indicating which filters to ignore."
  }, {
    name: "filter",
    type: "object",
    required: !0,
    description: "Per-tuple filter bitmaps from a CrossFilter transform."
  }]
};
QC(wx, T, {
  transform(e, t) {
    const i = ~(e.ignore || 0), n = e.filter, a = n.mask;
    if (!(a & i)) return t.StopPropagation;
    const o = t.fork(t.ALL), r = n.data(), s = n.curr(), l = n.prev(), d = (f) => s[f] & i ? null : r[f];
    return o.filter(o.MOD, d), a & a - 1 ? (o.filter(o.ADD, (f) => {
      const u = s[f] & i;
      return !u && u ^ l[f] & i ? r[f] : null;
    }), o.filter(o.REM, (f) => {
      const u = s[f] & i;
      return u && !(u ^ (u ^ l[f] & i)) ? r[f] : null;
    })) : (o.filter(o.ADD, d), o.filter(o.REM, (f) => (s[f] & i) === a ? r[f] : null)), o.filter(o.SOURCE, (f) => d(f._index));
  }
});
const iY = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  crossfilter: xx,
  resolvefilter: wx
}, Symbol.toStringTag, { value: "Module" }));
function Il(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function nY(e) {
  return e.length === 1 ? aY(e[0]) : oY(e);
}
const aY = (e) => function(t) {
  return t[e];
}, oY = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function jn(e) {
  throw Error(e);
}
function rY(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || jn("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && jn("Access path missing closing bracket: " + e), n && jn("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function sY(e, t, i) {
  const n = rY(e);
  return e = n.length === 1 ? n[0] : e, Il(nY(n), [e], e);
}
sY("id");
Il((e) => e, [], "identity");
Il(() => 0, [], "zero");
Il(() => 1, [], "one");
const lY = Il(() => !0, [], "true");
Il(() => !1, [], "false");
var as = Array.isArray;
function lu(e) {
  return e === Object(e);
}
function dY(e) {
  return e != null ? as(e) ? e : [e] : [];
}
function fY(e) {
  return typeof e == "function";
}
function dA(e) {
  return fY(e) ? e : () => e;
}
function uY(e, t) {
  let i;
  return (n) => {
    i && clearTimeout(i), i = setTimeout(() => (t(n), i = null), e);
  };
}
function Wh(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const cY = Object.prototype.hasOwnProperty;
function $x(e, t) {
  return cY.call(e, t);
}
function hY(e, t, i) {
  const n = e.prototype = Object.create(t.prototype);
  return Object.defineProperty(n, "constructor", {
    value: e,
    writable: !0,
    enumerable: !0,
    configurable: !0
  }), Wh(n, i);
}
function eR(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
function Gh(e) {
  return typeof e == "string";
}
function tR(e) {
  return as(e) ? "[" + e.map(tR) + "]" : lu(e) || Gh(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function pY(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
function jl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function gY(e) {
  return e.length === 1 ? mY(e[0]) : bY(e);
}
const mY = (e) => function(t) {
  return t[e];
}, bY = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Ct(e) {
  throw Error(e);
}
function yY(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Ct("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Ct("Access path missing closing bracket: " + e), n && Ct("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function iR(e, t, i) {
  const n = yY(e);
  return e = n.length === 1 ? n[0] : e, jl(gY(n), [e], e);
}
iR("id");
const kx = jl((e) => e, [], "identity");
jl(() => 0, [], "zero");
jl(() => 1, [], "one");
const nR = jl(() => !0, [], "true");
jl(() => !1, [], "false");
var Ra = Array.isArray;
function Hh(e) {
  return e === Object(e);
}
function Eo(e) {
  return e[e.length - 1];
}
function Ax(e) {
  return e == null || e === "" ? null : +e;
}
const aR = (e) => (t) => e * Math.exp(t), oR = (e) => (t) => Math.log(e * t), rR = (e) => (t) => Math.sign(t) * Math.log1p(Math.abs(t / e)), sR = (e) => (t) => Math.sign(t) * Math.expm1(Math.abs(t)) * e, Yh = (e) => (t) => t < 0 ? -Math.pow(-t, e) : Math.pow(t, e);
function og(e, t, i, n) {
  const a = i(e[0]), o = i(Eo(e)), r = (o - a) * t;
  return [n(a - r), n(o - r)];
}
function vY(e, t) {
  return og(e, t, Ax, kx);
}
function _Y(e, t) {
  var i = Math.sign(e[0]);
  return og(e, t, oR(i), aR(i));
}
function xY(e, t, i) {
  return og(e, t, Yh(i), Yh(1 / i));
}
function wY(e, t, i) {
  return og(e, t, rR(i), sR(i));
}
function rg(e, t, i, n, a) {
  const o = n(e[0]), r = n(Eo(e)), s = t != null ? n(t) : (o + r) / 2;
  return [a(s + (o - s) * i), a(s + (r - s) * i)];
}
function $Y(e, t, i) {
  return rg(e, t, i, Ax, kx);
}
function kY(e, t, i) {
  const n = Math.sign(e[0]);
  return rg(e, t, i, oR(n), aR(n));
}
function AY(e, t, i, n) {
  return rg(e, t, i, Yh(n), Yh(1 / n));
}
function OY(e, t, i, n) {
  return rg(e, t, i, rR(n), sR(n));
}
function EY(e) {
  return 1 + ~~(new Date(e).getMonth() / 3);
}
function DY(e) {
  return 1 + ~~(new Date(e).getUTCMonth() / 3);
}
function Xh(e) {
  return e != null ? Ra(e) ? e : [e] : [];
}
function SY(e, t, i) {
  let n = e[0], a = e[1], o;
  return a < n && (o = a, a = n, n = o), o = a - n, o >= i - t ? [t, i] : [n = Math.min(Math.max(n, t), i - o), n + o];
}
function Jh(e) {
  return typeof e == "function";
}
function Ox(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
function FY(e, t) {
  let i = 0, n, a, o, r;
  if (e && (n = e.length)) {
    for (a = e[i]; i < n && (a == null || a !== a); a = e[++i]) ;
    for (o = r = a; i < n; ++i)
      a = e[i], a != null && (a < o && (o = a), a > r && (r = a));
  }
  return [o, r];
}
const TY = Object.prototype.hasOwnProperty;
function co(e, t) {
  return TY.call(e, t);
}
function CY(e, t, i, n, a, o) {
  if (!i && i !== 0) return o;
  const r = +i;
  let s = e[0], l = Eo(e), d;
  l < s && (d = s, s = l, l = d), d = Math.abs(t - s);
  const f = Math.abs(l - t);
  return d < f && d <= r ? n : f <= r ? a : o;
}
function RY(e, t, i, n) {
  let a = t[0], o = t[t.length - 1], r;
  return a > o && (r = a, a = o, o = r), i = i === void 0 || i, n = n === void 0 || n, (i ? a <= e : a < e) && (n ? e <= o : e < o);
}
function IY(e) {
  return typeof e == "boolean";
}
function lR(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
function dR(e) {
  return typeof e == "number";
}
function jY(e) {
  return Object.prototype.toString.call(e) === "[object RegExp]";
}
function zl(e) {
  return typeof e == "string";
}
function zY(e, t) {
  const i = e[0], n = Eo(e), a = +t;
  return a ? a === 1 ? n : i + a * (n - i) : i;
}
function nc(e, t) {
  let i = "";
  for (; --t >= 0; ) i += e;
  return i;
}
function PY(e, t, i, n) {
  const a = i || " ", o = e + "", r = t - o.length;
  return r <= 0 ? o : n === "left" ? nc(a, r) + o : n === "center" ? nc(a, ~~(r / 2)) + o + nc(a, Math.ceil(r / 2)) : o + nc(a, r);
}
function NY(e) {
  return e && Eo(e) - e[0] || 0;
}
function wf(e) {
  return Ra(e) ? "[" + e.map(wf) + "]" : Hh(e) || zl(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function qY(e) {
  return e == null || e === "" ? null : !e || e === "false" || e === "0" ? !1 : !!e;
}
const LY = (e) => dR(e) || lR(e) ? e : Date.parse(e);
function BY(e, t) {
  return t = t || LY, e == null || e === "" ? null : t(e);
}
function UY(e) {
  return e == null || e === "" ? null : e + "";
}
function fA(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
function MY(e, t, i, n) {
  const a = n ?? "…", o = e + "", r = o.length, s = Math.max(0, t - a.length);
  return r <= t ? o : i === "left" ? a + o.slice(r - s) : i === "center" ? o.slice(0, Math.ceil(s / 2)) + a + o.slice(r - ~~(s / 2)) : o.slice(0, s) + a;
}
const VY = "RawCode", al = "Literal", WY = "Property", GY = "Identifier", HY = "ArrayExpression", YY = "BinaryExpression", fR = "CallExpression", XY = "ConditionalExpression", JY = "LogicalExpression", ZY = "MemberExpression", KY = "ObjectExpression", QY = "UnaryExpression";
function gn(e) {
  this.type = e;
}
gn.prototype.visit = function(e) {
  let t, i, n;
  if (e(this)) return 1;
  for (t = eX(this), i = 0, n = t.length; i < n; ++i)
    if (t[i].visit(e)) return 1;
};
function eX(e) {
  switch (e.type) {
    case HY:
      return e.elements;
    case YY:
    case JY:
      return [e.left, e.right];
    case fR:
      return [e.callee].concat(e.arguments);
    case XY:
      return [e.test, e.consequent, e.alternate];
    case ZY:
      return [e.object, e.property];
    case KY:
      return e.properties;
    case WY:
      return [e.key, e.value];
    case QY:
      return [e.argument];
    case GY:
    case al:
    case VY:
    default:
      return [];
  }
}
var Xn, G, C, jt, Ae, sg = 1, du = 2, qr = 3, zo = 4, lg = 5, os = 6, si = 7, fu = 8, tX = 9;
Xn = {};
Xn[sg] = "Boolean";
Xn[du] = "<end>";
Xn[qr] = "Identifier";
Xn[zo] = "Keyword";
Xn[lg] = "Null";
Xn[os] = "Numeric";
Xn[si] = "Punctuator";
Xn[fu] = "String";
Xn[tX] = "RegularExpression";
var iX = "ArrayExpression", nX = "BinaryExpression", aX = "CallExpression", oX = "ConditionalExpression", uR = "Identifier", rX = "Literal", sX = "LogicalExpression", lX = "MemberExpression", dX = "ObjectExpression", fX = "Property", uX = "UnaryExpression", ft = "Unexpected token %0", cX = "Unexpected number", hX = "Unexpected string", pX = "Unexpected identifier", gX = "Unexpected reserved word", mX = "Unexpected end of input", Jy = "Invalid regular expression", db = "Invalid regular expression: missing /", cR = "Octal literals are not allowed in strict mode.", bX = "Duplicate data property in object literal not allowed in strict mode", vt = "ILLEGAL", $f = "Disabled.", yX = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), vX = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
function dg(e, t) {
  if (!e)
    throw new Error("ASSERT: " + t);
}
function ma(e) {
  return e >= 48 && e <= 57;
}
function Ex(e) {
  return "0123456789abcdefABCDEF".includes(e);
}
function Gd(e) {
  return "01234567".includes(e);
}
function _X(e) {
  return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].includes(e);
}
function kf(e) {
  return e === 10 || e === 13 || e === 8232 || e === 8233;
}
function uu(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e === 92 || // \ (backslash)
  e >= 128 && yX.test(String.fromCharCode(e));
}
function Zh(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e >= 48 && e <= 57 || // 0..9
  e === 92 || // \ (backslash)
  e >= 128 && vX.test(String.fromCharCode(e));
}
const xX = {
  if: 1,
  in: 1,
  do: 1,
  var: 1,
  for: 1,
  new: 1,
  try: 1,
  let: 1,
  this: 1,
  else: 1,
  case: 1,
  void: 1,
  with: 1,
  enum: 1,
  while: 1,
  break: 1,
  catch: 1,
  throw: 1,
  const: 1,
  yield: 1,
  class: 1,
  super: 1,
  return: 1,
  typeof: 1,
  delete: 1,
  switch: 1,
  export: 1,
  import: 1,
  public: 1,
  static: 1,
  default: 1,
  finally: 1,
  extends: 1,
  package: 1,
  private: 1,
  function: 1,
  continue: 1,
  debugger: 1,
  interface: 1,
  protected: 1,
  instanceof: 1,
  implements: 1
};
function hR() {
  for (; C < jt; ) {
    const e = G.charCodeAt(C);
    if (_X(e) || kf(e))
      ++C;
    else
      break;
  }
}
function Zy(e) {
  var t, i, n, a = 0;
  for (i = e === "u" ? 4 : 2, t = 0; t < i; ++t)
    C < jt && Ex(G[C]) ? (n = G[C++], a = a * 16 + "0123456789abcdef".indexOf(n.toLowerCase())) : pe({}, ft, vt);
  return String.fromCharCode(a);
}
function wX() {
  var e, t, i, n;
  for (e = G[C], t = 0, e === "}" && pe({}, ft, vt); C < jt && (e = G[C++], !!Ex(e)); )
    t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
  return (t > 1114111 || e !== "}") && pe({}, ft, vt), t <= 65535 ? String.fromCharCode(t) : (i = (t - 65536 >> 10) + 55296, n = (t - 65536 & 1023) + 56320, String.fromCharCode(i, n));
}
function pR() {
  var e, t;
  for (e = G.charCodeAt(C++), t = String.fromCharCode(e), e === 92 && (G.charCodeAt(C) !== 117 && pe({}, ft, vt), ++C, e = Zy("u"), (!e || e === "\\" || !uu(e.charCodeAt(0))) && pe({}, ft, vt), t = e); C < jt && (e = G.charCodeAt(C), !!Zh(e)); )
    ++C, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), G.charCodeAt(C) !== 117 && pe({}, ft, vt), ++C, e = Zy("u"), (!e || e === "\\" || !Zh(e.charCodeAt(0))) && pe({}, ft, vt), t += e);
  return t;
}
function $X() {
  var e, t;
  for (e = C++; C < jt; ) {
    if (t = G.charCodeAt(C), t === 92)
      return C = e, pR();
    if (Zh(t))
      ++C;
    else
      break;
  }
  return G.slice(e, C);
}
function kX() {
  var e, t, i;
  return e = C, t = G.charCodeAt(C) === 92 ? pR() : $X(), t.length === 1 ? i = qr : xX.hasOwnProperty(t) ? i = zo : t === "null" ? i = lg : t === "true" || t === "false" ? i = sg : i = qr, {
    type: i,
    value: t,
    start: e,
    end: C
  };
}
function fb() {
  var e = C, t = G.charCodeAt(C), i, n = G[C], a, o, r;
  switch (t) {
    case 46:
    case 40:
    case 41:
    case 59:
    case 44:
    case 123:
    case 125:
    case 91:
    case 93:
    case 58:
    case 63:
    case 126:
      return ++C, {
        type: si,
        value: String.fromCharCode(t),
        start: e,
        end: C
      };
    default:
      if (i = G.charCodeAt(C + 1), i === 61)
        switch (t) {
          case 43:
          case 45:
          case 47:
          case 60:
          case 62:
          case 94:
          case 124:
          case 37:
          case 38:
          case 42:
            return C += 2, {
              type: si,
              value: String.fromCharCode(t) + String.fromCharCode(i),
              start: e,
              end: C
            };
          case 33:
          case 61:
            return C += 2, G.charCodeAt(C) === 61 && ++C, {
              type: si,
              value: G.slice(e, C),
              start: e,
              end: C
            };
        }
  }
  if (r = G.substr(C, 4), r === ">>>=")
    return C += 4, {
      type: si,
      value: r,
      start: e,
      end: C
    };
  if (o = r.substr(0, 3), o === ">>>" || o === "<<=" || o === ">>=")
    return C += 3, {
      type: si,
      value: o,
      start: e,
      end: C
    };
  if (a = o.substr(0, 2), n === a[1] && "+-<>&|".includes(n) || a === "=>")
    return C += 2, {
      type: si,
      value: a,
      start: e,
      end: C
    };
  if (a === "//" && pe({}, ft, vt), "<>=!+-*%&|^/".includes(n))
    return ++C, {
      type: si,
      value: n,
      start: e,
      end: C
    };
  pe({}, ft, vt);
}
function AX(e) {
  let t = "";
  for (; C < jt && Ex(G[C]); )
    t += G[C++];
  return t.length === 0 && pe({}, ft, vt), uu(G.charCodeAt(C)) && pe({}, ft, vt), {
    type: os,
    value: parseInt("0x" + t, 16),
    start: e,
    end: C
  };
}
function OX(e) {
  let t = "0" + G[C++];
  for (; C < jt && Gd(G[C]); )
    t += G[C++];
  return (uu(G.charCodeAt(C)) || ma(G.charCodeAt(C))) && pe({}, ft, vt), {
    type: os,
    value: parseInt(t, 8),
    octal: !0,
    start: e,
    end: C
  };
}
function uA() {
  var e, t, i;
  if (i = G[C], dg(ma(i.charCodeAt(0)) || i === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = C, e = "", i !== ".") {
    if (e = G[C++], i = G[C], e === "0") {
      if (i === "x" || i === "X")
        return ++C, AX(t);
      if (Gd(i))
        return OX(t);
      i && ma(i.charCodeAt(0)) && pe({}, ft, vt);
    }
    for (; ma(G.charCodeAt(C)); )
      e += G[C++];
    i = G[C];
  }
  if (i === ".") {
    for (e += G[C++]; ma(G.charCodeAt(C)); )
      e += G[C++];
    i = G[C];
  }
  if (i === "e" || i === "E")
    if (e += G[C++], i = G[C], (i === "+" || i === "-") && (e += G[C++]), ma(G.charCodeAt(C)))
      for (; ma(G.charCodeAt(C)); )
        e += G[C++];
    else
      pe({}, ft, vt);
  return uu(G.charCodeAt(C)) && pe({}, ft, vt), {
    type: os,
    value: parseFloat(e),
    start: t,
    end: C
  };
}
function EX() {
  var e = "", t, i, n, a, o = !1;
  for (t = G[C], dg(t === "'" || t === '"', "String literal must starts with a quote"), i = C, ++C; C < jt; )
    if (n = G[C++], n === t) {
      t = "";
      break;
    } else if (n === "\\")
      if (n = G[C++], !n || !kf(n.charCodeAt(0)))
        switch (n) {
          case "u":
          case "x":
            G[C] === "{" ? (++C, e += wX()) : e += Zy(n);
            break;
          case "n":
            e += `
`;
            break;
          case "r":
            e += "\r";
            break;
          case "t":
            e += "	";
            break;
          case "b":
            e += "\b";
            break;
          case "f":
            e += "\f";
            break;
          case "v":
            e += "\v";
            break;
          default:
            Gd(n) ? (a = "01234567".indexOf(n), a !== 0 && (o = !0), C < jt && Gd(G[C]) && (o = !0, a = a * 8 + "01234567".indexOf(G[C++]), "0123".includes(n) && C < jt && Gd(G[C]) && (a = a * 8 + "01234567".indexOf(G[C++]))), e += String.fromCharCode(a)) : e += n;
            break;
        }
      else
        n === "\r" && G[C] === `
` && ++C;
    else {
      if (kf(n.charCodeAt(0)))
        break;
      e += n;
    }
  return t !== "" && pe({}, ft, vt), {
    type: fu,
    value: e,
    octal: o,
    start: i,
    end: C
  };
}
function DX(e, t) {
  let i = e;
  t.includes("u") && (i = i.replace(/\\u\{([0-9a-fA-F]+)\}/g, (n, a) => {
    if (parseInt(a, 16) <= 1114111)
      return "x";
    pe({}, Jy);
  }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
  try {
    new RegExp(i);
  } catch {
    pe({}, Jy);
  }
  try {
    return new RegExp(e, t);
  } catch {
    return null;
  }
}
function SX() {
  var e, t, i, n, a;
  for (e = G[C], dg(e === "/", "Regular expression literal must start with a slash"), t = G[C++], i = !1, n = !1; C < jt; )
    if (e = G[C++], t += e, e === "\\")
      e = G[C++], kf(e.charCodeAt(0)) && pe({}, db), t += e;
    else if (kf(e.charCodeAt(0)))
      pe({}, db);
    else if (i)
      e === "]" && (i = !1);
    else if (e === "/") {
      n = !0;
      break;
    } else e === "[" && (i = !0);
  return n || pe({}, db), a = t.substr(1, t.length - 2), {
    value: a,
    literal: t
  };
}
function FX() {
  var e, t, i;
  for (t = "", i = ""; C < jt && (e = G[C], !!Zh(e.charCodeAt(0))); )
    ++C, e === "\\" && C < jt ? pe({}, ft, vt) : (i += e, t += e);
  return i.search(/[^gimuy]/g) >= 0 && pe({}, Jy, i), {
    value: i,
    literal: t
  };
}
function TX() {
  var e, t, i, n;
  return Ae = null, hR(), e = C, t = SX(), i = FX(), n = DX(t.value, i.value), {
    literal: t.literal + i.literal,
    value: n,
    regex: {
      pattern: t.value,
      flags: i.value
    },
    start: e,
    end: C
  };
}
function CX(e) {
  return e.type === qr || e.type === zo || e.type === sg || e.type === lg;
}
function gR() {
  if (hR(), C >= jt)
    return {
      type: du,
      start: C,
      end: C
    };
  const e = G.charCodeAt(C);
  return uu(e) ? kX() : e === 40 || e === 41 || e === 59 ? fb() : e === 39 || e === 34 ? EX() : e === 46 ? ma(G.charCodeAt(C + 1)) ? uA() : fb() : ma(e) ? uA() : fb();
}
function ui() {
  const e = Ae;
  return C = e.end, Ae = gR(), C = e.end, e;
}
function mR() {
  const e = C;
  Ae = gR(), C = e;
}
function RX(e) {
  const t = new gn(iX);
  return t.elements = e, t;
}
function cA(e, t, i) {
  const n = new gn(e === "||" || e === "&&" ? sX : nX);
  return n.operator = e, n.left = t, n.right = i, n;
}
function IX(e, t) {
  const i = new gn(aX);
  return i.callee = e, i.arguments = t, i;
}
function jX(e, t, i) {
  const n = new gn(oX);
  return n.test = e, n.consequent = t, n.alternate = i, n;
}
function Dx(e) {
  const t = new gn(uR);
  return t.name = e, t;
}
function Td(e) {
  const t = new gn(rX);
  return t.value = e.value, t.raw = G.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
}
function hA(e, t, i) {
  const n = new gn(lX);
  return n.computed = e === "[", n.object = t, n.property = i, n.computed || (i.member = !0), n;
}
function zX(e) {
  const t = new gn(dX);
  return t.properties = e, t;
}
function pA(e, t, i) {
  const n = new gn(fX);
  return n.key = t, n.value = i, n.kind = e, n;
}
function PX(e, t) {
  const i = new gn(uX);
  return i.operator = e, i.argument = t, i.prefix = !0, i;
}
function pe(e, t) {
  var i, n = Array.prototype.slice.call(arguments, 2), a = t.replace(/%(\d)/g, (o, r) => (dg(r < n.length, "Message reference must be in range"), n[r]));
  throw i = new Error(a), i.index = C, i.description = a, i;
}
function fg(e) {
  e.type === du && pe(e, mX), e.type === os && pe(e, cX), e.type === fu && pe(e, hX), e.type === qr && pe(e, pX), e.type === zo && pe(e, gX), pe(e, ft, e.value);
}
function zt(e) {
  const t = ui();
  (t.type !== si || t.value !== e) && fg(t);
}
function je(e) {
  return Ae.type === si && Ae.value === e;
}
function ub(e) {
  return Ae.type === zo && Ae.value === e;
}
function NX() {
  const e = [];
  for (C = Ae.start, zt("["); !je("]"); )
    je(",") ? (ui(), e.push(null)) : (e.push(Lr()), je("]") || zt(","));
  return ui(), RX(e);
}
function gA() {
  C = Ae.start;
  const e = ui();
  return e.type === fu || e.type === os ? (e.octal && pe(e, cR), Td(e)) : Dx(e.value);
}
function qX() {
  var e, t, i, n;
  if (C = Ae.start, e = Ae, e.type === qr)
    return i = gA(), zt(":"), n = Lr(), pA("init", i, n);
  if (e.type === du || e.type === si)
    fg(e);
  else
    return t = gA(), zt(":"), n = Lr(), pA("init", t, n);
}
function LX() {
  var e = [], t, i, n, a = {}, o = String;
  for (C = Ae.start, zt("{"); !je("}"); )
    t = qX(), t.key.type === uR ? i = t.key.name : i = o(t.key.value), n = "$" + i, Object.prototype.hasOwnProperty.call(a, n) ? pe({}, bX) : a[n] = !0, e.push(t), je("}") || zt(",");
  return zt("}"), zX(e);
}
function BX() {
  zt("(");
  const e = Sx();
  return zt(")"), e;
}
const UX = {
  if: 1
};
function MX() {
  var e, t, i;
  if (je("("))
    return BX();
  if (je("["))
    return NX();
  if (je("{"))
    return LX();
  if (e = Ae.type, C = Ae.start, e === qr || UX[Ae.value])
    i = Dx(ui().value);
  else if (e === fu || e === os)
    Ae.octal && pe(Ae, cR), i = Td(ui());
  else {
    if (e === zo)
      throw new Error($f);
    e === sg ? (t = ui(), t.value = t.value === "true", i = Td(t)) : e === lg ? (t = ui(), t.value = null, i = Td(t)) : je("/") || je("/=") ? (i = Td(TX()), mR()) : fg(ui());
  }
  return i;
}
function VX() {
  const e = [];
  if (zt("("), !je(")"))
    for (; C < jt && (e.push(Lr()), !je(")")); )
      zt(",");
  return zt(")"), e;
}
function WX() {
  C = Ae.start;
  const e = ui();
  return CX(e) || fg(e), Dx(e.value);
}
function GX() {
  return zt("."), WX();
}
function HX() {
  zt("[");
  const e = Sx();
  return zt("]"), e;
}
function YX() {
  var e, t, i;
  for (e = MX(); ; )
    if (je("."))
      i = GX(), e = hA(".", e, i);
    else if (je("("))
      t = VX(), e = IX(e, t);
    else if (je("["))
      i = HX(), e = hA("[", e, i);
    else
      break;
  return e;
}
function mA() {
  const e = YX();
  if (Ae.type === si && (je("++") || je("--")))
    throw new Error($f);
  return e;
}
function Wc() {
  var e, t;
  if (Ae.type !== si && Ae.type !== zo)
    t = mA();
  else {
    if (je("++") || je("--"))
      throw new Error($f);
    if (je("+") || je("-") || je("~") || je("!"))
      e = ui(), t = Wc(), t = PX(e.value, t);
    else {
      if (ub("delete") || ub("void") || ub("typeof"))
        throw new Error($f);
      t = mA();
    }
  }
  return t;
}
function bA(e) {
  let t = 0;
  if (e.type !== si && e.type !== zo)
    return 0;
  switch (e.value) {
    case "||":
      t = 1;
      break;
    case "&&":
      t = 2;
      break;
    case "|":
      t = 3;
      break;
    case "^":
      t = 4;
      break;
    case "&":
      t = 5;
      break;
    case "==":
    case "!=":
    case "===":
    case "!==":
      t = 6;
      break;
    case "<":
    case ">":
    case "<=":
    case ">=":
    case "instanceof":
    case "in":
      t = 7;
      break;
    case "<<":
    case ">>":
    case ">>>":
      t = 8;
      break;
    case "+":
    case "-":
      t = 9;
      break;
    case "*":
    case "/":
    case "%":
      t = 11;
      break;
  }
  return t;
}
function XX() {
  var e, t, i, n, a, o, r, s, l, d;
  if (e = Ae, l = Wc(), n = Ae, a = bA(n), a === 0)
    return l;
  for (n.prec = a, ui(), t = [e, Ae], r = Wc(), o = [l, n, r]; (a = bA(Ae)) > 0; ) {
    for (; o.length > 2 && a <= o[o.length - 2].prec; )
      r = o.pop(), s = o.pop().value, l = o.pop(), t.pop(), i = cA(s, l, r), o.push(i);
    n = ui(), n.prec = a, o.push(n), t.push(Ae), i = Wc(), o.push(i);
  }
  for (d = o.length - 1, i = o[d], t.pop(); d > 1; )
    t.pop(), i = cA(o[d - 1].value, o[d - 2], i), d -= 2;
  return i;
}
function Lr() {
  var e, t, i;
  return e = XX(), je("?") && (ui(), t = Lr(), zt(":"), i = Lr(), e = jX(e, t, i)), e;
}
function Sx() {
  const e = Lr();
  if (je(","))
    throw new Error($f);
  return e;
}
function JX(e) {
  G = e, C = 0, jt = G.length, Ae = null, mR();
  const t = Sx();
  if (Ae.type !== du)
    throw new Error("Unexpect token after expression.");
  return t;
}
var bR = {
  NaN: "NaN",
  E: "Math.E",
  LN2: "Math.LN2",
  LN10: "Math.LN10",
  LOG2E: "Math.LOG2E",
  LOG10E: "Math.LOG10E",
  PI: "Math.PI",
  SQRT1_2: "Math.SQRT1_2",
  SQRT2: "Math.SQRT2",
  MIN_VALUE: "Number.MIN_VALUE",
  MAX_VALUE: "Number.MAX_VALUE"
};
function yR(e) {
  function t(r, s, l, d) {
    let f = e(s[0]);
    return l && (f = l + "(" + f + ")", l.lastIndexOf("new ", 0) === 0 && (f = "(" + f + ")")), f + "." + r + (d < 0 ? "" : d === 0 ? "()" : "(" + s.slice(1).map(e).join(",") + ")");
  }
  function i(r, s, l) {
    return (d) => t(r, d, s, l);
  }
  const n = "new Date", a = "String", o = "RegExp";
  return {
    // MATH functions
    isNaN: "Number.isNaN",
    isFinite: "Number.isFinite",
    abs: "Math.abs",
    acos: "Math.acos",
    asin: "Math.asin",
    atan: "Math.atan",
    atan2: "Math.atan2",
    ceil: "Math.ceil",
    cos: "Math.cos",
    exp: "Math.exp",
    floor: "Math.floor",
    hypot: "Math.hypot",
    log: "Math.log",
    max: "Math.max",
    min: "Math.min",
    pow: "Math.pow",
    random: "Math.random",
    round: "Math.round",
    sin: "Math.sin",
    sqrt: "Math.sqrt",
    tan: "Math.tan",
    clamp: function(r) {
      r.length < 3 && Ct("Missing arguments to clamp function."), r.length > 3 && Ct("Too many arguments to clamp function.");
      const s = r.map(e);
      return "Math.max(" + s[1] + ", Math.min(" + s[2] + "," + s[0] + "))";
    },
    // DATE functions
    now: "Date.now",
    utc: "Date.UTC",
    datetime: n,
    date: i("getDate", n, 0),
    day: i("getDay", n, 0),
    year: i("getFullYear", n, 0),
    month: i("getMonth", n, 0),
    hours: i("getHours", n, 0),
    minutes: i("getMinutes", n, 0),
    seconds: i("getSeconds", n, 0),
    milliseconds: i("getMilliseconds", n, 0),
    time: i("getTime", n, 0),
    timezoneoffset: i("getTimezoneOffset", n, 0),
    utcdate: i("getUTCDate", n, 0),
    utcday: i("getUTCDay", n, 0),
    utcyear: i("getUTCFullYear", n, 0),
    utcmonth: i("getUTCMonth", n, 0),
    utchours: i("getUTCHours", n, 0),
    utcminutes: i("getUTCMinutes", n, 0),
    utcseconds: i("getUTCSeconds", n, 0),
    utcmilliseconds: i("getUTCMilliseconds", n, 0),
    // sequence functions
    length: i("length", null, -1),
    // STRING functions
    parseFloat: "parseFloat",
    parseInt: "parseInt",
    upper: i("toUpperCase", a, 0),
    lower: i("toLowerCase", a, 0),
    substring: i("substring", a),
    split: i("split", a),
    trim: i("trim", a, 0),
    // REGEXP functions
    regexp: o,
    test: i("test", o),
    // Control Flow functions
    if: function(r) {
      r.length < 3 && Ct("Missing arguments to if function."), r.length > 3 && Ct("Too many arguments to if function.");
      const s = r.map(e);
      return "(" + s[0] + "?" + s[1] + ":" + s[2] + ")";
    }
  };
}
function ZX(e) {
  const t = e && e.length - 1;
  return t && (e[0] === '"' && e[t] === '"' || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
}
function KX(e) {
  e = e || {};
  const t = e.allowed ? fA(e.allowed) : {}, i = e.forbidden ? fA(e.forbidden) : {}, n = e.constants || bR, a = (e.functions || yR)(u), o = e.globalvar, r = e.fieldvar, s = Jh(o) ? o : (p) => `${o}["${p}"]`;
  let l = {}, d = {}, f = 0;
  function u(p) {
    if (zl(p)) return p;
    const g = c[p.type];
    return g == null && Ct("Unsupported type: " + p.type), g(p);
  }
  const c = {
    Literal: (p) => p.raw,
    Identifier: (p) => {
      const g = p.name;
      return f > 0 ? g : co(i, g) ? Ct("Illegal identifier: " + g) : co(n, g) ? n[g] : co(t, g) ? g : (l[g] = 1, s(g));
    },
    MemberExpression: (p) => {
      const g = !p.computed, m = u(p.object);
      g && (f += 1);
      const b = u(p.property);
      return m === r && (d[ZX(b)] = 1), g && (f -= 1), m + (g ? "." + b : "[" + b + "]");
    },
    CallExpression: (p) => {
      p.callee.type !== "Identifier" && Ct("Illegal callee type: " + p.callee.type);
      const g = p.callee.name, m = p.arguments, b = co(a, g) && a[g];
      return b || Ct("Unrecognized function: " + g), Jh(b) ? b(m) : b + "(" + m.map(u).join(",") + ")";
    },
    ArrayExpression: (p) => "[" + p.elements.map(u).join(",") + "]",
    BinaryExpression: (p) => "(" + u(p.left) + " " + p.operator + " " + u(p.right) + ")",
    UnaryExpression: (p) => "(" + p.operator + u(p.argument) + ")",
    ConditionalExpression: (p) => "(" + u(p.test) + "?" + u(p.consequent) + ":" + u(p.alternate) + ")",
    LogicalExpression: (p) => "(" + u(p.left) + p.operator + u(p.right) + ")",
    ObjectExpression: (p) => "{" + p.properties.map(u).join(",") + "}",
    Property: (p) => {
      f += 1;
      const g = u(p.key);
      return f -= 1, g + ":" + u(p.value);
    }
  };
  function h(p) {
    const g = {
      code: u(p),
      globals: Object.keys(l),
      fields: Object.keys(d)
    };
    return l = {}, d = {}, g;
  }
  return h.functions = a, h.constants = n, h;
}
function Pl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function QX(e) {
  return e.length === 1 ? eJ(e[0]) : tJ(e);
}
const eJ = (e) => function(t) {
  return t[e];
}, tJ = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Gc(e) {
  throw Error(e);
}
function iJ(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Gc("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Gc("Access path missing closing bracket: " + e), n && Gc("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function Fx(e, t, i) {
  const n = iJ(e);
  return e = n.length === 1 ? n[0] : e, Pl(QX(n), [e], e);
}
Fx("id");
Pl((e) => e, [], "identity");
Pl(() => 0, [], "zero");
Pl(() => 1, [], "one");
Pl(() => !0, [], "true");
Pl(() => !1, [], "false");
var Ky = Array.isArray;
function nJ(e) {
  return e[e.length - 1];
}
function $r(e) {
  return e == null || e === "" ? null : +e;
}
function yA(e) {
  return e != null ? Ky(e) ? e : [e] : [];
}
function aJ(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const oJ = Object.prototype.hasOwnProperty;
function vA(e, t) {
  return oJ.call(e, t);
}
function ac(e, t, i, n) {
  let a = t[0], o = t[t.length - 1], r;
  return a > o && (r = a, a = o, o = r), i = i === void 0 || i, n = n === void 0 || n, (i ? a <= e : a < e) && (n ? e <= o : e < o);
}
function cb(e) {
  return Object.prototype.toString.call(e) === "[object Date]";
}
const rJ = "Literal";
var Jn, sJ = 1, lJ = 2, dJ = 3, fJ = 4, uJ = 5, cJ = 6, hJ = 7, pJ = 8, gJ = 9;
Jn = {};
Jn[sJ] = "Boolean";
Jn[lJ] = "<end>";
Jn[dJ] = "Identifier";
Jn[fJ] = "Keyword";
Jn[uJ] = "Null";
Jn[cJ] = "Numeric";
Jn[hJ] = "Punctuator";
Jn[pJ] = "String";
Jn[gJ] = "RegularExpression";
const _A = Symbol("vega_selection_getter");
function vR(e) {
  return (!e.getter || !e.getter[_A]) && (e.getter = Fx(e.field), e.getter[_A] = !0), e.getter;
}
const Tx = "intersect", xA = "union", mJ = "vlMulti", bJ = "vlPoint", wA = "or", yJ = "and", Sn = "_vgsid_", Af = Fx(Sn), vJ = "E", _J = "R", xJ = "R-E", wJ = "R-LE", $J = "R-RE", Kh = "index:unit";
function $A(e, t) {
  for (var i = t.fields, n = t.values, a = i.length, o = 0, r, s; o < a; ++o)
    if (s = i[o], r = vR(s)(e), cb(r) && (r = $r(r)), cb(n[o]) && (n[o] = $r(n[o])), Ky(n[o]) && cb(n[o][0]) && (n[o] = n[o].map($r)), s.type === vJ) {
      if (Ky(n[o]) ? n[o].indexOf(r) < 0 : r !== n[o])
        return !1;
    } else if (s.type === _J) {
      if (!ac(r, n[o])) return !1;
    } else if (s.type === $J) {
      if (!ac(r, n[o], !0, !1)) return !1;
    } else if (s.type === xJ) {
      if (!ac(r, n[o], !1, !1)) return !1;
    } else if (s.type === wJ && !ac(r, n[o], !1, !0))
      return !1;
  return !0;
}
function kJ(e, t, i) {
  for (var n = this.context.data[e], a = n ? n.values.value : [], o = n ? n[Kh] && n[Kh].value : void 0, r = i === Tx, s = a.length, l = 0, d, f, u, c, h; l < s; ++l)
    if (d = a[l], o && r) {
      if (f = f || {}, u = f[c = d.unit] || 0, u === -1) continue;
      if (h = $A(t, d), f[c] = h ? -1 : ++u, h && o.size === 1) return !0;
      if (!h && u === o.get(c).count) return !1;
    } else if (h = $A(t, d), r ^ h) return h;
  return s && r;
}
const _R = mE(Af), AJ = _R.left, OJ = _R.right;
function EJ(e, t, i) {
  const n = this.context.data[e], a = n ? n.values.value : [], o = n ? n[Kh] && n[Kh].value : void 0, r = i === Tx, s = Af(t), l = AJ(a, s);
  if (l === a.length || Af(a[l]) !== s) return !1;
  if (o && r) {
    if (o.size === 1) return !0;
    if (OJ(a, s) - l < o.size) return !1;
  }
  return !0;
}
function DJ(e, t) {
  return e.map((i) => aJ(t.fields ? {
    values: t.fields.map((n) => vR(n)(i.datum))
  } : {
    [Sn]: Af(i.datum)
  }, t));
}
function SJ(e, t, i, n) {
  for (var a = this.context.data[e], o = a ? a.values.value : [], r = {}, s = {}, l = {}, d, f, u, c, h, p, g, m, b, y, v = o.length, w = 0, x, $; w < v; ++w)
    if (d = o[w], c = d.unit, f = d.fields, u = d.values, f && u) {
      for (x = 0, $ = f.length; x < $; ++x)
        h = f[x], g = r[h.field] || (r[h.field] = {}), m = g[c] || (g[c] = []), l[h.field] = b = h.type.charAt(0), y = hb[`${b}_union`], g[c] = y(m, yA(u[x]));
      i && (m = s[c] || (s[c] = []), m.push(yA(u).reduce((_, k, A) => (_[f[A].field] = k, _), {})));
    } else
      h = Sn, p = Af(d), g = r[h] || (r[h] = {}), m = g[c] || (g[c] = []), m.push(p), i && (m = s[c] || (s[c] = []), m.push({
        [Sn]: p
      }));
  if (t = t || xA, r[Sn] ? r[Sn] = hb[`${Sn}_${t}`](...Object.values(r[Sn])) : Object.keys(r).forEach((_) => {
    r[_] = Object.keys(r[_]).map((k) => r[_][k]).reduce((k, A) => k === void 0 ? A : hb[`${l[_]}_${t}`](k, A));
  }), o = Object.keys(s), i && o.length) {
    const _ = n ? bJ : mJ;
    r[_] = t === xA ? {
      [wA]: o.reduce((k, A) => (k.push(...s[A]), k), [])
    } : {
      [yJ]: o.map((k) => ({
        [wA]: s[k]
      }))
    };
  }
  return r;
}
var hb = {
  [`${Sn}_union`]: pN,
  [`${Sn}_intersect`]: cN,
  E_union: function(e, t) {
    if (!e.length) return t;
    for (var i = 0, n = t.length; i < n; ++i) e.indexOf(t[i]) < 0 && e.push(t[i]);
    return e;
  },
  E_intersect: function(e, t) {
    return e.length ? e.filter((i) => t.indexOf(i) >= 0) : t;
  },
  R_union: function(e, t) {
    var i = $r(t[0]), n = $r(t[1]);
    return i > n && (i = t[1], n = t[0]), e.length ? (e[0] > i && (e[0] = i), e[1] < n && (e[1] = n), e) : [i, n];
  },
  R_intersect: function(e, t) {
    var i = $r(t[0]), n = $r(t[1]);
    return i > n && (i = t[1], n = t[0]), e.length ? n < e[0] || e[1] < i ? [] : (e[0] < i && (e[0] = i), e[1] > n && (e[1] = n), e) : [i, n];
  }
};
const FJ = ":", TJ = "@";
function Cx(e, t, i, n) {
  t[0].type !== rJ && Gc("First argument to selection functions must be a string literal.");
  const a = t[0].value, o = t.length >= 2 && nJ(t).value, r = "unit", s = TJ + r, l = FJ + a;
  o === Tx && !vA(n, s) && (n[s] = i.getData(a).indataRef(i, r)), vA(n, l) || (n[l] = i.getData(a).tuplesRef());
}
function xR(e) {
  const t = this.context.data[e];
  return t ? t.values.value : [];
}
function CJ(e, t, i) {
  const n = this.context.data[e]["index:" + t], a = n ? n.value.get(i) : void 0;
  return a && a.count;
}
function RJ(e, t) {
  const i = this.context.dataflow, n = this.context.data[e], a = n.input;
  return i.pulse(a, i.changeset().remove(nR).insert(t)), 1;
}
function IJ(e, t, i) {
  if (e) {
    const n = this.context.dataflow, a = e.mark.source;
    n.pulse(a, n.changeset().encode(e, t));
  }
  return i !== void 0 ? i : e;
}
const cu = (e) => function(t, i) {
  const n = this.context.dataflow.locale();
  return t === null ? "null" : n[e](i)(t);
}, jJ = cu("format"), wR = cu("timeFormat"), zJ = cu("utcFormat"), PJ = cu("timeParse"), NJ = cu("utcParse"), oc = new Date(2e3, 0, 1);
function ug(e, t, i) {
  return !Number.isInteger(e) || !Number.isInteger(t) ? "" : (oc.setYear(2e3), oc.setMonth(e), oc.setDate(t), wR.call(this, oc, i));
}
function qJ(e) {
  return ug.call(this, e, 1, "%B");
}
function LJ(e) {
  return ug.call(this, e, 1, "%b");
}
function BJ(e) {
  return ug.call(this, 0, 2 + e, "%A");
}
function UJ(e) {
  return ug.call(this, 0, 2 + e, "%a");
}
const MJ = ":", VJ = "@", Qy = "%", $R = "$";
function Rx(e, t, i, n) {
  t[0].type !== al && Ct("First argument to data functions must be a string literal.");
  const a = t[0].value, o = MJ + a;
  if (!co(o, n))
    try {
      n[o] = i.getData(a).tuplesRef();
    } catch {
    }
}
function WJ(e, t, i, n) {
  t[0].type !== al && Ct("First argument to indata must be a string literal."), t[1].type !== al && Ct("Second argument to indata must be a string literal.");
  const a = t[0].value, o = t[1].value, r = VJ + o;
  co(r, n) || (n[r] = i.getData(a).indataRef(i, o));
}
function ti(e, t, i, n) {
  if (t[0].type === al)
    kA(i, n, t[0].value);
  else
    for (e in i.scales)
      kA(i, n, e);
}
function kA(e, t, i) {
  const n = Qy + i;
  if (!co(t, n))
    try {
      t[n] = e.scaleRef(i);
    } catch {
    }
}
function Zn(e, t) {
  if (Jh(e))
    return e;
  if (zl(e)) {
    const i = t.scales[e];
    return i && nN(i.value) ? i.value : void 0;
  }
}
function GJ(e, t, i) {
  t.__bandwidth = (a) => a && a.bandwidth ? a.bandwidth() : 0, i._bandwidth = ti, i._range = ti, i._scale = ti;
  const n = (a) => "_[" + (a.type === al ? wf(Qy + a.value) : wf(Qy) + "+" + e(a)) + "]";
  return {
    _bandwidth: (a) => `this.__bandwidth(${n(a[0])})`,
    _range: (a) => `${n(a[0])}.range()`,
    _scale: (a) => `${n(a[0])}(${e(a[1])})`
  };
}
function Ix(e, t) {
  return function(i, n, a) {
    if (i) {
      const o = Zn(i, (a || this).context);
      return o && o.path[e](n);
    } else
      return t(n);
  };
}
const HJ = Ix("area", yN), YJ = Ix("bounds", wN), XJ = Ix("centroid", DN);
function JJ(e, t) {
  const i = Zn(e, (t || this).context);
  return i && i.scale();
}
function ZJ(e) {
  const t = this.context.group;
  let i = !1;
  if (t) for (; e; ) {
    if (e === t) {
      i = !0;
      break;
    }
    e = e.mark.group;
  }
  return i;
}
function jx(e, t, i) {
  try {
    e[t].apply(e, ["EXPRESSION"].concat([].slice.call(i)));
  } catch (n) {
    e.warn(n);
  }
  return i[i.length - 1];
}
function KJ() {
  return jx(this.context.dataflow, "warn", arguments);
}
function QJ() {
  return jx(this.context.dataflow, "info", arguments);
}
function eZ() {
  return jx(this.context.dataflow, "debug", arguments);
}
function pb(e) {
  const t = e / 255;
  return t <= 0.03928 ? t / 12.92 : Math.pow((t + 0.055) / 1.055, 2.4);
}
function ev(e) {
  const t = ah(e), i = pb(t.r), n = pb(t.g), a = pb(t.b);
  return 0.2126 * i + 0.7152 * n + 0.0722 * a;
}
function tZ(e, t) {
  const i = ev(e), n = ev(t), a = Math.max(i, n), o = Math.min(i, n);
  return (a + 0.05) / (o + 0.05);
}
function iZ() {
  const e = [].slice.call(arguments);
  return e.unshift({}), Ox(...e);
}
function kR(e, t) {
  return e === t || e !== e && t !== t ? !0 : Ra(e) ? Ra(t) && e.length === t.length ? nZ(e, t) : !1 : Hh(e) && Hh(t) ? AR(e, t) : !1;
}
function nZ(e, t) {
  for (let i = 0, n = e.length; i < n; ++i)
    if (!kR(e[i], t[i])) return !1;
  return !0;
}
function AR(e, t) {
  for (const i in e)
    if (!kR(e[i], t[i])) return !1;
  return !0;
}
function AA(e) {
  return (t) => AR(e, t);
}
function aZ(e, t, i, n, a, o) {
  const r = this.context.dataflow, s = this.context.data[e], l = s.input, d = r.stamp();
  let f = s.changes, u, c;
  if (r._trigger === !1 || !(l.value.length || t || n))
    return 0;
  if ((!f || f.stamp < d) && (s.changes = f = r.changeset(), f.stamp = d, r.runAfter(() => {
    s.modified = !0, r.pulse(l, f).run();
  }, !0, 1)), i && (u = i === !0 ? nR : Ra(i) || jp(i) ? i : AA(i), f.remove(u)), t && f.insert(t), n && (u = AA(n), l.value.some(u) ? f.remove(u) : f.insert(n)), a)
    for (c in o)
      f.modify(a, c, o[c]);
  return 1;
}
function oZ(e) {
  const t = e.touches, i = t[0].clientX - t[1].clientX, n = t[0].clientY - t[1].clientY;
  return Math.hypot(i, n);
}
function rZ(e) {
  const t = e.touches;
  return Math.atan2(t[0].clientY - t[1].clientY, t[0].clientX - t[1].clientX);
}
const OA = {};
function sZ(e, t) {
  const i = OA[t] || (OA[t] = iR(t));
  return Ra(e) ? e.map(i) : i(e);
}
function zx(e) {
  return Ra(e) || ArrayBuffer.isView(e) ? e : null;
}
function Px(e) {
  return zx(e) || (zl(e) ? e : null);
}
function lZ(e) {
  for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    i[n - 1] = arguments[n];
  return zx(e).join(...i);
}
function dZ(e) {
  for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    i[n - 1] = arguments[n];
  return Px(e).indexOf(...i);
}
function fZ(e) {
  for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    i[n - 1] = arguments[n];
  return Px(e).lastIndexOf(...i);
}
function uZ(e) {
  for (var t = arguments.length, i = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++)
    i[n - 1] = arguments[n];
  return Px(e).slice(...i);
}
function cZ(e, t, i) {
  return Jh(i) && Ct("Function argument passed to replace."), String(e).replace(t, i);
}
function hZ(e) {
  return zx(e).slice().reverse();
}
function pZ(e, t, i) {
  return TE(e || 0, t || 0, i || 0);
}
function gZ(e, t) {
  const i = Zn(e, (t || this).context);
  return i && i.bandwidth ? i.bandwidth() : 0;
}
function mZ(e, t) {
  const i = Zn(e, (t || this).context);
  return i ? i.copy() : void 0;
}
function bZ(e, t) {
  const i = Zn(e, (t || this).context);
  return i ? i.domain() : [];
}
function yZ(e, t, i) {
  const n = Zn(e, (i || this).context);
  return n ? Ra(t) ? (n.invertRange || n.invert)(t) : (n.invert || n.invertExtent)(t) : void 0;
}
function vZ(e, t) {
  const i = Zn(e, (t || this).context);
  return i && i.range ? i.range() : [];
}
function _Z(e, t, i) {
  const n = Zn(e, (i || this).context);
  return n ? n(t) : void 0;
}
function xZ(e, t, i, n, a) {
  e = Zn(e, (a || this).context);
  const o = LF(t, i);
  let r = e.domain(), s = r[0], l = Eo(r), d = kx;
  return l - s ? d = kE(e, s, l) : e = (e.interpolator ? af("sequential")().interpolator(e.interpolator()) : af("linear")().interpolate(e.interpolate()).range(e.range())).domain([s = 0, l = 1]), e.ticks && (r = e.ticks(+n || 15), s !== r[0] && r.unshift(s), l !== Eo(r) && r.push(l)), r.forEach((f) => o.stop(d(f), e(f))), o;
}
function wZ(e, t, i) {
  const n = Zn(e, (i || this).context);
  return function(a) {
    return n ? n.path.context(a)(t) : "";
  };
}
function $Z(e) {
  let t = null;
  return function(i) {
    return i ? gf(i, t = t || Ks(e)) : e;
  };
}
const OR = (e) => e.data;
function ER(e, t) {
  const i = xR.call(t, e);
  return i.root && i.root.lookup || {};
}
function kZ(e, t, i) {
  const n = ER(e, this), a = n[t], o = n[i];
  return a && o ? a.path(o).map(OR) : void 0;
}
function AZ(e, t) {
  const i = ER(e, this)[t];
  return i ? i.ancestors().map(OR) : void 0;
}
const DR = () => typeof window < "u" && window || null;
function OZ() {
  const e = DR();
  return e ? e.screen : {};
}
function EZ() {
  const e = DR();
  return e ? [e.innerWidth, e.innerHeight] : [void 0, void 0];
}
function DZ() {
  const e = this.context.dataflow, t = e.container && e.container();
  return t ? [t.clientWidth, t.clientHeight] : [void 0, void 0];
}
function SR(e, t, i) {
  if (!e) return [];
  const [n, a] = e, o = new it().set(n[0], n[1], a[0], a[1]), r = i || this.context.dataflow.scenegraph().root;
  return PT(r, o, SZ(t));
}
function SZ(e) {
  let t = null;
  if (e) {
    const i = Xh(e.marktype), n = Xh(e.markname);
    t = (a) => (!i.length || i.some((o) => a.marktype === o)) && (!n.length || n.some((o) => a.name === o));
  }
  return t;
}
function FZ(e, t, i) {
  let n = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : 5;
  e = Xh(e);
  const a = e[e.length - 1];
  return a === void 0 || Math.hypot(a[0] - t, a[1] - i) > n ? [...e, [t, i]] : e;
}
function TZ(e) {
  return Xh(e).reduce((t, i, n) => {
    let [a, o] = i;
    return t += n == 0 ? `M ${a},${o} ` : n === e.length - 1 ? " Z" : `L ${a},${o} `;
  }, "");
}
function CZ(e, t, i) {
  const {
    x: n,
    y: a,
    mark: o
  } = i, r = new it().set(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER);
  for (const [l, d] of t)
    l < r.x1 && (r.x1 = l), l > r.x2 && (r.x2 = l), d < r.y1 && (r.y1 = d), d > r.y2 && (r.y2 = d);
  return r.translate(n, a), SR([[r.x1, r.y1], [r.x2, r.y2]], e, o).filter((l) => RZ(l.x, l.y, t));
}
function RZ(e, t, i) {
  let n = 0;
  for (let a = 0, o = i.length - 1; a < i.length; o = a++) {
    const [r, s] = i[o], [l, d] = i[a];
    d > t != s > t && e < (r - l) * (t - d) / (s - d) + l && n++;
  }
  return n & 1;
}
const Of = {
  random() {
    return Op();
  },
  // override default
  cumulativeNormal: GE,
  cumulativeLogNormal: HE,
  cumulativeUniform: YE,
  densityNormal: XE,
  densityLogNormal: JE,
  densityUniform: ZE,
  quantileNormal: KE,
  quantileLogNormal: QE,
  quantileUniform: eD,
  sampleNormal: tD,
  sampleLogNormal: iD,
  sampleUniform: nD,
  isArray: Ra,
  isBoolean: IY,
  isDate: lR,
  isDefined(e) {
    return e !== void 0;
  },
  isNumber: dR,
  isObject: Hh,
  isRegExp: jY,
  isString: zl,
  isTuple: jp,
  isValid(e) {
    return e != null && e === e;
  },
  toBoolean: qY,
  toDate(e) {
    return BY(e);
  },
  // suppress extra arguments
  toNumber: Ax,
  toString: UY,
  indexof: dZ,
  join: lZ,
  lastindexof: fZ,
  replace: cZ,
  reverse: hZ,
  slice: uZ,
  flush: CY,
  lerp: zY,
  merge: iZ,
  pad: PY,
  peek: Eo,
  pluck: sZ,
  span: NY,
  inrange: RY,
  truncate: MY,
  rgb: ah,
  lab: eN,
  hcl: tN,
  hsl: iN,
  luminance: ev,
  contrast: tZ,
  sequence: Pi,
  format: jJ,
  utcFormat: zJ,
  utcParse: NJ,
  utcOffset: aD,
  utcSequence: oD,
  timeFormat: wR,
  timeParse: PJ,
  timeOffset: rD,
  timeSequence: sD,
  timeUnitSpecifier: lD,
  monthFormat: qJ,
  monthAbbrevFormat: LJ,
  dayFormat: BJ,
  dayAbbrevFormat: UJ,
  quarter: EY,
  utcquarter: DY,
  week: dD,
  utcweek: fD,
  dayofyear: uD,
  utcdayofyear: cD,
  warn: KJ,
  info: QJ,
  debug: eZ,
  extent(e) {
    return FY(e);
  },
  // suppress extra arguments
  inScope: ZJ,
  intersect: SR,
  clampRange: SY,
  pinchDistance: oZ,
  pinchAngle: rZ,
  screen: OZ,
  containerSize: DZ,
  windowSize: EZ,
  bandspace: pZ,
  setdata: RJ,
  pathShape: $Z,
  panLinear: vY,
  panLog: _Y,
  panPow: xY,
  panSymlog: wY,
  zoomLinear: $Y,
  zoomLog: kY,
  zoomPow: AY,
  zoomSymlog: OY,
  encode: IJ,
  modify: aZ,
  lassoAppend: FZ,
  lassoPath: TZ,
  intersectLasso: CZ
}, IZ = ["view", "item", "group", "xy", "x", "y"], jZ = "event.vega.", FR = "this.", Nx = {}, TR = {
  forbidden: ["_"],
  allowed: ["datum", "event", "item"],
  fieldvar: "datum",
  globalvar: (e) => `_[${wf($R + e)}]`,
  functions: zZ,
  constants: bR,
  visitors: Nx
}, tv = KX(TR);
function zZ(e) {
  const t = yR(e);
  IZ.forEach((i) => t[i] = jZ + i);
  for (const i in Of)
    t[i] = FR + i;
  return Ox(t, GJ(e, Of, Nx)), t;
}
function Qe(e, t, i) {
  return arguments.length === 1 ? Of[e] : (Of[e] = t, i && (Nx[e] = i), tv && (tv.functions[e] = FR + e), this);
}
Qe("bandwidth", gZ, ti);
Qe("copy", mZ, ti);
Qe("domain", bZ, ti);
Qe("range", vZ, ti);
Qe("invert", yZ, ti);
Qe("scale", _Z, ti);
Qe("gradient", xZ, ti);
Qe("geoArea", HJ, ti);
Qe("geoBounds", YJ, ti);
Qe("geoCentroid", XJ, ti);
Qe("geoShape", wZ, ti);
Qe("geoScale", JJ, ti);
Qe("indata", CJ, WJ);
Qe("data", xR, Rx);
Qe("treePath", kZ, Rx);
Qe("treeAncestors", AZ, Rx);
Qe("vlSelectionTest", kJ, Cx);
Qe("vlSelectionIdTest", EJ, Cx);
Qe("vlSelectionResolve", SJ, Cx);
Qe("vlSelectionTuples", DJ);
function Bn(e, t) {
  const i = {};
  let n;
  try {
    e = zl(e) ? e : wf(e) + "", n = JX(e);
  } catch {
    Ct("Expression parse error: " + e);
  }
  n.visit((o) => {
    if (o.type !== fR) return;
    const r = o.callee.name, s = TR.visitors[r];
    s && s(r, o.arguments, t, i);
  });
  const a = tv(n);
  return a.globals.forEach((o) => {
    const r = $R + o;
    !co(i, r) && t.getSignal(o) && (i[r] = t.signalRef(o));
  }), {
    $expr: Ox({
      code: a.code
    }, t.options.ast ? {
      ast: n
    } : null),
    $fields: a.fields,
    $params: i
  };
}
function Kn(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function PZ(e) {
  return e == null ? null : e.fields;
}
function CR(e) {
  return e.length === 1 ? NZ(e[0]) : qZ(e);
}
const NZ = (e) => function(t) {
  return t[e];
}, qZ = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Dr(e) {
  throw Error(e);
}
function RR(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Dr("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Dr("Access path missing closing bracket: " + e), n && Dr("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function qx(e, t, i) {
  const n = RR(e);
  return e = n.length === 1 ? n[0] : e, Kn((i && i.get || CR)(n), [e], t || e);
}
qx("id");
Kn((e) => e, [], "identity");
Kn(() => 0, [], "zero");
Kn(() => 1, [], "one");
const LZ = Kn(() => !0, [], "true");
Kn(() => !1, [], "false");
var Lx = Array.isArray;
function Bx(e) {
  return e === Object(e);
}
function Ef(e) {
  return e != null ? Lx(e) ? e : [e] : [];
}
function BZ(e) {
  return typeof e == "function";
}
const UZ = "descending";
function MZ(e, t, i) {
  i = i || {}, t = Ef(t) || [];
  const n = [], a = [], o = {}, r = i.comparator || VZ;
  return Ef(e).forEach((s, l) => {
    s != null && (n.push(t[l] === UZ ? -1 : 1), a.push(s = BZ(s) ? s : qx(s, null, i)), (PZ(s) || []).forEach((d) => o[d] = 1));
  }), a.length === 0 ? null : Kn(r(a, n), Object.keys(o));
}
const IR = (e, t) => (e < t || e == null) && t != null ? -1 : (e > t || t == null) && e != null ? 1 : (t = t instanceof Date ? +t : t, (e = e instanceof Date ? +e : e) !== e && t === t ? -1 : t !== t && e === e ? 1 : 0), VZ = (e, t) => e.length === 1 ? WZ(e[0], t[0]) : GZ(e, t, e.length), WZ = (e, t) => function(i, n) {
  return IR(e(i), e(n)) * t;
}, GZ = (e, t, i) => (t.push(0), function(n, a) {
  let o, r = 0, s = -1;
  for (; r === 0 && ++s < i; )
    o = e[s], r = IR(o(n), o(a));
  return r * t[s];
}), HZ = Object.prototype.hasOwnProperty;
function YZ(e, t) {
  return HZ.call(e, t);
}
function XZ(e) {
  return typeof e == "string";
}
function JZ(e, t, i) {
  e && (e = t ? Ef(e).map((s) => s.replace(/\\(.)/g, "$1")) : Ef(e));
  const n = e && e.length, a = i && i.get || CR, o = (s) => a(t ? [s] : RR(s));
  let r;
  if (!n)
    r = function() {
      return "";
    };
  else if (n === 1) {
    const s = o(e[0]);
    r = function(l) {
      return "" + s(l);
    };
  } else {
    const s = e.map(o);
    r = function(l) {
      let d = "" + s[0](l), f = 0;
      for (; ++f < n; ) d += "|" + s[f](l);
      return d;
    };
  }
  return Kn(r, e, "key");
}
function iv(e) {
  return Lx(e) ? "[" + e.map(iv) + "]" : Bx(e) || XZ(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function jR(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
function ZZ(e) {
  const t = this, i = e.operators || [];
  return e.background && (t.background = e.background), e.eventConfig && (t.eventConfig = e.eventConfig), e.locale && (t.locale = e.locale), i.forEach((n) => t.parseOperator(n)), i.forEach((n) => t.parseOperatorParameters(n)), (e.streams || []).forEach((n) => t.parseStream(n)), (e.updates || []).forEach((n) => t.parseUpdate(n)), t.resolve();
}
const KZ = jR(["rule"]), EA = jR(["group", "image", "rect"]);
function QZ(e, t) {
  let i = "";
  return KZ[t] || (e.x2 && (e.x ? (EA[t] && (i += "if(o.x>o.x2)$=o.x,o.x=o.x2,o.x2=$;"), i += "o.width=o.x2-o.x;") : i += "o.x=o.x2-(o.width||0);"), e.xc && (i += "o.x=o.xc-(o.width||0)/2;"), e.y2 && (e.y ? (EA[t] && (i += "if(o.y>o.y2)$=o.y,o.y=o.y2,o.y2=$;"), i += "o.height=o.y2-o.y;") : i += "o.y=o.y2-(o.height||0);"), e.yc && (i += "o.y=o.yc-(o.height||0)/2;")), i;
}
function Ux(e) {
  return (e + "").toLowerCase();
}
function eK(e) {
  return Ux(e) === "operator";
}
function tK(e) {
  return Ux(e) === "collect";
}
function fd(e, t, i) {
  i.endsWith(";") || (i = "return(" + i + ");");
  const n = Function(...t.concat(i));
  return e && e.functions ? n.bind(e.functions) : n;
}
function iK(e, t, i, n) {
  return `((u = ${e}) < (v = ${t}) || u == null) && v != null ? ${i}
  : (u > v || v == null) && u != null ? ${n}
  : ((v = v instanceof Date ? +v : v), (u = u instanceof Date ? +u : u)) !== u && v === v ? ${i}
  : v !== v && u === u ? ${n} : `;
}
var nK = {
  /**
   * Parse an expression used to update an operator value.
   */
  operator: (e, t) => fd(e, ["_"], t.code),
  /**
   * Parse an expression provided as an operator parameter value.
   */
  parameter: (e, t) => fd(e, ["datum", "_"], t.code),
  /**
   * Parse an expression applied to an event stream.
   */
  event: (e, t) => fd(e, ["event"], t.code),
  /**
   * Parse an expression used to handle an event-driven operator update.
   */
  handler: (e, t) => {
    const i = `var datum=event.item&&event.item.datum;return ${t.code};`;
    return fd(e, ["_", "event"], i);
  },
  /**
   * Parse an expression that performs visual encoding.
   */
  encode: (e, t) => {
    const {
      marktype: i,
      channels: n
    } = t;
    let a = "var o=item,datum=o.datum,m=0,$;";
    for (const o in n) {
      const r = "o[" + iv(o) + "]";
      a += `$=${n[o].code};if(${r}!==$)${r}=$,m=1;`;
    }
    return a += QZ(n, i), a += "return m;", fd(e, ["item", "_"], a);
  },
  /**
   * Optimized code generators for access and comparison.
   */
  codegen: {
    get(e) {
      const t = `[${e.map(iv).join("][")}]`, i = Function("_", `return _${t};`);
      return i.path = t, i;
    },
    comparator(e, t) {
      let i;
      const n = (o, r) => {
        const s = t[r];
        let l, d;
        return o.path ? (l = `a${o.path}`, d = `b${o.path}`) : ((i = i || {})["f" + r] = o, l = `this.f${r}(a)`, d = `this.f${r}(b)`), iK(l, d, -s, s);
      }, a = Function("a", "b", "var u, v; return " + e.map(n).join("") + "0;");
      return i ? a.bind(i) : a;
    }
  }
};
function aK(e) {
  const t = this;
  eK(e.type) || !e.type ? t.operator(e, e.update ? t.operatorExpression(e.update) : null) : t.transform(e, e.type);
}
function oK(e) {
  const t = this;
  if (e.params) {
    const i = t.get(e.id);
    i || Dr("Invalid operator id: " + e.id), t.dataflow.connect(i, i.parameters(t.parseParameters(e.params), e.react, e.initonly));
  }
}
function rK(e, t) {
  t = t || {};
  const i = this;
  for (const n in e) {
    const a = e[n];
    t[n] = Lx(a) ? a.map((o) => DA(o, i, t)) : DA(a, i, t);
  }
  return t;
}
function DA(e, t, i) {
  if (!e || !Bx(e)) return e;
  for (let n = 0, a = SA.length, o; n < a; ++n)
    if (o = SA[n], YZ(e, o.key))
      return o.parse(e, t, i);
  return e;
}
var SA = [{
  key: "$ref",
  parse: sK
}, {
  key: "$key",
  parse: dK
}, {
  key: "$expr",
  parse: lK
}, {
  key: "$field",
  parse: fK
}, {
  key: "$encode",
  parse: cK
}, {
  key: "$compare",
  parse: uK
}, {
  key: "$context",
  parse: hK
}, {
  key: "$subflow",
  parse: pK
}, {
  key: "$tupleid",
  parse: gK
}];
function sK(e, t) {
  return t.get(e.$ref) || Dr("Operator not defined: " + e.$ref);
}
function lK(e, t, i) {
  e.$params && t.parseParameters(e.$params, i);
  const n = "e:" + e.$expr.code;
  return t.fn[n] || (t.fn[n] = Kn(t.parameterExpression(e.$expr), e.$fields));
}
function dK(e, t) {
  const i = "k:" + e.$key + "_" + !!e.$flat;
  return t.fn[i] || (t.fn[i] = JZ(e.$key, e.$flat, t.expr.codegen));
}
function fK(e, t) {
  if (!e.$field) return null;
  const i = "f:" + e.$field + "_" + e.$name;
  return t.fn[i] || (t.fn[i] = qx(e.$field, e.$name, t.expr.codegen));
}
function uK(e, t) {
  const i = "c:" + e.$compare + "_" + e.$order, n = Ef(e.$compare).map((a) => a && a.$tupleid ? Z : a);
  return t.fn[i] || (t.fn[i] = MZ(n, e.$order, t.expr.codegen));
}
function cK(e, t) {
  const i = e.$encode, n = {};
  for (const a in i) {
    const o = i[a];
    n[a] = Kn(t.encodeExpression(o.$expr), o.$fields), n[a].output = o.$output;
  }
  return n;
}
function hK(e, t) {
  return t;
}
function pK(e, t) {
  const i = e.$subflow;
  return function(n, a, o) {
    const r = t.fork().parse(i), s = r.get(i.operators[0].id), l = r.signals.parent;
    return l && l.set(o), s.detachSubflow = () => t.detach(r), s;
  };
}
function gK() {
  return Z;
}
function mK(e) {
  var t = this, i = e.filter != null ? t.eventExpression(e.filter) : void 0, n = e.stream != null ? t.get(e.stream) : void 0, a;
  e.source ? n = t.events(e.source, e.type, i) : e.merge && (a = e.merge.map((o) => t.get(o)), n = a[0].merge.apply(a[0], a.slice(1))), e.between && (a = e.between.map((o) => t.get(o)), n = n.between(a[0], a[1])), e.filter && (n = n.filter(i)), e.throttle != null && (n = n.throttle(+e.throttle)), e.debounce != null && (n = n.debounce(+e.debounce)), n == null && Dr("Invalid stream definition: " + JSON.stringify(e)), e.consume && n.consume(!0), t.stream(e, n);
}
function bK(e) {
  var t = this, i = Bx(i = e.source) ? i.$ref : i, n = t.get(i), a = null, o = e.update, r = void 0;
  n || Dr("Source not defined: " + e.source), a = e.target && e.target.$expr ? t.eventExpression(e.target.$expr) : t.get(e.target), o && o.$expr && (o.$params && (r = t.parseParameters(o.$params)), o = t.handlerExpression(o.$expr)), t.update(e, n, a, o, r);
}
const yK = {
  skip: !0
};
function vK(e) {
  var t = this, i = {};
  if (e.signals) {
    var n = i.signals = {};
    Object.keys(t.signals).forEach((o) => {
      const r = t.signals[o];
      e.signals(o, r) && (n[o] = r.value);
    });
  }
  if (e.data) {
    var a = i.data = {};
    Object.keys(t.data).forEach((o) => {
      const r = t.data[o];
      e.data(o, r) && (a[o] = r.input.value);
    });
  }
  return t.subcontext && e.recurse !== !1 && (i.subcontext = t.subcontext.map((o) => o.getState(e))), i;
}
function _K(e) {
  var t = this, i = t.dataflow, n = e.data, a = e.signals;
  Object.keys(a || {}).forEach((o) => {
    i.update(t.signals[o], a[o], yK);
  }), Object.keys(n || {}).forEach((o) => {
    i.pulse(t.data[o].input, i.changeset().remove(LZ).insert(n[o]));
  }), (e.subcontext || []).forEach((o, r) => {
    const s = t.subcontext[r];
    s && s.setState(o);
  });
}
function zR(e, t, i, n) {
  return new PR(e, t, i, n);
}
function PR(e, t, i, n) {
  this.dataflow = e, this.transforms = t, this.events = e.events.bind(e), this.expr = n || nK, this.signals = {}, this.scales = {}, this.nodes = {}, this.data = {}, this.fn = {}, i && (this.functions = Object.create(i), this.functions.context = this);
}
function FA(e) {
  this.dataflow = e.dataflow, this.transforms = e.transforms, this.events = e.events, this.expr = e.expr, this.signals = Object.create(e.signals), this.scales = Object.create(e.scales), this.nodes = Object.create(e.nodes), this.data = Object.create(e.data), this.fn = Object.create(e.fn), e.functions && (this.functions = Object.create(e.functions), this.functions.context = this);
}
PR.prototype = FA.prototype = {
  fork() {
    const e = new FA(this);
    return (this.subcontext || (this.subcontext = [])).push(e), e;
  },
  detach(e) {
    this.subcontext = this.subcontext.filter((i) => i !== e);
    const t = Object.keys(e.nodes);
    for (const i of t) e.nodes[i]._targets = null;
    for (const i of t) e.nodes[i].detach();
    e.nodes = null;
  },
  get(e) {
    return this.nodes[e];
  },
  set(e, t) {
    return this.nodes[e] = t;
  },
  add(e, t) {
    const i = this, n = i.dataflow, a = e.value;
    if (i.set(e.id, t), tK(e.type) && a && (a.$ingest ? n.ingest(t, a.$ingest, a.$format) : a.$request ? n.preload(t, a.$request, a.$format) : n.pulse(t, n.changeset().insert(a))), e.root && (i.root = t), e.parent) {
      let o = i.get(e.parent.$ref);
      o ? (n.connect(o, [t]), t.targets().add(o)) : (i.unresolved = i.unresolved || []).push(() => {
        o = i.get(e.parent.$ref), n.connect(o, [t]), t.targets().add(o);
      });
    }
    if (e.signal && (i.signals[e.signal] = t), e.scale && (i.scales[e.scale] = t), e.data)
      for (const o in e.data) {
        const r = i.data[o] || (i.data[o] = {});
        e.data[o].forEach((s) => r[s] = t);
      }
  },
  resolve() {
    return (this.unresolved || []).forEach((e) => e()), delete this.unresolved, this;
  },
  operator(e, t) {
    this.add(e, this.dataflow.add(e.value, t));
  },
  transform(e, t) {
    this.add(e, this.dataflow.add(this.transforms[Ux(t)]));
  },
  stream(e, t) {
    this.set(e.id, t);
  },
  update(e, t, i, n, a) {
    this.dataflow.on(t, i, n, a, e.options);
  },
  // expression parsing
  operatorExpression(e) {
    return this.expr.operator(this, e);
  },
  parameterExpression(e) {
    return this.expr.parameter(this, e);
  },
  eventExpression(e) {
    return this.expr.event(this, e);
  },
  handlerExpression(e) {
    return this.expr.handler(this, e);
  },
  encodeExpression(e) {
    return this.expr.encode(this, e);
  },
  // parse methods
  parse: ZZ,
  parseOperator: aK,
  parseOperatorParameters: oK,
  parseParameters: rK,
  parseStream: mK,
  parseUpdate: bK,
  // state methods
  getState: vK,
  setState: _K
};
function xK(e) {
  const t = e.container();
  t && (t.setAttribute("role", "graphics-document"), t.setAttribute("aria-roleDescription", "visualization"), NR(t, e.description()));
}
function NR(e, t) {
  e && (t == null ? e.removeAttribute("aria-label") : e.setAttribute("aria-label", t));
}
function wK(e) {
  e.add(null, (t) => (e._background = t.bg, e._resize = 1, t.bg), {
    bg: e._signals.background
  });
}
const gb = "default";
function $K(e) {
  const t = e._signals.cursor || (e._signals.cursor = e.add({
    user: gb,
    item: null
  }));
  e.on(e.events("view", "pointermove"), t, (i, n) => {
    const a = t.value, o = a ? Gh(a) ? a : a.user : gb, r = n.item && n.item.cursor || null;
    return a && o === a.user && r == a.item ? a : {
      user: o,
      item: r
    };
  }), e.add(null, function(i) {
    let n = i.cursor, a = this.value;
    return Gh(n) || (a = n.item, n = n.user), nv(e, n && n !== gb ? n : a || n), a;
  }, {
    cursor: t
  });
}
function nv(e, t) {
  const i = e.globalCursor() ? typeof document < "u" && document.body : e.container();
  if (i)
    return t == null ? i.style.removeProperty("cursor") : i.style.cursor = t;
}
function Qh(e, t) {
  var i = e._runtime.data;
  return $x(i, t) || jn("Unrecognized data set: " + t), i[t];
}
function kK(e, t) {
  return arguments.length < 2 ? Qh(this, e).values.value : cg.call(this, e, ns().remove(lY).insert(t));
}
function cg(e, t) {
  TS(t) || jn("Second argument to changes must be a changeset.");
  const i = Qh(this, e);
  return i.modified = !0, this.pulse(i.input, t);
}
function AK(e, t) {
  return cg.call(this, e, ns().insert(t));
}
function OK(e, t) {
  return cg.call(this, e, ns().remove(t));
}
function qR(e) {
  var t = e.padding();
  return Math.max(0, e._viewWidth + t.left + t.right);
}
function LR(e) {
  var t = e.padding();
  return Math.max(0, e._viewHeight + t.top + t.bottom);
}
function hg(e) {
  var t = e.padding(), i = e._origin;
  return [t.left + i[0], t.top + i[1]];
}
function EK(e) {
  var t = hg(e), i = qR(e), n = LR(e);
  e._renderer.background(e.background()), e._renderer.resize(i, n, t), e._handler.origin(t), e._resizeListeners.forEach((a) => {
    try {
      a(i, n);
    } catch (o) {
      e.error(o);
    }
  });
}
function DK(e, t, i) {
  var n = e._renderer, a = n && n.canvas(), o, r, s;
  return a && (s = hg(e), r = t.changedTouches ? t.changedTouches[0] : t, o = Qp(r, a), o[0] -= s[0], o[1] -= s[1]), t.dataflow = e, t.item = i, t.vega = SK(e, i, o), t;
}
function SK(e, t, i) {
  const n = t ? t.mark.marktype === "group" ? t : t.mark.group : null;
  function a(r) {
    var s = n, l;
    if (r) {
      for (l = t; l; l = l.mark.group)
        if (l.mark.name === r) {
          s = l;
          break;
        }
    }
    return s && s.mark && s.mark.interactive ? s : {};
  }
  function o(r) {
    if (!r) return i;
    Gh(r) && (r = a(r));
    const s = i.slice();
    for (; r; )
      s[0] -= r.x || 0, s[1] -= r.y || 0, r = r.mark && r.mark.group;
    return s;
  }
  return {
    view: dA(e),
    item: dA(t || {}),
    group: a,
    xy: o,
    x: (r) => o(r)[0],
    y: (r) => o(r)[1]
  };
}
const TA = "view", FK = "timer", TK = "window", CK = {
  trap: !1
};
function RK(e) {
  const t = Wh({
    defaults: {}
  }, e), i = (n, a) => {
    a.forEach((o) => {
      as(n[o]) && (n[o] = pY(n[o]));
    });
  };
  return i(t.defaults, ["prevent", "allow"]), i(t, ["view", "window", "selector"]), t;
}
function BR(e, t, i, n) {
  e._eventListeners.push({
    type: i,
    sources: dY(t),
    handler: n
  });
}
function IK(e, t) {
  var i = e._eventConfig.defaults, n = i.prevent, a = i.allow;
  return n === !1 || a === !0 ? !1 : n === !0 || a === !1 ? !0 : n ? n[t] : a ? !a[t] : e.preventDefault();
}
function rc(e, t, i) {
  const n = e._eventConfig && e._eventConfig[t];
  return n === !1 || lu(n) && !n[i] ? (e.warn(`Blocked ${t} ${i} event listener.`), !1) : !0;
}
function jK(e, t, i) {
  var n = this, a = new Np(i), o = function(d, f) {
    n.runAsync(null, () => {
      e === TA && IK(n, t) && d.preventDefault(), a.receive(DK(n, d, f));
    });
  }, r;
  if (e === FK)
    rc(n, "timer", t) && n.timer(o, t);
  else if (e === TA)
    rc(n, "view", t) && n.addEventListener(t, o, CK);
  else if (e === TK ? rc(n, "window", t) && typeof window < "u" && (r = [window]) : typeof document < "u" && rc(n, "selector", t) && (r = Array.from(document.querySelectorAll(e))), !r)
    n.warn("Can not resolve event source: " + e);
  else {
    for (var s = 0, l = r.length; s < l; ++s)
      r[s].addEventListener(t, o);
    BR(n, r, t, o);
  }
  return a;
}
function CA(e) {
  return e.item;
}
function RA(e) {
  return e.item.mark.source;
}
function IA(e) {
  return function(t, i) {
    return i.vega.view().changeset().encode(i.item, e);
  };
}
function zK(e, t) {
  return e = [e || "hover"], t = [t || "update", e[0]], this.on(this.events("view", "pointerover", CA), RA, IA(e)), this.on(this.events("view", "pointerout", CA), RA, IA(t)), this;
}
function PK() {
  var e = this._tooltip, t = this._timers, i = this._handler.handlers(), n = this._eventListeners, a, o, r, s, l;
  for (a = t.length; --a >= 0; )
    t[a].stop();
  for (a = n.length; --a >= 0; )
    for (r = n[a], o = r.sources.length; --o >= 0; )
      r.sources[o].removeEventListener(r.type, r.handler);
  for (e && e.call(this, this._handler, null, null, null), a = i.length; --a >= 0; )
    l = i[a].type, s = i[a].handler, this._handler.off(l, s);
  return this;
}
function Ai(e, t, i) {
  const n = document.createElement(e);
  for (const a in t) n.setAttribute(a, t[a]);
  return i != null && (n.textContent = i), n;
}
const NK = "vega-bind", qK = "vega-bind-name", LK = "vega-bind-radio";
function BK(e, t, i) {
  if (!t) return;
  const n = i.param;
  let a = i.state;
  return a || (a = i.state = {
    elements: null,
    active: !1,
    set: null,
    update: (r) => {
      r != e.signal(n.signal) && e.runAsync(null, () => {
        a.source = !0, e.signal(n.signal, r);
      });
    }
  }, n.debounce && (a.update = uY(n.debounce, a.update))), (n.input == null && n.element ? UK : VK)(a, t, n, e), a.active || (e.on(e._signals[n.signal], null, () => {
    a.source ? a.source = !1 : a.set(e.signal(n.signal));
  }), a.active = !0), a;
}
function UK(e, t, i, n) {
  const a = i.event || "input", o = () => e.update(t.value);
  n.signal(i.signal, t.value), t.addEventListener(a, o), BR(n, t, a, o), e.set = (r) => {
    t.value = r, t.dispatchEvent(MK(a));
  };
}
function MK(e) {
  return typeof Event < "u" ? new Event(e) : {
    type: e
  };
}
function VK(e, t, i, n) {
  const a = n.signal(i.signal), o = Ai("div", {
    class: NK
  }), r = i.input === "radio" ? o : o.appendChild(Ai("label"));
  r.appendChild(Ai("span", {
    class: qK
  }, i.name || i.signal)), t.appendChild(o);
  let s = WK;
  switch (i.input) {
    case "checkbox":
      s = GK;
      break;
    case "select":
      s = HK;
      break;
    case "radio":
      s = YK;
      break;
    case "range":
      s = XK;
      break;
  }
  s(e, r, i, a);
}
function WK(e, t, i, n) {
  const a = Ai("input");
  for (const o in i)
    o !== "signal" && o !== "element" && a.setAttribute(o === "input" ? "type" : o, i[o]);
  a.setAttribute("name", i.signal), a.value = n, t.appendChild(a), a.addEventListener("input", () => e.update(a.value)), e.elements = [a], e.set = (o) => a.value = o;
}
function GK(e, t, i, n) {
  const a = {
    type: "checkbox",
    name: i.signal
  };
  n && (a.checked = !0);
  const o = Ai("input", a);
  t.appendChild(o), o.addEventListener("change", () => e.update(o.checked)), e.elements = [o], e.set = (r) => o.checked = !!r || null;
}
function HK(e, t, i, n) {
  const a = Ai("select", {
    name: i.signal
  }), o = i.labels || [];
  i.options.forEach((r, s) => {
    const l = {
      value: r
    };
    ep(r, n) && (l.selected = !0), a.appendChild(Ai("option", l, (o[s] || r) + ""));
  }), t.appendChild(a), a.addEventListener("change", () => {
    e.update(i.options[a.selectedIndex]);
  }), e.elements = [a], e.set = (r) => {
    for (let s = 0, l = i.options.length; s < l; ++s)
      if (ep(i.options[s], r)) {
        a.selectedIndex = s;
        return;
      }
  };
}
function YK(e, t, i, n) {
  const a = Ai("span", {
    class: LK
  }), o = i.labels || [];
  t.appendChild(a), e.elements = i.options.map((r, s) => {
    const l = {
      type: "radio",
      name: i.signal,
      value: r
    };
    ep(r, n) && (l.checked = !0);
    const d = Ai("input", l);
    d.addEventListener("change", () => e.update(r));
    const f = Ai("label", {}, (o[s] || r) + "");
    return f.prepend(d), a.appendChild(f), d;
  }), e.set = (r) => {
    const s = e.elements, l = s.length;
    for (let d = 0; d < l; ++d)
      ep(s[d].value, r) && (s[d].checked = !0);
  };
}
function XK(e, t, i, n) {
  n = n !== void 0 ? n : (+i.max + +i.min) / 2;
  const a = i.max != null ? i.max : Math.max(100, +n) || 100, o = i.min || Math.min(0, a, +n) || 0, r = i.step || Hv(o, a, 100), s = Ai("input", {
    type: "range",
    name: i.signal,
    min: o,
    max: a,
    step: r
  });
  s.value = n;
  const l = Ai("span", {}, +n);
  t.appendChild(s), t.appendChild(l);
  const d = () => {
    l.textContent = s.value, e.update(+s.value);
  };
  s.addEventListener("input", d), s.addEventListener("change", d), e.elements = [s], e.set = (f) => {
    s.value = f, l.textContent = f;
  };
}
function ep(e, t) {
  return e === t || e + "" == t + "";
}
function UR(e, t, i, n, a, o) {
  return t = t || new n(e.loader()), t.initialize(i, qR(e), LR(e), hg(e), a, o).background(e.background());
}
function Mx(e, t) {
  return t ? function() {
    try {
      t.apply(this, arguments);
    } catch (i) {
      e.error(i);
    }
  } : null;
}
function JK(e, t, i, n) {
  const a = new n(e.loader(), Mx(e, e.tooltip())).scene(e.scenegraph().root).initialize(i, hg(e), e);
  return t && t.handlers().forEach((o) => {
    a.on(o.type, o.handler);
  }), a;
}
function ZK(e, t) {
  const i = this, n = i._renderType, a = i._eventConfig.bind, o = eg(n);
  e = i._el = e ? mb(i, e, !0) : null, xK(i), o || i.error("Unrecognized renderer type: " + n);
  const r = o.handler || au, s = e ? o.renderer : o.headless;
  return i._renderer = s ? UR(i, i._renderer, e, s) : null, i._handler = JK(i, i._handler, e, r), i._redraw = !0, e && a !== "none" && (t = t ? i._elBind = mb(i, t, !0) : e.appendChild(Ai("form", {
    class: "vega-bindings"
  })), i._bind.forEach((l) => {
    l.param.element && a !== "container" && (l.element = mb(i, l.param.element, !!l.param.input));
  }), i._bind.forEach((l) => {
    BK(i, l.element || t, l);
  })), i;
}
function mb(e, t, i) {
  if (typeof t == "string")
    if (typeof document < "u") {
      if (t = document.querySelector(t), !t)
        return e.error("Signal bind element not found: " + t), null;
    } else
      return e.error("DOM document instance not found."), null;
  if (t && i)
    try {
      t.textContent = "";
    } catch (n) {
      t = null, e.error(n);
    }
  return t;
}
const ud = (e) => +e || 0, KK = (e) => ({
  top: e,
  bottom: e,
  left: e,
  right: e
});
function jA(e) {
  return lu(e) ? {
    top: ud(e.top),
    bottom: ud(e.bottom),
    left: ud(e.left),
    right: ud(e.right)
  } : KK(ud(e));
}
async function Vx(e, t, i, n) {
  const a = eg(t), o = a && a.headless;
  return o || jn("Unrecognized renderer type: " + t), await e.runAsync(), UR(e, null, null, o, i, n).renderAsync(e._scenegraph.root);
}
async function QK(e, t) {
  e !== ro.Canvas && e !== ro.SVG && e !== ro.PNG && jn("Unrecognized image type: " + e);
  const i = await Vx(this, e, t);
  return e === ro.SVG ? eQ(i.svg(), "image/svg+xml") : i.canvas().toDataURL("image/png");
}
function eQ(e, t) {
  const i = new Blob([e], {
    type: t
  });
  return window.URL.createObjectURL(i);
}
async function tQ(e, t) {
  return (await Vx(this, ro.Canvas, e, t)).canvas();
}
async function iQ(e) {
  return (await Vx(this, ro.SVG, e)).svg();
}
function nQ(e, t, i) {
  return zR(e, Js, Of, i).parse(t);
}
function aQ(e) {
  var t = this._runtime.scales;
  return $x(t, e) || jn("Unrecognized scale or projection: " + e), t[e].value;
}
var MR = "width", VR = "height", Wx = "padding", zA = {
  skip: !0
};
function WR(e, t) {
  var i = e.autosize(), n = e.padding();
  return t - (i && i.contains === Wx ? n.left + n.right : 0);
}
function GR(e, t) {
  var i = e.autosize(), n = e.padding();
  return t - (i && i.contains === Wx ? n.top + n.bottom : 0);
}
function oQ(e) {
  var t = e._signals, i = t[MR], n = t[VR], a = t[Wx];
  function o() {
    e._autosize = e._resize = 1;
  }
  e._resizeWidth = e.add(null, (s) => {
    e._width = s.size, e._viewWidth = WR(e, s.size), o();
  }, {
    size: i
  }), e._resizeHeight = e.add(null, (s) => {
    e._height = s.size, e._viewHeight = GR(e, s.size), o();
  }, {
    size: n
  });
  const r = e.add(null, o, {
    pad: a
  });
  e._resizeWidth.rank = i.rank + 1, e._resizeHeight.rank = n.rank + 1, r.rank = a.rank + 1;
}
function rQ(e, t, i, n, a, o) {
  this.runAfter((r) => {
    let s = 0;
    r._autosize = 0, r.width() !== i && (s = 1, r.signal(MR, i, zA), r._resizeWidth.skip(!0)), r.height() !== n && (s = 1, r.signal(VR, n, zA), r._resizeHeight.skip(!0)), r._viewWidth !== e && (r._resize = 1, r._viewWidth = e), r._viewHeight !== t && (r._resize = 1, r._viewHeight = t), (r._origin[0] !== a[0] || r._origin[1] !== a[1]) && (r._resize = 1, r._origin = a), s && r.run("enter"), o && r.runAfter((l) => l.resize());
  }, !1, 1);
}
function sQ(e) {
  return this._runtime.getState(e || {
    data: lQ,
    signals: dQ,
    recurse: !0
  });
}
function lQ(e, t) {
  return t.modified && as(t.input.value) && !e.startsWith("_:vega:_");
}
function dQ(e, t) {
  return !(e === "parent" || t instanceof Js.proxy);
}
function fQ(e) {
  return this.runAsync(null, (t) => {
    t._trigger = !1, t._runtime.setState(e);
  }, (t) => {
    t._trigger = !0;
  }), this;
}
function uQ(e, t) {
  function i(n) {
    e({
      timestamp: Date.now(),
      elapsed: n
    });
  }
  this._timers.push(AW(i, t));
}
function cQ(e, t, i, n) {
  const a = e.element();
  a && a.setAttribute("title", hQ(n));
}
function hQ(e) {
  return e == null ? "" : as(e) ? HR(e) : lu(e) && !eR(e) ? pQ(e) : e + "";
}
function pQ(e) {
  return Object.keys(e).map((t) => {
    const i = e[t];
    return t + ": " + (as(i) ? HR(i) : YR(i));
  }).join(`
`);
}
function HR(e) {
  return "[" + e.map(YR).join(", ") + "]";
}
function YR(e) {
  return as(e) ? "[…]" : lu(e) && !eR(e) ? "{…}" : e;
}
function gQ() {
  if (this.renderer() === "canvas" && this._renderer._canvas) {
    let e = null;
    const t = () => {
      e != null && e();
      const i = matchMedia(`(resolution: ${window.devicePixelRatio}dppx)`);
      i.addEventListener("change", t), e = () => {
        i.removeEventListener("change", t);
      }, this._renderer._canvas.getContext("2d").pixelRatio = window.devicePixelRatio || 1, this._redraw = !0, this._resize = 1, this.resize().runAsync();
    };
    t();
  }
}
function XR(e, t) {
  const i = this;
  if (t = t || {}, qs.call(i), t.loader && i.loader(t.loader), t.logger && i.logger(t.logger), t.logLevel != null && i.logLevel(t.logLevel), t.locale || e.locale) {
    const o = Wh({}, e.locale, t.locale);
    i.locale(xS(o.number, o.time));
  }
  i._el = null, i._elBind = null, i._renderType = t.renderer || ro.Canvas, i._scenegraph = new fT();
  const n = i._scenegraph.root;
  i._renderer = null, i._tooltip = t.tooltip || cQ, i._redraw = !0, i._handler = new au().scene(n), i._globalCursor = !1, i._preventDefault = !1, i._timers = [], i._eventListeners = [], i._resizeListeners = [], i._eventConfig = RK(e.eventConfig), i.globalCursor(i._eventConfig.globalCursor);
  const a = nQ(i, e, t.expr);
  i._runtime = a, i._signals = a.signals, i._bind = (e.bindings || []).map((o) => ({
    state: null,
    param: Wh({}, o)
  })), a.root && a.root.set(n), n.source = a.data.root.input, i.pulse(a.data.root.input, i.changeset().insert(n.items)), i._width = i.width(), i._height = i.height(), i._viewWidth = WR(i, i._width), i._viewHeight = GR(i, i._height), i._origin = [0, 0], i._resize = 0, i._autosize = 1, oQ(i), wK(i), $K(i), i.description(e.description), t.hover && i.hover(), t.container && i.initialize(t.container, t.bind), t.watchPixelRatio && i._watchPixelRatio();
}
function sc(e, t) {
  return $x(e._signals, t) ? e._signals[t] : jn("Unrecognized signal name: " + tR(t));
}
function JR(e, t) {
  const i = (e._targets || []).filter((n) => n._update && n._update.handler === t);
  return i.length ? i[0] : null;
}
function PA(e, t, i, n) {
  let a = JR(i, n);
  return a || (a = Mx(e, () => n(t, i.value)), a.handler = n, e.on(i, null, a)), e;
}
function NA(e, t, i) {
  const n = JR(t, i);
  return n && t._targets.remove(n), e;
}
hY(XR, qs, {
  // -- DATAFLOW / RENDERING ----
  async evaluate(e, t, i) {
    if (await qs.prototype.evaluate.call(this, e, t), this._redraw || this._resize)
      try {
        this._renderer && (this._resize && (this._resize = 0, EK(this)), await this._renderer.renderAsync(this._scenegraph.root)), this._redraw = !1;
      } catch (n) {
        this.error(n);
      }
    return i && Ac(this, i), this;
  },
  dirty(e) {
    this._redraw = !0, this._renderer && this._renderer.dirty(e);
  },
  // -- GET / SET ----
  description(e) {
    if (arguments.length) {
      const t = e != null ? e + "" : null;
      return t !== this._desc && NR(this._el, this._desc = t), this;
    }
    return this._desc;
  },
  container() {
    return this._el;
  },
  scenegraph() {
    return this._scenegraph;
  },
  origin() {
    return this._origin.slice();
  },
  signal(e, t, i) {
    const n = sc(this, e);
    return arguments.length === 1 ? n.value : this.update(n, t, i);
  },
  width(e) {
    return arguments.length ? this.signal("width", e) : this.signal("width");
  },
  height(e) {
    return arguments.length ? this.signal("height", e) : this.signal("height");
  },
  padding(e) {
    return arguments.length ? this.signal("padding", jA(e)) : jA(this.signal("padding"));
  },
  autosize(e) {
    return arguments.length ? this.signal("autosize", e) : this.signal("autosize");
  },
  background(e) {
    return arguments.length ? this.signal("background", e) : this.signal("background");
  },
  renderer(e) {
    return arguments.length ? (eg(e) || jn("Unrecognized renderer type: " + e), e !== this._renderType && (this._renderType = e, this._resetRenderer()), this) : this._renderType;
  },
  tooltip(e) {
    return arguments.length ? (e !== this._tooltip && (this._tooltip = e, this._resetRenderer()), this) : this._tooltip;
  },
  loader(e) {
    return arguments.length ? (e !== this._loader && (qs.prototype.loader.call(this, e), this._resetRenderer()), this) : this._loader;
  },
  resize() {
    return this._autosize = 1, this.touch(sc(this, "autosize"));
  },
  _resetRenderer() {
    this._renderer && (this._renderer = null, this.initialize(this._el, this._elBind));
  },
  // -- SIZING ----
  _resizeView: rQ,
  // -- EVENT HANDLING ----
  addEventListener(e, t, i) {
    let n = t;
    return i && i.trap === !1 || (n = Mx(this, t), n.raw = t), this._handler.on(e, n), this;
  },
  removeEventListener(e, t) {
    for (var i = this._handler.handlers(e), n = i.length, a, o; --n >= 0; )
      if (o = i[n].type, a = i[n].handler, e === o && (t === a || t === a.raw)) {
        this._handler.off(o, a);
        break;
      }
    return this;
  },
  addResizeListener(e) {
    const t = this._resizeListeners;
    return t.includes(e) || t.push(e), this;
  },
  removeResizeListener(e) {
    var t = this._resizeListeners, i = t.indexOf(e);
    return i >= 0 && t.splice(i, 1), this;
  },
  addSignalListener(e, t) {
    return PA(this, e, sc(this, e), t);
  },
  removeSignalListener(e, t) {
    return NA(this, sc(this, e), t);
  },
  addDataListener(e, t) {
    return PA(this, e, Qh(this, e).values, t);
  },
  removeDataListener(e, t) {
    return NA(this, Qh(this, e).values, t);
  },
  globalCursor(e) {
    if (arguments.length) {
      if (this._globalCursor !== !!e) {
        const t = nv(this, null);
        this._globalCursor = !!e, t && nv(this, t);
      }
      return this;
    } else
      return this._globalCursor;
  },
  preventDefault(e) {
    return arguments.length ? (this._preventDefault = e, this) : this._preventDefault;
  },
  timer: uQ,
  events: jK,
  finalize: PK,
  hover: zK,
  // -- DATA ----
  data: kK,
  change: cg,
  insert: AK,
  remove: OK,
  // -- SCALES --
  scale: aQ,
  // -- INITIALIZATION ----
  initialize: ZK,
  // -- HEADLESS RENDERING ----
  toImageURL: QK,
  toCanvas: tQ,
  toSVG: iQ,
  // -- SAVE / RESTORE STATE ----
  getState: sQ,
  setState: fQ,
  // RE-RENDER ON ZOOM
  _watchPixelRatio: gQ
});
function Nl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function mQ(e) {
  return e.length === 1 ? bQ(e[0]) : yQ(e);
}
const bQ = (e) => function(t) {
  return t[e];
}, yQ = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function ae(e) {
  throw Error(e);
}
function ZR(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || ae("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && ae("Access path missing closing bracket: " + e), n && ae("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function vQ(e, t, i) {
  const n = ZR(e);
  return e = n.length === 1 ? n[0] : e, Nl(mQ(n), [e], e);
}
vQ("id");
Nl((e) => e, [], "identity");
Nl(() => 0, [], "zero");
Nl(() => 1, [], "one");
Nl(() => !0, [], "true");
Nl(() => !1, [], "false");
var ut = Array.isArray;
function Re(e) {
  return e === Object(e);
}
const qA = (e) => e !== "__proto__";
function _Q() {
  for (var e = arguments.length, t = new Array(e), i = 0; i < e; i++)
    t[i] = arguments[i];
  return t.reduce((n, a) => {
    for (const o in a)
      if (o === "signals")
        n.signals = xQ(n.signals, a.signals);
      else {
        const r = o === "legend" ? {
          layout: 1
        } : o === "style" ? !0 : null;
        KR(n, o, a[o], r);
      }
    return n;
  }, {});
}
function KR(e, t, i, n) {
  if (!qA(t)) return;
  let a, o;
  if (Re(i) && !ut(i)) {
    o = Re(e[t]) ? e[t] : e[t] = {};
    for (a in i)
      n && (n === !0 || n[a]) ? KR(o, a, i[a]) : qA(a) && (o[a] = i[a]);
  } else
    e[t] = i;
}
function xQ(e, t) {
  if (e == null) return t;
  const i = {}, n = [];
  function a(o) {
    i[o.name] || (i[o.name] = 1, n.push(o));
  }
  return t.forEach(a), e.forEach(a), n;
}
function Hd(e) {
  return e[e.length - 1];
}
function Tt(e) {
  return e != null ? ut(e) ? e : [e] : [];
}
function Xe(e) {
  for (let t, i, n = 1, a = arguments.length; n < a; ++n) {
    t = arguments[n];
    for (i in t)
      e[i] = t[i];
  }
  return e;
}
const wQ = Object.prototype.hasOwnProperty;
function wi(e, t) {
  return wQ.call(e, t);
}
function cn(e) {
  return typeof e == "string";
}
function ne(e) {
  return ut(e) ? "[" + e.map(ne) + "]" : Re(e) || cn(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
const $Q = "view", tp = "[", ip = "]", QR = "{", eI = "}", kQ = ":", tI = ",", AQ = "@", OQ = ">", EQ = /[[\]{}]/, DQ = {
  "*": 1,
  arc: 1,
  area: 1,
  group: 1,
  image: 1,
  line: 1,
  path: 1,
  rect: 1,
  rule: 1,
  shape: 1,
  symbol: 1,
  text: 1,
  trail: 1
};
let iI, nI;
function aI(e, t, i) {
  return iI = t || $Q, nI = i || DQ, oI(e.trim()).map(av);
}
function SQ(e) {
  return nI[e];
}
function Yd(e, t, i, n, a) {
  const o = e.length;
  let r = 0, s;
  for (; t < o; ++t) {
    if (s = e[t], !r && s === i) return t;
    a && a.indexOf(s) >= 0 ? --r : n && n.indexOf(s) >= 0 && ++r;
  }
  return t;
}
function oI(e) {
  const t = [], i = e.length;
  let n = 0, a = 0;
  for (; a < i; )
    a = Yd(e, a, tI, tp + QR, ip + eI), t.push(e.substring(n, a).trim()), n = ++a;
  if (t.length === 0)
    throw "Empty event selector: " + e;
  return t;
}
function av(e) {
  return e[0] === "[" ? FQ(e) : TQ(e);
}
function FQ(e) {
  const t = e.length;
  let i = 1, n;
  if (i = Yd(e, i, ip, tp, ip), i === t)
    throw "Empty between selector: " + e;
  if (n = oI(e.substring(1, i)), n.length !== 2)
    throw "Between selector must have two elements: " + e;
  if (e = e.slice(i + 1).trim(), e[0] !== OQ)
    throw "Expected '>' after between selector: " + e;
  n = n.map(av);
  const a = av(e.slice(1).trim());
  return a.between ? {
    between: n,
    stream: a
  } : (a.between = n, a);
}
function TQ(e) {
  const t = {
    source: iI
  }, i = [];
  let n = [0, 0], a = 0, o = 0, r = e.length, s = 0, l, d;
  if (e[r - 1] === eI) {
    if (s = e.lastIndexOf(QR), s >= 0) {
      try {
        n = CQ(e.substring(s + 1, r - 1));
      } catch {
        throw "Invalid throttle specification: " + e;
      }
      e = e.slice(0, s).trim(), r = e.length;
    } else throw "Unmatched right brace: " + e;
    s = 0;
  }
  if (!r) throw e;
  if (e[0] === AQ && (a = ++s), l = Yd(e, s, kQ), l < r && (i.push(e.substring(o, l).trim()), o = s = ++l), s = Yd(e, s, tp), s === r)
    i.push(e.substring(o, r).trim());
  else if (i.push(e.substring(o, s).trim()), d = [], o = ++s, o === r) throw "Unmatched left bracket: " + e;
  for (; s < r; ) {
    if (s = Yd(e, s, ip), s === r) throw "Unmatched left bracket: " + e;
    if (d.push(e.substring(o, s).trim()), s < r - 1 && e[++s] !== tp) throw "Expected left bracket: " + e;
    o = ++s;
  }
  if (!(r = i.length) || EQ.test(i[r - 1]))
    throw "Invalid event selector: " + e;
  return r > 1 ? (t.type = i[1], a ? t.markname = i[0].slice(1) : SQ(i[0]) ? t.marktype = i[0] : t.source = i[0]) : t.type = i[0], t.type.slice(-1) === "!" && (t.consume = !0, t.type = t.type.slice(0, -1)), d != null && (t.filter = d), n[0] && (t.throttle = n[0]), n[1] && (t.debounce = n[1]), t;
}
function CQ(e) {
  const t = e.split(tI);
  if (!e.length || t.length > 2) throw e;
  return t.map((i) => {
    const n = +i;
    if (n !== n) throw e;
    return n;
  });
}
function RQ(e) {
  return Re(e) ? e : {
    type: e || "pad"
  };
}
const cd = (e) => +e || 0, IQ = (e) => ({
  top: e,
  bottom: e,
  left: e,
  right: e
});
function jQ(e) {
  return Re(e) ? e.signal ? e : {
    top: cd(e.top),
    bottom: cd(e.bottom),
    left: cd(e.left),
    right: cd(e.right)
  } : IQ(cd(e));
}
const ct = (e) => Re(e) && !ut(e) ? Xe({}, e) : {
  value: e
};
function LA(e, t, i, n) {
  return i != null ? (Re(i) && !ut(i) || ut(i) && i.length && Re(i[0]) ? e.update[t] = i : e[n || "enter"][t] = {
    value: i
  }, 1) : 0;
}
function $t(e, t, i) {
  for (const n in t)
    LA(e, n, t[n]);
  for (const n in i)
    LA(e, n, i[n], "update");
}
function ql(e, t, i) {
  for (const n in t)
    i && wi(i, n) || (e[n] = Xe(e[n] || {}, t[n]));
  return e;
}
function Ts(e, t) {
  return t && (t.enter && t.enter[e] || t.update && t.update[e]);
}
const Gx = "mark", Hx = "frame", Yx = "scope", zQ = "axis", PQ = "axis-domain", NQ = "axis-grid", qQ = "axis-label", LQ = "axis-tick", BQ = "axis-title", UQ = "legend", MQ = "legend-band", VQ = "legend-entry", WQ = "legend-gradient", rI = "legend-label", GQ = "legend-symbol", HQ = "legend-title", YQ = "title", XQ = "title-text", JQ = "title-subtitle";
function ZQ(e, t, i, n, a) {
  const o = {}, r = {};
  let s, l, d, f;
  l = "lineBreak", t === "text" && a[l] != null && !Ts(l, e) && bb(o, l, a[l]), (i == "legend" || String(i).startsWith("axis")) && (i = null), f = i === Hx ? a.group : i === Gx ? Xe({}, a.mark, a[t]) : null;
  for (l in f)
    d = Ts(l, e) || (l === "fill" || l === "stroke") && (Ts("fill", e) || Ts("stroke", e)), d || bb(o, l, f[l]);
  Tt(n).forEach((u) => {
    const c = a.style && a.style[u];
    for (const h in c)
      Ts(h, e) || bb(o, h, c[h]);
  }), e = Xe({}, e);
  for (l in o)
    f = o[l], f.signal ? (s = s || {})[l] = f : r[l] = f;
  return e.enter = Xe(r, e.enter), s && (e.update = Xe(s, e.update)), e;
}
function bb(e, t, i) {
  e[t] = i && i.signal ? {
    signal: i.signal
  } : {
    value: i
  };
}
const sI = (e) => cn(e) ? ne(e) : e.signal ? `(${e.signal})` : lI(e);
function pg(e) {
  if (e.gradient != null)
    return QQ(e);
  let t = e.signal ? `(${e.signal})` : e.color ? KQ(e.color) : e.field != null ? lI(e.field) : e.value !== void 0 ? ne(e.value) : void 0;
  return e.scale != null && (t = eee(e, t)), t === void 0 && (t = null), e.exponent != null && (t = `pow(${t},${Hc(e.exponent)})`), e.mult != null && (t += `*${Hc(e.mult)}`), e.offset != null && (t += `+${Hc(e.offset)}`), e.round && (t = `round(${t})`), t;
}
const lc = (e, t, i, n) => `(${e}(${[t, i, n].map(pg).join(",")})+'')`;
function KQ(e) {
  return e.c ? lc("hcl", e.h, e.c, e.l) : e.h || e.s ? lc("hsl", e.h, e.s, e.l) : e.l || e.a ? lc("lab", e.l, e.a, e.b) : e.r || e.g || e.b ? lc("rgb", e.r, e.g, e.b) : null;
}
function QQ(e) {
  const t = [e.start, e.stop, e.count].map((i) => i == null ? null : ne(i));
  for (; t.length && Hd(t) == null; ) t.pop();
  return t.unshift(sI(e.gradient)), `gradient(${t.join(",")})`;
}
function Hc(e) {
  return Re(e) ? "(" + pg(e) + ")" : e;
}
function lI(e) {
  return dI(Re(e) ? e : {
    datum: e
  });
}
function dI(e) {
  let t, i, n;
  if (e.signal)
    t = "datum", n = e.signal;
  else if (e.group || e.parent) {
    for (i = Math.max(1, e.level || 1), t = "item"; i-- > 0; )
      t += ".mark.group";
    e.parent ? (n = e.parent, t += ".datum") : n = e.group;
  } else e.datum ? (t = "datum", n = e.datum) : ae("Invalid field reference: " + ne(e));
  return e.signal || (n = cn(n) ? ZR(n).map(ne).join("][") : dI(n)), t + "[" + n + "]";
}
function eee(e, t) {
  const i = sI(e.scale);
  return e.range != null ? t = `lerp(_range(${i}), ${+e.range})` : (t !== void 0 && (t = `_scale(${i}, ${t})`), e.band && (t = (t ? t + "+" : "") + `_bandwidth(${i})` + (+e.band == 1 ? "" : "*" + Hc(e.band)), e.extra && (t = `(datum.extra ? _scale(${i}, datum.extra.value) : ${t})`)), t == null && (t = "0")), t;
}
function tee(e) {
  let t = "";
  return e.forEach((i) => {
    const n = pg(i);
    t += i.test ? `(${i.test})?${n}:` : n;
  }), Hd(t) === ":" && (t += "null"), t;
}
function fI(e, t, i, n, a, o) {
  const r = {};
  o = o || {}, o.encoders = {
    $encode: r
  }, e = ZQ(e, t, i, n, a.config);
  for (const s in e)
    r[s] = iee(e[s], t, o, a);
  return o;
}
function iee(e, t, i, n) {
  const a = {}, o = {};
  for (const r in e)
    e[r] != null && (a[r] = aee(nee(e[r]), n, i, o));
  return {
    $expr: {
      marktype: t,
      channels: a
    },
    $fields: Object.keys(o),
    $output: Object.keys(e)
  };
}
function nee(e) {
  return ut(e) ? tee(e) : pg(e);
}
function aee(e, t, i, n) {
  const a = Bn(e, t);
  return a.$fields.forEach((o) => n[o] = 1), Xe(i, a.$params), a.$expr;
}
const oee = "outer", ree = ["value", "update", "init", "react", "bind"];
function BA(e, t) {
  ae(e + ' for "outer" push: ' + ne(t));
}
function uI(e, t) {
  const i = e.name;
  if (e.push === oee)
    t.signals[i] || BA("No prior signal definition", i), ree.forEach((n) => {
      e[n] !== void 0 && BA("Invalid property ", n);
    });
  else {
    const n = t.addSignal(i, e.value);
    e.react === !1 && (n.react = !1), e.bind && t.addBinding(i, e.bind);
  }
}
function ov(e, t, i, n) {
  this.id = -1, this.type = e, this.value = t, this.params = i, n && (this.parent = n);
}
function gg(e, t, i, n) {
  return new ov(e, t, i, n);
}
function np(e, t) {
  return gg("operator", e, t);
}
function J(e) {
  const t = {
    $ref: e.id
  };
  return e.id < 0 && (e.refs = e.refs || []).push(t), t;
}
function Df(e, t) {
  return t ? {
    $field: e,
    $name: t
  } : {
    $field: e
  };
}
const rv = Df("key");
function UA(e, t) {
  return {
    $compare: e,
    $order: t
  };
}
function see(e, t) {
  const i = {
    $key: e
  };
  return t && (i.$flat = !0), i;
}
const lee = "ascending", dee = "descending";
function fee(e) {
  return Re(e) ? (e.order === dee ? "-" : "+") + mg(e.op, e.field) : "";
}
function mg(e, t) {
  return (e && e.signal ? "$" + e.signal : e || "") + (e && t ? "_" : "") + (t && t.signal ? "$" + t.signal : t || "");
}
const Xx = "scope", sv = "view";
function st(e) {
  return e && e.signal;
}
function uee(e) {
  return e && e.expr;
}
function Yc(e) {
  if (st(e)) return !0;
  if (Re(e)) {
    for (const t in e)
      if (Yc(e[t])) return !0;
  }
  return !1;
}
function Ki(e, t) {
  return e ?? t;
}
function Sr(e) {
  return e && e.signal || e;
}
const MA = "timer";
function Sf(e, t) {
  return (e.merge ? hee : e.stream ? pee : e.type ? gee : ae("Invalid stream specification: " + ne(e)))(e, t);
}
function cee(e) {
  return e === Xx ? sv : e || sv;
}
function hee(e, t) {
  const i = e.merge.map((a) => Sf(a, t)), n = Jx({
    merge: i
  }, e, t);
  return t.addStream(n).id;
}
function pee(e, t) {
  const i = Sf(e.stream, t), n = Jx({
    stream: i
  }, e, t);
  return t.addStream(n).id;
}
function gee(e, t) {
  let i;
  e.type === MA ? (i = t.event(MA, e.throttle), e = {
    between: e.between,
    filter: e.filter
  }) : i = t.event(cee(e.source), e.type);
  const n = Jx({
    stream: i
  }, e, t);
  return Object.keys(n).length === 1 ? i : t.addStream(n).id;
}
function Jx(e, t, i) {
  let n = t.between;
  return n && (n.length !== 2 && ae('Stream "between" parameter must have 2 entries: ' + ne(t)), e.between = [Sf(n[0], i), Sf(n[1], i)]), n = t.filter ? [].concat(t.filter) : [], (t.marktype || t.markname || t.markrole) && n.push(mee(t.marktype, t.markname, t.markrole)), t.source === Xx && n.push("inScope(event.item)"), n.length && (e.filter = Bn("(" + n.join(")&&(") + ")", i).$expr), (n = t.throttle) != null && (e.throttle = +n), (n = t.debounce) != null && (e.debounce = +n), t.consume && (e.consume = !0), e;
}
function mee(e, t, i) {
  const n = "event.item";
  return n + (e && e !== "*" ? "&&" + n + ".mark.marktype==='" + e + "'" : "") + (i ? "&&" + n + ".mark.role==='" + i + "'" : "") + (t ? "&&" + n + ".mark.name==='" + t + "'" : "");
}
const bee = {
  code: "_.$value",
  ast: {
    type: "Identifier",
    value: "value"
  }
};
function yee(e, t, i) {
  const n = e.encode, a = {
    target: i
  };
  let o = e.events, r = e.update, s = [];
  o || ae("Signal update missing events specification."), cn(o) && (o = aI(o, t.isSubscope() ? Xx : sv)), o = Tt(o).filter((l) => l.signal || l.scale ? (s.push(l), 0) : 1), s.length > 1 && (s = [_ee(s)]), o.length && s.push(o.length > 1 ? {
    merge: o
  } : o[0]), n != null && (r && ae("Signal encode and update are mutually exclusive."), r = "encode(item()," + ne(n) + ")"), a.update = cn(r) ? Bn(r, t) : r.expr != null ? Bn(r.expr, t) : r.value != null ? r.value : r.signal != null ? {
    $expr: bee,
    $params: {
      $value: t.signalRef(r.signal)
    }
  } : ae("Invalid signal update specification."), e.force && (a.options = {
    force: !0
  }), s.forEach((l) => t.addUpdate(Xe(vee(l, t), a)));
}
function vee(e, t) {
  return {
    source: e.signal ? t.signalRef(e.signal) : e.scale ? t.scaleRef(e.scale) : Sf(e, t)
  };
}
function _ee(e) {
  return {
    signal: "[" + e.map((t) => t.scale ? 'scale("' + t.scale + '")' : t.signal) + "]"
  };
}
function xee(e, t) {
  const i = t.getSignal(e.name);
  let n = e.update;
  e.init && (n ? ae("Signals can not include both init and update expressions.") : (n = e.init, i.initonly = !0)), n && (n = Bn(n, t), i.update = n.$expr, i.params = n.$params), e.on && e.on.forEach((a) => yee(a, t, i.id));
}
const Se = (e) => (t, i, n) => gg(e, i, t || void 0, n), cI = Se("aggregate"), wee = Se("axisticks"), hI = Se("bound"), mn = Se("collect"), VA = Se("compare"), $ee = Se("datajoin"), pI = Se("encode"), kee = Se("expression"), Aee = Se("facet"), Oee = Se("field"), Eee = Se("key"), Dee = Se("legendentries"), See = Se("load"), Fee = Se("mark"), Tee = Se("multiextent"), Cee = Se("multivalues"), Ree = Se("overlap"), Iee = Se("params"), gI = Se("prefacet"), jee = Se("projection"), zee = Se("proxy"), Pee = Se("relay"), mI = Se("render"), Nee = Se("scale"), rs = Se("sieve"), qee = Se("sortitems"), bI = Se("viewlayout"), Lee = Se("values");
let Bee = 0;
const yI = {
  min: "min",
  max: "max",
  count: "sum"
};
function Uee(e, t) {
  const i = e.type || "linear";
  aN(i) || ae("Unrecognized scale type: " + ne(i)), t.addScale(e.name, {
    type: i,
    domain: void 0
  });
}
function Mee(e, t) {
  const i = t.getScale(e.name).params;
  let n;
  i.domain = vI(e.domain, e, t), e.range != null && (i.range = xI(e, t, i)), e.interpolate != null && Qee(e.interpolate, i), e.nice != null && (i.nice = Kee(e.nice, t)), e.bins != null && (i.bins = Zee(e.bins, t));
  for (n in e)
    wi(i, n) || n === "name" || (i[n] = qi(e[n], t));
}
function qi(e, t) {
  return Re(e) ? e.signal ? t.signalRef(e.signal) : ae("Unsupported object: " + ne(e)) : e;
}
function Xc(e, t) {
  return e.signal ? t.signalRef(e.signal) : e.map((i) => qi(i, t));
}
function bg(e) {
  ae("Can not find data set: " + ne(e));
}
function vI(e, t, i) {
  if (!e) {
    (t.domainMin != null || t.domainMax != null) && ae("No scale domain defined for domainMin/domainMax to override.");
    return;
  }
  return e.signal ? i.signalRef(e.signal) : (ut(e) ? Vee : e.fields ? Gee : Wee)(e, t, i);
}
function Vee(e, t, i) {
  return e.map((n) => qi(n, i));
}
function Wee(e, t, i) {
  const n = i.getData(e.data);
  return n || bg(e.data), nf(t.type) ? n.valuesRef(i, e.field, _I(e.sort, !1)) : hD(t.type) ? n.domainRef(i, e.field) : n.extentRef(i, e.field);
}
function Gee(e, t, i) {
  const n = e.data, a = e.fields.reduce((o, r) => (r = cn(r) ? {
    data: n,
    field: r
  } : ut(r) || r.signal ? Hee(r, i) : r, o.push(r), o), []);
  return (nf(t.type) ? Yee : hD(t.type) ? Xee : Jee)(e, i, a);
}
function Hee(e, t) {
  const i = "_:vega:_" + Bee++, n = mn({});
  if (ut(e))
    n.value = {
      $ingest: e
    };
  else if (e.signal) {
    const a = "setdata(" + ne(i) + "," + e.signal + ")";
    n.params.input = t.signalRef(a);
  }
  return t.addDataPipeline(i, [n, rs({})]), {
    data: i,
    field: "data"
  };
}
function Yee(e, t, i) {
  const n = _I(e.sort, !0);
  let a, o;
  const r = i.map((d) => {
    const f = t.getData(d.data);
    return f || bg(d.data), f.countsRef(t, d.field, n);
  }), s = {
    groupby: rv,
    pulse: r
  };
  n && (a = n.op || "count", o = n.field ? mg(a, n.field) : "count", s.ops = [yI[a]], s.fields = [t.fieldRef(o)], s.as = [o]), a = t.add(cI(s));
  const l = t.add(mn({
    pulse: J(a)
  }));
  return o = t.add(Lee({
    field: rv,
    sort: t.sortRef(n),
    pulse: J(l)
  })), J(o);
}
function _I(e, t) {
  return e && (!e.field && !e.op ? Re(e) ? e.field = "key" : e = {
    field: "key"
  } : !e.field && e.op !== "count" ? ae("No field provided for sort aggregate op: " + e.op) : t && e.field && e.op && !yI[e.op] && ae("Multiple domain scales can not be sorted using " + e.op)), e;
}
function Xee(e, t, i) {
  const n = i.map((a) => {
    const o = t.getData(a.data);
    return o || bg(a.data), o.domainRef(t, a.field);
  });
  return J(t.add(Cee({
    values: n
  })));
}
function Jee(e, t, i) {
  const n = i.map((a) => {
    const o = t.getData(a.data);
    return o || bg(a.data), o.extentRef(t, a.field);
  });
  return J(t.add(Tee({
    extents: n
  })));
}
function Zee(e, t) {
  return e.signal || ut(e) ? Xc(e, t) : t.objectProperty(e);
}
function Kee(e, t) {
  return e.signal ? t.signalRef(e.signal) : Re(e) ? {
    interval: qi(e.interval),
    step: qi(e.step)
  } : qi(e);
}
function Qee(e, t) {
  t.interpolate = qi(e.type || e), e.gamma != null && (t.interpolateGamma = qi(e.gamma));
}
function xI(e, t, i) {
  const n = t.config.range;
  let a = e.range;
  if (a.signal)
    return t.signalRef(a.signal);
  if (cn(a)) {
    if (n && wi(n, a))
      return e = Xe({}, e, {
        range: n[a]
      }), xI(e, t, i);
    a === "width" ? a = [0, {
      signal: "width"
    }] : a === "height" ? a = nf(e.type) ? [0, {
      signal: "height"
    }] : [{
      signal: "height"
    }, 0] : ae("Unrecognized scale range value: " + ne(a));
  } else if (a.scheme) {
    i.scheme = ut(a.scheme) ? Xc(a.scheme, t) : qi(a.scheme, t), a.extent && (i.schemeExtent = Xc(a.extent, t)), a.count && (i.schemeCount = qi(a.count, t));
    return;
  } else if (a.step) {
    i.rangeStep = qi(a.step, t);
    return;
  } else {
    if (nf(e.type) && !ut(a))
      return vI(a, e, t);
    ut(a) || ae("Unsupported range type: " + ne(a));
  }
  return a.map((o) => (ut(o) ? Xc : qi)(o, t));
}
function ete(e, t) {
  const i = t.config.projection || {}, n = {};
  for (const a in e)
    a !== "name" && (n[a] = lv(e[a], a, t));
  for (const a in i)
    n[a] == null && (n[a] = lv(i[a], a, t));
  t.addProjection(e.name, n);
}
function lv(e, t, i) {
  return ut(e) ? e.map((n) => lv(n, t, i)) : Re(e) ? e.signal ? i.signalRef(e.signal) : t === "fit" ? e : ae("Unsupported parameter object: " + ne(e)) : e;
}
const bn = "top", Ll = "left", Bl = "right", Do = "bottom", wI = "center", tte = "vertical", ite = "start", nte = "middle", ate = "end", dv = "index", Zx = "label", ote = "offset", ol = "perc", rte = "perc2", Bi = "value", hu = "guide-label", Kx = "guide-title", ste = "group-title", lte = "group-subtitle", WA = "symbol", Jc = "gradient", fv = "discrete", uv = "size", dte = "shape", fte = "fill", ute = "stroke", cte = "strokeWidth", hte = "strokeDash", pte = "opacity", Qx = [uv, dte, fte, ute, cte, hte, pte], pu = {
  name: 1,
  style: 1,
  interactive: 1
}, ue = {
  value: 0
}, Ui = {
  value: 1
}, yg = "group", $I = "rect", e1 = "rule", gte = "symbol", ss = "text";
function Ff(e) {
  return e.type = yg, e.interactive = e.interactive || !1, e;
}
function yi(e, t) {
  const i = (n, a) => Ki(e[n], Ki(t[n], a));
  return i.isVertical = (n) => tte === Ki(e.direction, t.direction || (n ? t.symbolDirection : t.gradientDirection)), i.gradientLength = () => Ki(e.gradientLength, t.gradientLength || t.gradientWidth), i.gradientThickness = () => Ki(e.gradientThickness, t.gradientThickness || t.gradientHeight), i.entryColumns = () => Ki(e.columns, Ki(t.columns, +i.isVertical(!0))), i;
}
function kI(e, t) {
  const i = t && (t.update && t.update[e] || t.enter && t.enter[e]);
  return i && i.signal ? i : i ? i.value : null;
}
function mte(e, t, i) {
  const n = t.config.style[i];
  return n && n[e];
}
function vg(e, t, i) {
  return `item.anchor === '${ite}' ? ${e} : item.anchor === '${ate}' ? ${t} : ${i}`;
}
const t1 = vg(ne(Ll), ne(Bl), ne(wI));
function bte(e) {
  const t = e("tickBand");
  let i = e("tickOffset"), n, a;
  return t ? t.signal ? (n = {
    signal: `(${t.signal}) === 'extent' ? 1 : 0.5`
  }, a = {
    signal: `(${t.signal}) === 'extent'`
  }, Re(i) || (i = {
    signal: `(${t.signal}) === 'extent' ? 0 : ${i}`
  })) : t === "extent" ? (n = 1, a = !0, i = 0) : (n = 0.5, a = !1) : (n = e("bandPosition"), a = e("tickExtra")), {
    extra: a,
    band: n,
    offset: i
  };
}
function AI(e, t) {
  return t ? e ? Re(e) ? Object.assign({}, e, {
    offset: AI(e.offset, t)
  }) : {
    value: e,
    offset: t
  } : t : e;
}
function Ci(e, t) {
  return t ? (e.name = t.name, e.style = t.style || e.style, e.interactive = !!t.interactive, e.encode = ql(e.encode, t, pu)) : e.interactive = !1, e;
}
function yte(e, t, i, n) {
  const a = yi(e, i), o = a.isVertical(), r = a.gradientThickness(), s = a.gradientLength();
  let l, d, f, u, c;
  o ? (d = [0, 1], f = [0, 0], u = r, c = s) : (d = [0, 0], f = [1, 0], u = s, c = r);
  const h = {
    enter: l = {
      opacity: ue,
      x: ue,
      y: ue,
      width: ct(u),
      height: ct(c)
    },
    update: Xe({}, l, {
      opacity: Ui,
      fill: {
        gradient: t,
        start: d,
        stop: f
      }
    }),
    exit: {
      opacity: ue
    }
  };
  return $t(h, {
    stroke: a("gradientStrokeColor"),
    strokeWidth: a("gradientStrokeWidth")
  }, {
    // update
    opacity: a("gradientOpacity")
  }), Ci({
    type: $I,
    role: WQ,
    encode: h
  }, n);
}
function vte(e, t, i, n, a) {
  const o = yi(e, i), r = o.isVertical(), s = o.gradientThickness(), l = o.gradientLength();
  let d, f, u, c, h = "";
  r ? (d = "y", u = "y2", f = "x", c = "width", h = "1-") : (d = "x", u = "x2", f = "y", c = "height");
  const p = {
    opacity: ue,
    fill: {
      scale: t,
      field: Bi
    }
  };
  p[d] = {
    signal: h + "datum." + ol,
    mult: l
  }, p[f] = ue, p[u] = {
    signal: h + "datum." + rte,
    mult: l
  }, p[c] = ct(s);
  const g = {
    enter: p,
    update: Xe({}, p, {
      opacity: Ui
    }),
    exit: {
      opacity: ue
    }
  };
  return $t(g, {
    stroke: o("gradientStrokeColor"),
    strokeWidth: o("gradientStrokeWidth")
  }, {
    // update
    opacity: o("gradientOpacity")
  }), Ci({
    type: $I,
    role: MQ,
    key: Bi,
    from: a,
    encode: g
  }, n);
}
const _te = `datum.${ol}<=0?"${Ll}":datum.${ol}>=1?"${Bl}":"${wI}"`, xte = `datum.${ol}<=0?"${Do}":datum.${ol}>=1?"${bn}":"${nte}"`;
function GA(e, t, i, n) {
  const a = yi(e, t), o = a.isVertical(), r = ct(a.gradientThickness()), s = a.gradientLength();
  let l = a("labelOverlap"), d, f, u, c, h = "";
  const p = {
    enter: d = {
      opacity: ue
    },
    update: f = {
      opacity: Ui,
      text: {
        field: Zx
      }
    },
    exit: {
      opacity: ue
    }
  };
  return $t(p, {
    fill: a("labelColor"),
    fillOpacity: a("labelOpacity"),
    font: a("labelFont"),
    fontSize: a("labelFontSize"),
    fontStyle: a("labelFontStyle"),
    fontWeight: a("labelFontWeight"),
    limit: Ki(e.labelLimit, t.gradientLabelLimit)
  }), o ? (d.align = {
    value: "left"
  }, d.baseline = f.baseline = {
    signal: xte
  }, u = "y", c = "x", h = "1-") : (d.align = f.align = {
    signal: _te
  }, d.baseline = {
    value: "top"
  }, u = "x", c = "y"), d[u] = f[u] = {
    signal: h + "datum." + ol,
    mult: s
  }, d[c] = f[c] = r, r.offset = Ki(e.labelOffset, t.gradientLabelOffset) || 0, l = l ? {
    separation: a("labelSeparation"),
    method: l,
    order: "datum." + dv
  } : void 0, Ci({
    type: ss,
    role: rI,
    style: hu,
    key: Bi,
    from: n,
    encode: p,
    overlap: l
  }, i);
}
function wte(e, t, i, n, a) {
  const o = yi(e, t), r = i.entries, s = !!(r && r.interactive), l = r ? r.name : void 0, d = o("clipHeight"), f = o("symbolOffset"), u = {
    data: "value"
  }, c = `(${a}) ? datum.${ote} : datum.${uv}`, h = d ? ct(d) : {
    field: uv
  }, p = `datum.${dv}`, g = `max(1, ${a})`;
  let m, b, y, v, w;
  h.mult = 0.5, m = {
    enter: b = {
      opacity: ue,
      x: {
        signal: c,
        mult: 0.5,
        offset: f
      },
      y: h
    },
    update: y = {
      opacity: Ui,
      x: b.x,
      y: b.y
    },
    exit: {
      opacity: ue
    }
  };
  let x = null, $ = null;
  e.fill || (x = t.symbolBaseFillColor, $ = t.symbolBaseStrokeColor), $t(m, {
    fill: o("symbolFillColor", x),
    shape: o("symbolType"),
    size: o("symbolSize"),
    stroke: o("symbolStrokeColor", $),
    strokeDash: o("symbolDash"),
    strokeDashOffset: o("symbolDashOffset"),
    strokeWidth: o("symbolStrokeWidth")
  }, {
    // update
    opacity: o("symbolOpacity")
  }), Qx.forEach((E) => {
    e[E] && (y[E] = b[E] = {
      scale: e[E],
      field: Bi
    });
  });
  const _ = Ci({
    type: gte,
    role: GQ,
    key: Bi,
    from: u,
    clip: d ? !0 : void 0,
    encode: m
  }, i.symbols), k = ct(f);
  k.offset = o("labelOffset"), m = {
    enter: b = {
      opacity: ue,
      x: {
        signal: c,
        offset: k
      },
      y: h
    },
    update: y = {
      opacity: Ui,
      text: {
        field: Zx
      },
      x: b.x,
      y: b.y
    },
    exit: {
      opacity: ue
    }
  }, $t(m, {
    align: o("labelAlign"),
    baseline: o("labelBaseline"),
    fill: o("labelColor"),
    fillOpacity: o("labelOpacity"),
    font: o("labelFont"),
    fontSize: o("labelFontSize"),
    fontStyle: o("labelFontStyle"),
    fontWeight: o("labelFontWeight"),
    limit: o("labelLimit")
  });
  const A = Ci({
    type: ss,
    role: rI,
    style: hu,
    key: Bi,
    from: u,
    encode: m
  }, i.labels);
  return m = {
    enter: {
      noBound: {
        value: !d
      },
      // ignore width/height in bounds calc
      width: ue,
      height: d ? ct(d) : ue,
      opacity: ue
    },
    exit: {
      opacity: ue
    },
    update: y = {
      opacity: Ui,
      row: {
        signal: null
      },
      column: {
        signal: null
      }
    }
  }, o.isVertical(!0) ? (v = `ceil(item.mark.items.length / ${g})`, y.row.signal = `${p}%${v}`, y.column.signal = `floor(${p} / ${v})`, w = {
    field: ["row", p]
  }) : (y.row.signal = `floor(${p} / ${g})`, y.column.signal = `${p} % ${g}`, w = {
    field: p
  }), y.column.signal = `(${a})?${y.column.signal}:${p}`, n = {
    facet: {
      data: n,
      name: "value",
      groupby: dv
    }
  }, Ff({
    role: Yx,
    from: n,
    encode: ql(m, r, pu),
    marks: [_, A],
    name: l,
    interactive: s,
    sort: w
  });
}
function $te(e, t) {
  const i = yi(e, t);
  return {
    align: i("gridAlign"),
    columns: i.entryColumns(),
    center: {
      row: !0,
      column: !1
    },
    padding: {
      row: i("rowPadding"),
      column: i("columnPadding")
    }
  };
}
const i1 = 'item.orient === "left"', n1 = 'item.orient === "right"', _g = `(${i1} || ${n1})`, kte = `datum.vgrad && ${_g}`, Ate = vg('"top"', '"bottom"', '"middle"'), Ote = vg('"right"', '"left"', '"center"'), Ete = `datum.vgrad && ${n1} ? (${Ote}) : (${_g} && !(datum.vgrad && ${i1})) ? "left" : ${t1}`, Dte = `item._anchor || (${_g} ? "middle" : "start")`, Ste = `${kte} ? (${i1} ? -90 : 90) : 0`, Fte = `${_g} ? (datum.vgrad ? (${n1} ? "bottom" : "top") : ${Ate}) : "top"`;
function Tte(e, t, i, n) {
  const a = yi(e, t), o = {
    enter: {
      opacity: ue
    },
    update: {
      opacity: Ui,
      x: {
        field: {
          group: "padding"
        }
      },
      y: {
        field: {
          group: "padding"
        }
      }
    },
    exit: {
      opacity: ue
    }
  };
  return $t(o, {
    orient: a("titleOrient"),
    _anchor: a("titleAnchor"),
    anchor: {
      signal: Dte
    },
    angle: {
      signal: Ste
    },
    align: {
      signal: Ete
    },
    baseline: {
      signal: Fte
    },
    text: e.title,
    fill: a("titleColor"),
    fillOpacity: a("titleOpacity"),
    font: a("titleFont"),
    fontSize: a("titleFontSize"),
    fontStyle: a("titleFontStyle"),
    fontWeight: a("titleFontWeight"),
    limit: a("titleLimit"),
    lineHeight: a("titleLineHeight")
  }, {
    // require update
    align: a("titleAlign"),
    baseline: a("titleBaseline")
  }), Ci({
    type: ss,
    role: HQ,
    style: Kx,
    from: n,
    encode: o
  }, i);
}
function Cte(e, t) {
  let i;
  return Re(e) && (e.signal ? i = e.signal : e.path ? i = "pathShape(" + HA(e.path) + ")" : e.sphere && (i = "geoShape(" + HA(e.sphere) + ', {type: "Sphere"})')), i ? t.signalRef(i) : !!e;
}
function HA(e) {
  return Re(e) && e.signal ? e.signal : ne(e);
}
function OI(e) {
  const t = e.role || "";
  return t.startsWith("axis") || t.startsWith("legend") || t.startsWith("title") ? t : e.type === yg ? Yx : t || Gx;
}
function Rte(e) {
  return {
    marktype: e.type,
    name: e.name || void 0,
    role: e.role || OI(e),
    zindex: +e.zindex || void 0,
    aria: e.aria,
    description: e.description
  };
}
function Ite(e, t) {
  return e && e.signal ? t.signalRef(e.signal) : e !== !1;
}
function a1(e, t) {
  const i = IS(e.type);
  i || ae("Unrecognized transform type: " + ne(e.type));
  const n = gg(i.type.toLowerCase(), null, EI(i, e, t));
  return e.signal && t.addSignal(e.signal, t.proxy(n)), n.metadata = i.metadata || {}, n;
}
function EI(e, t, i) {
  const n = {}, a = e.params.length;
  for (let o = 0; o < a; ++o) {
    const r = e.params[o];
    n[r.name] = jte(r, t, i);
  }
  return n;
}
function jte(e, t, i) {
  const n = e.type, a = t[e.name];
  if (n === "index")
    return zte(e, t, i);
  if (a === void 0) {
    e.required && ae("Missing required " + ne(t.type) + " parameter: " + ne(e.name));
    return;
  } else {
    if (n === "param")
      return Pte(e, t, i);
    if (n === "projection")
      return i.projectionRef(t[e.name]);
  }
  return e.array && !st(a) ? a.map((o) => YA(e, o, i)) : YA(e, a, i);
}
function YA(e, t, i) {
  const n = e.type;
  if (st(t))
    return JA(n) ? ae("Expression references can not be signals.") : yb(n) ? i.fieldRef(t) : ZA(n) ? i.compareRef(t) : i.signalRef(t.signal);
  {
    const a = e.expr || yb(n);
    return a && Nte(t) ? i.exprRef(t.expr, t.as) : a && qte(t) ? Df(t.field, t.as) : JA(n) ? Bn(t, i) : Lte(n) ? J(i.getData(t).values) : yb(n) ? Df(t) : ZA(n) ? i.compareRef(t) : t;
  }
}
function zte(e, t, i) {
  return cn(t.from) || ae('Lookup "from" parameter must be a string literal.'), i.getData(t.from).lookupRef(i, t.key);
}
function Pte(e, t, i) {
  const n = t[e.name];
  return e.array ? (ut(n) || ae("Expected an array of sub-parameters. Instead: " + ne(n)), n.map((a) => XA(e, a, i))) : XA(e, n, i);
}
function XA(e, t, i) {
  const n = e.params.length;
  let a;
  for (let r = 0; r < n; ++r) {
    a = e.params[r];
    for (const s in a.key)
      if (a.key[s] !== t[s]) {
        a = null;
        break;
      }
    if (a) break;
  }
  a || ae("Unsupported parameter: " + ne(t));
  const o = Xe(EI(a, t, i), a.key);
  return J(i.add(Iee(o)));
}
const Nte = (e) => e && e.expr, qte = (e) => e && e.field, Lte = (e) => e === "data", JA = (e) => e === "expr", yb = (e) => e === "field", ZA = (e) => e === "compare";
function Bte(e, t, i) {
  let n, a, o, r, s;
  return e ? (n = e.facet) && (t || ae("Only group marks can be faceted."), n.field != null ? r = s = Zc(n, i) : (e.data ? s = J(i.getData(e.data).aggregate) : (o = a1(Xe({
    type: "aggregate",
    groupby: Tt(n.groupby)
  }, n.aggregate), i), o.params.key = i.keyRef(n.groupby), o.params.pulse = Zc(n, i), r = s = J(i.add(o))), a = i.keyRef(n.groupby, !0))) : r = J(i.add(mn(null, [{}]))), r || (r = Zc(e, i)), {
    key: a,
    pulse: r,
    parent: s
  };
}
function Zc(e, t) {
  return e.$ref ? e : e.data && e.data.$ref ? e.data : J(t.getData(e.data).output);
}
function Br(e, t, i, n, a) {
  this.scope = e, this.input = t, this.output = i, this.values = n, this.aggregate = a, this.index = {};
}
Br.fromEntries = function(e, t) {
  const i = t.length, n = t[i - 1], a = t[i - 2];
  let o = t[0], r = null, s = 1;
  for (o && o.type === "load" && (o = t[1]), e.add(t[0]); s < i; ++s)
    t[s].params.pulse = J(t[s - 1]), e.add(t[s]), t[s].type === "aggregate" && (r = t[s]);
  return new Br(e, o, a, n, r);
};
function DI(e) {
  return cn(e) ? e : null;
}
function KA(e, t, i) {
  const n = mg(i.op, i.field);
  let a;
  if (t.ops) {
    for (let o = 0, r = t.as.length; o < r; ++o)
      if (t.as[o] === n) return;
  } else
    t.ops = ["count"], t.fields = [null], t.as = ["count"];
  i.op && (t.ops.push((a = i.op.signal) ? e.signalRef(a) : i.op), t.fields.push(e.fieldRef(i.field)), t.as.push(n));
}
function hd(e, t, i, n, a, o, r) {
  const s = t[i] || (t[i] = {}), l = fee(o);
  let d = DI(a), f, u;
  if (d != null && (e = t.scope, d = d + (l ? "|" + l : ""), f = s[d]), !f) {
    const c = o ? {
      field: rv,
      pulse: t.countsRef(e, a, o)
    } : {
      field: e.fieldRef(a),
      pulse: J(t.output)
    };
    l && (c.sort = e.sortRef(o)), u = e.add(gg(n, void 0, c)), r && (t.index[a] = u), f = J(u), d != null && (s[d] = f);
  }
  return f;
}
Br.prototype = {
  countsRef(e, t, i) {
    const n = this, a = n.counts || (n.counts = {}), o = DI(t);
    let r, s, l;
    return o != null && (e = n.scope, r = a[o]), r ? i && i.field && KA(e, r.agg.params, i) : (l = {
      groupby: e.fieldRef(t, "key"),
      pulse: J(n.output)
    }, i && i.field && KA(e, l, i), s = e.add(cI(l)), r = e.add(mn({
      pulse: J(s)
    })), r = {
      agg: s,
      ref: J(r)
    }, o != null && (a[o] = r)), r.ref;
  },
  tuplesRef() {
    return J(this.values);
  },
  extentRef(e, t) {
    return hd(e, this, "extent", "extent", t, !1);
  },
  domainRef(e, t) {
    return hd(e, this, "domain", "values", t, !1);
  },
  valuesRef(e, t, i) {
    return hd(e, this, "vals", "values", t, i || !0);
  },
  lookupRef(e, t) {
    return hd(e, this, "lookup", "tupleindex", t, !1);
  },
  indataRef(e, t) {
    return hd(e, this, "indata", "tupleindex", t, !0, !0);
  }
};
function Ute(e, t, i) {
  const n = e.from.facet, a = n.name, o = Zc(n, t);
  let r;
  n.name || ae("Facet must have a name: " + ne(n)), n.data || ae("Facet must reference a data set: " + ne(n)), n.field ? r = t.add(gI({
    field: t.fieldRef(n.field),
    pulse: o
  })) : n.groupby ? r = t.add(Aee({
    key: t.keyRef(n.groupby),
    group: J(t.proxy(i.parent)),
    pulse: o
  })) : ae("Facet must specify groupby or field: " + ne(n));
  const s = t.fork(), l = s.add(mn()), d = s.add(rs({
    pulse: J(l)
  }));
  s.addData(a, new Br(s, l, l, d)), s.addSignal("parent", null), r.params.subflow = {
    $subflow: s.parse(e).toRuntime()
  };
}
function Mte(e, t, i) {
  const n = t.add(gI({
    pulse: i.pulse
  })), a = t.fork();
  a.add(rs()), a.addSignal("parent", null), n.params.subflow = {
    $subflow: a.parse(e).toRuntime()
  };
}
function SI(e, t, i) {
  const n = e.remove, a = e.insert, o = e.toggle, r = e.modify, s = e.values, l = t.add(np()), d = "if(" + e.trigger + ',modify("' + i + '",' + [a, n, o, r, s].map((u) => u ?? "null").join(",") + "),0)", f = Bn(d, t);
  l.update = f.$expr, l.params = f.$params;
}
function xg(e, t) {
  const i = OI(e), n = e.type === yg, a = e.from && e.from.facet, o = e.overlap;
  let r = e.layout || i === Yx || i === Hx, s, l, d, f, u, c, h;
  const p = i === Gx || r || a, g = Bte(e.from, n, t);
  l = t.add($ee({
    key: g.key || (e.key ? Df(e.key) : void 0),
    pulse: g.pulse,
    clean: !n
  }));
  const m = J(l);
  l = d = t.add(mn({
    pulse: m
  })), l = t.add(Fee({
    markdef: Rte(e),
    interactive: Ite(e.interactive, t),
    clip: Cte(e.clip, t),
    context: {
      $context: !0
    },
    groups: t.lookup(),
    parent: t.signals.parent ? t.signalRef("parent") : null,
    index: t.markpath(),
    pulse: J(l)
  }));
  const b = J(l);
  l = f = t.add(pI(fI(e.encode, e.type, i, e.style, t, {
    mod: !1,
    pulse: b
  }))), l.params.parent = t.encode(), e.transform && e.transform.forEach(($) => {
    const _ = a1($, t), k = _.metadata;
    (k.generates || k.changes) && ae("Mark transforms should not generate new data."), k.nomod || (f.params.mod = !0), _.params.pulse = J(l), t.add(l = _);
  }), e.sort && (l = t.add(qee({
    sort: t.compareRef(e.sort),
    pulse: J(l)
  })));
  const y = J(l);
  (a || r) && (r = t.add(bI({
    layout: t.objectProperty(e.layout),
    legends: t.legends,
    mark: b,
    pulse: y
  })), c = J(r));
  const v = t.add(hI({
    mark: b,
    pulse: c || y
  }));
  h = J(v), n && (p && (s = t.operators, s.pop(), r && s.pop()), t.pushState(y, c || h, m), a ? Ute(e, t, g) : p ? Mte(e, t, g) : t.parse(e), t.popState(), p && (r && s.push(r), s.push(v))), o && (h = Vte(o, h, t));
  const w = t.add(mI({
    pulse: h
  })), x = t.add(rs({
    pulse: J(w)
  }, void 0, t.parent()));
  e.name != null && (u = e.name, t.addData(u, new Br(t, d, w, x)), e.on && e.on.forEach(($) => {
    ($.insert || $.remove || $.toggle) && ae("Marks only support modify triggers."), SI($, t, u);
  }));
}
function Vte(e, t, i) {
  const n = e.method, a = e.bound, o = e.separation, r = {
    separation: st(o) ? i.signalRef(o.signal) : o,
    method: st(n) ? i.signalRef(n.signal) : n,
    pulse: t
  };
  if (e.order && (r.sort = i.compareRef({
    field: e.order
  })), a) {
    const s = a.tolerance;
    r.boundTolerance = st(s) ? i.signalRef(s.signal) : +s, r.boundScale = i.scaleRef(a.scale), r.boundOrient = a.orient;
  }
  return J(i.add(Ree(r)));
}
function Wte(e, t) {
  const i = t.config.legend, n = e.encode || {}, a = yi(e, i), o = n.legend || {}, r = o.name || void 0, s = o.interactive, l = o.style, d = {};
  let f = 0, u, c, h;
  Qx.forEach((v) => e[v] ? (d[v] = e[v], f = f || e[v]) : 0), f || ae("Missing valid scale for legend.");
  const p = Gte(e, t.scaleType(f)), g = {
    title: e.title != null,
    scales: d,
    type: p,
    vgrad: p !== "symbol" && a.isVertical()
  }, m = J(t.add(mn(null, [g]))), b = {
    enter: {
      x: {
        value: 0
      },
      y: {
        value: 0
      }
    }
  }, y = J(t.add(Dee(c = {
    type: p,
    scale: t.scaleRef(f),
    count: t.objectProperty(a("tickCount")),
    limit: t.property(a("symbolLimit")),
    values: t.objectProperty(e.values),
    minstep: t.property(e.tickMinStep),
    formatType: t.property(e.formatType),
    formatSpecifier: t.property(e.format)
  })));
  return p === Jc ? (h = [yte(e, f, i, n.gradient), GA(e, i, n.labels, y)], c.count = c.count || t.signalRef(`max(2,2*floor((${Sr(a.gradientLength())})/100))`)) : p === fv ? h = [vte(e, f, i, n.gradient, y), GA(e, i, n.labels, y)] : (u = $te(e, i), h = [wte(e, i, n, y, Sr(u.columns))], c.size = Xte(e, t, h[0].marks)), h = [Ff({
    role: VQ,
    from: m,
    encode: b,
    marks: h,
    layout: u,
    interactive: s
  })], g.title && h.push(Tte(e, i, n.title, m)), xg(Ff({
    role: UQ,
    from: m,
    encode: ql(Yte(a, e, i), o, pu),
    marks: h,
    aria: a("aria"),
    description: a("description"),
    zindex: a("zindex"),
    name: r,
    interactive: s,
    style: l
  }), t);
}
function Gte(e, t) {
  let i = e.type || WA;
  return !e.type && Hte(e) === 1 && (e.fill || e.stroke) && (i = Kv(t) ? Jc : i$(t) ? fv : WA), i !== Jc ? i : i$(t) ? fv : Jc;
}
function Hte(e) {
  return Qx.reduce((t, i) => t + (e[i] ? 1 : 0), 0);
}
function Yte(e, t, i) {
  const n = {
    enter: {},
    update: {}
  };
  return $t(n, {
    orient: e("orient"),
    offset: e("offset"),
    padding: e("padding"),
    titlePadding: e("titlePadding"),
    cornerRadius: e("cornerRadius"),
    fill: e("fillColor"),
    stroke: e("strokeColor"),
    strokeWidth: i.strokeWidth,
    strokeDash: i.strokeDash,
    x: e("legendX"),
    y: e("legendY"),
    // accessibility support
    format: t.format,
    formatType: t.formatType
  }), n;
}
function Xte(e, t, i) {
  const n = Sr(QA("size", e, i)), a = Sr(QA("strokeWidth", e, i)), o = Sr(Jte(i[1].encode, t, hu));
  return Bn(`max(ceil(sqrt(${n})+${a}),${o})`, t);
}
function QA(e, t, i) {
  return t[e] ? `scale("${t[e]}",datum)` : kI(e, i[0].encode);
}
function Jte(e, t, i) {
  return kI("fontSize", e) || mte("fontSize", t, i);
}
const Zte = `item.orient==="${Ll}"?-90:item.orient==="${Bl}"?90:0`;
function Kte(e, t) {
  e = cn(e) ? {
    text: e
  } : e;
  const i = yi(e, t.config.title), n = e.encode || {}, a = n.group || {}, o = a.name || void 0, r = a.interactive, s = a.style, l = [], d = {}, f = J(t.add(mn(null, [d])));
  return l.push(tie(e, i, Qte(e), f)), e.subtitle && l.push(iie(e, i, n.subtitle, f)), xg(Ff({
    role: YQ,
    from: f,
    encode: eie(i, a),
    marks: l,
    aria: i("aria"),
    description: i("description"),
    zindex: i("zindex"),
    name: o,
    interactive: r,
    style: s
  }), t);
}
function Qte(e) {
  const t = e.encode;
  return t && t.title || Xe({
    name: e.name,
    interactive: e.interactive,
    style: e.style
  }, t);
}
function eie(e, t) {
  const i = {
    enter: {},
    update: {}
  };
  return $t(i, {
    orient: e("orient"),
    anchor: e("anchor"),
    align: {
      signal: t1
    },
    angle: {
      signal: Zte
    },
    limit: e("limit"),
    frame: e("frame"),
    offset: e("offset") || 0,
    padding: e("subtitlePadding")
  }), ql(i, t, pu);
}
function tie(e, t, i, n) {
  const a = {
    value: 0
  }, o = e.text, r = {
    enter: {
      opacity: a
    },
    update: {
      opacity: {
        value: 1
      }
    },
    exit: {
      opacity: a
    }
  };
  return $t(r, {
    text: o,
    align: {
      signal: "item.mark.group.align"
    },
    angle: {
      signal: "item.mark.group.angle"
    },
    limit: {
      signal: "item.mark.group.limit"
    },
    baseline: "top",
    dx: t("dx"),
    dy: t("dy"),
    fill: t("color"),
    font: t("font"),
    fontSize: t("fontSize"),
    fontStyle: t("fontStyle"),
    fontWeight: t("fontWeight"),
    lineHeight: t("lineHeight")
  }, {
    // update
    align: t("align"),
    angle: t("angle"),
    baseline: t("baseline")
  }), Ci({
    type: ss,
    role: XQ,
    style: ste,
    from: n,
    encode: r
  }, i);
}
function iie(e, t, i, n) {
  const a = {
    value: 0
  }, o = e.subtitle, r = {
    enter: {
      opacity: a
    },
    update: {
      opacity: {
        value: 1
      }
    },
    exit: {
      opacity: a
    }
  };
  return $t(r, {
    text: o,
    align: {
      signal: "item.mark.group.align"
    },
    angle: {
      signal: "item.mark.group.angle"
    },
    limit: {
      signal: "item.mark.group.limit"
    },
    baseline: "top",
    dx: t("dx"),
    dy: t("dy"),
    fill: t("subtitleColor"),
    font: t("subtitleFont"),
    fontSize: t("subtitleFontSize"),
    fontStyle: t("subtitleFontStyle"),
    fontWeight: t("subtitleFontWeight"),
    lineHeight: t("subtitleLineHeight")
  }, {
    // update
    align: t("align"),
    angle: t("angle"),
    baseline: t("baseline")
  }), Ci({
    type: ss,
    role: JQ,
    style: lte,
    from: n,
    encode: r
  }, i);
}
function nie(e, t) {
  const i = [];
  e.transform && e.transform.forEach((n) => {
    i.push(a1(n, t));
  }), e.on && e.on.forEach((n) => {
    SI(n, t, e.name);
  }), t.addDataPipeline(e.name, aie(e, t, i));
}
function aie(e, t, i) {
  const n = [];
  let a = null, o = !1, r = !1, s, l, d, f, u;
  for (e.values ? st(e.values) || Yc(e.format) ? (n.push(e2(t, e)), n.push(a = ir())) : n.push(a = ir({
    $ingest: e.values,
    $format: e.format
  })) : e.url ? Yc(e.url) || Yc(e.format) ? (n.push(e2(t, e)), n.push(a = ir())) : n.push(a = ir({
    $request: e.url,
    $format: e.format
  })) : e.source && (a = s = Tt(e.source).map((c) => J(t.getData(c).output)), n.push(null)), l = 0, d = i.length; l < d; ++l)
    f = i[l], u = f.metadata, !a && !u.source && n.push(a = ir()), n.push(f), u.generates && (r = !0), u.modifies && !r && (o = !0), u.source ? a = f : u.changes && (a = null);
  return s && (d = s.length - 1, n[0] = Pee({
    derive: o,
    pulse: d ? s : s[0]
  }), (o || d) && n.splice(1, 0, ir())), a || n.push(ir()), n.push(rs({})), n;
}
function ir(e) {
  const t = mn({}, e);
  return t.metadata = {
    source: !0
  }, t;
}
function e2(e, t) {
  return See({
    url: t.url ? e.property(t.url) : void 0,
    async: t.async ? e.property(t.async) : void 0,
    values: t.values ? e.property(t.values) : void 0,
    format: e.objectProperty(t.format)
  });
}
const FI = (e) => e === Do || e === bn, wg = (e, t, i) => st(e) ? lie(e.signal, t, i) : e === Ll || e === bn ? t : i, ht = (e, t, i) => st(e) ? rie(e.signal, t, i) : FI(e) ? t : i, ln = (e, t, i) => st(e) ? sie(e.signal, t, i) : FI(e) ? i : t, TI = (e, t, i) => st(e) ? die(e.signal, t, i) : e === bn ? {
  value: t
} : {
  value: i
}, oie = (e, t, i) => st(e) ? fie(e.signal, t, i) : e === Bl ? {
  value: t
} : {
  value: i
}, rie = (e, t, i) => CI(`${e} === '${bn}' || ${e} === '${Do}'`, t, i), sie = (e, t, i) => CI(`${e} !== '${bn}' && ${e} !== '${Do}'`, t, i), lie = (e, t, i) => o1(`${e} === '${Ll}' || ${e} === '${bn}'`, t, i), die = (e, t, i) => o1(`${e} === '${bn}'`, t, i), fie = (e, t, i) => o1(`${e} === '${Bl}'`, t, i), CI = (e, t, i) => (t = t != null ? ct(t) : t, i = i != null ? ct(i) : i, t2(t) && t2(i) ? (t = t ? t.signal || ne(t.value) : null, i = i ? i.signal || ne(i.value) : null, {
  signal: `${e} ? (${t}) : (${i})`
}) : [Xe({
  test: e
}, t)].concat(i || [])), t2 = (e) => e == null || Object.keys(e).length === 1, o1 = (e, t, i) => ({
  signal: `${e} ? (${zs(t)}) : (${zs(i)})`
}), uie = (e, t, i, n, a) => ({
  signal: (n != null ? `${e} === '${Ll}' ? (${zs(n)}) : ` : "") + (i != null ? `${e} === '${Do}' ? (${zs(i)}) : ` : "") + (a != null ? `${e} === '${Bl}' ? (${zs(a)}) : ` : "") + (t != null ? `${e} === '${bn}' ? (${zs(t)}) : ` : "") + "(null)"
}), zs = (e) => st(e) ? e.signal : e == null ? null : ne(e), cie = (e, t) => t === 0 ? 0 : st(e) ? {
  signal: `(${e.signal}) * ${t}`
} : {
  value: e * t
}, Bs = (e, t) => {
  const i = e.signal;
  return i && i.endsWith("(null)") ? {
    signal: i.slice(0, -6) + t.signal
  } : e;
};
function Es(e, t, i, n) {
  let a;
  if (t && wi(t, e))
    return t[e];
  if (wi(i, e))
    return i[e];
  if (e.startsWith("title")) {
    switch (e) {
      case "titleColor":
        a = "fill";
        break;
      case "titleFont":
      case "titleFontSize":
      case "titleFontWeight":
        a = e[5].toLowerCase() + e.slice(6);
    }
    return n[Kx][a];
  } else if (e.startsWith("label")) {
    switch (e) {
      case "labelColor":
        a = "fill";
        break;
      case "labelFont":
      case "labelFontSize":
        a = e[5].toLowerCase() + e.slice(6);
    }
    return n[hu][a];
  }
  return null;
}
function i2(e) {
  const t = {};
  for (const i of e)
    if (i)
      for (const n in i) t[n] = 1;
  return Object.keys(t);
}
function hie(e, t) {
  var i = t.config, n = i.style, a = i.axis, o = t.scaleType(e.scale) === "band" && i.axisBand, r = e.orient, s, l, d;
  if (st(r)) {
    const u = i2([i.axisX, i.axisY]), c = i2([i.axisTop, i.axisBottom, i.axisLeft, i.axisRight]);
    s = {};
    for (d of u)
      s[d] = ht(r, Es(d, i.axisX, a, n), Es(d, i.axisY, a, n));
    l = {};
    for (d of c)
      l[d] = uie(r.signal, Es(d, i.axisTop, a, n), Es(d, i.axisBottom, a, n), Es(d, i.axisLeft, a, n), Es(d, i.axisRight, a, n));
  } else
    s = r === bn || r === Do ? i.axisX : i.axisY, l = i["axis" + r[0].toUpperCase() + r.slice(1)];
  return s || l || o ? Xe({}, a, s, l, o) : a;
}
function pie(e, t, i, n) {
  const a = yi(e, t), o = e.orient;
  let r, s;
  const l = {
    enter: r = {
      opacity: ue
    },
    update: s = {
      opacity: Ui
    },
    exit: {
      opacity: ue
    }
  };
  $t(l, {
    stroke: a("domainColor"),
    strokeCap: a("domainCap"),
    strokeDash: a("domainDash"),
    strokeDashOffset: a("domainDashOffset"),
    strokeWidth: a("domainWidth"),
    strokeOpacity: a("domainOpacity")
  });
  const d = n2(e, 0), f = n2(e, 1);
  return r.x = s.x = ht(o, d, ue), r.x2 = s.x2 = ht(o, f), r.y = s.y = ln(o, d, ue), r.y2 = s.y2 = ln(o, f), Ci({
    type: e1,
    role: PQ,
    from: n,
    encode: l
  }, i);
}
function n2(e, t) {
  return {
    scale: e.scale,
    range: t
  };
}
function gie(e, t, i, n, a) {
  const o = yi(e, t), r = e.orient, s = e.gridScale, l = wg(r, 1, -1), d = mie(e.offset, l);
  let f, u, c;
  const h = {
    enter: f = {
      opacity: ue
    },
    update: c = {
      opacity: Ui
    },
    exit: u = {
      opacity: ue
    }
  };
  $t(h, {
    stroke: o("gridColor"),
    strokeCap: o("gridCap"),
    strokeDash: o("gridDash"),
    strokeDashOffset: o("gridDashOffset"),
    strokeOpacity: o("gridOpacity"),
    strokeWidth: o("gridWidth")
  });
  const p = {
    scale: e.scale,
    field: Bi,
    band: a.band,
    extra: a.extra,
    offset: a.offset,
    round: o("tickRound")
  }, g = ht(r, {
    signal: "height"
  }, {
    signal: "width"
  }), m = s ? {
    scale: s,
    range: 0,
    mult: l,
    offset: d
  } : {
    value: 0,
    offset: d
  }, b = s ? {
    scale: s,
    range: 1,
    mult: l,
    offset: d
  } : Xe(g, {
    mult: l,
    offset: d
  });
  return f.x = c.x = ht(r, p, m), f.y = c.y = ln(r, p, m), f.x2 = c.x2 = ln(r, b), f.y2 = c.y2 = ht(r, b), u.x = ht(r, p), u.y = ln(r, p), Ci({
    type: e1,
    role: NQ,
    key: Bi,
    from: n,
    encode: h
  }, i);
}
function mie(e, t) {
  if (t !== 1) if (!Re(e))
    e = st(t) ? {
      signal: `(${t.signal}) * (${e || 0})`
    } : t * (e || 0);
  else {
    let i = e = Xe({}, e);
    for (; i.mult != null; )
      if (Re(i.mult))
        i = i.mult = Xe({}, i.mult);
      else
        return i.mult = st(t) ? {
          signal: `(${i.mult}) * (${t.signal})`
        } : i.mult * t, e;
    i.mult = t;
  }
  return e;
}
function bie(e, t, i, n, a, o) {
  const r = yi(e, t), s = e.orient, l = wg(s, -1, 1);
  let d, f, u;
  const c = {
    enter: d = {
      opacity: ue
    },
    update: u = {
      opacity: Ui
    },
    exit: f = {
      opacity: ue
    }
  };
  $t(c, {
    stroke: r("tickColor"),
    strokeCap: r("tickCap"),
    strokeDash: r("tickDash"),
    strokeDashOffset: r("tickDashOffset"),
    strokeOpacity: r("tickOpacity"),
    strokeWidth: r("tickWidth")
  });
  const h = ct(a);
  h.mult = l;
  const p = {
    scale: e.scale,
    field: Bi,
    band: o.band,
    extra: o.extra,
    offset: o.offset,
    round: r("tickRound")
  };
  return u.y = d.y = ht(s, ue, p), u.y2 = d.y2 = ht(s, h), f.x = ht(s, p), u.x = d.x = ln(s, ue, p), u.x2 = d.x2 = ln(s, h), f.y = ln(s, p), Ci({
    type: e1,
    role: LQ,
    key: Bi,
    from: n,
    encode: c
  }, i);
}
function vb(e, t, i, n, a) {
  return {
    signal: 'flush(range("' + e + '"), scale("' + e + '", datum.value), ' + t + "," + i + "," + n + "," + a + ")"
  };
}
function yie(e, t, i, n, a, o) {
  const r = yi(e, t), s = e.orient, l = e.scale, d = wg(s, -1, 1), f = Sr(r("labelFlush")), u = Sr(r("labelFlushOffset")), c = r("labelAlign"), h = r("labelBaseline");
  let p = f === 0 || !!f, g;
  const m = ct(a);
  m.mult = d, m.offset = ct(r("labelPadding") || 0), m.offset.mult = d;
  const b = {
    scale: l,
    field: Bi,
    band: 0.5,
    offset: AI(o.offset, r("labelOffset"))
  }, y = ht(s, p ? vb(l, f, '"left"', '"right"', '"center"') : {
    value: "center"
  }, oie(s, "left", "right")), v = ht(s, TI(s, "bottom", "top"), p ? vb(l, f, '"top"', '"bottom"', '"middle"') : {
    value: "middle"
  }), w = vb(l, f, `-(${u})`, u, 0);
  p = p && u;
  const x = {
    opacity: ue,
    x: ht(s, b, m),
    y: ln(s, b, m)
  }, $ = {
    enter: x,
    update: g = {
      opacity: Ui,
      text: {
        field: Zx
      },
      x: x.x,
      y: x.y,
      align: y,
      baseline: v
    },
    exit: {
      opacity: ue,
      x: x.x,
      y: x.y
    }
  };
  $t($, {
    dx: !c && p ? ht(s, w) : null,
    dy: !h && p ? ln(s, w) : null
  }), $t($, {
    angle: r("labelAngle"),
    fill: r("labelColor"),
    fillOpacity: r("labelOpacity"),
    font: r("labelFont"),
    fontSize: r("labelFontSize"),
    fontWeight: r("labelFontWeight"),
    fontStyle: r("labelFontStyle"),
    limit: r("labelLimit"),
    lineHeight: r("labelLineHeight")
  }, {
    align: c,
    baseline: h
  });
  const _ = r("labelBound");
  let k = r("labelOverlap");
  return k = k || _ ? {
    separation: r("labelSeparation"),
    method: k,
    order: "datum.index",
    bound: _ ? {
      scale: l,
      orient: s,
      tolerance: _
    } : null
  } : void 0, g.align !== y && (g.align = Bs(g.align, y)), g.baseline !== v && (g.baseline = Bs(g.baseline, v)), Ci({
    type: ss,
    role: qQ,
    style: hu,
    key: Bi,
    from: n,
    encode: $,
    overlap: k
  }, i);
}
function vie(e, t, i, n) {
  const a = yi(e, t), o = e.orient, r = wg(o, -1, 1);
  let s, l;
  const d = {
    enter: s = {
      opacity: ue,
      anchor: ct(a("titleAnchor", null)),
      align: {
        signal: t1
      }
    },
    update: l = Xe({}, s, {
      opacity: Ui,
      text: ct(e.title)
    }),
    exit: {
      opacity: ue
    }
  }, f = {
    signal: `lerp(range("${e.scale}"), ${vg(0, 1, 0.5)})`
  };
  return l.x = ht(o, f), l.y = ln(o, f), s.angle = ht(o, ue, cie(r, 90)), s.baseline = ht(o, TI(o, Do, bn), {
    value: Do
  }), l.angle = s.angle, l.baseline = s.baseline, $t(d, {
    fill: a("titleColor"),
    fillOpacity: a("titleOpacity"),
    font: a("titleFont"),
    fontSize: a("titleFontSize"),
    fontStyle: a("titleFontStyle"),
    fontWeight: a("titleFontWeight"),
    limit: a("titleLimit"),
    lineHeight: a("titleLineHeight")
  }, {
    // require update
    align: a("titleAlign"),
    angle: a("titleAngle"),
    baseline: a("titleBaseline")
  }), _ie(a, o, d, i), d.update.align = Bs(d.update.align, s.align), d.update.angle = Bs(d.update.angle, s.angle), d.update.baseline = Bs(d.update.baseline, s.baseline), Ci({
    type: ss,
    role: BQ,
    style: Kx,
    from: n,
    encode: d
  }, i);
}
function _ie(e, t, i, n) {
  const a = (s, l) => s != null ? (i.update[l] = Bs(ct(s), i.update[l]), !1) : !Ts(l, n), o = a(e("titleX"), "x"), r = a(e("titleY"), "y");
  i.enter.auto = r === o ? ct(r) : ht(t, ct(r), ct(o));
}
function xie(e, t) {
  const i = hie(e, t), n = e.encode || {}, a = n.axis || {}, o = a.name || void 0, r = a.interactive, s = a.style, l = yi(e, i), d = bte(l), f = {
    scale: e.scale,
    ticks: !!l("ticks"),
    labels: !!l("labels"),
    grid: !!l("grid"),
    domain: !!l("domain"),
    title: e.title != null
  }, u = J(t.add(mn({}, [f]))), c = J(t.add(wee({
    scale: t.scaleRef(e.scale),
    extra: t.property(d.extra),
    count: t.objectProperty(e.tickCount),
    values: t.objectProperty(e.values),
    minstep: t.property(e.tickMinStep),
    formatType: t.property(e.formatType),
    formatSpecifier: t.property(e.format)
  }))), h = [];
  let p;
  return f.grid && h.push(gie(e, i, n.grid, c, d)), f.ticks && (p = l("tickSize"), h.push(bie(e, i, n.ticks, c, p, d))), f.labels && (p = f.ticks ? p : 0, h.push(yie(e, i, n.labels, c, p, d))), f.domain && h.push(pie(e, i, n.domain, u)), f.title && h.push(vie(e, i, n.title, u)), xg(Ff({
    role: zQ,
    from: u,
    encode: ql(wie(l, e), a, pu),
    marks: h,
    aria: l("aria"),
    description: l("description"),
    zindex: l("zindex"),
    name: o,
    interactive: r,
    style: s
  }), t);
}
function wie(e, t) {
  const i = {
    enter: {},
    update: {}
  };
  return $t(i, {
    orient: e("orient"),
    offset: e("offset") || 0,
    position: Ki(t.position, 0),
    titlePadding: e("titlePadding"),
    minExtent: e("minExtent"),
    maxExtent: e("maxExtent"),
    range: {
      signal: `abs(span(range("${t.scale}")))`
    },
    translate: e("translate"),
    // accessibility support
    format: t.format,
    formatType: t.formatType
  }), i;
}
function RI(e, t, i) {
  const n = Tt(e.signals), a = Tt(e.scales);
  return i || n.forEach((o) => uI(o, t)), Tt(e.projections).forEach((o) => ete(o, t)), a.forEach((o) => Uee(o, t)), Tt(e.data).forEach((o) => nie(o, t)), a.forEach((o) => Mee(o, t)), (i || n).forEach((o) => xee(o, t)), Tt(e.axes).forEach((o) => xie(o, t)), Tt(e.marks).forEach((o) => xg(o, t)), Tt(e.legends).forEach((o) => Wte(o, t)), e.title && Kte(e.title, t), t.parseLambdas(), t;
}
const $ie = (e) => ql({
  enter: {
    x: {
      value: 0
    },
    y: {
      value: 0
    }
  },
  update: {
    width: {
      signal: "width"
    },
    height: {
      signal: "height"
    }
  }
}, e);
function kie(e, t) {
  const i = t.config, n = J(t.root = t.add(np())), a = Aie(e, i);
  a.forEach((d) => uI(d, t)), t.description = e.description || i.description, t.eventConfig = i.events, t.legends = t.objectProperty(i.legend && i.legend.layout), t.locale = i.locale;
  const o = t.add(mn()), r = t.add(pI(fI($ie(e.encode), yg, Hx, e.style, t, {
    pulse: J(o)
  }))), s = t.add(bI({
    layout: t.objectProperty(e.layout),
    legends: t.legends,
    autosize: t.signalRef("autosize"),
    mark: n,
    pulse: J(r)
  }));
  t.operators.pop(), t.pushState(J(r), J(s), null), RI(e, t, a), t.operators.push(s);
  let l = t.add(hI({
    mark: n,
    pulse: J(s)
  }));
  return l = t.add(mI({
    pulse: J(l)
  })), l = t.add(rs({
    pulse: J(l)
  })), t.addData("root", new Br(t, o, o, l)), t;
}
function pd(e, t) {
  return t && t.signal ? {
    name: e,
    update: t.signal
  } : {
    name: e,
    value: t
  };
}
function Aie(e, t) {
  const i = (r) => Ki(e[r], t[r]), n = [pd("background", i("background")), pd("autosize", RQ(i("autosize"))), pd("padding", jQ(i("padding"))), pd("width", i("width") || 0), pd("height", i("height") || 0)], a = n.reduce((r, s) => (r[s.name] = s, r), {}), o = {};
  return Tt(e.signals).forEach((r) => {
    wi(a, r.name) ? r = Xe(a[r.name], r) : n.push(r), o[r.name] = r;
  }), Tt(t.signals).forEach((r) => {
    !wi(o, r.name) && !wi(a, r.name) && n.push(r);
  }), n;
}
function II(e, t) {
  this.config = e || {}, this.options = t || {}, this.bindings = [], this.field = {}, this.signals = {}, this.lambdas = {}, this.scales = {}, this.events = {}, this.data = {}, this.streams = [], this.updates = [], this.operators = [], this.eventConfig = null, this.locale = null, this._id = 0, this._subid = 0, this._nextsub = [0], this._parent = [], this._encode = [], this._lookup = [], this._markpath = [];
}
function a2(e) {
  this.config = e.config, this.options = e.options, this.legends = e.legends, this.field = Object.create(e.field), this.signals = Object.create(e.signals), this.lambdas = Object.create(e.lambdas), this.scales = Object.create(e.scales), this.events = Object.create(e.events), this.data = Object.create(e.data), this.streams = [], this.updates = [], this.operators = [], this._id = 0, this._subid = ++e._nextsub[0], this._nextsub = e._nextsub, this._parent = e._parent.slice(), this._encode = e._encode.slice(), this._lookup = e._lookup.slice(), this._markpath = e._markpath;
}
II.prototype = a2.prototype = {
  parse(e) {
    return RI(e, this);
  },
  fork() {
    return new a2(this);
  },
  isSubscope() {
    return this._subid > 0;
  },
  toRuntime() {
    return this.finish(), {
      description: this.description,
      operators: this.operators,
      streams: this.streams,
      updates: this.updates,
      bindings: this.bindings,
      eventConfig: this.eventConfig,
      locale: this.locale
    };
  },
  id() {
    return (this._subid ? this._subid + ":" : 0) + this._id++;
  },
  add(e) {
    return this.operators.push(e), e.id = this.id(), e.refs && (e.refs.forEach((t) => {
      t.$ref = e.id;
    }), e.refs = null), e;
  },
  proxy(e) {
    const t = e instanceof ov ? J(e) : e;
    return this.add(zee({
      value: t
    }));
  },
  addStream(e) {
    return this.streams.push(e), e.id = this.id(), e;
  },
  addUpdate(e) {
    return this.updates.push(e), e;
  },
  // Apply metadata
  finish() {
    let e, t;
    this.root && (this.root.root = !0);
    for (e in this.signals)
      this.signals[e].signal = e;
    for (e in this.scales)
      this.scales[e].scale = e;
    function i(n, a, o) {
      let r, s;
      n && (r = n.data || (n.data = {}), s = r[a] || (r[a] = []), s.push(o));
    }
    for (e in this.data) {
      t = this.data[e], i(t.input, e, "input"), i(t.output, e, "output"), i(t.values, e, "values");
      for (const n in t.index)
        i(t.index[n], e, "index:" + n);
    }
    return this;
  },
  // ----
  pushState(e, t, i) {
    this._encode.push(J(this.add(rs({
      pulse: e
    })))), this._parent.push(t), this._lookup.push(i ? J(this.proxy(i)) : null), this._markpath.push(-1);
  },
  popState() {
    this._encode.pop(), this._parent.pop(), this._lookup.pop(), this._markpath.pop();
  },
  parent() {
    return Hd(this._parent);
  },
  encode() {
    return Hd(this._encode);
  },
  lookup() {
    return Hd(this._lookup);
  },
  markpath() {
    const e = this._markpath;
    return ++e[e.length - 1];
  },
  // ----
  fieldRef(e, t) {
    if (cn(e)) return Df(e, t);
    e.signal || ae("Unsupported field reference: " + ne(e));
    const i = e.signal;
    let n = this.field[i];
    if (!n) {
      const a = {
        name: this.signalRef(i)
      };
      t && (a.as = t), this.field[i] = n = J(this.add(Oee(a)));
    }
    return n;
  },
  compareRef(e) {
    let t = !1;
    const i = (o) => st(o) ? (t = !0, this.signalRef(o.signal)) : uee(o) ? (t = !0, this.exprRef(o.expr)) : o, n = Tt(e.field).map(i), a = Tt(e.order).map(i);
    return t ? J(this.add(VA({
      fields: n,
      orders: a
    }))) : UA(n, a);
  },
  keyRef(e, t) {
    let i = !1;
    const n = (o) => st(o) ? (i = !0, J(a[o.signal])) : o, a = this.signals;
    return e = Tt(e).map(n), i ? J(this.add(Eee({
      fields: e,
      flat: t
    }))) : see(e, t);
  },
  sortRef(e) {
    if (!e) return e;
    const t = mg(e.op, e.field), i = e.order || lee;
    return i.signal ? J(this.add(VA({
      fields: t,
      orders: this.signalRef(i.signal)
    }))) : UA(t, i);
  },
  // ----
  event(e, t) {
    const i = e + ":" + t;
    if (!this.events[i]) {
      const n = this.id();
      this.streams.push({
        id: n,
        source: e,
        type: t
      }), this.events[i] = n;
    }
    return this.events[i];
  },
  // ----
  hasOwnSignal(e) {
    return wi(this.signals, e);
  },
  addSignal(e, t) {
    this.hasOwnSignal(e) && ae("Duplicate signal name: " + ne(e));
    const i = t instanceof ov ? t : this.add(np(t));
    return this.signals[e] = i;
  },
  getSignal(e) {
    return this.signals[e] || ae("Unrecognized signal name: " + ne(e)), this.signals[e];
  },
  signalRef(e) {
    return this.signals[e] ? J(this.signals[e]) : (wi(this.lambdas, e) || (this.lambdas[e] = this.add(np(null))), J(this.lambdas[e]));
  },
  parseLambdas() {
    const e = Object.keys(this.lambdas);
    for (let t = 0, i = e.length; t < i; ++t) {
      const n = e[t], a = Bn(n, this), o = this.lambdas[n];
      o.params = a.$params, o.update = a.$expr;
    }
  },
  property(e) {
    return e && e.signal ? this.signalRef(e.signal) : e;
  },
  objectProperty(e) {
    return !e || !Re(e) ? e : this.signalRef(e.signal || r1(e));
  },
  exprRef(e, t) {
    const i = {
      expr: Bn(e, this)
    };
    return t && (i.expr.$name = t), J(this.add(kee(i)));
  },
  addBinding(e, t) {
    this.bindings || ae("Nested signals do not support binding: " + ne(e)), this.bindings.push(Xe({
      signal: e
    }, t));
  },
  // ----
  addScaleProj(e, t) {
    wi(this.scales, e) && ae("Duplicate scale or projection name: " + ne(e)), this.scales[e] = this.add(t);
  },
  addScale(e, t) {
    this.addScaleProj(e, Nee(t));
  },
  addProjection(e, t) {
    this.addScaleProj(e, jee(t));
  },
  getScale(e) {
    return this.scales[e] || ae("Unrecognized scale name: " + ne(e)), this.scales[e];
  },
  scaleRef(e) {
    return J(this.getScale(e));
  },
  scaleType(e) {
    return this.getScale(e).params.type;
  },
  projectionRef(e) {
    return this.scaleRef(e);
  },
  projectionType(e) {
    return this.scaleType(e);
  },
  // ----
  addData(e, t) {
    return wi(this.data, e) && ae("Duplicate data set name: " + ne(e)), this.data[e] = t;
  },
  getData(e) {
    return this.data[e] || ae("Undefined data set name: " + ne(e)), this.data[e];
  },
  addDataPipeline(e, t) {
    return wi(this.data, e) && ae("Duplicate data set name: " + ne(e)), this.addData(e, Br.fromEntries(this, t));
  }
};
function r1(e) {
  return (ut(e) ? Oie : Eie)(e);
}
function Oie(e) {
  const t = e.length;
  let i = "[";
  for (let n = 0; n < t; ++n) {
    const a = e[n];
    i += (n > 0 ? "," : "") + (Re(a) ? a.signal || r1(a) : ne(a));
  }
  return i + "]";
}
function Eie(e) {
  let t = "{", i = 0, n, a;
  for (n in e)
    a = e[n], t += (++i > 1 ? "," : "") + ne(n) + ":" + (Re(a) ? a.signal || r1(a) : ne(a));
  return t + "}";
}
function Die() {
  const e = "sans-serif", n = "#4c78a8", a = "#000", o = "#888", r = "#ddd";
  return {
    // default visualization description
    description: "Vega visualization",
    // default padding around visualization
    padding: 0,
    // default for automatic sizing; options: 'none', 'pad', 'fit'
    // or provide an object (e.g., {'type': 'pad', 'resize': true})
    autosize: "pad",
    // default view background color
    // covers the entire view component
    background: null,
    // default event handling configuration
    // preventDefault for view-sourced event types except 'wheel'
    events: {
      defaults: {
        allow: ["wheel"]
      }
    },
    // defaults for top-level group marks
    // accepts mark properties (fill, stroke, etc)
    // covers the data rectangle within group width/height
    group: null,
    // defaults for basic mark types
    // each subset accepts mark properties (fill, stroke, etc)
    mark: null,
    arc: {
      fill: n
    },
    area: {
      fill: n
    },
    image: null,
    line: {
      stroke: n,
      strokeWidth: 2
    },
    path: {
      stroke: n
    },
    rect: {
      fill: n
    },
    rule: {
      stroke: a
    },
    shape: {
      stroke: n
    },
    symbol: {
      fill: n,
      size: 64
    },
    text: {
      fill: a,
      font: e,
      fontSize: 11
    },
    trail: {
      fill: n,
      size: 2
    },
    // style definitions
    style: {
      // axis & legend labels
      "guide-label": {
        fill: a,
        font: e,
        fontSize: 10
      },
      // axis & legend titles
      "guide-title": {
        fill: a,
        font: e,
        fontSize: 11,
        fontWeight: "bold"
      },
      // headers, including chart title
      "group-title": {
        fill: a,
        font: e,
        fontSize: 13,
        fontWeight: "bold"
      },
      // chart subtitle
      "group-subtitle": {
        fill: a,
        font: e,
        fontSize: 12
      },
      // defaults for styled point marks in Vega-Lite
      point: {
        size: 30,
        strokeWidth: 2,
        shape: "circle"
      },
      circle: {
        size: 30,
        strokeWidth: 2
      },
      square: {
        size: 30,
        strokeWidth: 2,
        shape: "square"
      },
      // defaults for styled group marks in Vega-Lite
      cell: {
        fill: "transparent",
        stroke: r
      },
      view: {
        fill: "transparent"
      }
    },
    // defaults for title
    title: {
      orient: "top",
      anchor: "middle",
      offset: 4,
      subtitlePadding: 3
    },
    // defaults for axes
    axis: {
      minExtent: 0,
      maxExtent: 200,
      bandPosition: 0.5,
      domain: !0,
      domainWidth: 1,
      domainColor: o,
      grid: !1,
      gridWidth: 1,
      gridColor: r,
      labels: !0,
      labelAngle: 0,
      labelLimit: 180,
      labelOffset: 0,
      labelPadding: 2,
      ticks: !0,
      tickColor: o,
      tickOffset: 0,
      tickRound: !0,
      tickSize: 5,
      tickWidth: 1,
      titlePadding: 4
    },
    // correction for centering bias
    axisBand: {
      tickOffset: -0.5
    },
    // defaults for cartographic projection
    projection: {
      type: "mercator"
    },
    // defaults for legends
    legend: {
      orient: "right",
      padding: 0,
      gridAlign: "each",
      columnPadding: 10,
      rowPadding: 2,
      symbolDirection: "vertical",
      gradientDirection: "vertical",
      gradientLength: 200,
      gradientThickness: 16,
      gradientStrokeColor: r,
      gradientStrokeWidth: 0,
      gradientLabelOffset: 2,
      labelAlign: "left",
      labelBaseline: "middle",
      labelLimit: 160,
      labelOffset: 4,
      labelOverlap: !0,
      symbolLimit: 30,
      symbolType: "circle",
      symbolSize: 100,
      symbolOffset: 0,
      symbolStrokeWidth: 1.5,
      symbolBaseFillColor: "transparent",
      symbolBaseStrokeColor: o,
      titleLimit: 180,
      titleOrient: "top",
      titlePadding: 5,
      layout: {
        offset: 18,
        direction: "horizontal",
        left: {
          direction: "vertical"
        },
        right: {
          direction: "vertical"
        }
      }
    },
    // defaults for scale ranges
    range: {
      category: {
        scheme: "tableau10"
      },
      ordinal: {
        scheme: "blues"
      },
      heatmap: {
        scheme: "yellowgreenblue"
      },
      ramp: {
        scheme: "blues"
      },
      diverging: {
        scheme: "blueorange",
        extent: [1, 0]
      },
      symbol: ["circle", "square", "triangle-up", "cross", "diamond", "triangle-right", "triangle-down", "triangle-left"]
    }
  };
}
function Sie(e, t, i) {
  return Re(e) || ae("Input Vega specification must be an object."), t = _Q(Die(), t, e.config), kie(e, new II(t, i)).toRuntime();
}
const Fie = "RawCode", Tie = "Literal", Cie = "Property", Rie = "Identifier", Iie = "ArrayExpression", jie = "BinaryExpression", zie = "CallExpression", Pie = "ConditionalExpression", Nie = "LogicalExpression", qie = "MemberExpression", Lie = "ObjectExpression", Bie = "UnaryExpression";
function yn(e) {
  this.type = e;
}
yn.prototype.visit = function(e) {
  let t, i, n;
  if (e(this)) return 1;
  for (t = Uie(this), i = 0, n = t.length; i < n; ++i)
    if (t[i].visit(e)) return 1;
};
function Uie(e) {
  switch (e.type) {
    case Iie:
      return e.elements;
    case jie:
    case Nie:
      return [e.left, e.right];
    case zie:
      return [e.callee].concat(e.arguments);
    case Pie:
      return [e.test, e.consequent, e.alternate];
    case qie:
      return [e.object, e.property];
    case Lie:
      return e.properties;
    case Cie:
      return [e.key, e.value];
    case Bie:
      return [e.argument];
    case Rie:
    case Tie:
    case Fie:
    default:
      return [];
  }
}
var Qn, H, R, Pt, Oe, $g = 1, gu = 2, Ur = 3, Po = 4, kg = 5, ls = 6, li = 7, mu = 8, Mie = 9;
Qn = {};
Qn[$g] = "Boolean";
Qn[gu] = "<end>";
Qn[Ur] = "Identifier";
Qn[Po] = "Keyword";
Qn[kg] = "Null";
Qn[ls] = "Numeric";
Qn[li] = "Punctuator";
Qn[mu] = "String";
Qn[Mie] = "RegularExpression";
var Vie = "ArrayExpression", Wie = "BinaryExpression", Gie = "CallExpression", Hie = "ConditionalExpression", jI = "Identifier", Yie = "Literal", Xie = "LogicalExpression", Jie = "MemberExpression", Zie = "ObjectExpression", Kie = "Property", Qie = "UnaryExpression", pt = "Unexpected token %0", ene = "Unexpected number", tne = "Unexpected string", ine = "Unexpected identifier", nne = "Unexpected reserved word", ane = "Unexpected end of input", cv = "Invalid regular expression", _b = "Invalid regular expression: missing /", zI = "Octal literals are not allowed in strict mode.", one = "Duplicate data property in object literal not allowed in strict mode", _t = "ILLEGAL", Tf = "Disabled.", rne = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), sne = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
function Ag(e, t) {
  if (!e)
    throw new Error("ASSERT: " + t);
}
function ba(e) {
  return e >= 48 && e <= 57;
}
function s1(e) {
  return "0123456789abcdefABCDEF".includes(e);
}
function Xd(e) {
  return "01234567".includes(e);
}
function lne(e) {
  return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].includes(e);
}
function Cf(e) {
  return e === 10 || e === 13 || e === 8232 || e === 8233;
}
function bu(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e === 92 || // \ (backslash)
  e >= 128 && rne.test(String.fromCharCode(e));
}
function ap(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e >= 48 && e <= 57 || // 0..9
  e === 92 || // \ (backslash)
  e >= 128 && sne.test(String.fromCharCode(e));
}
const dne = {
  if: 1,
  in: 1,
  do: 1,
  var: 1,
  for: 1,
  new: 1,
  try: 1,
  let: 1,
  this: 1,
  else: 1,
  case: 1,
  void: 1,
  with: 1,
  enum: 1,
  while: 1,
  break: 1,
  catch: 1,
  throw: 1,
  const: 1,
  yield: 1,
  class: 1,
  super: 1,
  return: 1,
  typeof: 1,
  delete: 1,
  switch: 1,
  export: 1,
  import: 1,
  public: 1,
  static: 1,
  default: 1,
  finally: 1,
  extends: 1,
  package: 1,
  private: 1,
  function: 1,
  continue: 1,
  debugger: 1,
  interface: 1,
  protected: 1,
  instanceof: 1,
  implements: 1
};
function PI() {
  for (; R < Pt; ) {
    const e = H.charCodeAt(R);
    if (lne(e) || Cf(e))
      ++R;
    else
      break;
  }
}
function hv(e) {
  var t, i, n, a = 0;
  for (i = e === "u" ? 4 : 2, t = 0; t < i; ++t)
    R < Pt && s1(H[R]) ? (n = H[R++], a = a * 16 + "0123456789abcdef".indexOf(n.toLowerCase())) : ge({}, pt, _t);
  return String.fromCharCode(a);
}
function fne() {
  var e, t, i, n;
  for (e = H[R], t = 0, e === "}" && ge({}, pt, _t); R < Pt && (e = H[R++], !!s1(e)); )
    t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
  return (t > 1114111 || e !== "}") && ge({}, pt, _t), t <= 65535 ? String.fromCharCode(t) : (i = (t - 65536 >> 10) + 55296, n = (t - 65536 & 1023) + 56320, String.fromCharCode(i, n));
}
function NI() {
  var e, t;
  for (e = H.charCodeAt(R++), t = String.fromCharCode(e), e === 92 && (H.charCodeAt(R) !== 117 && ge({}, pt, _t), ++R, e = hv("u"), (!e || e === "\\" || !bu(e.charCodeAt(0))) && ge({}, pt, _t), t = e); R < Pt && (e = H.charCodeAt(R), !!ap(e)); )
    ++R, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), H.charCodeAt(R) !== 117 && ge({}, pt, _t), ++R, e = hv("u"), (!e || e === "\\" || !ap(e.charCodeAt(0))) && ge({}, pt, _t), t += e);
  return t;
}
function une() {
  var e, t;
  for (e = R++; R < Pt; ) {
    if (t = H.charCodeAt(R), t === 92)
      return R = e, NI();
    if (ap(t))
      ++R;
    else
      break;
  }
  return H.slice(e, R);
}
function cne() {
  var e, t, i;
  return e = R, t = H.charCodeAt(R) === 92 ? NI() : une(), t.length === 1 ? i = Ur : dne.hasOwnProperty(t) ? i = Po : t === "null" ? i = kg : t === "true" || t === "false" ? i = $g : i = Ur, {
    type: i,
    value: t,
    start: e,
    end: R
  };
}
function xb() {
  var e = R, t = H.charCodeAt(R), i, n = H[R], a, o, r;
  switch (t) {
    case 46:
    case 40:
    case 41:
    case 59:
    case 44:
    case 123:
    case 125:
    case 91:
    case 93:
    case 58:
    case 63:
    case 126:
      return ++R, {
        type: li,
        value: String.fromCharCode(t),
        start: e,
        end: R
      };
    default:
      if (i = H.charCodeAt(R + 1), i === 61)
        switch (t) {
          case 43:
          case 45:
          case 47:
          case 60:
          case 62:
          case 94:
          case 124:
          case 37:
          case 38:
          case 42:
            return R += 2, {
              type: li,
              value: String.fromCharCode(t) + String.fromCharCode(i),
              start: e,
              end: R
            };
          case 33:
          case 61:
            return R += 2, H.charCodeAt(R) === 61 && ++R, {
              type: li,
              value: H.slice(e, R),
              start: e,
              end: R
            };
        }
  }
  if (r = H.substr(R, 4), r === ">>>=")
    return R += 4, {
      type: li,
      value: r,
      start: e,
      end: R
    };
  if (o = r.substr(0, 3), o === ">>>" || o === "<<=" || o === ">>=")
    return R += 3, {
      type: li,
      value: o,
      start: e,
      end: R
    };
  if (a = o.substr(0, 2), n === a[1] && "+-<>&|".includes(n) || a === "=>")
    return R += 2, {
      type: li,
      value: a,
      start: e,
      end: R
    };
  if (a === "//" && ge({}, pt, _t), "<>=!+-*%&|^/".includes(n))
    return ++R, {
      type: li,
      value: n,
      start: e,
      end: R
    };
  ge({}, pt, _t);
}
function hne(e) {
  let t = "";
  for (; R < Pt && s1(H[R]); )
    t += H[R++];
  return t.length === 0 && ge({}, pt, _t), bu(H.charCodeAt(R)) && ge({}, pt, _t), {
    type: ls,
    value: parseInt("0x" + t, 16),
    start: e,
    end: R
  };
}
function pne(e) {
  let t = "0" + H[R++];
  for (; R < Pt && Xd(H[R]); )
    t += H[R++];
  return (bu(H.charCodeAt(R)) || ba(H.charCodeAt(R))) && ge({}, pt, _t), {
    type: ls,
    value: parseInt(t, 8),
    octal: !0,
    start: e,
    end: R
  };
}
function o2() {
  var e, t, i;
  if (i = H[R], Ag(ba(i.charCodeAt(0)) || i === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = R, e = "", i !== ".") {
    if (e = H[R++], i = H[R], e === "0") {
      if (i === "x" || i === "X")
        return ++R, hne(t);
      if (Xd(i))
        return pne(t);
      i && ba(i.charCodeAt(0)) && ge({}, pt, _t);
    }
    for (; ba(H.charCodeAt(R)); )
      e += H[R++];
    i = H[R];
  }
  if (i === ".") {
    for (e += H[R++]; ba(H.charCodeAt(R)); )
      e += H[R++];
    i = H[R];
  }
  if (i === "e" || i === "E")
    if (e += H[R++], i = H[R], (i === "+" || i === "-") && (e += H[R++]), ba(H.charCodeAt(R)))
      for (; ba(H.charCodeAt(R)); )
        e += H[R++];
    else
      ge({}, pt, _t);
  return bu(H.charCodeAt(R)) && ge({}, pt, _t), {
    type: ls,
    value: parseFloat(e),
    start: t,
    end: R
  };
}
function gne() {
  var e = "", t, i, n, a, o = !1;
  for (t = H[R], Ag(t === "'" || t === '"', "String literal must starts with a quote"), i = R, ++R; R < Pt; )
    if (n = H[R++], n === t) {
      t = "";
      break;
    } else if (n === "\\")
      if (n = H[R++], !n || !Cf(n.charCodeAt(0)))
        switch (n) {
          case "u":
          case "x":
            H[R] === "{" ? (++R, e += fne()) : e += hv(n);
            break;
          case "n":
            e += `
`;
            break;
          case "r":
            e += "\r";
            break;
          case "t":
            e += "	";
            break;
          case "b":
            e += "\b";
            break;
          case "f":
            e += "\f";
            break;
          case "v":
            e += "\v";
            break;
          default:
            Xd(n) ? (a = "01234567".indexOf(n), a !== 0 && (o = !0), R < Pt && Xd(H[R]) && (o = !0, a = a * 8 + "01234567".indexOf(H[R++]), "0123".includes(n) && R < Pt && Xd(H[R]) && (a = a * 8 + "01234567".indexOf(H[R++]))), e += String.fromCharCode(a)) : e += n;
            break;
        }
      else
        n === "\r" && H[R] === `
` && ++R;
    else {
      if (Cf(n.charCodeAt(0)))
        break;
      e += n;
    }
  return t !== "" && ge({}, pt, _t), {
    type: mu,
    value: e,
    octal: o,
    start: i,
    end: R
  };
}
function mne(e, t) {
  let i = e;
  t.includes("u") && (i = i.replace(/\\u\{([0-9a-fA-F]+)\}/g, (n, a) => {
    if (parseInt(a, 16) <= 1114111)
      return "x";
    ge({}, cv);
  }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
  try {
    new RegExp(i);
  } catch {
    ge({}, cv);
  }
  try {
    return new RegExp(e, t);
  } catch {
    return null;
  }
}
function bne() {
  var e, t, i, n, a;
  for (e = H[R], Ag(e === "/", "Regular expression literal must start with a slash"), t = H[R++], i = !1, n = !1; R < Pt; )
    if (e = H[R++], t += e, e === "\\")
      e = H[R++], Cf(e.charCodeAt(0)) && ge({}, _b), t += e;
    else if (Cf(e.charCodeAt(0)))
      ge({}, _b);
    else if (i)
      e === "]" && (i = !1);
    else if (e === "/") {
      n = !0;
      break;
    } else e === "[" && (i = !0);
  return n || ge({}, _b), a = t.substr(1, t.length - 2), {
    value: a,
    literal: t
  };
}
function yne() {
  var e, t, i;
  for (t = "", i = ""; R < Pt && (e = H[R], !!ap(e.charCodeAt(0))); )
    ++R, e === "\\" && R < Pt ? ge({}, pt, _t) : (i += e, t += e);
  return i.search(/[^gimuy]/g) >= 0 && ge({}, cv, i), {
    value: i,
    literal: t
  };
}
function vne() {
  var e, t, i, n;
  return Oe = null, PI(), e = R, t = bne(), i = yne(), n = mne(t.value, i.value), {
    literal: t.literal + i.literal,
    value: n,
    regex: {
      pattern: t.value,
      flags: i.value
    },
    start: e,
    end: R
  };
}
function _ne(e) {
  return e.type === Ur || e.type === Po || e.type === $g || e.type === kg;
}
function qI() {
  if (PI(), R >= Pt)
    return {
      type: gu,
      start: R,
      end: R
    };
  const e = H.charCodeAt(R);
  return bu(e) ? cne() : e === 40 || e === 41 || e === 59 ? xb() : e === 39 || e === 34 ? gne() : e === 46 ? ba(H.charCodeAt(R + 1)) ? o2() : xb() : ba(e) ? o2() : xb();
}
function ci() {
  const e = Oe;
  return R = e.end, Oe = qI(), R = e.end, e;
}
function LI() {
  const e = R;
  Oe = qI(), R = e;
}
function xne(e) {
  const t = new yn(Vie);
  return t.elements = e, t;
}
function r2(e, t, i) {
  const n = new yn(e === "||" || e === "&&" ? Xie : Wie);
  return n.operator = e, n.left = t, n.right = i, n;
}
function wne(e, t) {
  const i = new yn(Gie);
  return i.callee = e, i.arguments = t, i;
}
function $ne(e, t, i) {
  const n = new yn(Hie);
  return n.test = e, n.consequent = t, n.alternate = i, n;
}
function l1(e) {
  const t = new yn(jI);
  return t.name = e, t;
}
function Cd(e) {
  const t = new yn(Yie);
  return t.value = e.value, t.raw = H.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
}
function s2(e, t, i) {
  const n = new yn(Jie);
  return n.computed = e === "[", n.object = t, n.property = i, n.computed || (i.member = !0), n;
}
function kne(e) {
  const t = new yn(Zie);
  return t.properties = e, t;
}
function l2(e, t, i) {
  const n = new yn(Kie);
  return n.key = t, n.value = i, n.kind = e, n;
}
function Ane(e, t) {
  const i = new yn(Qie);
  return i.operator = e, i.argument = t, i.prefix = !0, i;
}
function ge(e, t) {
  var i, n = Array.prototype.slice.call(arguments, 2), a = t.replace(/%(\d)/g, (o, r) => (Ag(r < n.length, "Message reference must be in range"), n[r]));
  throw i = new Error(a), i.index = R, i.description = a, i;
}
function Og(e) {
  e.type === gu && ge(e, ane), e.type === ls && ge(e, ene), e.type === mu && ge(e, tne), e.type === Ur && ge(e, ine), e.type === Po && ge(e, nne), ge(e, pt, e.value);
}
function Nt(e) {
  const t = ci();
  (t.type !== li || t.value !== e) && Og(t);
}
function ze(e) {
  return Oe.type === li && Oe.value === e;
}
function wb(e) {
  return Oe.type === Po && Oe.value === e;
}
function One() {
  const e = [];
  for (R = Oe.start, Nt("["); !ze("]"); )
    ze(",") ? (ci(), e.push(null)) : (e.push(Mr()), ze("]") || Nt(","));
  return ci(), xne(e);
}
function d2() {
  R = Oe.start;
  const e = ci();
  return e.type === mu || e.type === ls ? (e.octal && ge(e, zI), Cd(e)) : l1(e.value);
}
function Ene() {
  var e, t, i, n;
  if (R = Oe.start, e = Oe, e.type === Ur)
    return i = d2(), Nt(":"), n = Mr(), l2("init", i, n);
  if (e.type === gu || e.type === li)
    Og(e);
  else
    return t = d2(), Nt(":"), n = Mr(), l2("init", t, n);
}
function Dne() {
  var e = [], t, i, n, a = {}, o = String;
  for (R = Oe.start, Nt("{"); !ze("}"); )
    t = Ene(), t.key.type === jI ? i = t.key.name : i = o(t.key.value), n = "$" + i, Object.prototype.hasOwnProperty.call(a, n) ? ge({}, one) : a[n] = !0, e.push(t), ze("}") || Nt(",");
  return Nt("}"), kne(e);
}
function Sne() {
  Nt("(");
  const e = d1();
  return Nt(")"), e;
}
const Fne = {
  if: 1
};
function Tne() {
  var e, t, i;
  if (ze("("))
    return Sne();
  if (ze("["))
    return One();
  if (ze("{"))
    return Dne();
  if (e = Oe.type, R = Oe.start, e === Ur || Fne[Oe.value])
    i = l1(ci().value);
  else if (e === mu || e === ls)
    Oe.octal && ge(Oe, zI), i = Cd(ci());
  else {
    if (e === Po)
      throw new Error(Tf);
    e === $g ? (t = ci(), t.value = t.value === "true", i = Cd(t)) : e === kg ? (t = ci(), t.value = null, i = Cd(t)) : ze("/") || ze("/=") ? (i = Cd(vne()), LI()) : Og(ci());
  }
  return i;
}
function Cne() {
  const e = [];
  if (Nt("("), !ze(")"))
    for (; R < Pt && (e.push(Mr()), !ze(")")); )
      Nt(",");
  return Nt(")"), e;
}
function Rne() {
  R = Oe.start;
  const e = ci();
  return _ne(e) || Og(e), l1(e.value);
}
function Ine() {
  return Nt("."), Rne();
}
function jne() {
  Nt("[");
  const e = d1();
  return Nt("]"), e;
}
function zne() {
  var e, t, i;
  for (e = Tne(); ; )
    if (ze("."))
      i = Ine(), e = s2(".", e, i);
    else if (ze("("))
      t = Cne(), e = wne(e, t);
    else if (ze("["))
      i = jne(), e = s2("[", e, i);
    else
      break;
  return e;
}
function f2() {
  const e = zne();
  if (Oe.type === li && (ze("++") || ze("--")))
    throw new Error(Tf);
  return e;
}
function Kc() {
  var e, t;
  if (Oe.type !== li && Oe.type !== Po)
    t = f2();
  else {
    if (ze("++") || ze("--"))
      throw new Error(Tf);
    if (ze("+") || ze("-") || ze("~") || ze("!"))
      e = ci(), t = Kc(), t = Ane(e.value, t);
    else {
      if (wb("delete") || wb("void") || wb("typeof"))
        throw new Error(Tf);
      t = f2();
    }
  }
  return t;
}
function u2(e) {
  let t = 0;
  if (e.type !== li && e.type !== Po)
    return 0;
  switch (e.value) {
    case "||":
      t = 1;
      break;
    case "&&":
      t = 2;
      break;
    case "|":
      t = 3;
      break;
    case "^":
      t = 4;
      break;
    case "&":
      t = 5;
      break;
    case "==":
    case "!=":
    case "===":
    case "!==":
      t = 6;
      break;
    case "<":
    case ">":
    case "<=":
    case ">=":
    case "instanceof":
    case "in":
      t = 7;
      break;
    case "<<":
    case ">>":
    case ">>>":
      t = 8;
      break;
    case "+":
    case "-":
      t = 9;
      break;
    case "*":
    case "/":
    case "%":
      t = 11;
      break;
  }
  return t;
}
function Pne() {
  var e, t, i, n, a, o, r, s, l, d;
  if (e = Oe, l = Kc(), n = Oe, a = u2(n), a === 0)
    return l;
  for (n.prec = a, ci(), t = [e, Oe], r = Kc(), o = [l, n, r]; (a = u2(Oe)) > 0; ) {
    for (; o.length > 2 && a <= o[o.length - 2].prec; )
      r = o.pop(), s = o.pop().value, l = o.pop(), t.pop(), i = r2(s, l, r), o.push(i);
    n = ci(), n.prec = a, o.push(n), t.push(Oe), i = Kc(), o.push(i);
  }
  for (d = o.length - 1, i = o[d], t.pop(); d > 1; )
    t.pop(), i = r2(o[d - 1].value, o[d - 2], i), d -= 2;
  return i;
}
function Mr() {
  var e, t, i;
  return e = Pne(), ze("?") && (ci(), t = Mr(), Nt(":"), i = Mr(), e = $ne(e, t, i)), e;
}
function d1() {
  const e = Mr();
  if (ze(","))
    throw new Error(Tf);
  return e;
}
function Nne(e) {
  H = e, R = 0, Pt = H.length, Oe = null, LI();
  const t = d1();
  if (Oe.type !== gu)
    throw new Error("Unexpect token after expression.");
  return t;
}
var qne = {
  NaN: "NaN",
  E: "Math.E",
  LN2: "Math.LN2",
  LN10: "Math.LN10",
  LOG2E: "Math.LOG2E",
  LOG10E: "Math.LOG10E",
  PI: "Math.PI",
  SQRT1_2: "Math.SQRT1_2",
  SQRT2: "Math.SQRT2",
  MIN_VALUE: "Number.MIN_VALUE",
  MAX_VALUE: "Number.MAX_VALUE"
};
function Lne(e) {
  function t(r, s, l, d) {
    let f = e(s[0]);
    return l && (f = l + "(" + f + ")", l.lastIndexOf("new ", 0) === 0 && (f = "(" + f + ")")), f + "." + r + (d < 0 ? "" : d === 0 ? "()" : "(" + s.slice(1).map(e).join(",") + ")");
  }
  function i(r, s, l) {
    return (d) => t(r, d, s, l);
  }
  const n = "new Date", a = "String", o = "RegExp";
  return {
    // MATH functions
    isNaN: "Number.isNaN",
    isFinite: "Number.isFinite",
    abs: "Math.abs",
    acos: "Math.acos",
    asin: "Math.asin",
    atan: "Math.atan",
    atan2: "Math.atan2",
    ceil: "Math.ceil",
    cos: "Math.cos",
    exp: "Math.exp",
    floor: "Math.floor",
    hypot: "Math.hypot",
    log: "Math.log",
    max: "Math.max",
    min: "Math.min",
    pow: "Math.pow",
    random: "Math.random",
    round: "Math.round",
    sin: "Math.sin",
    sqrt: "Math.sqrt",
    tan: "Math.tan",
    clamp: function(r) {
      r.length < 3 && Ni("Missing arguments to clamp function."), r.length > 3 && Ni("Too many arguments to clamp function.");
      const s = r.map(e);
      return "Math.max(" + s[1] + ", Math.min(" + s[2] + "," + s[0] + "))";
    },
    // DATE functions
    now: "Date.now",
    utc: "Date.UTC",
    datetime: n,
    date: i("getDate", n, 0),
    day: i("getDay", n, 0),
    year: i("getFullYear", n, 0),
    month: i("getMonth", n, 0),
    hours: i("getHours", n, 0),
    minutes: i("getMinutes", n, 0),
    seconds: i("getSeconds", n, 0),
    milliseconds: i("getMilliseconds", n, 0),
    time: i("getTime", n, 0),
    timezoneoffset: i("getTimezoneOffset", n, 0),
    utcdate: i("getUTCDate", n, 0),
    utcday: i("getUTCDay", n, 0),
    utcyear: i("getUTCFullYear", n, 0),
    utcmonth: i("getUTCMonth", n, 0),
    utchours: i("getUTCHours", n, 0),
    utcminutes: i("getUTCMinutes", n, 0),
    utcseconds: i("getUTCSeconds", n, 0),
    utcmilliseconds: i("getUTCMilliseconds", n, 0),
    // sequence functions
    length: i("length", null, -1),
    // STRING functions
    parseFloat: "parseFloat",
    parseInt: "parseInt",
    upper: i("toUpperCase", a, 0),
    lower: i("toLowerCase", a, 0),
    substring: i("substring", a),
    split: i("split", a),
    trim: i("trim", a, 0),
    // REGEXP functions
    regexp: o,
    test: i("test", o),
    // Control Flow functions
    if: function(r) {
      r.length < 3 && Ni("Missing arguments to if function."), r.length > 3 && Ni("Too many arguments to if function.");
      const s = r.map(e);
      return "(" + s[0] + "?" + s[1] + ":" + s[2] + ")";
    }
  };
}
function Bne(e) {
  const t = e && e.length - 1;
  return t && (e[0] === '"' && e[t] === '"' || e[0] === "'" && e[t] === "'") ? e.slice(1, -1) : e;
}
function Une(e) {
  e = e || {};
  const t = e.allowed ? gy(e.allowed) : {}, i = e.forbidden ? gy(e.forbidden) : {}, n = e.constants || qne, a = (e.functions || Lne)(u), o = e.globalvar, r = e.fieldvar, s = Gs(o) ? o : (p) => `${o}["${p}"]`;
  let l = {}, d = {}, f = 0;
  function u(p) {
    if (Ir(p)) return p;
    const g = c[p.type];
    return g == null && Ni("Unsupported type: " + p.type), g(p);
  }
  const c = {
    Literal: (p) => p.raw,
    Identifier: (p) => {
      const g = p.name;
      return f > 0 ? g : tn(i, g) ? Ni("Illegal identifier: " + g) : tn(n, g) ? n[g] : tn(t, g) ? g : (l[g] = 1, s(g));
    },
    MemberExpression: (p) => {
      const g = !p.computed, m = u(p.object);
      g && (f += 1);
      const b = u(p.property);
      return m === r && (d[Bne(b)] = 1), g && (f -= 1), m + (g ? "." + b : "[" + b + "]");
    },
    CallExpression: (p) => {
      p.callee.type !== "Identifier" && Ni("Illegal callee type: " + p.callee.type);
      const g = p.callee.name, m = p.arguments, b = tn(a, g) && a[g];
      return b || Ni("Unrecognized function: " + g), Gs(b) ? b(m) : b + "(" + m.map(u).join(",") + ")";
    },
    ArrayExpression: (p) => "[" + p.elements.map(u).join(",") + "]",
    BinaryExpression: (p) => "(" + u(p.left) + " " + p.operator + " " + u(p.right) + ")",
    UnaryExpression: (p) => "(" + p.operator + u(p.argument) + ")",
    ConditionalExpression: (p) => "(" + u(p.test) + "?" + u(p.consequent) + ":" + u(p.alternate) + ")",
    LogicalExpression: (p) => "(" + u(p.left) + p.operator + u(p.right) + ")",
    ObjectExpression: (p) => "{" + p.properties.map(u).join(",") + "}",
    Property: (p) => {
      f += 1;
      const g = u(p.key);
      return f -= 1, g + ":" + u(p.value);
    }
  };
  function h(p) {
    const g = {
      code: u(p),
      globals: Object.keys(l),
      fields: Object.keys(d)
    };
    return l = {}, d = {}, g;
  }
  return h.functions = a, h.constants = n, h;
}
var Mne = "5.30.0";
d0(Js, iU, l8, rV, PV, MW, zG, rG, HG, kH, MH, iY);
const Vne = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  Bounds: it,
  CanvasHandler: au,
  CanvasRenderer: Ph,
  DATE: Zb,
  DAY: sE,
  DAYOFYEAR: oN,
  Dataflow: qs,
  Debug: ID,
  Error: TD,
  EventStream: Np,
  Gradient: LF,
  GroupItem: Gp,
  HOURS: Jb,
  Handler: O_,
  HybridHandler: TT,
  HybridRenderer: Ry,
  Info: RD,
  Item: Wp,
  MILLISECONDS: rE,
  MINUTES: Xb,
  MONTH: Qb,
  Marks: Ti,
  MultiPulse: $0,
  None: FD,
  Operator: Te,
  Parameters: Pp,
  Pulse: mo,
  QUARTER: ey,
  RenderType: ro,
  Renderer: nu,
  ResourceLoader: HF,
  SECONDS: Yb,
  SVGHandler: yT,
  SVGRenderer: C_,
  SVGStringRenderer: FT,
  Scenegraph: fT,
  TIME_UNITS: uE,
  Transform: T,
  View: XR,
  WEEK: Kb,
  Warn: CD,
  YEAR: ty,
  accessor: Pa,
  accessorFields: DD,
  accessorName: ZN,
  array: sf,
  ascending: l0,
  bandwidthNRD: PE,
  bin: lE,
  bootstrapCI: yE,
  boundClip: BT,
  boundContext: Qf,
  boundItem: Dy,
  boundMark: rT,
  boundStroke: Na,
  changeset: ns,
  clampRange: y5,
  codegenExpression: Une,
  compare: _5,
  constant: k5,
  cumulativeLogNormal: HE,
  cumulativeNormal: GE,
  cumulativeUniform: YE,
  dayofyear: uD,
  debounce: A5,
  defaultLocale: y0,
  definition: IS,
  densityLogNormal: JE,
  densityNormal: XE,
  densityUniform: ZE,
  domChild: ot,
  domClear: zi,
  domCreate: ao,
  domFind: A_,
  dotbin: dE,
  error: Ni,
  expressionFunction: Qe,
  extend: d0,
  extent: O5,
  extentIndex: E5,
  falsy: a5,
  fastmap: S5,
  field: a0,
  flush: F5,
  font: Zp,
  fontFamily: iu,
  fontSize: Hn,
  format: kc,
  formatLocale: xh,
  formats: x0,
  hasOwnProperty: tn,
  id: e5,
  identity: o0,
  inferType: $S,
  inferTypes: kS,
  ingest: xe,
  inherits: T5,
  inrange: C5,
  interpolate: FE,
  interpolateColors: Qv,
  interpolateRange: IE,
  intersect: PT,
  intersectBoxLine: Rs,
  intersectPath: f_,
  intersectPoint: u_,
  intersectRule: XF,
  isArray: Dp,
  isBoolean: qD,
  isDate: LD,
  isFunction: Gs,
  isIterable: R5,
  isNumber: BD,
  isObject: rf,
  isRegExp: I5,
  isString: Ir,
  isTuple: jp,
  key: j5,
  lerp: z5,
  lineHeight: ko,
  loader: Rp,
  locale: xS,
  logger: r5,
  lruCache: N5,
  markup: T_,
  merge: q5,
  mergeConfig: r0,
  multiLineOffset: w_,
  one: i5,
  pad: L5,
  panLinear: l5,
  panLog: d5,
  panPow: f5,
  panSymlog: u5,
  parse: Sie,
  parseExpression: Nne,
  parseSelector: aI,
  path: Lp,
  pathCurves: s_,
  pathEqual: UT,
  pathParse: Ks,
  pathRectangle: MF,
  pathRender: gf,
  pathSymbols: UF,
  pathTrail: VF,
  peek: bl,
  point: Qp,
  projection: zE,
  quantileLogNormal: QE,
  quantileNormal: KE,
  quantileUniform: eD,
  quantiles: fE,
  quantizeInterpolator: RE,
  quarter: m5,
  quartiles: bE,
  get random() {
    return Op;
  },
  randomInteger: rN,
  randomKDE: Jv,
  randomLCG: sN,
  randomLogNormal: xE,
  randomMixture: vE,
  randomNormal: _E,
  randomUniform: wE,
  read: ES,
  regressionConstant: qE,
  regressionExp: UE,
  regressionLinear: LE,
  regressionLoess: NE,
  regressionLog: BE,
  regressionPoly: WE,
  regressionPow: ME,
  regressionQuad: VE,
  renderModule: eg,
  repeat: $d,
  resetDefaultLocale: tB,
  resetSVGClipId: GF,
  resetSVGDefIds: v6,
  responseType: OS,
  runtimeContext: zR,
  sampleCurve: Ap,
  sampleLogNormal: iD,
  sampleNormal: tD,
  sampleUniform: nD,
  scale: af,
  sceneEqual: R_,
  sceneFromJSON: lT,
  scenePickVisit: Sh,
  sceneToJSON: sT,
  sceneVisit: un,
  sceneZOrder: c_,
  scheme: CE,
  serializeXML: OT,
  setHybridRendererOptions: g6,
  setRandom: lN,
  span: B5,
  splitAccessPath: n0,
  stringValue: UD,
  textMetrics: ki,
  timeBin: cE,
  timeFloor: gE,
  timeFormatLocale: ff,
  timeInterval: Yv,
  timeOffset: rD,
  timeSequence: sD,
  timeUnitSpecifier: lD,
  timeUnits: hE,
  toBoolean: U5,
  toDate: V5,
  toNumber: s0,
  toSet: gy,
  toString: W5,
  transform: jS,
  transforms: Js,
  truncate: G5,
  truthy: n5,
  tupleid: Z,
  typeParsers: _y,
  utcFloor: pE,
  utcInterval: Xv,
  utcOffset: aD,
  utcSequence: oD,
  utcdayofyear: cD,
  utcquarter: b5,
  utcweek: fD,
  version: Mne,
  visitArray: H5,
  week: dD,
  writeConfig: Sp,
  zero: t5,
  zoomLinear: c5,
  zoomLog: h5,
  zoomPow: p5,
  zoomSymlog: g5
}, Symbol.toStringTag, { value: "Module" }));
function Wne(e, t, i) {
  let n;
  t.x2 && (t.x ? (i && e.x > e.x2 && (n = e.x, e.x = e.x2, e.x2 = n), e.width = e.x2 - e.x) : e.x = e.x2 - (e.width || 0)), t.xc && (e.x = e.xc - (e.width || 0) / 2), t.y2 && (t.y ? (i && e.y > e.y2 && (n = e.y, e.y = e.y2, e.y2 = n), e.height = e.y2 - e.y) : e.y = e.y2 - (e.height || 0)), t.yc && (e.y = e.yc - (e.height || 0) / 2);
}
var Gne = {
  NaN: NaN,
  E: Math.E,
  LN2: Math.LN2,
  LN10: Math.LN10,
  LOG2E: Math.LOG2E,
  LOG10E: Math.LOG10E,
  PI: Math.PI,
  SQRT1_2: Math.SQRT1_2,
  SQRT2: Math.SQRT2,
  MIN_VALUE: Number.MIN_VALUE,
  MAX_VALUE: Number.MAX_VALUE
}, Hne = {
  "*": (e, t) => e * t,
  "+": (e, t) => e + t,
  "-": (e, t) => e - t,
  "/": (e, t) => e / t,
  "%": (e, t) => e % t,
  ">": (e, t) => e > t,
  "<": (e, t) => e < t,
  "<=": (e, t) => e <= t,
  ">=": (e, t) => e >= t,
  "==": (e, t) => e == t,
  "!=": (e, t) => e != t,
  "===": (e, t) => e === t,
  "!==": (e, t) => e !== t,
  "&": (e, t) => e & t,
  "|": (e, t) => e | t,
  "^": (e, t) => e ^ t,
  "<<": (e, t) => e << t,
  ">>": (e, t) => e >> t,
  ">>>": (e, t) => e >>> t
}, Yne = {
  "+": (e) => +e,
  "-": (e) => -e,
  "~": (e) => ~e,
  "!": (e) => !e
};
const Xne = Array.prototype.slice, nr = (e, t, i) => {
  const n = i ? i(t[0]) : t[0];
  return n[e].apply(n, Xne.call(t, 1));
}, Jne = (e, t, i, n, a, o, r) => new Date(e, t || 0, i ?? 1, n || 0, a || 0, o || 0, r || 0);
var Zne = {
  // math functions
  isNaN: Number.isNaN,
  isFinite: Number.isFinite,
  abs: Math.abs,
  acos: Math.acos,
  asin: Math.asin,
  atan: Math.atan,
  atan2: Math.atan2,
  ceil: Math.ceil,
  cos: Math.cos,
  exp: Math.exp,
  floor: Math.floor,
  log: Math.log,
  max: Math.max,
  min: Math.min,
  pow: Math.pow,
  random: Math.random,
  round: Math.round,
  sin: Math.sin,
  sqrt: Math.sqrt,
  tan: Math.tan,
  clamp: (e, t, i) => Math.max(t, Math.min(i, e)),
  // date functions
  now: Date.now,
  utc: Date.UTC,
  datetime: Jne,
  date: (e) => new Date(e).getDate(),
  day: (e) => new Date(e).getDay(),
  year: (e) => new Date(e).getFullYear(),
  month: (e) => new Date(e).getMonth(),
  hours: (e) => new Date(e).getHours(),
  minutes: (e) => new Date(e).getMinutes(),
  seconds: (e) => new Date(e).getSeconds(),
  milliseconds: (e) => new Date(e).getMilliseconds(),
  time: (e) => new Date(e).getTime(),
  timezoneoffset: (e) => new Date(e).getTimezoneOffset(),
  utcdate: (e) => new Date(e).getUTCDate(),
  utcday: (e) => new Date(e).getUTCDay(),
  utcyear: (e) => new Date(e).getUTCFullYear(),
  utcmonth: (e) => new Date(e).getUTCMonth(),
  utchours: (e) => new Date(e).getUTCHours(),
  utcminutes: (e) => new Date(e).getUTCMinutes(),
  utcseconds: (e) => new Date(e).getUTCSeconds(),
  utcmilliseconds: (e) => new Date(e).getUTCMilliseconds(),
  // sequence functions
  length: (e) => e.length,
  join: function() {
    return nr("join", arguments);
  },
  indexof: function() {
    return nr("indexOf", arguments);
  },
  lastindexof: function() {
    return nr("lastIndexOf", arguments);
  },
  slice: function() {
    return nr("slice", arguments);
  },
  reverse: (e) => e.slice().reverse(),
  // string functions
  parseFloat,
  parseInt,
  upper: (e) => String(e).toUpperCase(),
  lower: (e) => String(e).toLowerCase(),
  substring: function() {
    return nr("substring", arguments, String);
  },
  split: function() {
    return nr("split", arguments, String);
  },
  replace: function() {
    return nr("replace", arguments, String);
  },
  trim: (e) => String(e).trim(),
  // regexp functions
  regexp: RegExp,
  test: (e, t) => RegExp(e).test(t)
};
const Kne = ["view", "item", "group", "xy", "x", "y"], pv = /* @__PURE__ */ new Set([Function, eval, setTimeout, setInterval]);
typeof setImmediate == "function" && pv.add(setImmediate);
const Qne = {
  Literal: (e, t) => t.value,
  Identifier: (e, t) => {
    const i = t.name;
    return e.memberDepth > 0 ? i : i === "datum" ? e.datum : i === "event" ? e.event : i === "item" ? e.item : Gne[i] || e.params["$" + i];
  },
  MemberExpression: (e, t) => {
    const i = !t.computed, n = e(t.object);
    i && (e.memberDepth += 1);
    const a = e(t.property);
    if (i && (e.memberDepth -= 1), pv.has(n[a])) {
      console.error(`Prevented interpretation of member "${a}" which could lead to insecure code execution`);
      return;
    }
    return n[a];
  },
  CallExpression: (e, t) => {
    const i = t.arguments;
    let n = t.callee.name;
    return n.startsWith("_") && (n = n.slice(1)), n === "if" ? e(i[0]) ? e(i[1]) : e(i[2]) : (e.fn[n] || Zne[n]).apply(e.fn, i.map(e));
  },
  ArrayExpression: (e, t) => t.elements.map(e),
  BinaryExpression: (e, t) => Hne[t.operator](e(t.left), e(t.right)),
  UnaryExpression: (e, t) => Yne[t.operator](e(t.argument)),
  ConditionalExpression: (e, t) => e(t.test) ? e(t.consequent) : e(t.alternate),
  LogicalExpression: (e, t) => t.operator === "&&" ? e(t.left) && e(t.right) : e(t.left) || e(t.right),
  ObjectExpression: (e, t) => t.properties.reduce((i, n) => {
    e.memberDepth += 1;
    const a = e(n.key);
    return e.memberDepth -= 1, pv.has(e(n.value)) ? console.error(`Prevented interpretation of property "${a}" which could lead to insecure code execution`) : i[a] = e(n.value), i;
  }, {})
};
function gd(e, t, i, n, a, o) {
  const r = (s) => Qne[s.type](r, s);
  return r.memberDepth = 0, r.fn = Object.create(t), r.params = i, r.datum = n, r.event = a, r.item = o, Kne.forEach((s) => r.fn[s] = function() {
    return a.vega[s](...arguments);
  }), r(e);
}
var eae = {
  /**
   * Parse an expression used to update an operator value.
   */
  operator(e, t) {
    const i = t.ast, n = e.functions;
    return (a) => gd(i, n, a);
  },
  /**
   * Parse an expression provided as an operator parameter value.
   */
  parameter(e, t) {
    const i = t.ast, n = e.functions;
    return (a, o) => gd(i, n, o, a);
  },
  /**
   * Parse an expression applied to an event stream.
   */
  event(e, t) {
    const i = t.ast, n = e.functions;
    return (a) => gd(i, n, void 0, void 0, a);
  },
  /**
   * Parse an expression used to handle an event-driven operator update.
   */
  handler(e, t) {
    const i = t.ast, n = e.functions;
    return (a, o) => {
      const r = o.item && o.item.datum;
      return gd(i, n, a, r, o);
    };
  },
  /**
   * Parse an expression that performs visual encoding.
   */
  encode(e, t) {
    const {
      marktype: i,
      channels: n
    } = t, a = e.functions, o = i === "group" || i === "image" || i === "rect";
    return (r, s) => {
      const l = r.datum;
      let d = 0, f;
      for (const u in n)
        f = gd(n[u].ast, a, s, l, void 0, r), r[u] !== f && (r[u] = f, d = 1);
      return i !== "rule" && Wne(r, n, o), d;
    };
  }
};
const tae = "4.17.0";
function Ul(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function iae(e) {
  return e.length === 1 ? nae(e[0]) : aae(e);
}
const nae = (e) => function(t) {
  return t[e];
}, aae = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function $b(e) {
  throw Error(e);
}
function ds(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s), o += e.substring(++s, ++s), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || $b("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && $b("Access path missing closing bracket: " + e), n && $b("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function oae(e, t, i) {
  const n = ds(e);
  return e = n.length === 1 ? n[0] : e, Ul(iae(n), [e], e);
}
oae("id");
const rae = Ul((e) => e, [], "identity");
Ul(() => 0, [], "zero");
Ul(() => 1, [], "one");
Ul(() => !0, [], "true");
Ul(() => !1, [], "false");
function dc(e, t, i) {
  const n = [t].concat([].slice.call(i));
  console[e].apply(console, n);
}
const sae = 1, BI = 2, lae = 3, dae = 4;
function fae(e, t) {
  let i = e;
  return {
    level(n) {
      return arguments.length ? (i = +n, this) : i;
    },
    error() {
      return i >= sae && dc("error", "ERROR", arguments), this;
    },
    warn() {
      return i >= BI && dc("warn", "WARN", arguments), this;
    },
    info() {
      return i >= lae && dc("log", "INFO", arguments), this;
    },
    debug() {
      return i >= dae && dc("log", "DEBUG", arguments), this;
    }
  };
}
var X = Array.isArray;
function Je(e) {
  return e === Object(e);
}
const c2 = (e) => e !== "__proto__";
function UI(...e) {
  return e.reduce((t, i) => {
    for (const n in i)
      if (n === "signals")
        t.signals = uae(t.signals, i.signals);
      else {
        const a = n === "legend" ? {
          layout: 1
        } : n === "style" ? !0 : null;
        f1(t, n, i[n], a);
      }
    return t;
  }, {});
}
function f1(e, t, i, n) {
  if (!c2(t)) return;
  let a, o;
  if (Je(i) && !X(i)) {
    o = Je(e[t]) ? e[t] : e[t] = {};
    for (a in i)
      n && (n === !0 || n[a]) ? f1(o, a, i[a]) : c2(a) && (o[a] = i[a]);
  } else
    e[t] = i;
}
function uae(e, t) {
  if (e == null) return t;
  const i = {}, n = [];
  function a(o) {
    i[o.name] || (i[o.name] = 1, n.push(o));
  }
  return t.forEach(a), e.forEach(a), n;
}
function Ze(e) {
  return e != null ? X(e) ? e : [e] : [];
}
function cae(e) {
  return typeof e == "function";
}
const hae = Object.prototype.hasOwnProperty;
function Ps(e, t) {
  return hae.call(e, t);
}
function yu(e) {
  return typeof e == "boolean";
}
function nt(e) {
  return typeof e == "number";
}
function re(e) {
  return typeof e == "string";
}
function he(e) {
  return X(e) ? "[" + e.map(he) + "]" : Je(e) || re(e) ? (
    // Output valid JSON and JS source strings.
    // See http://timelessrepo.com/json-isnt-a-javascript-subset
    JSON.stringify(e).replace("\u2028", "\\u2028").replace("\u2029", "\\u2029")
  ) : e;
}
function fs(e) {
  const t = {}, i = e.length;
  for (let n = 0; n < i; ++n) t[e[n]] = !0;
  return t;
}
Array.prototype.flat || Object.defineProperty(Array.prototype, "flat", { configurable: !0, value: function e() {
  var t = isNaN(arguments[0]) ? 1 : Number(arguments[0]);
  return t ? Array.prototype.reduce.call(this, function(i, n) {
    return Array.isArray(n) ? i.push.apply(i, e.call(n, t - 1)) : i.push(n), i;
  }, []) : Array.prototype.slice.call(this);
}, writable: !0 }), Array.prototype.flatMap || Object.defineProperty(Array.prototype, "flatMap", { configurable: !0, value: function(e) {
  return Array.prototype.map.apply(this, arguments).flat();
}, writable: !0 });
var MI = { exports: {} };
(function(e) {
  var t = function() {
    function i(c, h) {
      return h != null && c instanceof h;
    }
    var n;
    try {
      n = Map;
    } catch {
      n = function() {
      };
    }
    var a;
    try {
      a = Set;
    } catch {
      a = function() {
      };
    }
    var o;
    try {
      o = Promise;
    } catch {
      o = function() {
      };
    }
    function r(c, h, p, g, m) {
      typeof h == "object" && (p = h.depth, g = h.prototype, m = h.includeNonEnumerable, h = h.circular);
      var b = [], y = [], v = typeof Buffer < "u";
      typeof h > "u" && (h = !0), typeof p > "u" && (p = 1 / 0);
      function w(x, $) {
        if (x === null)
          return null;
        if ($ === 0)
          return x;
        var _, k;
        if (typeof x != "object")
          return x;
        if (i(x, n))
          _ = new n();
        else if (i(x, a))
          _ = new a();
        else if (i(x, o))
          _ = new o(function(P, N) {
            x.then(function(L) {
              P(w(L, $ - 1));
            }, function(L) {
              N(w(L, $ - 1));
            });
          });
        else if (r.__isArray(x))
          _ = [];
        else if (r.__isRegExp(x))
          _ = new RegExp(x.source, u(x)), x.lastIndex && (_.lastIndex = x.lastIndex);
        else if (r.__isDate(x))
          _ = new Date(x.getTime());
        else {
          if (v && Buffer.isBuffer(x))
            return Buffer.allocUnsafe ? _ = Buffer.allocUnsafe(x.length) : _ = new Buffer(x.length), x.copy(_), _;
          i(x, Error) ? _ = Object.create(x) : typeof g > "u" ? (k = Object.getPrototypeOf(x), _ = Object.create(k)) : (_ = Object.create(g), k = g);
        }
        if (h) {
          var A = b.indexOf(x);
          if (A != -1)
            return y[A];
          b.push(x), y.push(_);
        }
        i(x, n) && x.forEach(function(P, N) {
          var L = w(N, $ - 1), K = w(P, $ - 1);
          _.set(L, K);
        }), i(x, a) && x.forEach(function(P) {
          var N = w(P, $ - 1);
          _.add(N);
        });
        for (var E in x) {
          var S;
          k && (S = Object.getOwnPropertyDescriptor(k, E)), !(S && S.set == null) && (_[E] = w(x[E], $ - 1));
        }
        if (Object.getOwnPropertySymbols)
          for (var z = Object.getOwnPropertySymbols(x), E = 0; E < z.length; E++) {
            var O = z[E], D = Object.getOwnPropertyDescriptor(x, O);
            D && !D.enumerable && !m || (_[O] = w(x[O], $ - 1), D.enumerable || Object.defineProperty(_, O, {
              enumerable: !1
            }));
          }
        if (m)
          for (var j = Object.getOwnPropertyNames(x), E = 0; E < j.length; E++) {
            var F = j[E], D = Object.getOwnPropertyDescriptor(x, F);
            D && D.enumerable || (_[F] = w(x[F], $ - 1), Object.defineProperty(_, F, {
              enumerable: !1
            }));
          }
        return _;
      }
      return w(c, p);
    }
    r.clonePrototype = function(h) {
      if (h === null)
        return null;
      var p = function() {
      };
      return p.prototype = h, new p();
    };
    function s(c) {
      return Object.prototype.toString.call(c);
    }
    r.__objToStr = s;
    function l(c) {
      return typeof c == "object" && s(c) === "[object Date]";
    }
    r.__isDate = l;
    function d(c) {
      return typeof c == "object" && s(c) === "[object Array]";
    }
    r.__isArray = d;
    function f(c) {
      return typeof c == "object" && s(c) === "[object RegExp]";
    }
    r.__isRegExp = f;
    function u(c) {
      var h = "";
      return c.global && (h += "g"), c.ignoreCase && (h += "i"), c.multiline && (h += "m"), h;
    }
    return r.__getRegExpFlags = u, r;
  }();
  e.exports && (e.exports = t);
})(MI);
var pae = MI.exports;
const gae = /* @__PURE__ */ kp(pae);
var mae = function e(t, i) {
  if (t === i) return !0;
  if (t && i && typeof t == "object" && typeof i == "object") {
    if (t.constructor !== i.constructor) return !1;
    var n, a, o;
    if (Array.isArray(t)) {
      if (n = t.length, n != i.length) return !1;
      for (a = n; a-- !== 0; )
        if (!e(t[a], i[a])) return !1;
      return !0;
    }
    if (t.constructor === RegExp) return t.source === i.source && t.flags === i.flags;
    if (t.valueOf !== Object.prototype.valueOf) return t.valueOf() === i.valueOf();
    if (t.toString !== Object.prototype.toString) return t.toString() === i.toString();
    if (o = Object.keys(t), n = o.length, n !== Object.keys(i).length) return !1;
    for (a = n; a-- !== 0; )
      if (!Object.prototype.hasOwnProperty.call(i, o[a])) return !1;
    for (a = n; a-- !== 0; ) {
      var r = o[a];
      if (!e(t[r], i[r])) return !1;
    }
    return !0;
  }
  return t !== t && i !== i;
};
const bae = /* @__PURE__ */ kp(mae);
var yae = function(e, t) {
  t || (t = {}), typeof t == "function" && (t = { cmp: t });
  var i = typeof t.cycles == "boolean" ? t.cycles : !1, n = t.cmp && /* @__PURE__ */ function(o) {
    return function(r) {
      return function(s, l) {
        var d = { key: s, value: r[s] }, f = { key: l, value: r[l] };
        return o(d, f);
      };
    };
  }(t.cmp), a = [];
  return function o(r) {
    if (r && r.toJSON && typeof r.toJSON == "function" && (r = r.toJSON()), r !== void 0) {
      if (typeof r == "number") return isFinite(r) ? "" + r : "null";
      if (typeof r != "object") return JSON.stringify(r);
      var s, l;
      if (Array.isArray(r)) {
        for (l = "[", s = 0; s < r.length; s++)
          s && (l += ","), l += o(r[s]) || "null";
        return l + "]";
      }
      if (r === null) return "null";
      if (a.indexOf(r) !== -1) {
        if (i) return JSON.stringify("__cycle__");
        throw new TypeError("Converting circular structure to JSON");
      }
      var d = a.push(r) - 1, f = Object.keys(r).sort(n && n(r));
      for (l = "", s = 0; s < f.length; s++) {
        var u = f[s], c = o(r[u]);
        c && (l && (l += ","), l += JSON.stringify(u) + ":" + c);
      }
      return a.splice(d, 1), "{" + l + "}";
    }
  }(e);
};
const Rf = /* @__PURE__ */ kp(yae);
function u1(e) {
  return !!e.or;
}
function c1(e) {
  return !!e.and;
}
function h1(e) {
  return !!e.not;
}
function Qc(e, t) {
  if (h1(e))
    Qc(e.not, t);
  else if (c1(e))
    for (const i of e.and)
      Qc(i, t);
  else if (u1(e))
    for (const i of e.or)
      Qc(i, t);
  else
    t(e);
}
function eh(e, t) {
  return h1(e) ? { not: eh(e.not, t) } : c1(e) ? { and: e.and.map((i) => eh(i, t)) } : u1(e) ? { or: e.or.map((i) => eh(i, t)) } : t(e);
}
const Ml = bae, se = gae;
function rl(e, t) {
  const i = {};
  for (const n of t)
    Ps(e, n) && (i[n] = e[n]);
  return i;
}
function Oi(e, t) {
  const i = Object.assign({}, e);
  for (const n of t)
    delete i[n];
  return i;
}
Set.prototype.toJSON = function() {
  return `Set(${[...this].map((e) => Rf(e)).join(",")})`;
};
const Ie = Rf;
function fe(e) {
  if (nt(e))
    return e;
  const t = re(e) ? e : Rf(e);
  if (t.length < 250)
    return t;
  let i = 0;
  for (let n = 0; n < t.length; n++) {
    const a = t.charCodeAt(n);
    i = (i << 5) - i + a, i = i & i;
  }
  return i;
}
function gv(e) {
  return e === !1 || e === null;
}
function Q(e, t) {
  return e.indexOf(t) > -1;
}
function sl(e, t) {
  let i = 0;
  for (const [n, a] of e.entries())
    if (t(a, n, i++))
      return !0;
  return !1;
}
function p1(e, t) {
  let i = 0;
  for (const [n, a] of e.entries())
    if (!t(a, n, i++))
      return !1;
  return !0;
}
function VI(e, ...t) {
  for (const i of t)
    vae(e, i ?? {});
  return e;
}
function vae(e, t) {
  for (const i of q(t))
    f1(e, i, t[i], !0);
}
function Tn(e, t) {
  const i = [], n = {};
  let a;
  for (const o of e)
    a = t(o), !(a in n) && (n[a] = 1, i.push(o));
  return i;
}
function _ae(e, t) {
  const i = q(e), n = q(t);
  if (i.length !== n.length)
    return !1;
  for (const a of i)
    if (e[a] !== t[a])
      return !1;
  return !0;
}
function WI(e, t) {
  if (e.size !== t.size)
    return !1;
  for (const i of e)
    if (!t.has(i))
      return !1;
  return !0;
}
function g1(e, t) {
  for (const i of e)
    if (t.has(i))
      return !0;
  return !1;
}
function mv(e) {
  const t = /* @__PURE__ */ new Set();
  for (const i of e) {
    const a = ds(i).map((r, s) => s === 0 ? r : `[${r}]`), o = a.map((r, s) => a.slice(0, s + 1).join(""));
    for (const r of o)
      t.add(r);
  }
  return t;
}
function m1(e, t) {
  return e === void 0 || t === void 0 ? !0 : g1(mv(e), mv(t));
}
function De(e) {
  return q(e).length === 0;
}
const q = Object.keys, Aa = Object.values, vu = Object.entries;
function If(e) {
  return e === !0 || e === !1;
}
function Ne(e) {
  const t = e.replace(/\W/g, "_");
  return (e.match(/^\d+/) ? "_" : "") + t;
}
function Us(e, t) {
  return h1(e) ? "!(" + Us(e.not, t) + ")" : c1(e) ? "(" + e.and.map((i) => Us(i, t)).join(") && (") + ")" : u1(e) ? "(" + e.or.map((i) => Us(i, t)).join(") || (") + ")" : t(e);
}
function op(e, t) {
  if (t.length === 0)
    return !0;
  const i = t.shift();
  return i in e && op(e[i], t) && delete e[i], De(e);
}
function _u(e) {
  return e.charAt(0).toUpperCase() + e.substr(1);
}
function b1(e, t = "datum") {
  const i = ds(e), n = [];
  for (let a = 1; a <= i.length; a++) {
    const o = `[${i.slice(0, a).map(he).join("][")}]`;
    n.push(`${t}${o}`);
  }
  return n.join(" && ");
}
function GI(e, t = "datum") {
  return `${t}[${he(ds(e).join("."))}]`;
}
function xae(e) {
  return e.replace(/(\[|\]|\.|'|")/g, "\\$1");
}
function Ia(e) {
  return `${ds(e).map(xae).join("\\.")}`;
}
function Vr(e, t, i) {
  return e.replace(new RegExp(t.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), "g"), i);
}
function y1(e) {
  return `${ds(e).join(".")}`;
}
function ll(e) {
  return e ? ds(e).length : 0;
}
function Ke(...e) {
  for (const t of e)
    if (t !== void 0)
      return t;
}
let HI = 42;
function YI(e) {
  const t = ++HI;
  return e ? String(e) + t : t;
}
function wae() {
  HI = 42;
}
function XI(e) {
  return JI(e) ? e : `__${e}`;
}
function JI(e) {
  return e.indexOf("__") === 0;
}
function jf(e) {
  if (e !== void 0)
    return (e % 360 + 360) % 360;
}
function Eg(e) {
  return nt(e) ? !0 : !isNaN(e) && !isNaN(parseFloat(e));
}
const h2 = {
  labelAlign: {
    part: "labels",
    vgProp: "align"
  },
  labelBaseline: {
    part: "labels",
    vgProp: "baseline"
  },
  labelColor: {
    part: "labels",
    vgProp: "fill"
  },
  labelFont: {
    part: "labels",
    vgProp: "font"
  },
  labelFontSize: {
    part: "labels",
    vgProp: "fontSize"
  },
  labelFontStyle: {
    part: "labels",
    vgProp: "fontStyle"
  },
  labelFontWeight: {
    part: "labels",
    vgProp: "fontWeight"
  },
  labelOpacity: {
    part: "labels",
    vgProp: "opacity"
  },
  labelOffset: null,
  labelPadding: null,
  gridColor: {
    part: "grid",
    vgProp: "stroke"
  },
  gridDash: {
    part: "grid",
    vgProp: "strokeDash"
  },
  gridDashOffset: {
    part: "grid",
    vgProp: "strokeDashOffset"
  },
  gridOpacity: {
    part: "grid",
    vgProp: "opacity"
  },
  gridWidth: {
    part: "grid",
    vgProp: "strokeWidth"
  },
  tickColor: {
    part: "ticks",
    vgProp: "stroke"
  },
  tickDash: {
    part: "ticks",
    vgProp: "strokeDash"
  },
  tickDashOffset: {
    part: "ticks",
    vgProp: "strokeDashOffset"
  },
  tickOpacity: {
    part: "ticks",
    vgProp: "opacity"
  },
  tickSize: null,
  tickWidth: {
    part: "ticks",
    vgProp: "strokeWidth"
  }
};
function xu(e) {
  return e && e.condition;
}
const ZI = ["domain", "grid", "labels", "ticks", "title"], $ae = {
  grid: "grid",
  gridCap: "grid",
  gridColor: "grid",
  gridDash: "grid",
  gridDashOffset: "grid",
  gridOpacity: "grid",
  gridScale: "grid",
  gridWidth: "grid",
  orient: "main",
  bandPosition: "both",
  aria: "main",
  description: "main",
  domain: "main",
  domainCap: "main",
  domainColor: "main",
  domainDash: "main",
  domainDashOffset: "main",
  domainOpacity: "main",
  domainWidth: "main",
  format: "main",
  formatType: "main",
  labelAlign: "main",
  labelAngle: "main",
  labelBaseline: "main",
  labelBound: "main",
  labelColor: "main",
  labelFlush: "main",
  labelFlushOffset: "main",
  labelFont: "main",
  labelFontSize: "main",
  labelFontStyle: "main",
  labelFontWeight: "main",
  labelLimit: "main",
  labelLineHeight: "main",
  labelOffset: "main",
  labelOpacity: "main",
  labelOverlap: "main",
  labelPadding: "main",
  labels: "main",
  labelSeparation: "main",
  maxExtent: "main",
  minExtent: "main",
  offset: "both",
  position: "main",
  tickCap: "main",
  tickColor: "main",
  tickDash: "main",
  tickDashOffset: "main",
  tickMinStep: "main",
  tickOffset: "both",
  tickOpacity: "main",
  tickRound: "both",
  ticks: "main",
  tickSize: "main",
  tickWidth: "both",
  title: "main",
  titleAlign: "main",
  titleAnchor: "main",
  titleAngle: "main",
  titleBaseline: "main",
  titleColor: "main",
  titleFont: "main",
  titleFontSize: "main",
  titleFontStyle: "main",
  titleFontWeight: "main",
  titleLimit: "main",
  titleLineHeight: "main",
  titleOpacity: "main",
  titlePadding: "main",
  titleX: "main",
  titleY: "main",
  encode: "both",
  scale: "both",
  tickBand: "both",
  tickCount: "both",
  tickExtra: "both",
  translate: "both",
  values: "both",
  zindex: "both"
  // this is actually set afterward, so it doesn't matter
}, KI = {
  orient: 1,
  aria: 1,
  bandPosition: 1,
  description: 1,
  domain: 1,
  domainCap: 1,
  domainColor: 1,
  domainDash: 1,
  domainDashOffset: 1,
  domainOpacity: 1,
  domainWidth: 1,
  format: 1,
  formatType: 1,
  grid: 1,
  gridCap: 1,
  gridColor: 1,
  gridDash: 1,
  gridDashOffset: 1,
  gridOpacity: 1,
  gridWidth: 1,
  labelAlign: 1,
  labelAngle: 1,
  labelBaseline: 1,
  labelBound: 1,
  labelColor: 1,
  labelFlush: 1,
  labelFlushOffset: 1,
  labelFont: 1,
  labelFontSize: 1,
  labelFontStyle: 1,
  labelFontWeight: 1,
  labelLimit: 1,
  labelLineHeight: 1,
  labelOffset: 1,
  labelOpacity: 1,
  labelOverlap: 1,
  labelPadding: 1,
  labels: 1,
  labelSeparation: 1,
  maxExtent: 1,
  minExtent: 1,
  offset: 1,
  position: 1,
  tickBand: 1,
  tickCap: 1,
  tickColor: 1,
  tickCount: 1,
  tickDash: 1,
  tickDashOffset: 1,
  tickExtra: 1,
  tickMinStep: 1,
  tickOffset: 1,
  tickOpacity: 1,
  tickRound: 1,
  ticks: 1,
  tickSize: 1,
  tickWidth: 1,
  title: 1,
  titleAlign: 1,
  titleAnchor: 1,
  titleAngle: 1,
  titleBaseline: 1,
  titleColor: 1,
  titleFont: 1,
  titleFontSize: 1,
  titleFontStyle: 1,
  titleFontWeight: 1,
  titleLimit: 1,
  titleLineHeight: 1,
  titleOpacity: 1,
  titlePadding: 1,
  titleX: 1,
  titleY: 1,
  translate: 1,
  values: 1,
  zindex: 1
}, kae = Object.assign(Object.assign({}, KI), { style: 1, labelExpr: 1, encoding: 1 });
function p2(e) {
  return !!kae[e];
}
const Aae = {
  axis: 1,
  axisBand: 1,
  axisBottom: 1,
  axisDiscrete: 1,
  axisLeft: 1,
  axisPoint: 1,
  axisQuantitative: 1,
  axisRight: 1,
  axisTemporal: 1,
  axisTop: 1,
  axisX: 1,
  axisXBand: 1,
  axisXDiscrete: 1,
  axisXPoint: 1,
  axisXQuantitative: 1,
  axisXTemporal: 1,
  axisY: 1,
  axisYBand: 1,
  axisYDiscrete: 1,
  axisYPoint: 1,
  axisYQuantitative: 1,
  axisYTemporal: 1
}, QI = q(Aae), Oae = {
  argmax: 1,
  argmin: 1,
  average: 1,
  count: 1,
  distinct: 1,
  product: 1,
  max: 1,
  mean: 1,
  median: 1,
  min: 1,
  missing: 1,
  q1: 1,
  q3: 1,
  ci0: 1,
  ci1: 1,
  stderr: 1,
  stdev: 1,
  stdevp: 1,
  sum: 1,
  valid: 1,
  values: 1,
  variance: 1,
  variancep: 1
}, Eae = {
  count: 1,
  min: 1,
  max: 1
};
function ja(e) {
  return !!e && !!e.argmin;
}
function No(e) {
  return !!e && !!e.argmax;
}
function v1(e) {
  return re(e) && !!Oae[e];
}
const Dae = ["count", "valid", "missing", "distinct"];
function ej(e) {
  return re(e) && Q(Dae, e);
}
function Sae(e) {
  return re(e) && Q(["min", "max"], e);
}
const Fae = ["count", "sum", "distinct", "valid", "missing"], Tae = ["mean", "average", "median", "q1", "q3", "min", "max"], Cae = fs(Tae);
var wu = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
const Oa = "row", Ea = "column", Dg = "facet", Me = "x", lt = "y", vn = "x2", ea = "y2", ta = "radius", Ba = "radius2", _n = "theta", Ua = "theta2", ia = "latitude", na = "longitude", xn = "latitude2", Mi = "longitude2", gi = "color", aa = "fill", oa = "stroke", mi = "shape", Ma = "size", us = "angle", Va = "opacity", qo = "fillOpacity", Lo = "strokeOpacity", Bo = "strokeWidth", Uo = "strokeDash", $u = "text", ku = "order", Au = "detail", Sg = "key", Wr = "tooltip", Fg = "href", Tg = "url", Cg = "description", Rae = {
  x: 1,
  y: 1,
  x2: 1,
  y2: 1
}, tj = {
  theta: 1,
  theta2: 1,
  radius: 1,
  radius2: 1
};
function ij(e) {
  return e in tj;
}
const _1 = {
  longitude: 1,
  longitude2: 1,
  latitude: 1,
  latitude2: 1
};
function Iae(e) {
  switch (e) {
    case ia:
      return "y";
    case xn:
      return "y2";
    case na:
      return "x";
    case Mi:
      return "x2";
  }
}
function jae(e) {
  return e in _1;
}
const zae = q(_1), nj = Object.assign(Object.assign(Object.assign(Object.assign({}, Rae), tj), _1), {
  // color
  color: 1,
  fill: 1,
  stroke: 1,
  // other non-position with scale
  opacity: 1,
  fillOpacity: 1,
  strokeOpacity: 1,
  strokeWidth: 1,
  strokeDash: 1,
  size: 1,
  angle: 1,
  shape: 1,
  // channels without scales
  order: 1,
  text: 1,
  detail: 1,
  key: 1,
  tooltip: 1,
  href: 1,
  url: 1,
  description: 1
});
function Ms(e) {
  return e === gi || e === aa || e === oa;
}
const aj = {
  row: 1,
  column: 1,
  facet: 1
}, Li = q(aj), x1 = Object.assign(Object.assign({}, nj), aj), Pae = q(x1), Nae = wu(x1, ["order", "detail", "tooltip"]), qae = wu(Nae, ["row", "column", "facet"]);
function Lae(e) {
  return !!qae[e];
}
function oj(e) {
  return !!x1[e];
}
const Bae = [vn, ea, xn, Mi, Ua, Ba];
function rj(e) {
  return cs(e) !== e;
}
function cs(e) {
  switch (e) {
    case vn:
      return Me;
    case ea:
      return lt;
    case xn:
      return ia;
    case Mi:
      return na;
    case Ua:
      return _n;
    case Ba:
      return ta;
  }
  return e;
}
function So(e) {
  if (ij(e))
    switch (e) {
      case _n:
        return "startAngle";
      case Ua:
        return "endAngle";
      case ta:
        return "outerRadius";
      case Ba:
        return "innerRadius";
    }
  return e;
}
function ra(e) {
  switch (e) {
    case Me:
      return vn;
    case lt:
      return ea;
    case ia:
      return xn;
    case na:
      return Mi;
    case _n:
      return Ua;
    case ta:
      return Ba;
  }
}
function sa(e) {
  switch (e) {
    case Me:
    case vn:
      return "width";
    case lt:
    case ea:
      return "height";
  }
}
function Uae(e) {
  switch (e) {
    case Me:
      return "xOffset";
    case lt:
      return "yOffset";
    case vn:
      return "x2Offset";
    case ea:
      return "y2Offset";
    case _n:
      return "thetaOffset";
    case ta:
      return "radiusOffset";
    case Ua:
      return "theta2Offset";
    case Ba:
      return "radius2Offset";
  }
}
const w1 = wu(nj, ["x", "y", "x2", "y2", "latitude", "longitude", "latitude2", "longitude2", "theta", "theta2", "radius", "radius2"]), Mae = q(w1), Mo = {
  x: 1,
  y: 1
}, Vi = q(Mo);
function Un(e) {
  return e in Mo;
}
const $1 = {
  theta: 1,
  radius: 1
}, Vae = q($1);
function Rg(e) {
  return e === "width" ? Me : lt;
}
const sj = wu(w1, ["text", "tooltip", "href", "url", "description", "detail", "key", "order"]), Wae = q(sj);
function Gae(e) {
  return !!w1[e];
}
function Hae(e) {
  switch (e) {
    case gi:
    case aa:
    case oa:
    case Ma:
    case mi:
    case Va:
    case Bo:
    case Uo:
      return !0;
    case qo:
    case Lo:
    case us:
      return !1;
  }
}
const lj = Object.assign(Object.assign(Object.assign({}, Mo), $1), sj), Ig = q(lj);
function Vo(e) {
  return !!lj[e];
}
function Yae(e, t) {
  return Jae(e)[t];
}
const dj = {
  // all marks
  arc: "always",
  area: "always",
  bar: "always",
  circle: "always",
  geoshape: "always",
  image: "always",
  line: "always",
  rule: "always",
  point: "always",
  rect: "always",
  square: "always",
  trail: "always",
  text: "always",
  tick: "always"
}, Xae = wu(dj, ["geoshape"]);
function Jae(e) {
  switch (e) {
    case gi:
    case aa:
    case oa:
    case Cg:
    case Au:
    case Sg:
    case Wr:
    case Fg:
    case ku:
    case Va:
    case qo:
    case Lo:
    case Bo:
    case Dg:
    case Oa:
    case Ea:
      return dj;
    case Me:
    case lt:
    case ia:
    case na:
      return Xae;
    case vn:
    case ea:
    case xn:
    case Mi:
      return {
        area: "always",
        bar: "always",
        image: "always",
        rect: "always",
        rule: "always",
        circle: "binned",
        point: "binned",
        square: "binned",
        tick: "binned",
        line: "binned",
        trail: "binned"
      };
    case Ma:
      return {
        point: "always",
        tick: "always",
        rule: "always",
        circle: "always",
        square: "always",
        bar: "always",
        text: "always",
        line: "always",
        trail: "always"
      };
    case Uo:
      return {
        line: "always",
        point: "always",
        tick: "always",
        rule: "always",
        circle: "always",
        square: "always",
        bar: "always",
        geoshape: "always"
      };
    case mi:
      return { point: "always", geoshape: "always" };
    case $u:
      return { text: "always" };
    case us:
      return { point: "always", square: "always", text: "always" };
    case Tg:
      return { image: "always" };
    case _n:
      return { text: "always", arc: "always" };
    case ta:
      return { text: "always", arc: "always" };
    case Ua:
    case Ba:
      return { arc: "always" };
  }
}
function kb(e) {
  switch (e) {
    case Me:
    case lt:
    case _n:
    case ta:
    case Ma:
    case us:
    case Bo:
    case Va:
    case qo:
    case Lo:
    case vn:
    case ea:
    case Ua:
    case Ba:
      return;
    case Dg:
    case Oa:
    case Ea:
    case mi:
    case Uo:
    case $u:
    case Wr:
    case Fg:
    case Tg:
    case Cg:
      return "discrete";
    case gi:
    case aa:
    case oa:
      return "flexible";
    case ia:
    case na:
    case xn:
    case Mi:
    case Au:
    case Sg:
    case ku:
      return;
  }
}
function fj(e) {
  return yu(e) && (e = Hg(e, void 0)), "bin" + q(e).map((t) => jg(e[t]) ? Ne(`_${t}_${vu(e[t])}`) : Ne(`_${t}_${e[t]}`)).join("");
}
function qe(e) {
  return e === !0 || Ou(e) && !e.binned;
}
function Zt(e) {
  return e === "binned" || Ou(e) && e.binned === !0;
}
function Ou(e) {
  return Je(e);
}
function jg(e) {
  return e == null ? void 0 : e.selection;
}
function g2(e) {
  switch (e) {
    case Oa:
    case Ea:
    case Ma:
    case gi:
    case aa:
    case oa:
    case Bo:
    case Va:
    case qo:
    case Lo:
    case mi:
      return 6;
    case Uo:
      return 4;
    default:
      return 10;
  }
}
function k1(e) {
  return `Invalid specification ${JSON.stringify(e)}. Make sure the specification includes at least one of the following properties: "mark", "layer", "facet", "hconcat", "vconcat", "concat", or "repeat".`;
}
const Zae = 'Autosize "fit" only works for single views and layered views.';
function m2(e) {
  return `${e == "width" ? "Width" : "Height"} "container" only works for single views and layered views.`;
}
function b2(e) {
  const t = e == "width" ? "Width" : "Height", i = e == "width" ? "x" : "y";
  return `${t} "container" only works well with autosize "fit" or "fit-${i}".`;
}
function y2(e) {
  return e ? `Dropping "fit-${e}" because spec has discrete ${sa(e)}.` : 'Dropping "fit" because spec has discrete size.';
}
function A1(e) {
  return `Unknown field for ${e}. Cannot calculate view size.`;
}
function v2(e) {
  return `Cannot project a selection on encoding channel "${e}", which has no field.`;
}
function Kae(e, t) {
  return `Cannot project a selection on encoding channel "${e}" as it uses an aggregate function ("${t}").`;
}
function Qae(e) {
  return `The "nearest" transform is not supported for ${e} marks.`;
}
function uj(e) {
  return `Selection not supported for ${e} yet.`;
}
function eoe(e) {
  return `Cannot find a selection named "${e}".`;
}
const toe = "Scale bindings are currently only supported for scales with unbinned, continuous domains.", ioe = "Legend bindings are only supported for selections over an individual field or encoding channel.";
function noe(e) {
  return `Cannot define and lookup the "${e}" selection in the same view. Try moving the lookup into a second, layered view?`;
}
const aoe = "The same selection must be used to override scale domains in a layered view.", ooe = 'Interval selections should be initialized using "x" and/or "y" keys.';
function roe(e) {
  return `Unknown repeated value "${e}".`;
}
function _2(e) {
  return `The "columns" property cannot be used when "${e}" has nested row/column.`;
}
const soe = "Axes cannot be shared in concatenated or repeated views yet (https://github.com/vega/vega-lite/issues/2415).";
function loe(e) {
  return `Unrecognized parse "${e}".`;
}
function x2(e, t, i) {
  return `An ancestor parsed field "${e}" as ${i} but a child wants to parse the field as ${t}.`;
}
const doe = "Attempt to add the same child twice.";
function foe(e) {
  return `Ignoring an invalid transform: ${Ie(e)}.`;
}
const uoe = 'If "from.fields" is not specified, "as" has to be a string that specifies the key to be used for the data from the secondary source.';
function w2(e) {
  return `Config.customFormatTypes is not true, thus custom format type and format for channel ${e} are dropped.`;
}
function coe(e) {
  const { parentProjection: t, projection: i } = e;
  return `Layer's shared projection ${Ie(t)} is overridden by a child projection ${Ie(i)}.`;
}
const hoe = "Arc marks uses theta channel rather than angle, replacing angle with theta.";
function poe(e, t, i) {
  return `Channel ${e} is a ${t}. Converted to {value: ${Ie(i)}}.`;
}
function cj(e) {
  return `Invalid field type "${e}".`;
}
function goe(e, t) {
  return `Invalid field type "${e}" for aggregate: "${t}", using "quantitative" instead.`;
}
function moe(e) {
  return `Invalid aggregation operator "${e}".`;
}
function hj(e, t) {
  const { fill: i, stroke: n } = t;
  return `Dropping color ${e} as the plot also has ${i && n ? "fill and stroke" : i ? "fill" : "stroke"}.`;
}
function bv(e, t) {
  return `Dropping ${Ie(e)} from channel "${t}" since it does not contain any data field, datum, value, or signal.`;
}
const boe = "Line marks cannot encode size with a non-groupby field. You may want to use trail marks instead.";
function zg(e, t, i) {
  return `${e} dropped as it is incompatible with "${t}".`;
}
function yoe(e) {
  return `${e}-encoding is dropped as ${e} is not a valid encoding channel.`;
}
function voe(e) {
  return `${e} encoding should be discrete (ordinal / nominal / binned).`;
}
function _oe(e) {
  return `Facet encoding dropped as ${e.join(" and ")} ${e.length > 1 ? "are" : "is"} also specified.`;
}
function Ab(e, t) {
  return `Using discrete channel "${e}" to encode "${t}" field can be misleading as it does not encode ${t === "ordinal" ? "order" : "magnitude"}.`;
}
function xoe(e) {
  return `The ${e} for range marks cannot be an expression`;
}
function woe(e, t) {
  return `Line mark is for continuous lines and thus cannot be used with ${e && t ? "x2 and y2" : e ? "x2" : "y2"}. We will use the rule mark (line segments) instead.`;
}
function $oe(e, t) {
  return `Specified orient "${e}" overridden with "${t}".`;
}
const koe = `Scale's "rangeStep" is deprecated and will be removed in Vega-Lite 5.0. Please use "width"/"height": {"step": ...} instead. See https://vega.github.io/vega-lite/docs/size.html.`;
function Aoe(e) {
  return `Cannot use the scale property "${e}" with non-color channel.`;
}
function Ooe(e) {
  return `Using unaggregated domain with raw field has no effect (${Ie(e)}).`;
}
function Eoe(e) {
  return `Unaggregated domain not applicable for "${e}" since it produces values outside the origin domain of the source data.`;
}
function Doe(e) {
  return `Unaggregated domain is currently unsupported for log scale (${Ie(e)}).`;
}
function Soe(e) {
  return `Cannot apply size to non-oriented mark "${e}".`;
}
function Foe(e, t, i) {
  return `Channel "${e}" does not work with "${t}" scale. We are using "${i}" scale instead.`;
}
function Toe(e, t) {
  return `FieldDef does not work with "${e}" scale. We are using "${t}" scale instead.`;
}
function pj(e, t, i) {
  return `${i}-scale's "${t}" is dropped as it does not work with ${e} scale.`;
}
function gj(e) {
  return `The step for "${e}" is dropped because the ${e === "width" ? "x" : "y"} is continuous.`;
}
function Coe(e, t, i, n) {
  return `Conflicting ${t.toString()} property "${e.toString()}" (${Ie(i)} and ${Ie(n)}). Using ${Ie(i)}.`;
}
function Roe(e, t, i, n) {
  return `Conflicting ${t.toString()} property "${e.toString()}" (${Ie(i)} and ${Ie(n)}). Using the union of the two domains.`;
}
function Ioe(e) {
  return `Setting the scale to be independent for "${e}" means we also have to set the guide (axis or legend) to be independent.`;
}
function joe(e) {
  return `Dropping sort property ${Ie(e)} as unioned domains only support boolean or op "count", "min", and "max".`;
}
const $2 = "Domains that should be unioned has conflicting sort properties. Sort will be set to true.", zoe = "Detected faceted independent scales that union domain of multiple fields from different data sources. We will use the first field. The result view size may be incorrect.", Poe = "Detected faceted independent scales that union domain of the same fields from different source. We will assume that this is the same field from a different fork of the same data source. However, if this is not the case, the result view size may be incorrect.", Noe = "Detected faceted independent scales that union domain of multiple fields from the same data source. We will use the first field. The result view size may be incorrect.";
function qoe(e) {
  return `Cannot stack "${e}" if there is already "${e}2".`;
}
function Loe(e) {
  return `Cannot stack non-linear scale (${e}).`;
}
function Boe(e) {
  return `Stacking is applied even though the aggregate function is non-summative ("${e}").`;
}
function rp(e, t) {
  return `Invalid ${e}: ${Ie(t)}.`;
}
function Uoe(e) {
  return `Dropping day from datetime ${Ie(e)} as day cannot be combined with other units.`;
}
function Moe(e, t) {
  return `${t ? "extent " : ""}${t && e ? "and " : ""}${e ? "center " : ""}${t && e ? "are " : "is "}not needed when data are aggregated.`;
}
function Voe(e, t, i) {
  return `${e} is not usually used with ${t} for ${i}.`;
}
function Woe(e, t) {
  return `Continuous axis should not have customized aggregation function ${e}; ${t} already agregates the axis.`;
}
function k2(e) {
  return `1D error band does not support ${e}.`;
}
function mj(e) {
  return `Channel ${e} is required for "binned" bin.`;
}
function Goe(e) {
  return `Channel ${e} should not be used with "binned" bin.`;
}
function Hoe(e) {
  return `Domain for ${e} is required for threshold scale.`;
}
const bj = fae(BI);
let dl = bj;
function Yoe(e) {
  return dl = e, dl;
}
function Xoe() {
  return dl = bj, dl;
}
function U(...e) {
  dl.warn(...e);
}
function Joe(...e) {
  dl.debug(...e);
}
function hs(e) {
  if (e && Je(e)) {
    for (const t of E1)
      if (t in e)
        return !0;
  }
  return !1;
}
const yj = [
  "january",
  "february",
  "march",
  "april",
  "may",
  "june",
  "july",
  "august",
  "september",
  "october",
  "november",
  "december"
], Zoe = yj.map((e) => e.substr(0, 3)), vj = ["sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"], Koe = vj.map((e) => e.substr(0, 3));
function Qoe(e) {
  if (Eg(e) && (e = +e), nt(e))
    return e > 4 && U(rp("quarter", e)), e - 1;
  throw new Error(rp("quarter", e));
}
function ere(e) {
  if (Eg(e) && (e = +e), nt(e))
    return e - 1;
  {
    const t = e.toLowerCase(), i = yj.indexOf(t);
    if (i !== -1)
      return i;
    const n = t.substr(0, 3), a = Zoe.indexOf(n);
    if (a !== -1)
      return a;
    throw new Error(rp("month", e));
  }
}
function tre(e) {
  if (Eg(e) && (e = +e), nt(e))
    return e % 7;
  {
    const t = e.toLowerCase(), i = vj.indexOf(t);
    if (i !== -1)
      return i;
    const n = t.substr(0, 3), a = Koe.indexOf(n);
    if (a !== -1)
      return a;
    throw new Error(rp("day", e));
  }
}
function O1(e, t) {
  const i = [];
  if (t && e.day !== void 0 && q(e).length > 1 && (U(Uoe(e)), e = se(e), delete e.day), e.year !== void 0 ? i.push(e.year) : i.push(2012), e.month !== void 0) {
    const n = t ? ere(e.month) : e.month;
    i.push(n);
  } else if (e.quarter !== void 0) {
    const n = t ? Qoe(e.quarter) : e.quarter;
    i.push(nt(n) ? n * 3 : n + "*3");
  } else
    i.push(0);
  if (e.date !== void 0)
    i.push(e.date);
  else if (e.day !== void 0) {
    const n = t ? tre(e.day) : e.day;
    i.push(nt(n) ? n + 1 : n + "+1");
  } else
    i.push(1);
  for (const n of ["hours", "minutes", "seconds", "milliseconds"]) {
    const a = e[n];
    i.push(typeof a > "u" ? 0 : a);
  }
  return i;
}
function zf(e) {
  const i = O1(e, !0).join(", ");
  return e.utc ? `utc(${i})` : `datetime(${i})`;
}
function ire(e) {
  const i = O1(e, !1).join(", ");
  return e.utc ? `utc(${i})` : `datetime(${i})`;
}
function nre(e) {
  const t = O1(e, !0);
  return e.utc ? +new Date(Date.UTC(...t)) : +new Date(...t);
}
var are = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
const _j = {
  year: 1,
  quarter: 1,
  month: 1,
  week: 1,
  day: 1,
  dayofyear: 1,
  date: 1,
  hours: 1,
  minutes: 1,
  seconds: 1,
  milliseconds: 1
}, E1 = q(_j);
function ore(e) {
  return !!_j[e];
}
function D1(e) {
  return e.startsWith("utc");
}
function rre(e) {
  return e.substr(3);
}
const sre = {
  "year-month": "%b %Y ",
  "year-month-date": "%b %d, %Y "
};
function S1(e) {
  const t = [];
  for (const i of E1)
    xj(e, i) && t.push(i);
  return t;
}
function xj(e, t) {
  const i = e.indexOf(t);
  return !(i < 0 || i > 0 && t === "seconds" && e.charAt(i - 1) === "i" || e.length > i + 3 && t === "day" && e.charAt(i + 3) === "o" || i > 0 && t === "year" && e.charAt(i - 1) === "f");
}
function lre(e, t, { end: i } = { end: !1 }) {
  const n = b1(t), a = D1(e) ? "utc" : "";
  function o(l) {
    return l === "quarter" ? `(${a}quarter(${n})-1)` : `${a}${l}(${n})`;
  }
  let r;
  const s = {};
  for (const l of E1)
    xj(e, l) && (s[l] = o(l), r = l);
  return i && (s[r] += "+1"), ire(s);
}
function wj(e) {
  if (!e)
    return;
  const t = S1(e);
  return `timeUnitSpecifier(${Rf(t)}, ${Rf(sre)})`;
}
function dre(e, t, i) {
  if (!e)
    return;
  const n = wj(e);
  return `${i || D1(e) ? "utc" : "time"}Format(${t}, ${n})`;
}
function ni(e) {
  if (!e)
    return;
  let t;
  return re(e) ? t = {
    unit: e
  } : Je(e) && (t = Object.assign(Object.assign({}, e), e.unit ? { unit: e.unit } : {})), D1(t.unit) && (t.utc = !0, t.unit = rre(t.unit)), t;
}
function fre(e) {
  const t = ni(e), { utc: i } = t, n = are(t, ["utc"]);
  return n.unit ? (i ? "utc" : "") + q(n).map((a) => Ne(`${a === "unit" ? "" : `_${a}_`}${n[a]}`)).join("") : (i ? "utc" : "") + "timeunit" + q(n).map((a) => Ne(`_${a}_${n[a]}`)).join("");
}
function ee(e) {
  return e && !!e.signal;
}
function Wo(e) {
  return !!e.step;
}
function ure(e) {
  return X(e) ? !1 : "fields" in e && !("data" in e);
}
function cre(e) {
  return X(e) ? !1 : "fields" in e && "data" in e;
}
function wa(e) {
  return X(e) ? !1 : "field" in e && "data" in e;
}
const hre = {
  aria: 1,
  description: 1,
  ariaRole: 1,
  ariaRoleDescription: 1,
  blend: 1,
  opacity: 1,
  fill: 1,
  fillOpacity: 1,
  stroke: 1,
  strokeCap: 1,
  strokeWidth: 1,
  strokeOpacity: 1,
  strokeDash: 1,
  strokeDashOffset: 1,
  strokeJoin: 1,
  strokeOffset: 1,
  strokeMiterLimit: 1,
  startAngle: 1,
  endAngle: 1,
  padAngle: 1,
  innerRadius: 1,
  outerRadius: 1,
  size: 1,
  shape: 1,
  interpolate: 1,
  tension: 1,
  orient: 1,
  align: 1,
  baseline: 1,
  text: 1,
  dir: 1,
  dx: 1,
  dy: 1,
  ellipsis: 1,
  limit: 1,
  radius: 1,
  theta: 1,
  angle: 1,
  font: 1,
  fontSize: 1,
  fontWeight: 1,
  fontStyle: 1,
  lineBreak: 1,
  lineHeight: 1,
  cursor: 1,
  href: 1,
  tooltip: 1,
  cornerRadius: 1,
  cornerRadiusTopLeft: 1,
  cornerRadiusTopRight: 1,
  cornerRadiusBottomLeft: 1,
  cornerRadiusBottomRight: 1,
  aspect: 1,
  width: 1,
  height: 1,
  url: 1,
  smooth: 1
  // commented below are vg channel that do not have mark config.
  // x: 1,
  // y: 1,
  // x2: 1,
  // y2: 1,
  // xc'|'yc'
  // clip: 1,
  // path: 1,
  // url: 1,
}, pre = q(hre), gre = {
  arc: 1,
  area: 1,
  group: 1,
  image: 1,
  line: 1,
  path: 1,
  rect: 1,
  rule: 1,
  shape: 1,
  symbol: 1,
  text: 1,
  trail: 1
}, yv = [
  "cornerRadius",
  "cornerRadiusTopLeft",
  "cornerRadiusTopRight",
  "cornerRadiusBottomLeft",
  "cornerRadiusBottomRight"
];
function mre(e) {
  return e == null ? void 0 : e.selection;
}
function F1(e) {
  return e && !!e.field && e.equal !== void 0;
}
function T1(e) {
  return e && !!e.field && e.lt !== void 0;
}
function C1(e) {
  return e && !!e.field && e.lte !== void 0;
}
function R1(e) {
  return e && !!e.field && e.gt !== void 0;
}
function I1(e) {
  return e && !!e.field && e.gte !== void 0;
}
function j1(e) {
  if (e && e.field) {
    if (X(e.range) && e.range.length === 2)
      return !0;
    if (ee(e.range))
      return !0;
  }
  return !1;
}
function z1(e) {
  return e && !!e.field && (X(e.oneOf) || X(e.in));
}
function bre(e) {
  return e && !!e.field && e.valid !== void 0;
}
function $j(e) {
  return z1(e) || F1(e) || j1(e) || T1(e) || R1(e) || C1(e) || I1(e);
}
function An(e, t) {
  return Yg(e, { timeUnit: t, wrapTime: !0 });
}
function yre(e, t) {
  return e.map((i) => An(i, t));
}
function kj(e, t = !0) {
  var i;
  const { field: n } = e, a = (i = ni(e.timeUnit)) === null || i === void 0 ? void 0 : i.unit, o = a ? (
    // For timeUnit, cast into integer with time() so we can use ===, inrange, indexOf to compare values directly.
    // TODO: We calculate timeUnit on the fly here. Consider if we would like to consolidate this with timeUnit pipeline
    // TODO: support utc
    "time(" + lre(a, n) + ")"
  ) : M(e, { expr: "datum" });
  if (F1(e))
    return o + "===" + An(e.equal, a);
  if (T1(e)) {
    const r = e.lt;
    return `${o}<${An(r, a)}`;
  } else if (R1(e)) {
    const r = e.gt;
    return `${o}>${An(r, a)}`;
  } else if (C1(e)) {
    const r = e.lte;
    return `${o}<=${An(r, a)}`;
  } else if (I1(e)) {
    const r = e.gte;
    return `${o}>=${An(r, a)}`;
  } else {
    if (z1(e))
      return `indexof([${yre(e.oneOf, a).join(",")}], ${o}) !== -1`;
    if (bre(e))
      return P1(o, e.valid);
    if (j1(e)) {
      const { range: r } = e, s = ee(r) ? { signal: `${r.signal}[0]` } : r[0], l = ee(r) ? { signal: `${r.signal}[1]` } : r[1];
      if (s !== null && l !== null && t)
        return "inrange(" + o + ", [" + An(s, a) + ", " + An(l, a) + "])";
      const d = [];
      return s !== null && d.push(`${o} >= ${An(s, a)}`), l !== null && d.push(`${o} <= ${An(l, a)}`), d.length > 0 ? d.join(" && ") : "true";
    }
  }
  throw new Error(`Invalid field predicate: ${JSON.stringify(e)}`);
}
function P1(e, t = !0) {
  return t ? `isValid(${e}) && isFinite(+${e})` : `!isValid(${e}) || !isFinite(+${e})`;
}
function vre(e) {
  var t;
  return $j(e) && e.timeUnit ? Object.assign(Object.assign({}, e), { timeUnit: (t = ni(e.timeUnit)) === null || t === void 0 ? void 0 : t.unit }) : e;
}
const Eu = {
  quantitative: "quantitative",
  ordinal: "ordinal",
  temporal: "temporal",
  nominal: "nominal",
  geojson: "geojson"
}, Gr = Eu.quantitative, N1 = Eu.ordinal, fl = Eu.temporal, q1 = Eu.nominal, Vl = Eu.geojson;
function _re(e) {
  if (e)
    switch (e = e.toLowerCase(), e) {
      case "q":
      case Gr:
        return "quantitative";
      case "t":
      case fl:
        return "temporal";
      case "o":
      case N1:
        return "ordinal";
      case "n":
      case q1:
        return "nominal";
      case Vl:
        return "geojson";
    }
}
var xre = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
const tt = {
  // Continuous - Quantitative
  LINEAR: "linear",
  LOG: "log",
  POW: "pow",
  SQRT: "sqrt",
  SYMLOG: "symlog",
  IDENTITY: "identity",
  SEQUENTIAL: "sequential",
  // Continuous - Time
  TIME: "time",
  UTC: "utc",
  // Discretizing scales
  QUANTILE: "quantile",
  QUANTIZE: "quantize",
  THRESHOLD: "threshold",
  BIN_ORDINAL: "bin-ordinal",
  // Discrete scales
  ORDINAL: "ordinal",
  POINT: "point",
  BAND: "band"
}, vv = {
  linear: "numeric",
  log: "numeric",
  pow: "numeric",
  sqrt: "numeric",
  symlog: "numeric",
  identity: "numeric",
  sequential: "numeric",
  time: "time",
  utc: "time",
  ordinal: "ordinal",
  "bin-ordinal": "bin-ordinal",
  point: "ordinal-position",
  band: "ordinal-position",
  quantile: "discretizing",
  quantize: "discretizing",
  threshold: "discretizing"
};
function wre(e, t) {
  const i = vv[e], n = vv[t];
  return i === n || i === "ordinal-position" && n === "time" || n === "ordinal-position" && i === "time";
}
const $re = {
  // numeric
  linear: 0,
  log: 1,
  pow: 1,
  sqrt: 1,
  symlog: 1,
  identity: 1,
  sequential: 1,
  // time
  time: 0,
  utc: 0,
  // ordinal-position -- these have higher precedence than continuous scales as they support more types of data
  point: 10,
  band: 11,
  // non grouped types
  ordinal: 0,
  "bin-ordinal": 0,
  quantile: 0,
  quantize: 0,
  threshold: 0
};
function A2(e) {
  return $re[e];
}
const Aj = ["linear", "log", "pow", "sqrt", "symlog", "time", "utc"], kre = fs(Aj), Are = ["linear", "log", "pow", "sqrt", "symlog"], Ore = fs(Are);
function Ere(e) {
  return e in Ore;
}
const Dre = ["quantile", "quantize", "threshold"], Sre = fs(Dre), Fre = Aj.concat([
  "quantile",
  "quantize",
  "threshold",
  "sequential",
  "identity"
]), Tre = fs(Fre), Cre = ["ordinal", "bin-ordinal", "point", "band"], Rre = fs(Cre);
function bi(e) {
  return e in Rre;
}
function Wi(e) {
  return e in Tre;
}
function sn(e) {
  return e in kre;
}
function sp(e) {
  return e in Sre;
}
const Ire = {
  pointPadding: 0.5,
  barBandPaddingInner: 0.1,
  rectBandPaddingInner: 0,
  minBandSize: 2,
  minFontSize: 8,
  maxFontSize: 40,
  minOpacity: 0.3,
  maxOpacity: 0.8,
  // FIXME: revise if these *can* become ratios of width/height step
  minSize: 9,
  minStrokeWidth: 1,
  maxStrokeWidth: 4,
  quantileCount: 4,
  quantizeCount: 4
};
function jre(e) {
  return !re(e) && !!e.name;
}
function Oj(e) {
  return e == null ? void 0 : e.selection;
}
function zre(e) {
  return e && e.unionWith;
}
const Pre = {
  type: 1,
  domain: 1,
  domainMax: 1,
  domainMin: 1,
  domainMid: 1,
  align: 1,
  range: 1,
  rangeMax: 1,
  rangeMin: 1,
  scheme: 1,
  bins: 1,
  // Other properties
  reverse: 1,
  round: 1,
  // quantitative / time
  clamp: 1,
  nice: 1,
  // quantitative
  base: 1,
  exponent: 1,
  constant: 1,
  interpolate: 1,
  zero: 1,
  // band/point
  padding: 1,
  paddingInner: 1,
  paddingOuter: 1
}, Nre = xre(Pre, ["type", "domain", "range", "rangeMax", "rangeMin", "scheme"]), qre = q(Nre);
function _v(e, t) {
  switch (t) {
    case "type":
    case "domain":
    case "reverse":
    case "range":
      return !0;
    case "scheme":
    case "interpolate":
      return !Q(["point", "band", "identity"], e);
    case "bins":
      return !Q(["point", "band", "identity", "ordinal"], e);
    case "round":
      return sn(e) || e === "band" || e === "point";
    case "padding":
    case "rangeMin":
    case "rangeMax":
      return sn(e) || Q(["point", "band"], e);
    case "paddingOuter":
    case "align":
      return Q(["point", "band"], e);
    case "paddingInner":
      return e === "band";
    case "domainMax":
    case "domainMid":
    case "domainMin":
    case "clamp":
      return sn(e);
    case "nice":
      return sn(e) || e === "quantize" || e === "threshold";
    case "exponent":
      return e === "pow";
    case "base":
      return e === "log";
    case "constant":
      return e === "symlog";
    case "zero":
      return Wi(e) && !Q([
        "log",
        "time",
        "utc",
        "threshold",
        "quantile"
        // quantile depends on distribution so zero does not matter
      ], e);
  }
}
function Ej(e, t) {
  switch (t) {
    case "interpolate":
    case "scheme":
    case "domainMid":
      return Ms(e) ? void 0 : Aoe(e);
    case "align":
    case "type":
    case "bins":
    case "domain":
    case "domainMax":
    case "domainMin":
    case "range":
    case "base":
    case "exponent":
    case "constant":
    case "nice":
    case "padding":
    case "paddingInner":
    case "paddingOuter":
    case "rangeMax":
    case "rangeMin":
    case "reverse":
    case "round":
    case "clamp":
    case "zero":
      return;
  }
}
function Lre(e, t) {
  return Q([N1, q1], t) ? e === void 0 || bi(e) : t === fl ? Q([tt.TIME, tt.UTC, void 0], e) : t === Gr ? Q([
    tt.LOG,
    tt.POW,
    tt.SQRT,
    tt.SYMLOG,
    tt.QUANTILE,
    tt.QUANTIZE,
    tt.THRESHOLD,
    tt.LINEAR,
    void 0
  ], e) : !0;
}
function Bre(e, t) {
  if (!Vo(e))
    return !1;
  switch (e) {
    case Me:
    case lt:
    case _n:
    case ta:
      return sn(t) || Q(["band", "point"], t);
    case Ma:
    case Bo:
    case Va:
    case qo:
    case Lo:
    case us:
      return sn(t) || sp(t) || Q(["band", "point", "ordinal"], t);
    case gi:
    case aa:
    case oa:
      return t !== "band";
    case Uo:
      return t === "ordinal" || sp(t);
    case mi:
      return t === "ordinal";
  }
}
function Du(e) {
  return e && !!e.expr;
}
function en(e) {
  const t = q(e || {}), i = {};
  for (const n of t)
    i[n] = Qt(e[n]);
  return i;
}
const oi = {
  arc: "arc",
  area: "area",
  bar: "bar",
  image: "image",
  line: "line",
  point: "point",
  rect: "rect",
  rule: "rule",
  text: "text",
  tick: "tick",
  trail: "trail",
  circle: "circle",
  square: "square",
  geoshape: "geoshape"
}, Dj = oi.arc, Pg = oi.area, Ng = oi.bar, Ure = oi.image, qg = oi.line, Lg = oi.point, Mre = oi.rect, lp = oi.rule, Sj = oi.text, L1 = oi.tick, Vre = oi.trail, B1 = oi.circle, U1 = oi.square, Fj = oi.geoshape;
function Go(e) {
  return Q(["line", "area", "trail"], e);
}
function O2(e) {
  return Q([
    "rect",
    "bar",
    "image",
    "arc"
    /* arc is rect/interval in polar coordinate */
  ], e);
}
const Tj = q(oi);
function za(e) {
  return e.type;
}
fs(Tj);
const Wre = [
  "stroke",
  "strokeWidth",
  "strokeDash",
  "strokeDashOffset",
  "strokeOpacity",
  "strokeJoin",
  "strokeMiterLimit"
], Gre = ["fill", "fillOpacity"], Hre = [...Wre, ...Gre], Yre = {
  color: 1,
  filled: 1,
  invalid: 1,
  order: 1,
  radius2: 1,
  theta2: 1,
  timeUnitBand: 1,
  timeUnitBandPosition: 1
}, E2 = q(Yre), Xre = {
  area: ["line", "point"],
  bar: ["binSpacing", "continuousBandSize", "discreteBandSize"],
  rect: ["binSpacing", "continuousBandSize", "discreteBandSize"],
  line: ["point"],
  tick: ["bandSize", "thickness"]
}, Jre = {
  color: "#4c78a8",
  invalid: "filter",
  timeUnitBand: 1
}, Zre = {
  mark: 1,
  arc: 1,
  area: 1,
  bar: 1,
  circle: 1,
  image: 1,
  line: 1,
  point: 1,
  rect: 1,
  rule: 1,
  square: 1,
  text: 1,
  tick: 1,
  trail: 1,
  geoshape: 1
}, Cj = q(Zre), Kre = {
  horizontal: ["cornerRadiusTopRight", "cornerRadiusBottomRight"],
  vertical: ["cornerRadiusTopLeft", "cornerRadiusTopRight"]
}, Rj = 5, Qre = {
  binSpacing: 1,
  continuousBandSize: Rj,
  timeUnitBandPosition: 0.5
}, ese = {
  binSpacing: 0,
  continuousBandSize: Rj,
  timeUnitBandPosition: 0.5
}, tse = {
  thickness: 1
};
function ise(e) {
  return za(e) ? e.type : e;
}
function M1(e) {
  const { channel: t, channelDef: i, markDef: n, scale: a, config: o } = e, r = jj(e);
  return (
    // Only this for field def without counting aggregate (as count wouldn't be null)
    V(i) && !ej(i.aggregate) && // and only for continuous scale without zero (otherwise, null / invalid will be interpreted as zero, which doesn't cause layout problem)
    a && sn(a.get("type")) && a.get("zero") === !1 ? Ij({
      fieldDef: i,
      channel: t,
      markDef: n,
      ref: r,
      config: o
    }) : r
  );
}
function Ij({ fieldDef: e, channel: t, markDef: i, ref: n, config: a }) {
  return Go(i.type) || $e("invalid", i, a) === null ? n : [nse(e, t), n];
}
function nse(e, t) {
  const i = V1(e, !0), a = cs(t) === "y" ? { field: { group: "height" } } : (
    // x / angle / radius can all use 0
    { value: 0 }
  );
  return Object.assign({ test: i }, a);
}
function V1(e, t = !0) {
  return P1(re(e) ? e : M(e, { expr: "datum" }), !t);
}
function ase(e) {
  const { datum: t } = e;
  return hs(t) ? zf(t) : `${JSON.stringify(t)}`;
}
function Fr(e, t, i, n) {
  const a = {};
  if (t && (a.scale = t), Ho(e)) {
    const { datum: o } = e;
    hs(o) ? a.signal = zf(o) : ee(o) ? a.signal = o.signal : Du(o) ? a.signal = o.expr : a.value = o;
  } else
    a.field = M(e, i);
  if (n) {
    const { offset: o, band: r } = n;
    o && (a.offset = o), r && (a.band = r);
  }
  return a;
}
function dp({ scaleName: e, fieldOrDatumDef: t, fieldOrDatumDef2: i, offset: n, startSuffix: a, band: o = 0.5 }) {
  const r = 0 < o && o < 1 ? "datum" : void 0, s = M(t, { expr: r, suffix: a }), l = i !== void 0 ? M(i, { expr: r }) : M(t, { suffix: "end", expr: r }), d = {};
  if (o === 0 || o === 1) {
    d.scale = e;
    const f = o === 0 ? s : l;
    d.field = f;
  } else {
    const f = `${o} * ${s} + ${1 - o} * ${l}`;
    d.signal = `scale("${e}", ${f})`;
  }
  return n && (d.offset = n), d;
}
function jj({ channel: e, channelDef: t, channel2Def: i, markDef: n, config: a, scaleName: o, scale: r, stack: s, offset: l, defaultRef: d, band: f }) {
  var u;
  if (t) {
    if (ie(t)) {
      if (Gi(t)) {
        f = f ?? Fu({
          channel: e,
          fieldDef: t,
          fieldDef2: i,
          markDef: n,
          stack: s,
          config: a,
          isMidPoint: !0
        });
        const { bin: h, timeUnit: p, type: g } = t;
        if (qe(h) || f && p && g === fl)
          return s && s.impute ? Fr(t, o, { binSuffix: "mid" }, { offset: l }) : f ? dp({ scaleName: o, fieldOrDatumDef: t, band: f, offset: l }) : Fr(t, o, Tu(t, e) ? { binSuffix: "range" } : {}, {
            offset: l
          });
        if (Zt(h)) {
          if (V(i))
            return dp({
              scaleName: o,
              fieldOrDatumDef: t,
              fieldOrDatumDef2: i,
              band: f,
              offset: l
            });
          U(mj(e === Me ? vn : ea));
        }
      }
      const c = r == null ? void 0 : r.get("type");
      return Fr(
        t,
        o,
        bi(c) ? { binSuffix: "range" } : {},
        // no need for bin suffix if there is no scale
        {
          offset: l,
          // For band, to get mid point, need to offset by half of the band
          band: c === "band" ? (u = f ?? t.band) !== null && u !== void 0 ? u : 0.5 : void 0
        }
      );
    } else if (hn(t)) {
      const c = t.value, h = l ? { offset: l } : {};
      return Object.assign(Object.assign({}, Jd(e, c)), h);
    }
  }
  return cae(d) && (d = d()), d && Object.assign(Object.assign({}, d), l ? { offset: l } : {});
}
function Jd(e, t) {
  return Q(["x", "x2"], e) && t === "width" ? { field: { group: "width" } } : Q(["y", "y2"], e) && t === "height" ? { field: { group: "height" } } : Ue(t);
}
function Hr(e) {
  return e && e !== "number" && e !== "time";
}
function zj(e, t, i) {
  return `${e}(${t}${i ? `, ${JSON.stringify(i)}` : ""})`;
}
const ose = " – ";
function W1({ fieldOrDatumDef: e, format: t, formatType: i, expr: n, normalizeStack: a, config: o }) {
  var r, s;
  if (Hr(i))
    return G1({
      fieldOrDatumDef: e,
      format: t,
      formatType: i,
      expr: n,
      config: o
    });
  const l = Pj(e, n, a);
  if (ul(e)) {
    const d = sse(l, V(e) ? (r = ni(e.timeUnit)) === null || r === void 0 ? void 0 : r.unit : void 0, t, o.timeFormat, Gg(e) && ((s = e.scale) === null || s === void 0 ? void 0 : s.type) === tt.UTC);
    return d ? { signal: d } : void 0;
  }
  if (t = Lj(to(e), t, o), V(e) && qe(e.bin)) {
    const d = M(e, { expr: n, binSuffix: "end" });
    return {
      signal: Bg(l, d, t, i, o)
    };
  } else return t || to(e) === "quantitative" ? {
    signal: `${Bj(l, t)}`
  } : { signal: `isValid(${l}) ? ${l} : ""+${l}` };
}
function Pj(e, t, i) {
  return V(e) ? i ? `${M(e, { expr: t, suffix: "end" })}-${M(e, {
    expr: t,
    suffix: "start"
  })}` : M(e, { expr: t }) : ase(e);
}
function G1({ fieldOrDatumDef: e, format: t, formatType: i, expr: n, normalizeStack: a, config: o, field: r }) {
  if (r = r ?? Pj(e, n, a), V(e) && qe(e.bin)) {
    const s = M(e, { expr: n, binSuffix: "end" });
    return {
      signal: Bg(r, s, t, i, o)
    };
  }
  return { signal: zj(i, r, t) };
}
function Nj(e, t, i, n, a, o) {
  var r;
  if (!Hr(n)) {
    if (ul(e)) {
      const s = V(e) ? (r = ni(e.timeUnit)) === null || r === void 0 ? void 0 : r.unit : void 0;
      return rse(i, s, a, o);
    }
    return Lj(t, i, a);
  }
}
function qj(e, t, i) {
  if (e && (ee(e) || e === "number" || e === "time"))
    return e;
  if (ul(t) && i !== "time" && i !== "utc")
    return "time";
}
function Lj(e, t, i) {
  if (re(t))
    return t;
  if (e === Gr)
    return i.numberFormat;
}
function rse(e, t, i, n) {
  return e || (t ? {
    signal: wj(t)
  } : n ? void 0 : i.timeFormat);
}
function Bj(e, t) {
  return `format(${e}, "${t || ""}")`;
}
function D2(e, t, i, n) {
  var a;
  return Hr(i) ? zj(i, e, t) : Bj(e, (a = re(t) ? t : void 0) !== null && a !== void 0 ? a : n.numberFormat);
}
function Bg(e, t, i, n, a) {
  const o = D2(e, i, n, a), r = D2(t, i, n, a);
  return `${P1(e, !1)} ? "null" : ${o} + "${ose}" + ${r}`;
}
function sse(e, t, i, n, a) {
  return !t || i ? (i = re(i) ? i : n, `${a ? "utc" : "time"}Format(${e}, '${i}')`) : dre(t, e, a);
}
const Ug = "min", lse = {
  x: 1,
  y: 1,
  color: 1,
  fill: 1,
  stroke: 1,
  strokeWidth: 1,
  size: 1,
  shape: 1,
  fillOpacity: 1,
  strokeOpacity: 1,
  opacity: 1,
  text: 1
};
function S2(e) {
  return e in lse;
}
function Uj(e) {
  return !!e && !!e.encoding;
}
function zn(e) {
  return !!e && (e.op === "count" || !!e.field);
}
function Mj(e) {
  return !!e && X(e);
}
function Su(e) {
  return "row" in e || "column" in e;
}
function H1(e) {
  return !!e && "header" in e;
}
function Mg(e) {
  return "facet" in e;
}
var xv = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function dse(e) {
  return e.selection;
}
function fse(e) {
  return e && !re(e) && "repeat" in e;
}
function F2(e) {
  const { field: t, timeUnit: i, bin: n, aggregate: a } = e;
  return Object.assign(Object.assign(Object.assign(Object.assign({}, i ? { timeUnit: i } : {}), n ? { bin: n } : {}), a ? { aggregate: a } : {}), { field: t });
}
function Y1(e) {
  return "sort" in e;
}
function Fu({ channel: e, fieldDef: t, fieldDef2: i, markDef: n, stack: a, config: o, isMidPoint: r }) {
  if (ie(t) && t.band !== void 0)
    return t.band;
  if (V(t)) {
    const { timeUnit: s, bin: l } = t;
    if (s && !i)
      return r ? Yr("timeUnitBandPosition", n, o) : O2(n.type) ? Yr("timeUnitBand", n, o) : 0;
    if (qe(l))
      return O2(n.type) && !r ? 1 : 0.5;
  }
  if ((a == null ? void 0 : a.fieldChannel) === e && r)
    return 0.5;
}
function X1(e, t, i, n, a, o) {
  return qe(t.bin) || t.timeUnit && Gi(t) && t.type === "temporal" ? !!Fu({ channel: e, fieldDef: t, fieldDef2: i, stack: n, markDef: a, config: o }) : !1;
}
function J1(e) {
  return !!e && "condition" in e;
}
function Vg(e) {
  const t = e && e.condition;
  return !!t && !X(t) && V(t);
}
function Wg(e) {
  const t = e && e.condition;
  return !!t && !X(t) && ie(t);
}
function use(e) {
  const t = e && e.condition;
  return !!t && (X(t) || hn(t));
}
function V(e) {
  return !!e && (!!e.field || e.aggregate === "count");
}
function to(e) {
  return e && e.type;
}
function Ho(e) {
  return !!e && "datum" in e;
}
function Cn(e) {
  return Gi(e) && Hj(e) || wv(e);
}
function wv(e) {
  return Ho(e) && nt(e.datum);
}
function ie(e) {
  return V(e) || Ho(e);
}
function Gi(e) {
  return !!e && ("field" in e || e.aggregate === "count") && "type" in e;
}
function hn(e) {
  return e && "value" in e && "value" in e;
}
function Gg(e) {
  return !!e && ("scale" in e || "sort" in e);
}
function Z1(e) {
  return e && ("axis" in e || "stack" in e || "impute" in e);
}
function Vj(e) {
  return !!e && "legend" in e;
}
function Wj(e) {
  return !!e && ("format" in e || "formatType" in e);
}
function cse(e) {
  return Oi(e, ["legend", "axis", "header", "scale"]);
}
function hse(e) {
  return "op" in e;
}
function M(e, t = {}) {
  var i, n, a;
  let o = e.field;
  const r = t.prefix;
  let s = t.suffix, l = "";
  if (pse(e))
    o = XI("count");
  else {
    let d;
    if (!t.nofn)
      if (hse(e))
        d = e.op;
      else {
        const { bin: f, aggregate: u, timeUnit: c } = e;
        qe(f) ? (d = fj(f), s = ((i = t.binSuffix) !== null && i !== void 0 ? i : "") + ((n = t.suffix) !== null && n !== void 0 ? n : "")) : u ? No(u) ? (l = `["${o}"]`, o = `argmax_${u.argmax}`) : ja(u) ? (l = `["${o}"]`, o = `argmin_${u.argmin}`) : d = String(u) : c && (d = fre(c), s = (!Q(["range", "mid"], t.binSuffix) && t.binSuffix || "") + ((a = t.suffix) !== null && a !== void 0 ? a : ""));
      }
    d && (o = o ? `${d}_${o}` : d);
  }
  return s && (o = `${o}_${s}`), r && (o = `${r}_${o}`), t.forAs ? y1(o) : t.expr ? GI(o, t.expr) + l : Ia(o) + l;
}
function Gj(e) {
  switch (e.type) {
    case "nominal":
    case "ordinal":
    case "geojson":
      return !0;
    case "quantitative":
      return V(e) && !!e.bin;
    case "temporal":
      return !1;
  }
  throw new Error(cj(e.type));
}
function Hj(e) {
  return !Gj(e);
}
function pse(e) {
  return e.aggregate === "count";
}
function gse(e, t) {
  var i;
  const { field: n, bin: a, timeUnit: o, aggregate: r } = e;
  if (r === "count")
    return t.countTitle;
  if (qe(a))
    return `${n} (binned)`;
  if (o) {
    const s = (i = ni(o)) === null || i === void 0 ? void 0 : i.unit;
    if (s)
      return `${n} (${S1(s).join("-")})`;
  } else if (r)
    return No(r) ? `${n} for max ${r.argmax}` : ja(r) ? `${n} for min ${r.argmin}` : `${_u(r)} of ${n}`;
  return n;
}
function mse(e) {
  const { aggregate: t, bin: i, timeUnit: n, field: a } = e;
  if (No(t))
    return `${a} for argmax(${t.argmax})`;
  if (ja(t))
    return `${a} for argmin(${t.argmin})`;
  const o = ni(n), r = t || (o == null ? void 0 : o.unit) || (o == null ? void 0 : o.maxbins) && "timeunit" || qe(i) && "bin";
  return r ? r.toUpperCase() + "(" + a + ")" : a;
}
const Yj = (e, t) => {
  switch (t.fieldTitle) {
    case "plain":
      return e.field;
    case "functional":
      return mse(e);
    default:
      return gse(e, t);
  }
};
let Xj = Yj;
function Jj(e) {
  Xj = e;
}
function bse() {
  Jj(Yj);
}
function Vs(e, t, { allowDisabling: i, includeDefault: n = !0 }) {
  var a, o;
  const r = (a = K1(e)) === null || a === void 0 ? void 0 : a.title;
  if (!V(e))
    return r;
  const s = e, l = n ? Q1(s, t) : void 0;
  return i ? Ke(r, s.title, l) : (o = r ?? s.title) !== null && o !== void 0 ? o : l;
}
function K1(e) {
  if (Z1(e) && e.axis)
    return e.axis;
  if (Vj(e) && e.legend)
    return e.legend;
  if (H1(e) && e.header)
    return e.header;
}
function Q1(e, t) {
  return Xj(e, t);
}
function fp(e) {
  var t;
  if (Wj(e)) {
    const { format: i, formatType: n } = e;
    return { format: i, formatType: n };
  } else {
    const i = (t = K1(e)) !== null && t !== void 0 ? t : {}, { format: n, formatType: a } = i;
    return { format: n, formatType: a };
  }
}
function yse(e, t) {
  var i;
  switch (t) {
    case "latitude":
    case "longitude":
      return "quantitative";
    case "row":
    case "column":
    case "facet":
    case "shape":
    case "strokeDash":
      return "nominal";
    case "order":
      return "ordinal";
  }
  if (Y1(e) && X(e.sort))
    return "ordinal";
  const { aggregate: n, bin: a, timeUnit: o } = e;
  if (o)
    return "temporal";
  if (a || n && !No(n) && !ja(n))
    return "quantitative";
  if (Gg(e) && (!((i = e.scale) === null || i === void 0) && i.type))
    switch (vv[e.scale.type]) {
      case "numeric":
      case "discretizing":
        return "quantitative";
      case "time":
        return "temporal";
    }
  return "nominal";
}
function Mn(e) {
  if (V(e))
    return e;
  if (Vg(e))
    return e.condition;
}
function rt(e) {
  if (ie(e))
    return e;
  if (Wg(e))
    return e.condition;
}
function Zj(e, t, i, n = {}) {
  if (re(e) || nt(e) || yu(e)) {
    const a = re(e) ? "string" : nt(e) ? "number" : "boolean";
    return U(poe(t, a, e)), { value: e };
  }
  return ie(e) ? up(e, t, i, n) : Wg(e) ? Object.assign(Object.assign({}, e), {
    // Need to cast as normalizeFieldDef normally return FieldDef, but here we know that it is definitely Condition<FieldDef>
    condition: up(e.condition, t, i, n)
  }) : e;
}
function up(e, t, i, n) {
  if (Wj(e)) {
    const { format: a, formatType: o } = e, r = xv(e, ["format", "formatType"]);
    if (Hr(o) && !i.customFormatTypes)
      return U(w2(t)), up(r, t, i, n);
  } else {
    const a = Z1(e) ? "axis" : Vj(e) ? "legend" : H1(e) ? "header" : null;
    if (a && e[a]) {
      const o = e[a], { format: r, formatType: s } = o, l = xv(o, ["format", "formatType"]);
      if (Hr(s) && !i.customFormatTypes)
        return U(w2(t)), up(Object.assign(Object.assign({}, e), { [a]: l }), t, i, n);
    }
  }
  return V(e) ? ew(e, t, n) : vse(e);
}
function vse(e) {
  let t = e.type;
  if (t)
    return e;
  const { datum: i } = e;
  return t = nt(i) ? "quantitative" : re(i) ? "nominal" : hs(i) ? "temporal" : void 0, Object.assign(Object.assign({}, e), { type: t });
}
function ew(e, t, { compositeMark: i = !1 } = {}) {
  const { aggregate: n, timeUnit: a, bin: o, field: r } = e, s = Object.assign({}, e);
  if (!i && n && !v1(n) && !No(n) && !ja(n) && (U(moe(n)), delete s.aggregate), a && (s.timeUnit = ni(a)), r && (s.field = `${r}`), qe(o) && (s.bin = Hg(o, t)), Zt(o) && !Un(t) && U(Goe(t)), Gi(s)) {
    const { type: l } = s, d = _re(l);
    l !== d && (s.type = d), l !== "quantitative" && ej(n) && (U(goe(l, n)), s.type = "quantitative");
  } else if (!rj(t)) {
    const l = yse(s, t);
    s.type = l;
  }
  if (Gi(s)) {
    const { compatible: l, warning: d } = _se(s, t) || {};
    l === !1 && U(d);
  }
  if (Y1(s) && re(s.sort)) {
    const { sort: l } = s;
    if (S2(l))
      return Object.assign(Object.assign({}, s), { sort: { encoding: l } });
    const d = l.substr(1);
    if (l.charAt(0) === "-" && S2(d))
      return Object.assign(Object.assign({}, s), { sort: { encoding: d, order: "descending" } });
  }
  if (H1(s)) {
    const { header: l } = s, { orient: d } = l, f = xv(l, ["orient"]);
    if (d)
      return Object.assign(Object.assign({}, s), { header: Object.assign(Object.assign({}, f), { labelOrient: l.labelOrient || d, titleOrient: l.titleOrient || d }) });
  }
  return s;
}
function Hg(e, t) {
  return yu(e) ? { maxbins: g2(t) } : e === "binned" ? {
    binned: !0
  } : !e.maxbins && !e.step ? Object.assign(Object.assign({}, e), { maxbins: g2(t) }) : e;
}
const ar = { compatible: !0 };
function _se(e, t) {
  const i = e.type;
  if (i === "geojson" && t !== "shape")
    return {
      compatible: !1,
      warning: `Channel ${t} should not be used with a geojson data.`
    };
  switch (t) {
    case Oa:
    case Ea:
    case Dg:
      return Hj(e) ? {
        compatible: !1,
        warning: voe(t)
      } : ar;
    case Me:
    case lt:
    case gi:
    case aa:
    case oa:
    case $u:
    case Au:
    case Sg:
    case Wr:
    case Fg:
    case Tg:
    case us:
    case _n:
    case ta:
    case Cg:
      return ar;
    case na:
    case Mi:
    case ia:
    case xn:
      return i !== Gr ? {
        compatible: !1,
        warning: `Channel ${t} should be used with a quantitative field only, not ${e.type} field.`
      } : ar;
    case Va:
    case qo:
    case Lo:
    case Bo:
    case Ma:
    case Ua:
    case Ba:
    case vn:
    case ea:
      return i === "nominal" && !e.sort ? {
        compatible: !1,
        warning: `Channel ${t} should not be used with an unsorted discrete field.`
      } : ar;
    case Uo:
      return Q(["ordinal", "nominal"], e.type) ? ar : {
        compatible: !1,
        warning: "StrokeDash channel should be used with only discrete data."
      };
    case mi:
      return Q(["ordinal", "nominal", "geojson"], e.type) ? ar : {
        compatible: !1,
        warning: "Shape channel should be used with only either discrete or geojson data."
      };
    case ku:
      return e.type === "nominal" && !("sort" in e) ? {
        compatible: !1,
        warning: "Channel order is inappropriate for nominal field, which has no inherent order."
      } : ar;
  }
}
function ul(e) {
  const { formatType: t } = fp(e);
  return t === "time" || !t && xse(e);
}
function xse(e) {
  return e && (e.type === "temporal" || V(e) && !!e.timeUnit);
}
function Yg(e, { timeUnit: t, type: i, wrapTime: n, undefinedIfExprNotRequired: a }) {
  var o;
  const r = t && ((o = ni(t)) === null || o === void 0 ? void 0 : o.unit);
  let s = r || i === "temporal", l;
  return Du(e) ? l = e.expr : ee(e) ? l = e.signal : hs(e) ? (s = !0, l = zf(e)) : (re(e) || nt(e)) && s && (l = `datetime(${JSON.stringify(e)})`, ore(r) && (nt(e) && e < 1e4 || re(e) && isNaN(Date.parse(e))) && (l = zf({ [r]: e }))), l ? n && s ? `time(${l})` : l : a ? void 0 : JSON.stringify(e);
}
function Kj(e, t) {
  const { type: i } = e;
  return t.map((n) => {
    const a = Yg(n, {
      timeUnit: V(e) ? e.timeUnit : void 0,
      type: i,
      undefinedIfExprNotRequired: !0
    });
    return a !== void 0 ? { signal: a } : n;
  });
}
function Tu(e, t) {
  return qe(e.bin) ? Vo(t) && Q(["ordinal", "nominal"], e.type) : (console.warn("Only call this method for binned field defs."), !1);
}
var wse = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function Qj(e) {
  const {
    // These are non-mark title config that need to be hardcoded
    anchor: t,
    frame: i,
    offset: n,
    orient: a,
    // color needs to be redirect to fill
    color: o,
    // subtitle properties
    subtitleColor: r,
    subtitleFont: s,
    subtitleFontSize: l,
    subtitleFontStyle: d,
    subtitleFontWeight: f,
    subtitleLineHeight: u,
    subtitlePadding: c
  } = e, h = wse(e, ["anchor", "frame", "offset", "orient", "color", "subtitleColor", "subtitleFont", "subtitleFontSize", "subtitleFontStyle", "subtitleFontWeight", "subtitleLineHeight", "subtitlePadding"]), p = Object.assign(Object.assign({}, h), o ? { fill: o } : {}), g = Object.assign(Object.assign(Object.assign(Object.assign({}, t ? { anchor: t } : {}), i ? { frame: i } : {}), n ? { offset: n } : {}), a ? { orient: a } : {}), m = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, r ? { subtitleColor: r } : {}), s ? { subtitleFont: s } : {}), l ? { subtitleFontSize: l } : {}), d ? { subtitleFontStyle: d } : {}), f ? { subtitleFontWeight: f } : {}), u ? { subtitleLineHeight: u } : {}), c ? { subtitlePadding: c } : {}), b = rl(p, ["align", "baseline", "dx", "dy", "limit"]);
  return { titleMarkConfig: p, subtitleMarkConfig: b, nonMark: g, subtitle: m };
}
function io(e) {
  return re(e) || X(e) && re(e[0]);
}
var tw = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function ez(e) {
  const t = X(e.condition) ? e.condition.map(T2) : T2(e.condition);
  return Object.assign(Object.assign({}, Qt(e)), { condition: t });
}
function Qt(e) {
  if (Du(e)) {
    const { expr: t } = e, i = tw(e, ["expr"]);
    return Object.assign({ signal: t }, i);
  }
  return e;
}
function T2(e) {
  if (Du(e)) {
    const { expr: t } = e, i = tw(e, ["expr"]);
    return Object.assign({ signal: t }, i);
  }
  return e;
}
function Ue(e) {
  if (Du(e)) {
    const { expr: t } = e, i = tw(e, ["expr"]);
    return Object.assign({ signal: t }, i);
  }
  return ee(e) ? e : e !== void 0 ? { value: e } : void 0;
}
function C2(e) {
  return ee(e) ? e.signal : he(e.value);
}
function Da(e) {
  return ee(e) ? e.signal : e == null ? null : he(e);
}
function $se(e, t, i) {
  for (const n of i) {
    const a = Yr(n, t.markDef, t.config);
    a !== void 0 && (e[n] = Ue(a));
  }
  return e;
}
function tz(e) {
  var t;
  return [].concat(e.type, (t = e.style) !== null && t !== void 0 ? t : []);
}
function $e(e, t, i, n = {}) {
  const { vgChannel: a, ignoreVgConfig: o } = n;
  return a && t[a] !== void 0 ? t[a] : t[e] !== void 0 ? t[e] : o && (!a || a === e) ? void 0 : Yr(e, t, i, n);
}
function Yr(e, t, i, { vgChannel: n } = {}) {
  return Ke(
    // style config has highest precedence
    n ? cp(e, t, i.style) : void 0,
    cp(e, t, i.style),
    // then mark-specific config
    n ? i[t.type][n] : void 0,
    i[t.type][e],
    // Need to cast because MarkDef doesn't perfectly match with AnyMarkConfig, but if the type isn't available, we'll get nothing here, which is fine
    // If there is vgChannel, skip vl channel.
    // For example, vl size for text is vg fontSize, but config.mark.size is only for point size.
    n ? i.mark[n] : i.mark[e]
    // Need to cast for the same reason as above
  );
}
function cp(e, t, i) {
  return iz(e, tz(t), i);
}
function iz(e, t, i) {
  t = Ze(t);
  let n;
  for (const a of t) {
    const o = i[a];
    o && o[e] !== void 0 && (n = o[e]);
  }
  return n;
}
function nz(e, t) {
  return Ze(e).reduce((i, n) => {
    var a;
    return i.field.push(M(n, t)), i.order.push((a = n.sort) !== null && a !== void 0 ? a : "ascending"), i;
  }, { field: [], order: [] });
}
function az(e, t) {
  const i = [...e];
  return t.forEach((n) => {
    for (const a of i)
      if (Ml(a, n))
        return;
    i.push(n);
  }), i;
}
function oz(e, t) {
  return Ml(e, t) || !t ? e : e ? [...Ze(e), ...Ze(t)].join(", ") : t;
}
function rz(e, t) {
  const i = e.value, n = t.value;
  if (i == null || n === null)
    return {
      explicit: e.explicit,
      value: null
    };
  if ((io(i) || ee(i)) && (io(n) || ee(n)))
    return {
      explicit: e.explicit,
      value: oz(i, n)
    };
  if (io(i) || ee(i))
    return {
      explicit: e.explicit,
      value: i
    };
  if (io(n) || ee(n))
    return {
      explicit: e.explicit,
      value: n
    };
  if (!io(i) && !ee(i) && !io(n) && !ee(n))
    return {
      explicit: e.explicit,
      value: az(i, n)
    };
  throw new Error("It should never reach here");
}
function Wa(e) {
  return "mark" in e;
}
class Xg {
  constructor(t, i) {
    this.name = t, this.run = i;
  }
  hasMatchingType(t) {
    return Wa(t) ? ise(t.mark) === this.name : !1;
  }
}
var kse = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function Tr(e, t) {
  const i = e && e[t];
  return i ? X(i) ? sl(i, (n) => !!n.field) : V(i) || Vg(i) : !1;
}
function iw(e) {
  return sl(Pae, (t) => {
    if (Tr(e, t)) {
      const i = e[t];
      if (X(i))
        return sl(i, (n) => !!n.aggregate);
      {
        const n = Mn(i);
        return n && !!n.aggregate;
      }
    }
    return !1;
  });
}
function sz(e, t) {
  const i = [], n = [], a = [], o = [], r = {};
  return nw(e, (s, l) => {
    if (V(s)) {
      const { field: d, aggregate: f, bin: u, timeUnit: c } = s, h = kse(s, ["field", "aggregate", "bin", "timeUnit"]);
      if (f || c || u) {
        const p = K1(s), g = p && p.title;
        let m = M(s, { forAs: !0 });
        const b = Object.assign(Object.assign(Object.assign({}, g ? [] : { title: Vs(s, t, { allowDisabling: !0 }) }), h), {
          // Always overwrite field
          field: m
        });
        if (f) {
          let y;
          if (No(f) ? (y = "argmax", m = M({ op: "argmax", field: f.argmax }, { forAs: !0 }), b.field = `${m}.${d}`) : ja(f) ? (y = "argmin", m = M({ op: "argmin", field: f.argmin }, { forAs: !0 }), b.field = `${m}.${d}`) : f !== "boxplot" && f !== "errorbar" && f !== "errorband" && (y = f), y) {
            const v = {
              op: y,
              as: m
            };
            d && (v.field = d), o.push(v);
          }
        } else if (i.push(m), Gi(s) && qe(u)) {
          if (n.push({ bin: u, field: d, as: m }), i.push(M(s, { binSuffix: "end" })), Tu(s, l) && i.push(M(s, { binSuffix: "range" })), Un(l)) {
            const y = {
              field: m + "_end"
            };
            r[l + "2"] = y;
          }
          b.bin = "binned", rj(l) || (b.type = Gr);
        } else if (c) {
          a.push({
            timeUnit: c,
            field: d,
            as: m
          });
          const y = Gi(s) && s.type !== fl && "time";
          y && (l === $u || l === Wr ? b.formatType = y : Gae(l) ? b.legend = Object.assign({ formatType: y }, b.legend) : Un(l) && (b.axis = Object.assign({ formatType: y }, b.axis)));
        }
        r[l] = b;
      } else
        i.push(d), r[l] = e[l];
    } else
      r[l] = e[l];
  }), {
    bins: n,
    timeUnits: a,
    aggregate: o,
    groupby: i,
    encoding: r
  };
}
function Ase(e, t, i) {
  const n = Yae(t, i);
  if (n) {
    if (n === "binned") {
      const a = e[t === vn ? Me : lt];
      return !!(V(a) && V(e[t]) && Zt(a.bin));
    }
  } else return !1;
  return !0;
}
function Ose(e, t, i, n) {
  return q(e).reduce((a, o) => {
    if (!oj(o))
      return U(yoe(o)), a;
    const r = e[o];
    if (o === "angle" && t === "arc" && !e.theta && (U(hoe), o = _n), !Ase(e, o, t))
      return U(zg(o, t)), a;
    if (o === Ma && t === "line") {
      const s = Mn(e[o]);
      if (s != null && s.aggregate)
        return U(boe), a;
    }
    if (o === gi && (i ? "fill" in e : "stroke" in e))
      return U(hj("encoding", { fill: "fill" in e, stroke: "stroke" in e })), a;
    if (o === Au || o === ku && !X(r) && !hn(r) || o === Wr && X(r))
      r && (a[o] = Ze(r).reduce((s, l) => (V(l) ? s.push(ew(l, o)) : U(bv(l, o)), s), []));
    else {
      if (o === Wr && r === null)
        a[o] = null;
      else if (!V(r) && !Ho(r) && !hn(r) && !J1(r) && !ee(r))
        return U(bv(r, o)), a;
      a[o] = Zj(r, o, n);
    }
    return a;
  }, {});
}
function Jg(e, t) {
  const i = {};
  for (const n of q(e)) {
    const a = Zj(e[n], n, t, { compositeMark: !0 });
    i[n] = a;
  }
  return i;
}
function Ese(e) {
  const t = [];
  for (const i of q(e))
    if (Tr(e, i)) {
      const n = e[i], a = Ze(n);
      for (const o of a)
        V(o) ? t.push(o) : Vg(o) && t.push(o.condition);
    }
  return t;
}
function nw(e, t, i) {
  if (e)
    for (const n of q(e)) {
      const a = e[n];
      if (X(a))
        for (const o of a)
          t.call(i, o, n);
      else
        t.call(i, a, n);
    }
}
function Dse(e, t, i, n) {
  return e ? q(e).reduce((a, o) => {
    const r = e[o];
    return X(r) ? r.reduce((s, l) => t.call(n, s, l, o), a) : t.call(n, a, r, o);
  }, i) : i;
}
function lz(e, t) {
  return q(t).reduce((i, n) => {
    switch (n) {
      case Me:
      case lt:
      case Fg:
      case Cg:
      case Tg:
      case vn:
      case ea:
      case _n:
      case Ua:
      case ta:
      case Ba:
      case ia:
      case na:
      case xn:
      case Mi:
      case $u:
      case mi:
      case us:
      case Wr:
        return i;
      case ku:
        if (e === "line" || e === "trail")
          return i;
      case Au:
      case Sg: {
        const a = t[n];
        if (X(a) || V(a))
          for (const o of Ze(a))
            o.aggregate || i.push(M(o, {}));
        return i;
      }
      case Ma:
        if (e === "trail")
          return i;
      case gi:
      case aa:
      case oa:
      case Va:
      case qo:
      case Lo:
      case Uo:
      case Bo: {
        const a = Mn(t[n]);
        return a && !a.aggregate && i.push(M(a, {})), i;
      }
    }
  }, []);
}
var dz = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function Sse(e) {
  const { tooltip: t } = e, i = dz(e, ["tooltip"]);
  if (!t)
    return { filteredEncoding: i };
  let n, a;
  if (X(t)) {
    for (const o of t)
      o.aggregate ? (n || (n = []), n.push(o)) : (a || (a = []), a.push(o));
    n && (i.tooltip = n);
  } else
    t.aggregate ? i.tooltip = t : a = t;
  return X(a) && a.length === 1 && (a = a[0]), { customTooltipWithoutAggregatedField: a, filteredEncoding: i };
}
function $v(e, t, i, n = !0) {
  if ("tooltip" in i)
    return { tooltip: i.tooltip };
  const a = e.map(({ fieldPrefix: r, titlePrefix: s }) => {
    const l = n ? ` of ${aw(t)}` : "";
    return {
      field: r + t.field,
      type: t.type,
      title: ee(s) ? { signal: s + `"${escape(l)}"` } : s + l
    };
  }), o = Ese(i).map(cse);
  return {
    tooltip: [
      ...a,
      // need to cast because TextFieldDef supports fewer types of bin
      ...Tn(o, fe)
    ]
  };
}
function aw(e) {
  const { title: t, field: i } = e;
  return Ke(t, i);
}
function ow(e, t, i, n, a) {
  const { scale: o, axis: r } = i;
  return ({ partName: s, mark: l, positionPrefix: d, endPositionPrefix: f = void 0, extraEncoding: u = {} }) => {
    const c = aw(i);
    return fz(e, s, a, {
      mark: l,
      encoding: Object.assign(Object.assign(Object.assign({ [t]: Object.assign(Object.assign(Object.assign({ field: d + "_" + i.field, type: i.type }, c !== void 0 ? { title: c } : {}), o !== void 0 ? { scale: o } : {}), r !== void 0 ? { axis: r } : {}) }, re(f) ? {
        [t + "2"]: {
          field: f + "_" + i.field
        }
      } : {}), n), u)
    });
  };
}
function fz(e, t, i, n) {
  const { clip: a, color: o, opacity: r } = e, s = e.type;
  return e[t] || e[t] === void 0 && i[t] ? [
    Object.assign(Object.assign({}, n), { mark: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, i[t]), a ? { clip: a } : {}), o ? { color: o } : {}), r ? { opacity: r } : {}), za(n.mark) ? n.mark : { type: n.mark }), { style: `${s}-${t}` }), yu(e[t]) ? {} : e[t]) })
  ] : [];
}
function uz(e, t, i) {
  const { encoding: n } = e, a = t === "vertical" ? "y" : "x", o = n[a], r = n[a + "2"], s = n[a + "Error"], l = n[a + "Error2"];
  return {
    continuousAxisChannelDef: fc(o, i),
    continuousAxisChannelDef2: fc(r, i),
    continuousAxisChannelDefError: fc(s, i),
    continuousAxisChannelDefError2: fc(l, i),
    continuousAxis: a
  };
}
function fc(e, t) {
  if (e && e.aggregate) {
    const { aggregate: i } = e, n = dz(e, ["aggregate"]);
    return i !== t && U(Woe(i, t)), n;
  } else
    return e;
}
function cz(e, t) {
  const { mark: i, encoding: n } = e, { x: a, y: o } = n;
  if (za(i) && i.orient)
    return i.orient;
  if (Cn(a)) {
    if (Cn(o)) {
      const r = V(a) && a.aggregate, s = V(o) && o.aggregate;
      if (!r && s === t)
        return "vertical";
      if (!s && r === t)
        return "horizontal";
      if (r === t && s === t)
        throw new Error("Both x and y cannot have aggregate");
      return ul(o) && !ul(a) ? "horizontal" : "vertical";
    }
    return "horizontal";
  } else {
    if (Cn(o))
      return "vertical";
    throw new Error(`Need a valid continuous axis for ${t}s`);
  }
}
var th = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
const hp = "boxplot", Fse = ["box", "median", "outliers", "rule", "ticks"], Tse = new Xg(hp, pz);
function hz(e) {
  return nt(e) ? "tukey" : e;
}
function pz(e, { config: t }) {
  var i, n;
  e = Object.assign(Object.assign({}, e), { encoding: Jg(e.encoding, t) });
  const { mark: a, encoding: o, selection: r, projection: s } = e, l = th(e, ["mark", "encoding", "selection", "projection"]), d = za(a) ? a : { type: a };
  r && U(uj("boxplot"));
  const f = (i = d.extent) !== null && i !== void 0 ? i : t.boxplot.extent, u = $e(
    "size",
    d,
    // TODO: https://github.com/vega/vega-lite/issues/6245
    t
  ), c = hz(f), { bins: h, timeUnits: p, transform: g, continuousAxisChannelDef: m, continuousAxis: b, groupby: y, aggregate: v, encodingWithoutContinuousAxis: w, ticksOrient: x, boxOrient: $, customTooltipWithoutAggregatedField: _ } = Cse(e, f, t), { color: k, size: A } = w, E = th(w, ["color", "size"]), S = (Ut) => ow(d, b, m, Ut, t.boxplot), z = S(E), O = S(w), D = S(Object.assign(Object.assign({}, E), A ? { size: A } : {})), j = $v([
    { fieldPrefix: c === "min-max" ? "upper_whisker_" : "max_", titlePrefix: "Max" },
    { fieldPrefix: "upper_box_", titlePrefix: "Q3" },
    { fieldPrefix: "mid_box_", titlePrefix: "Median" },
    { fieldPrefix: "lower_box_", titlePrefix: "Q1" },
    { fieldPrefix: c === "min-max" ? "lower_whisker_" : "min_", titlePrefix: "Min" }
  ], m, w), F = { type: "tick", color: "black", opacity: 1, orient: x, invalid: null, aria: !1 }, P = c === "min-max" ? j : (
    // for tukey / k-IQR, just show upper/lower-whisker
    $v([
      { fieldPrefix: "upper_whisker_", titlePrefix: "Upper Whisker" },
      { fieldPrefix: "lower_whisker_", titlePrefix: "Lower Whisker" }
    ], m, w)
  ), N = [
    ...z({
      partName: "rule",
      mark: { type: "rule", invalid: null, aria: !1 },
      positionPrefix: "lower_whisker",
      endPositionPrefix: "lower_box",
      extraEncoding: P
    }),
    ...z({
      partName: "rule",
      mark: { type: "rule", invalid: null, aria: !1 },
      positionPrefix: "upper_box",
      endPositionPrefix: "upper_whisker",
      extraEncoding: P
    }),
    ...z({
      partName: "ticks",
      mark: F,
      positionPrefix: "lower_whisker",
      extraEncoding: P
    }),
    ...z({
      partName: "ticks",
      mark: F,
      positionPrefix: "upper_whisker",
      extraEncoding: P
    })
  ], L = [
    ...c !== "tukey" ? N : [],
    ...O({
      partName: "box",
      mark: Object.assign(Object.assign({ type: "bar" }, u ? { size: u } : {}), { orient: $, invalid: null, ariaRoleDescription: "box" }),
      positionPrefix: "lower_box",
      endPositionPrefix: "upper_box",
      extraEncoding: j
    }),
    ...D({
      partName: "median",
      mark: Object.assign(Object.assign(Object.assign({ type: "tick", invalid: null }, Je(t.boxplot.median) && t.boxplot.median.color ? { color: t.boxplot.median.color } : {}), u ? { size: u } : {}), { orient: x, aria: !1 }),
      positionPrefix: "mid_box",
      extraEncoding: j
    })
  ];
  if (c === "min-max")
    return Object.assign(Object.assign({}, l), { transform: ((n = l.transform) !== null && n !== void 0 ? n : []).concat(g), layer: L });
  const K = `datum["lower_box_${m.field}"]`, te = `datum["upper_box_${m.field}"]`, ce = `(${te} - ${K})`, Ve = `${K} - ${f} * ${ce}`, ke = `${te} + ${f} * ${ce}`, We = `datum["${m.field}"]`, Jo = {
    joinaggregate: gz(m.field),
    groupby: y
  }, Ha = {
    transform: [
      {
        filter: `(${Ve} <= ${We}) && (${We} <= ${ke})`
      },
      {
        aggregate: [
          {
            op: "min",
            field: m.field,
            as: "lower_whisker_" + m.field
          },
          {
            op: "max",
            field: m.field,
            as: "upper_whisker_" + m.field
          },
          // preserve lower_box / upper_box
          {
            op: "min",
            field: "lower_box_" + m.field,
            as: "lower_box_" + m.field
          },
          {
            op: "max",
            field: "upper_box_" + m.field,
            as: "upper_box_" + m.field
          },
          ...v
        ],
        groupby: y
      }
    ],
    layer: N
  }, Zo = th(E, ["tooltip"]), { scale: W, axis: oe } = m, de = aw(m), B = Oi(oe, ["title"]), yt = fz(d, "outliers", t.boxplot, {
    transform: [{ filter: `(${We} < ${Ve}) || (${We} > ${ke})` }],
    mark: "point",
    encoding: Object.assign(Object.assign(Object.assign({ [b]: Object.assign(Object.assign(Object.assign({ field: m.field, type: m.type }, de !== void 0 ? { title: de } : {}), W !== void 0 ? { scale: W } : {}), De(B) ? {} : { axis: B }) }, Zo), k ? { color: k } : {}), _ ? { tooltip: _ } : {})
  })[0];
  let _e;
  const At = [...h, ...p, Jo];
  return yt ? _e = {
    transform: At,
    layer: [yt, Ha]
  } : (_e = Ha, _e.transform.unshift(...At)), Object.assign(Object.assign({}, l), { layer: [
    _e,
    {
      // boxplot
      transform: g,
      layer: L
    }
  ] });
}
function gz(e) {
  return [
    {
      op: "q1",
      field: e,
      as: "lower_box_" + e
    },
    {
      op: "q3",
      field: e,
      as: "upper_box_" + e
    }
  ];
}
function Cse(e, t, i) {
  const n = cz(e, hp), { continuousAxisChannelDef: a, continuousAxis: o } = uz(e, n, hp), r = a.field, s = hz(t), l = [
    ...gz(r),
    {
      op: "median",
      field: r,
      as: "mid_box_" + r
    },
    {
      op: "min",
      field: r,
      as: (s === "min-max" ? "lower_whisker_" : "min_") + r
    },
    {
      op: "max",
      field: r,
      as: (s === "min-max" ? "upper_whisker_" : "max_") + r
    }
  ], d = s === "min-max" || s === "tukey" ? [] : [
    // This is for the  original k-IQR, which we do not expose
    {
      calculate: `datum["upper_box_${r}"] - datum["lower_box_${r}"]`,
      as: "iqr_" + r
    },
    {
      calculate: `min(datum["upper_box_${r}"] + datum["iqr_${r}"] * ${t}, datum["max_${r}"])`,
      as: "upper_whisker_" + r
    },
    {
      calculate: `max(datum["lower_box_${r}"] - datum["iqr_${r}"] * ${t}, datum["min_${r}"])`,
      as: "lower_whisker_" + r
    }
  ], f = e.encoding, u = o;
  f[u];
  const c = th(f, [typeof u == "symbol" ? u : u + ""]), { customTooltipWithoutAggregatedField: h, filteredEncoding: p } = Sse(c), { bins: g, timeUnits: m, aggregate: b, groupby: y, encoding: v } = sz(p, i), w = n === "vertical" ? "horizontal" : "vertical", x = n, $ = [
    ...g,
    ...m,
    {
      aggregate: [...b, ...l],
      groupby: y
    },
    ...d
  ];
  return {
    bins: g,
    timeUnits: m,
    transform: $,
    groupby: y,
    aggregate: b,
    continuousAxisChannelDef: a,
    continuousAxis: o,
    encodingWithoutContinuousAxis: v,
    ticksOrient: w,
    boxOrient: x,
    customTooltipWithoutAggregatedField: h
  };
}
var R2 = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
const rw = "errorbar", Rse = ["ticks", "rule"], Ise = new Xg(rw, mz);
function mz(e, { config: t }) {
  e = Object.assign(Object.assign({}, e), { encoding: Jg(e.encoding, t) });
  const { transform: i, continuousAxisChannelDef: n, continuousAxis: a, encodingWithoutContinuousAxis: o, ticksOrient: r, markDef: s, outerSpec: l, tooltipEncoding: d } = bz(e, rw, t);
  delete o.size;
  const f = ow(s, a, n, o, t.errorbar), u = s.thickness, c = s.size, h = Object.assign(Object.assign({ type: "tick", orient: r, aria: !1 }, u !== void 0 ? { thickness: u } : {}), c !== void 0 ? { size: c } : {}), p = [
    ...f({
      partName: "ticks",
      mark: h,
      positionPrefix: "lower",
      extraEncoding: d
    }),
    ...f({
      partName: "ticks",
      mark: h,
      positionPrefix: "upper",
      extraEncoding: d
    }),
    ...f({
      partName: "rule",
      mark: Object.assign({ type: "rule", ariaRoleDescription: "errorbar" }, u !== void 0 ? { size: u } : {}),
      positionPrefix: "lower",
      endPositionPrefix: "upper",
      extraEncoding: d
    })
  ];
  return Object.assign(Object.assign(Object.assign({}, l), { transform: i }), p.length > 1 ? { layer: p } : Object.assign({}, p[0]));
}
function jse(e, t) {
  const { encoding: i } = e;
  if (zse(i))
    return {
      orient: cz(e, t),
      inputType: "raw"
    };
  const n = Pse(i), a = Nse(i), o = i.x, r = i.y;
  if (n) {
    if (a)
      throw new Error(`${t} cannot be both type aggregated-upper-lower and aggregated-error`);
    const s = i.x2, l = i.y2;
    if (ie(s) && ie(l))
      throw new Error(`${t} cannot have both x2 and y2`);
    if (ie(s)) {
      if (Cn(o))
        return { orient: "horizontal", inputType: "aggregated-upper-lower" };
      throw new Error(`Both x and x2 have to be quantitative in ${t}`);
    } else if (ie(l)) {
      if (Cn(r))
        return { orient: "vertical", inputType: "aggregated-upper-lower" };
      throw new Error(`Both y and y2 have to be quantitative in ${t}`);
    }
    throw new Error("No ranged axis");
  } else {
    const s = i.xError, l = i.xError2, d = i.yError, f = i.yError2;
    if (ie(l) && !ie(s))
      throw new Error(`${t} cannot have xError2 without xError`);
    if (ie(f) && !ie(d))
      throw new Error(`${t} cannot have yError2 without yError`);
    if (ie(s) && ie(d))
      throw new Error(`${t} cannot have both xError and yError with both are quantiative`);
    if (ie(s)) {
      if (Cn(o))
        return { orient: "horizontal", inputType: "aggregated-error" };
      throw new Error("All x, xError, and xError2 (if exist) have to be quantitative");
    } else if (ie(d)) {
      if (Cn(r))
        return { orient: "vertical", inputType: "aggregated-error" };
      throw new Error("All y, yError, and yError2 (if exist) have to be quantitative");
    }
    throw new Error("No ranged axis");
  }
}
function zse(e) {
  return (ie(e.x) || ie(e.y)) && !ie(e.x2) && !ie(e.y2) && !ie(e.xError) && !ie(e.xError2) && !ie(e.yError) && !ie(e.yError2);
}
function Pse(e) {
  return ie(e.x2) || ie(e.y2);
}
function Nse(e) {
  return ie(e.xError) || ie(e.xError2) || ie(e.yError) || ie(e.yError2);
}
function bz(e, t, i) {
  var n;
  const { mark: a, encoding: o, selection: r, projection: s } = e, l = R2(e, ["mark", "encoding", "selection", "projection"]), d = za(a) ? a : { type: a };
  r && U(uj(t));
  const { orient: f, inputType: u } = jse(e, t), { continuousAxisChannelDef: c, continuousAxisChannelDef2: h, continuousAxisChannelDefError: p, continuousAxisChannelDefError2: g, continuousAxis: m } = uz(e, f, t), { errorBarSpecificAggregate: b, postAggregateCalculates: y, tooltipSummary: v, tooltipTitleWithFieldName: w } = qse(d, c, h, p, g, u, t, i), x = o, $ = m;
  x[$];
  const _ = m === "x" ? "x2" : "y2";
  x[_];
  const k = m === "x" ? "xError" : "yError";
  x[k];
  const A = m === "x" ? "xError2" : "yError2";
  x[A];
  const E = R2(x, [typeof $ == "symbol" ? $ : $ + "", typeof _ == "symbol" ? _ : _ + "", typeof k == "symbol" ? k : k + "", typeof A == "symbol" ? A : A + ""]), { bins: S, timeUnits: z, aggregate: O, groupby: D, encoding: j } = sz(E, i), F = [...O, ...b], P = u !== "raw" ? [] : D, N = $v(v, c, j, w);
  return {
    transform: [
      ...(n = l.transform) !== null && n !== void 0 ? n : [],
      ...S,
      ...z,
      ...F.length === 0 ? [] : [{ aggregate: F, groupby: P }],
      ...y
    ],
    groupby: P,
    continuousAxisChannelDef: c,
    continuousAxis: m,
    encodingWithoutContinuousAxis: j,
    ticksOrient: f === "vertical" ? "horizontal" : "vertical",
    markDef: d,
    outerSpec: l,
    tooltipEncoding: N
  };
}
function qse(e, t, i, n, a, o, r, s) {
  let l = [], d = [];
  const f = t.field;
  let u, c = !1;
  if (o === "raw") {
    const h = e.center ? e.center : e.extent ? e.extent === "iqr" ? "median" : "mean" : s.errorbar.center, p = e.extent ? e.extent : h === "mean" ? "stderr" : "iqr";
    if (h === "median" != (p === "iqr") && U(Voe(h, p, r)), p === "stderr" || p === "stdev")
      l = [
        { op: p, field: f, as: "extent_" + f },
        { op: h, field: f, as: "center_" + f }
      ], d = [
        {
          calculate: `datum["center_${f}"] + datum["extent_${f}"]`,
          as: "upper_" + f
        },
        {
          calculate: `datum["center_${f}"] - datum["extent_${f}"]`,
          as: "lower_" + f
        }
      ], u = [
        { fieldPrefix: "center_", titlePrefix: _u(h) },
        { fieldPrefix: "upper_", titlePrefix: I2(h, p, "+") },
        { fieldPrefix: "lower_", titlePrefix: I2(h, p, "-") }
      ], c = !0;
    else {
      let g, m, b;
      p === "ci" ? (g = "mean", m = "ci0", b = "ci1") : (g = "median", m = "q1", b = "q3"), l = [
        { op: m, field: f, as: "lower_" + f },
        { op: b, field: f, as: "upper_" + f },
        { op: g, field: f, as: "center_" + f }
      ], u = [
        {
          fieldPrefix: "upper_",
          titlePrefix: Vs({ field: f, aggregate: b, type: "quantitative" }, s, {
            allowDisabling: !1
          })
        },
        {
          fieldPrefix: "lower_",
          titlePrefix: Vs({ field: f, aggregate: m, type: "quantitative" }, s, {
            allowDisabling: !1
          })
        },
        {
          fieldPrefix: "center_",
          titlePrefix: Vs({ field: f, aggregate: g, type: "quantitative" }, s, {
            allowDisabling: !1
          })
        }
      ];
    }
  } else {
    (e.center || e.extent) && U(Moe(e.center, e.extent)), o === "aggregated-upper-lower" ? (u = [], d = [
      { calculate: `datum["${i.field}"]`, as: "upper_" + f },
      { calculate: `datum["${f}"]`, as: "lower_" + f }
    ]) : o === "aggregated-error" && (u = [{ fieldPrefix: "", titlePrefix: f }], d = [
      {
        calculate: `datum["${f}"] + datum["${n.field}"]`,
        as: "upper_" + f
      }
    ], a ? d.push({
      calculate: `datum["${f}"] + datum["${a.field}"]`,
      as: "lower_" + f
    }) : d.push({
      calculate: `datum["${f}"] - datum["${n.field}"]`,
      as: "lower_" + f
    }));
    for (const h of d)
      u.push({
        fieldPrefix: h.as.substring(0, 6),
        titlePrefix: Vr(Vr(h.calculate, 'datum["', ""), '"]', "")
      });
  }
  return { postAggregateCalculates: d, errorBarSpecificAggregate: l, tooltipSummary: u, tooltipTitleWithFieldName: c };
}
function I2(e, t, i) {
  return _u(e) + " " + i + " " + t;
}
const sw = "errorband", Lse = ["band", "borders"], Bse = new Xg(sw, yz);
function yz(e, { config: t }) {
  e = Object.assign(Object.assign({}, e), { encoding: Jg(e.encoding, t) });
  const { transform: i, continuousAxisChannelDef: n, continuousAxis: a, encodingWithoutContinuousAxis: o, markDef: r, outerSpec: s, tooltipEncoding: l } = bz(e, sw, t), d = r, f = ow(d, a, n, o, t.errorband), u = e.encoding.x !== void 0 && e.encoding.y !== void 0;
  let c = { type: u ? "area" : "rect" }, h = { type: u ? "line" : "rule" };
  const p = Object.assign(Object.assign({}, d.interpolate ? { interpolate: d.interpolate } : {}), d.tension && d.interpolate ? { tension: d.tension } : {});
  return u ? (c = Object.assign(Object.assign(Object.assign({}, c), p), { ariaRoleDescription: "errorband" }), h = Object.assign(Object.assign(Object.assign({}, h), p), { aria: !1 })) : d.interpolate ? U(k2("interpolate")) : d.tension && U(k2("tension")), Object.assign(Object.assign({}, s), { transform: i, layer: [
    ...f({
      partName: "band",
      mark: c,
      positionPrefix: "lower",
      endPositionPrefix: "upper",
      extraEncoding: l
    }),
    ...f({
      partName: "borders",
      mark: h,
      positionPrefix: "lower",
      extraEncoding: l
    }),
    ...f({
      partName: "borders",
      mark: h,
      positionPrefix: "upper",
      extraEncoding: l
    })
  ] });
}
const vz = {};
function lw(e, t, i) {
  const n = new Xg(e, t);
  vz[e] = { normalizer: n, parts: i };
}
function Use() {
  return q(vz);
}
lw(hp, pz, Fse);
lw(rw, mz, Rse);
lw(sw, yz, Lse);
const Mse = [
  "gradientHorizontalMaxLength",
  "gradientHorizontalMinLength",
  "gradientVerticalMaxLength",
  "gradientVerticalMinLength",
  "unselectedOpacity"
], _z = {
  titleAlign: "align",
  titleAnchor: "anchor",
  titleAngle: "angle",
  titleBaseline: "baseline",
  titleColor: "color",
  titleFont: "font",
  titleFontSize: "fontSize",
  titleFontStyle: "fontStyle",
  titleFontWeight: "fontWeight",
  titleLimit: "limit",
  titleLineHeight: "lineHeight",
  titleOrient: "orient",
  titlePadding: "offset"
}, xz = {
  labelAlign: "align",
  labelAnchor: "anchor",
  labelAngle: "angle",
  labelBaseline: "baseline",
  labelColor: "color",
  labelFont: "font",
  labelFontSize: "fontSize",
  labelFontStyle: "fontStyle",
  labelFontWeight: "fontWeight",
  labelLimit: "limit",
  labelLineHeight: "lineHeight",
  labelOrient: "orient",
  labelPadding: "offset"
}, Vse = q(_z), Wse = q(xz), Gse = {
  header: 1,
  headerRow: 1,
  headerColumn: 1,
  headerFacet: 1
}, wz = q(Gse), $z = [
  "size",
  "shape",
  "fill",
  "stroke",
  "strokeDash",
  "strokeWidth",
  "opacity"
], Hse = {
  gradientHorizontalMaxLength: 200,
  gradientHorizontalMinLength: 100,
  gradientVerticalMaxLength: 200,
  gradientVerticalMinLength: 64,
  unselectedOpacity: 0.35
}, Yse = {
  aria: 1,
  clipHeight: 1,
  columnPadding: 1,
  columns: 1,
  cornerRadius: 1,
  description: 1,
  direction: 1,
  fillColor: 1,
  format: 1,
  formatType: 1,
  gradientLength: 1,
  gradientOpacity: 1,
  gradientStrokeColor: 1,
  gradientStrokeWidth: 1,
  gradientThickness: 1,
  gridAlign: 1,
  labelAlign: 1,
  labelBaseline: 1,
  labelColor: 1,
  labelFont: 1,
  labelFontSize: 1,
  labelFontStyle: 1,
  labelFontWeight: 1,
  labelLimit: 1,
  labelOffset: 1,
  labelOpacity: 1,
  labelOverlap: 1,
  labelPadding: 1,
  labelSeparation: 1,
  legendX: 1,
  legendY: 1,
  offset: 1,
  orient: 1,
  padding: 1,
  rowPadding: 1,
  strokeColor: 1,
  symbolDash: 1,
  symbolDashOffset: 1,
  symbolFillColor: 1,
  symbolLimit: 1,
  symbolOffset: 1,
  symbolOpacity: 1,
  symbolSize: 1,
  symbolStrokeColor: 1,
  symbolStrokeWidth: 1,
  symbolType: 1,
  tickCount: 1,
  tickMinStep: 1,
  title: 1,
  titleAlign: 1,
  titleAnchor: 1,
  titleBaseline: 1,
  titleColor: 1,
  titleFont: 1,
  titleFontSize: 1,
  titleFontStyle: 1,
  titleFontWeight: 1,
  titleLimit: 1,
  titleLineHeight: 1,
  titleOpacity: 1,
  titleOrient: 1,
  titlePadding: 1,
  type: 1,
  values: 1,
  zindex: 1
};
var Xse = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function kz(e) {
  const t = [];
  for (const i of e || []) {
    const { expr: n, bind: a } = i, o = Xse(i, ["expr", "bind"]);
    if (a && n) {
      const r = Object.assign(Object.assign({}, o), { bind: a, init: n });
      t.push(r);
    } else {
      const r = Object.assign(Object.assign(Object.assign({}, o), n ? { update: n } : {}), a ? { bind: a } : {});
      t.push(r);
    }
  }
  return t;
}
const cl = "_vgsid_", Jse = {
  single: {
    on: "click",
    fields: [cl],
    resolve: "global",
    empty: "all",
    clear: "dblclick"
  },
  multi: {
    on: "click",
    fields: [cl],
    toggle: "event.shiftKey",
    resolve: "global",
    empty: "all",
    clear: "dblclick"
  },
  interval: {
    on: "[mousedown, window:mouseup] > window:mousemove!",
    encodings: ["x", "y"],
    translate: "[mousedown, window:mouseup] > window:mousemove!",
    zoom: "wheel!",
    mark: { fill: "#333", fillOpacity: 0.125, stroke: "white" },
    resolve: "global",
    clear: "dblclick"
  }
};
function dw(e) {
  return !!e && (e === "legend" || !!e.legend);
}
function Ob(e) {
  return dw(e) && Je(e);
}
function Zse(e) {
  return Zg(e) || uw(e) || fw(e);
}
function fw(e) {
  return "concat" in e;
}
function Zg(e) {
  return "vconcat" in e;
}
function uw(e) {
  return "hconcat" in e;
}
function Vn(e) {
  return Je(e) && e.step !== void 0;
}
function j2(e) {
  return e.view || e.width || e.height;
}
const z2 = 20, Kse = {
  align: 1,
  bounds: 1,
  center: 1,
  columns: 1,
  spacing: 1
}, Qse = q(Kse);
function ele(e, t, i) {
  var n, a;
  const o = i[t], r = {}, { spacing: s, columns: l } = o;
  s !== void 0 && (r.spacing = s), l !== void 0 && (Mg(e) && !Su(e.facet) || fw(e)) && (r.columns = l), Zg(e) && (r.columns = 1);
  for (const d of Qse)
    if (e[d] !== void 0)
      if (d === "spacing") {
        const f = e[d];
        r[d] = nt(f) ? f : {
          row: (n = f.row) !== null && n !== void 0 ? n : s,
          column: (a = f.column) !== null && a !== void 0 ? a : s
        };
      } else
        r[d] = e[d];
  return r;
}
var tle = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function kv(e, t) {
  var i;
  return (i = e[t]) !== null && i !== void 0 ? i : e[t === "width" ? "continuousWidth" : "continuousHeight"];
}
function pp(e, t) {
  const i = Pf(e, t);
  return Vn(i) ? i.step : cw;
}
function Pf(e, t) {
  var i;
  const n = (i = e[t]) !== null && i !== void 0 ? i : e[t === "width" ? "discreteWidth" : "discreteHeight"];
  return Ke(n, { step: e.step });
}
const cw = 20, ile = {
  continuousWidth: 200,
  continuousHeight: 200,
  step: cw
}, nle = {
  background: "white",
  padding: 5,
  timeFormat: "%b %d, %Y",
  countTitle: "Count of Records",
  view: ile,
  mark: Jre,
  arc: {},
  area: {},
  bar: Qre,
  circle: {},
  geoshape: {},
  image: {},
  line: {},
  point: {},
  rect: ese,
  rule: { color: "black" },
  square: {},
  text: { color: "black" },
  tick: tse,
  trail: {},
  boxplot: {
    size: 14,
    extent: 1.5,
    box: {},
    median: { color: "white" },
    outliers: {},
    rule: {},
    ticks: null
  },
  errorbar: {
    center: "mean",
    rule: !0,
    ticks: !1
  },
  errorband: {
    band: {
      opacity: 0.3
    },
    borders: !1
  },
  scale: Ire,
  projection: {},
  legend: Hse,
  header: { titlePadding: 10, labelPadding: 10 },
  headerColumn: {},
  headerRow: {},
  headerFacet: {},
  selection: Jse,
  style: {},
  title: {},
  facet: { spacing: z2 },
  concat: { spacing: z2 }
}, ha = [
  "#4c78a8",
  "#f58518",
  "#e45756",
  "#72b7b2",
  "#54a24b",
  "#eeca3b",
  "#b279a2",
  "#ff9da6",
  "#9d755d",
  "#bab0ac"
], P2 = {
  text: 11,
  guideLabel: 10,
  guideTitle: 11,
  groupTitle: 13,
  groupSubtitle: 12
}, N2 = {
  blue: ha[0],
  orange: ha[1],
  red: ha[2],
  teal: ha[3],
  green: ha[4],
  yellow: ha[5],
  purple: ha[6],
  pink: ha[7],
  brown: ha[8],
  gray0: "#000",
  gray1: "#111",
  gray2: "#222",
  gray3: "#333",
  gray4: "#444",
  gray5: "#555",
  gray6: "#666",
  gray7: "#777",
  gray8: "#888",
  gray9: "#999",
  gray10: "#aaa",
  gray11: "#bbb",
  gray12: "#ccc",
  gray13: "#ddd",
  gray14: "#eee",
  gray15: "#fff"
};
function ale(e = {}) {
  return {
    signals: [
      {
        name: "color",
        value: Je(e) ? Object.assign(Object.assign({}, N2), e) : N2
      }
    ],
    mark: { color: { signal: "color.blue" } },
    rule: { color: { signal: "color.gray0" } },
    text: {
      color: { signal: "color.gray0" }
    },
    style: {
      "guide-label": {
        fill: { signal: "color.gray0" }
      },
      "guide-title": {
        fill: { signal: "color.gray0" }
      },
      "group-title": {
        fill: { signal: "color.gray0" }
      },
      "group-subtitle": {
        fill: { signal: "color.gray0" }
      },
      cell: {
        stroke: { signal: "color.gray8" }
      }
    },
    axis: {
      domainColor: { signal: "color.gray13" },
      gridColor: { signal: "color.gray8" },
      tickColor: { signal: "color.gray13" }
    },
    range: {
      category: [
        { signal: "color.blue" },
        { signal: "color.orange" },
        { signal: "color.red" },
        { signal: "color.teal" },
        { signal: "color.green" },
        { signal: "color.yellow" },
        { signal: "color.purple" },
        { signal: "color.pink" },
        { signal: "color.brown" },
        { signal: "color.grey8" }
      ]
    }
  };
}
function ole(e) {
  return {
    signals: [
      {
        name: "fontSize",
        value: Je(e) ? Object.assign(Object.assign({}, P2), e) : P2
      }
    ],
    text: {
      fontSize: { signal: "fontSize.text" }
    },
    style: {
      "guide-label": {
        fontSize: { signal: "fontSize.guideLabel" }
      },
      "guide-title": {
        fontSize: { signal: "fontSize.guideTitle" }
      },
      "group-title": {
        fontSize: { signal: "fontSize.groupTitle" }
      },
      "group-subtitle": {
        fontSize: { signal: "fontSize.groupSubtitle" }
      }
    }
  };
}
function rle(e) {
  return {
    text: { font: e },
    style: {
      "guide-label": { font: e },
      "guide-title": { font: e },
      "group-title": { font: e },
      "group-subtitle": { font: e }
    }
  };
}
function Az(e) {
  const t = q(e || {}), i = {};
  for (const n of t) {
    const a = e[n];
    i[n] = xu(a) ? ez(a) : Qt(a);
  }
  return i;
}
function sle(e) {
  const t = q(e), i = {};
  for (const n of t)
    i[n] = Az(e[n]);
  return i;
}
const lle = [
  ...Cj,
  ...QI,
  ...wz,
  "background",
  "padding",
  "legend",
  "lineBreak",
  "scale",
  "style",
  "title",
  "view"
];
function Oz(e = {}) {
  const { color: t, font: i, fontSize: n } = e, a = tle(e, ["color", "font", "fontSize"]), o = UI({}, nle, i ? rle(i) : {}, t ? ale(t) : {}, n ? ole(n) : {}, a || {}), r = Oi(o, lle);
  for (const s of ["background", "lineBreak", "padding"])
    o[s] && (r[s] = Qt(o[s]));
  for (const s of Cj)
    o[s] && (r[s] = en(o[s]));
  for (const s of QI)
    o[s] && (r[s] = Az(o[s]));
  for (const s of wz)
    o[s] && (r[s] = en(o[s]));
  return o.legend && (r.legend = en(o.legend)), o.scale && (r.scale = en(o.scale)), o.style && (r.style = sle(o.style)), o.title && (r.title = en(o.title)), o.view && (r.view = en(o.view)), r;
}
const dle = ["view", ...Tj], fle = [
  "color",
  "fontSize",
  "background",
  "padding",
  "facet",
  "concat",
  "numberFormat",
  "timeFormat",
  "countTitle",
  "header",
  "axisQuantitative",
  "axisTemporal",
  "axisDiscrete",
  "axisPoint",
  "axisXBand",
  "axisXPoint",
  "axisXDiscrete",
  "axisXQuantitative",
  "axisXTemporal",
  "axisYBand",
  "axisYPoint",
  "axisYDiscrete",
  "axisYQuantitative",
  "axisYTemporal",
  "scale",
  "selection",
  "overlay"
  // FIXME: Redesign and unhide this
], ule = Object.assign({ view: ["continuousWidth", "continuousHeight", "discreteWidth", "discreteHeight", "step"] }, Xre);
function cle(e) {
  e = se(e);
  for (const t of fle)
    delete e[t];
  if (e.axis)
    for (const t in e.axis)
      xu(e.axis[t]) && delete e.axis[t];
  if (e.legend)
    for (const t of Mse)
      delete e.legend[t];
  if (e.mark) {
    for (const t of E2)
      delete e.mark[t];
    e.mark.tooltip && Je(e.mark.tooltip) && delete e.mark.tooltip;
  }
  e.params && (e.signals = (e.signals || []).concat(kz(e.params)), delete e.params);
  for (const t of dle) {
    for (const n of E2)
      delete e[t][n];
    const i = ule[t];
    if (i)
      for (const n of i)
        delete e[t][n];
    ple(e, t);
  }
  for (const t of Use())
    delete e[t];
  hle(e);
  for (const t in e)
    Je(e[t]) && De(e[t]) && delete e[t];
  return De(e) ? void 0 : e;
}
function hle(e) {
  const { titleMarkConfig: t, subtitleMarkConfig: i, subtitle: n } = Qj(e.title);
  De(t) || (e.style["group-title"] = Object.assign(
    Object.assign({}, e.style["group-title"]),
    t
    // config.title has higher precedence than config.style.group-title in Vega
  )), De(i) || (e.style["group-subtitle"] = Object.assign(Object.assign({}, e.style["group-subtitle"]), i)), De(n) ? delete e.title : e.title = n;
}
function ple(e, t, i, n) {
  const a = e[t];
  t === "view" && (i = "cell");
  const o = Object.assign(Object.assign({}, a), e.style[i ?? t]);
  De(o) || (e.style[i ?? t] = o), delete e[t];
}
function Kg(e) {
  return "layer" in e;
}
function gle(e) {
  return "repeat" in e;
}
function mle(e) {
  return !X(e.repeat) && e.repeat.layer;
}
var ble = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class yle {
  map(t, i) {
    return Mg(t) ? this.mapFacet(t, i) : gle(t) ? this.mapRepeat(t, i) : uw(t) ? this.mapHConcat(t, i) : Zg(t) ? this.mapVConcat(t, i) : fw(t) ? this.mapConcat(t, i) : this.mapLayerOrUnit(t, i);
  }
  mapLayerOrUnit(t, i) {
    if (Kg(t))
      return this.mapLayer(t, i);
    if (Wa(t))
      return this.mapUnit(t, i);
    throw new Error(k1(t));
  }
  mapLayer(t, i) {
    return Object.assign(Object.assign({}, t), { layer: t.layer.map((n) => this.mapLayerOrUnit(n, i)) });
  }
  mapHConcat(t, i) {
    return Object.assign(Object.assign({}, t), { hconcat: t.hconcat.map((n) => this.map(n, i)) });
  }
  mapVConcat(t, i) {
    return Object.assign(Object.assign({}, t), { vconcat: t.vconcat.map((n) => this.map(n, i)) });
  }
  mapConcat(t, i) {
    const { concat: n } = t, a = ble(t, ["concat"]);
    return Object.assign(Object.assign({}, a), { concat: n.map((o) => this.map(o, i)) });
  }
  mapFacet(t, i) {
    return Object.assign(Object.assign({}, t), {
      // TODO: remove "any" once we support all facet listed in https://github.com/vega/vega-lite/issues/2760
      spec: this.map(t.spec, i)
    });
  }
  mapRepeat(t, i) {
    return Object.assign(Object.assign({}, t), {
      // as any is required here since TS cannot infer that the output type satisfies the input type
      spec: this.map(t.spec, i)
    });
  }
}
const vle = {
  zero: 1,
  center: 1,
  normalize: 1
};
function _le(e) {
  return e in vle;
}
const xle = /* @__PURE__ */ new Set([Dj, Ng, Pg, lp, Lg, B1, U1, qg, Sj, L1]), wle = /* @__PURE__ */ new Set([Ng, Pg, Dj]);
function q2(e, t) {
  var i, n;
  const a = t === "x" ? "y" : "radius", o = e[t], r = e[a];
  if (V(o) && V(r))
    if (to(o) === "quantitative" && to(r) === "quantitative") {
      if (o.stack)
        return t;
      if (r.stack)
        return a;
      const s = V(o) && !!o.aggregate, l = V(r) && !!r.aggregate;
      if (s !== l)
        return s ? t : a;
      {
        const d = (i = o.scale) === null || i === void 0 ? void 0 : i.type, f = (n = r.scale) === null || n === void 0 ? void 0 : n.type;
        if (d && d !== "linear")
          return a;
        if (f && f !== "linear")
          return t;
      }
    } else {
      if (to(o) === "quantitative")
        return t;
      if (to(r) === "quantitative")
        return a;
    }
  else {
    if (to(o) === "quantitative")
      return t;
    if (to(r) === "quantitative")
      return a;
  }
}
function $le(e) {
  switch (e) {
    case "x":
      return "y";
    case "y":
      return "x";
    case "theta":
      return "radius";
    case "radius":
      return "theta";
  }
}
function Ez(e, t, i = {}) {
  const n = za(e) ? e.type : e;
  if (!xle.has(n))
    return null;
  const a = q2(t, "x") || q2(t, "theta");
  if (!a)
    return null;
  const o = t[a], r = V(o) ? M(o, {}) : void 0;
  let s = $le(a), l = t[s], d = V(l) ? M(l, {}) : void 0;
  d === r && (d = void 0, l = void 0, s = void 0);
  const f = Mae.reduce((c, h) => {
    if (h !== "tooltip" && Tr(t, h)) {
      const p = t[h];
      for (const g of Ze(p)) {
        const m = Mn(g);
        if (m.aggregate)
          continue;
        const b = M(m, {});
        // if fielddef is a repeat, just include it in the stack by
        (!b || // otherwise, the field must be different from x and y fields.
        b !== d) && c.push({ channel: h, fieldDef: m });
      }
    }
    return c;
  }, []);
  let u;
  if (o.stack !== void 0 ? yu(o.stack) ? u = o.stack ? "zero" : null : u = o.stack : f.length > 0 && wle.has(n) && (u = "zero"), !u || !_le(u) || iw(t) && f.length === 0)
    return null;
  if (o.scale && o.scale.type && o.scale.type !== tt.LINEAR) {
    if (i.disallowNonLinearStack)
      return null;
    U(Loe(o.scale.type));
  }
  return ie(t[ra(a)]) ? (o.stack !== void 0 && U(qoe(a)), null) : (V(o) && o.aggregate && !Q(Fae, o.aggregate) && U(Boe(o.aggregate)), {
    groupbyChannel: l ? s : void 0,
    groupbyField: d,
    fieldChannel: a,
    impute: o.impute === null ? !1 : Go(n),
    stackBy: f,
    offset: u
  });
}
var Dz = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function kle(e) {
  const t = Dz(e, ["point", "line"]);
  return q(t).length > 1 ? t : t.type;
}
function Ale(e) {
  for (const t of ["line", "area", "rule", "trail"])
    e[t] && (e = Object.assign(Object.assign({}, e), {
      // TODO: remove as any
      [t]: Oi(e[t], ["point", "line"])
    }));
  return e;
}
function Eb(e, t = {}, i) {
  return e.point === "transparent" ? { opacity: 0 } : e.point ? Je(e.point) ? e.point : {} : e.point !== void 0 ? null : t.point || i.shape ? Je(t.point) ? t.point : {} : void 0;
}
function L2(e, t = {}) {
  return e.line ? e.line === !0 ? {} : e.line : e.line !== void 0 ? null : t.line ? t.line === !0 ? {} : t.line : void 0;
}
class Ole {
  constructor() {
    this.name = "path-overlay";
  }
  hasMatchingType(t, i) {
    if (Wa(t)) {
      const { mark: n, encoding: a } = t, o = za(n) ? n : { type: n };
      switch (o.type) {
        case "line":
        case "rule":
        case "trail":
          return !!Eb(o, i[o.type], a);
        case "area":
          return (
            // false / null are also included as we want to remove the properties
            !!Eb(o, i[o.type], a) || !!L2(o, i[o.type])
          );
      }
    }
    return !1;
  }
  run(t, i, n) {
    const { config: a } = i, { selection: o, projection: r, mark: s, encoding: l } = t, d = Dz(t, ["selection", "projection", "mark", "encoding"]), f = Jg(l, a), u = za(s) ? s : { type: s }, c = Eb(u, a[u.type], f), h = u.type === "area" && L2(u, a[u.type]), p = [
      Object.assign(Object.assign({}, o ? { selection: o } : {}), {
        mark: kle(Object.assign(Object.assign({}, u.type === "area" && u.opacity === void 0 && u.fillOpacity === void 0 ? { opacity: 0.7 } : {}), u)),
        // drop shape from encoding as this might be used to trigger point overlay
        encoding: Oi(f, ["shape"])
      })
    ], g = Ez(u, f);
    let m = f;
    if (g) {
      const { fieldChannel: b, offset: y } = g;
      m = Object.assign(Object.assign({}, f), { [b]: Object.assign(Object.assign({}, f[b]), y ? { stack: y } : {}) });
    }
    return h && p.push(Object.assign(Object.assign({}, r ? { projection: r } : {}), { mark: Object.assign(Object.assign({ type: "line" }, rl(u, ["clip", "interpolate", "tension", "tooltip"])), h), encoding: m })), c && p.push(Object.assign(Object.assign({}, r ? { projection: r } : {}), { mark: Object.assign(Object.assign({ type: "point", opacity: 1, filled: !0 }, rl(u, ["clip", "tooltip"])), c), encoding: m })), n(Object.assign(Object.assign({}, d), { layer: p }), Object.assign(Object.assign({}, i), { config: Ale(a) }));
  }
}
var B2 = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class Ele {
  constructor() {
    this.name = "RangeStep";
  }
  hasMatchingType(t) {
    var i;
    if (Wa(t) && t.encoding)
      for (const n of Vi) {
        const a = t.encoding[n];
        if (a && ie(a) && !((i = a == null ? void 0 : a.scale) === null || i === void 0) && i.rangeStep)
          return !0;
      }
    return !1;
  }
  run(t) {
    var i;
    const n = {};
    let a = Object.assign({}, t.encoding);
    for (const o of Vi) {
      const r = sa(o), s = a[o];
      if (s && ie(s) && !((i = s == null ? void 0 : s.scale) === null || i === void 0) && i.rangeStep) {
        const { scale: l } = s, d = B2(s, ["scale"]), f = l, u = B2(f, ["rangeStep"]);
        n[r] = { step: l.rangeStep }, U(koe), a = Object.assign(Object.assign({}, a), { [o]: Object.assign(Object.assign({}, d), De(u) ? {} : { scale: u }) });
      }
    }
    return Object.assign(Object.assign(Object.assign({}, n), t), { encoding: a });
  }
}
var Dle = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function Sle(e, t) {
  return t ? Su(e) ? Fz(e, t) : Sz(e, t) : e;
}
function Db(e, t) {
  return t ? Fz(e, t) : e;
}
function Av(e, t, i) {
  const n = t[e];
  if (fse(n)) {
    if (n.repeat in i)
      return Object.assign(Object.assign({}, t), { [e]: i[n.repeat] });
    U(roe(n.repeat));
    return;
  }
  return t;
}
function Sz(e, t) {
  if (e = Av("field", e, t), e !== void 0) {
    if (e === null)
      return null;
    if (Y1(e) && zn(e.sort)) {
      const i = Av("field", e.sort, t);
      e = Object.assign(Object.assign({}, e), i ? { sort: i } : {});
    }
    return e;
  }
}
function U2(e, t) {
  if (V(e))
    return Sz(e, t);
  {
    const i = Av("datum", e, t);
    return i !== e && !i.type && (i.type = "nominal"), i;
  }
}
function M2(e, t) {
  if (ie(e)) {
    const i = U2(e, t);
    if (i)
      return i;
    if (J1(e))
      return { condition: e.condition };
  } else {
    if (Wg(e)) {
      const i = U2(e.condition, t);
      return i ? Object.assign(Object.assign({}, e), { condition: i }) : Dle(e, ["condition"]);
    }
    return e;
  }
}
function Fz(e, t) {
  const i = {};
  for (const n in e)
    if (Ps(e, n)) {
      const a = e[n];
      if (X(a))
        i[n] = a.map((o) => M2(o, t)).filter((o) => o);
      else {
        const o = M2(a, t);
        o !== void 0 && (i[n] = o);
      }
    }
  return i;
}
class Fle {
  constructor() {
    this.name = "RuleForRangedLine";
  }
  hasMatchingType(t) {
    if (Wa(t)) {
      const { encoding: i, mark: n } = t;
      if (n === "line")
        for (const a of Bae) {
          const o = cs(a), r = i[o];
          if (i[a] && (V(r) && !Zt(r.bin) || Ho(r)))
            return !0;
        }
    }
    return !1;
  }
  run(t, i, n) {
    const { encoding: a } = t;
    return U(woe(!!a.x2, !!a.y2)), n(Object.assign(Object.assign({}, t), { mark: "rule" }), i);
  }
}
var Xa = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class Tle extends yle {
  constructor() {
    super(...arguments), this.nonFacetUnitNormalizers = [
      Tse,
      Ise,
      Bse,
      new Ole(),
      new Fle(),
      new Ele()
    ];
  }
  map(t, i) {
    if (Wa(t)) {
      const n = Tr(t.encoding, Oa), a = Tr(t.encoding, Ea), o = Tr(t.encoding, Dg);
      if (n || a || o)
        return this.mapFacetedUnit(t, i);
    }
    return super.map(t, i);
  }
  // This is for normalizing non-facet unit
  mapUnit(t, i) {
    const { parentEncoding: n, parentProjection: a } = i, o = Db(t.encoding, i.repeater), r = Object.assign(Object.assign({}, t), o ? { encoding: o } : {});
    if (n || a)
      return this.mapUnitWithParentEncodingOrProjection(r, i);
    const s = this.mapLayerOrUnit.bind(this);
    for (const l of this.nonFacetUnitNormalizers)
      if (l.hasMatchingType(r, i.config))
        return l.run(r, i, s);
    return r;
  }
  mapRepeat(t, i) {
    return mle(t) ? this.mapLayerRepeat(t, i) : this.mapNonLayerRepeat(t, i);
  }
  mapLayerRepeat(t, i) {
    const { repeat: n, spec: a } = t, o = Xa(t, ["repeat", "spec"]), { row: r, column: s, layer: l } = n, { repeater: d = {}, repeaterPrefix: f = "" } = i;
    return r || s ? this.mapRepeat(Object.assign(Object.assign({}, t), { repeat: Object.assign(Object.assign({}, r ? { row: r } : {}), s ? { column: s } : {}), spec: {
      repeat: { layer: l },
      spec: a
    } }), i) : Object.assign(Object.assign({}, o), { layer: l.map((u) => {
      const c = Object.assign(Object.assign({}, d), { layer: u }), h = (a.name || "") + f + `child__layer_${Ne(u)}`, p = this.mapLayerOrUnit(a, Object.assign(Object.assign({}, i), { repeater: c, repeaterPrefix: h }));
      return p.name = h, p;
    }) });
  }
  mapNonLayerRepeat(t, i) {
    var n;
    const { repeat: a, spec: o, data: r } = t, s = Xa(t, ["repeat", "spec", "data"]);
    !X(a) && t.columns && (t = Oi(t, ["columns"]), U(_2("repeat")));
    const l = [], { repeater: d = {}, repeaterPrefix: f = "" } = i, u = !X(a) && a.row || [d ? d.row : null], c = !X(a) && a.column || [d ? d.column : null], h = X(a) && a || [d ? d.repeat : null];
    for (const g of h)
      for (const m of u)
        for (const b of c) {
          const y = {
            repeat: g,
            row: m,
            column: b,
            layer: d.layer
          }, v = (o.name || "") + f + "child__" + (X(a) ? `${Ne(g)}` : (a.row ? `row_${Ne(m)}` : "") + (a.column ? `column_${Ne(b)}` : "")), w = this.map(o, Object.assign(Object.assign({}, i), { repeater: y, repeaterPrefix: v }));
          w.name = v, l.push(Oi(w, ["data"]));
        }
    const p = X(a) ? t.columns : a.column ? a.column.length : 1;
    return Object.assign(Object.assign({ data: (n = o.data) !== null && n !== void 0 ? n : r, align: "all" }, s), {
      columns: p,
      concat: l
    });
  }
  mapFacet(t, i) {
    const { facet: n } = t;
    return Su(n) && t.columns && (t = Oi(t, ["columns"]), U(_2("facet"))), super.mapFacet(t, i);
  }
  mapUnitWithParentEncodingOrProjection(t, i) {
    const { encoding: n, projection: a } = t, { parentEncoding: o, parentProjection: r, config: s } = i, l = W2({ parentProjection: r, projection: a }), d = V2({
      parentEncoding: o,
      encoding: Db(n, i.repeater)
    });
    return this.mapUnit(Object.assign(Object.assign(Object.assign({}, t), l ? { projection: l } : {}), d ? { encoding: d } : {}), { config: s });
  }
  mapFacetedUnit(t, i) {
    const n = t.encoding, { row: a, column: o, facet: r } = n, s = Xa(n, ["row", "column", "facet"]), { mark: l, width: d, projection: f, height: u, view: c, selection: h, encoding: p } = t, g = Xa(t, ["mark", "width", "projection", "height", "view", "selection", "encoding"]), { facetMapping: m, layout: b } = this.getFacetMappingAndLayout({ row: a, column: o, facet: r }, i), y = Db(s, i.repeater);
    return this.mapFacet(Object.assign(Object.assign(Object.assign({}, g), b), {
      // row / column has higher precedence than facet
      facet: m,
      spec: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, d ? { width: d } : {}), u ? { height: u } : {}), c ? { view: c } : {}), f ? { projection: f } : {}), { mark: l, encoding: y }), h ? { selection: h } : {})
    }), i);
  }
  getFacetMappingAndLayout(t, i) {
    var n;
    const { row: a, column: o, facet: r } = t;
    if (a || o) {
      r && U(_oe([...a ? [Oa] : [], ...o ? [Ea] : []]));
      const s = {}, l = {};
      for (const d of [Oa, Ea]) {
        const f = t[d];
        if (f) {
          const u = Xa(f, ["align", "center", "spacing", "columns"]);
          s[d] = u;
          for (const c of ["align", "center", "spacing"])
            f[c] !== void 0 && (l[c] = (n = l[c]) !== null && n !== void 0 ? n : {}, l[c][d] = f[c]);
        }
      }
      return { facetMapping: s, layout: l };
    } else {
      const { align: s, center: l, spacing: d, columns: f } = r, u = Xa(r, ["align", "center", "spacing", "columns"]);
      return {
        facetMapping: Sle(u, i.repeater),
        layout: Object.assign(Object.assign(Object.assign(Object.assign({}, s ? { align: s } : {}), l ? { center: l } : {}), d ? { spacing: d } : {}), f ? { columns: f } : {})
      };
    }
  }
  mapLayer(t, i) {
    var { parentEncoding: n, parentProjection: a } = i, o = Xa(i, ["parentEncoding", "parentProjection"]);
    const { encoding: r, projection: s } = t, l = Xa(t, ["encoding", "projection"]), d = Object.assign(Object.assign({}, o), { parentEncoding: V2({ parentEncoding: n, encoding: r, layer: !0 }), parentProjection: W2({ parentProjection: a, projection: s }) });
    return super.mapLayer(l, d);
  }
}
function V2({ parentEncoding: e, encoding: t = {}, layer: i }) {
  let n = {};
  if (e) {
    const a = /* @__PURE__ */ new Set([...q(e), ...q(t)]);
    for (const o of a) {
      const r = t[o], s = e[o];
      if (ie(r)) {
        const l = Object.assign(Object.assign({}, s), r);
        n[o] = l;
      } else Wg(r) ? n[o] = Object.assign(Object.assign({}, r), { condition: Object.assign(Object.assign({}, s), r.condition) }) : r || r === null ? n[o] = r : (i || hn(s) || ee(s) || ie(s) || X(s)) && (n[o] = s);
    }
  } else
    n = t;
  return !n || De(n) ? void 0 : n;
}
function W2(e) {
  const { parentProjection: t, projection: i } = e;
  return t && i && U(coe({ parentProjection: t, projection: i })), i ?? t;
}
function Tz(e, t) {
  t === void 0 && (t = Oz(e.config));
  const i = Rle(e, t), { width: n, height: a } = e, o = Ile(i, { width: n, height: a, autosize: e.autosize }, t);
  return Object.assign(Object.assign({}, i), o ? { autosize: o } : {});
}
const Cle = new Tle();
function Rle(e, t = {}) {
  return Cle.map(e, { config: t });
}
function G2(e) {
  return re(e) ? { type: e } : e ?? {};
}
function Ile(e, t, i) {
  let { width: n, height: a } = t;
  const o = Wa(e) || Kg(e), r = {};
  o ? n == "container" && a == "container" ? (r.type = "fit", r.contains = "padding") : n == "container" ? (r.type = "fit-x", r.contains = "padding") : a == "container" && (r.type = "fit-y", r.contains = "padding") : (n == "container" && (U(m2("width")), n = void 0), a == "container" && (U(m2("height")), a = void 0));
  const s = Object.assign(Object.assign(Object.assign({ type: "pad" }, r), i ? G2(i.autosize) : {}), G2(e.autosize));
  if (s.type === "fit" && !o && (U(Zae), s.type = "pad"), n == "container" && !(s.type == "fit" || s.type == "fit-x") && U(b2("width")), a == "container" && !(s.type == "fit" || s.type == "fit-y") && U(b2("height")), !Ml(s, { type: "pad" }))
    return s;
}
function jle(e) {
  return e === "fit" || e === "fit-x" || e === "fit-y";
}
function zle(e) {
  return e ? `fit-${Rg(e)}` : "fit";
}
const Ple = [
  "background",
  "padding"
  // We do not include "autosize" here as it is supported by only unit and layer specs and thus need to be normalized
];
function H2(e, t) {
  const i = {};
  for (const n of Ple)
    e && e[n] !== void 0 && (i[n] = Qt(e[n]));
  return t && (i.params = e.params), i;
}
class Ga {
  constructor(t = {}, i = {}) {
    this.explicit = t, this.implicit = i;
  }
  clone() {
    return new Ga(se(this.explicit), se(this.implicit));
  }
  combine() {
    return Object.assign(Object.assign({}, this.explicit), this.implicit);
  }
  get(t) {
    return Ke(this.explicit[t], this.implicit[t]);
  }
  getWithExplicit(t) {
    return this.explicit[t] !== void 0 ? { explicit: !0, value: this.explicit[t] } : this.implicit[t] !== void 0 ? { explicit: !1, value: this.implicit[t] } : { explicit: !1, value: void 0 };
  }
  setWithExplicit(t, i) {
    i.value !== void 0 && this.set(t, i.value, i.explicit);
  }
  set(t, i, n) {
    return delete this[n ? "implicit" : "explicit"][t], this[n ? "explicit" : "implicit"][t] = i, this;
  }
  copyKeyFromSplit(t, i) {
    i.explicit[t] !== void 0 ? this.set(t, i.explicit[t], !0) : i.implicit[t] !== void 0 && this.set(t, i.implicit[t], !1);
  }
  copyKeyFromObject(t, i) {
    i[t] !== void 0 && this.set(t, i[t], !0);
  }
  /**
   * Merge split object into this split object. Properties from the other split
   * overwrite properties from this split.
   */
  copyAll(t) {
    for (const i of q(t.combine())) {
      const n = t.getWithExplicit(i);
      this.setWithExplicit(i, n);
    }
  }
}
function ya(e) {
  return {
    explicit: !0,
    value: e
  };
}
function vi(e) {
  return {
    explicit: !1,
    value: e
  };
}
function Cz(e) {
  return (t, i, n, a) => {
    const o = e(t.value, i.value);
    return o > 0 ? t : o < 0 ? i : Qg(t, i, n, a);
  };
}
function Qg(e, t, i, n) {
  return e.explicit && t.explicit && U(Coe(i, n, e.value, t.value)), e;
}
function Fo(e, t, i, n, a = Qg) {
  return e === void 0 || e.value === void 0 ? t : e.explicit && !t.explicit ? e : t.explicit && !e.explicit ? t : Ml(e.value, t.value) ? e : a(e, t, i, n);
}
class Nle extends Ga {
  constructor(t = {}, i = {}, n = !1) {
    super(t, i), this.explicit = t, this.implicit = i, this.parseNothing = n;
  }
  clone() {
    const t = super.clone();
    return t.parseNothing = this.parseNothing, t;
  }
}
function Nf(e) {
  return "url" in e;
}
function gp(e) {
  return "values" in e;
}
function Rz(e) {
  return "name" in e && !Nf(e) && !gp(e) && !Cr(e);
}
function Cr(e) {
  return e && (Iz(e) || jz(e) || hw(e));
}
function Iz(e) {
  return "sequence" in e;
}
function jz(e) {
  return "sphere" in e;
}
function hw(e) {
  return "graticule" in e;
}
var Ce;
(function(e) {
  e[e.Raw = 0] = "Raw", e[e.Main = 1] = "Main", e[e.Row = 2] = "Row", e[e.Column = 3] = "Column", e[e.Lookup = 4] = "Lookup";
})(Ce || (Ce = {}));
function zz(e) {
  return "filter" in e;
}
function qle(e) {
  return (e == null ? void 0 : e.stop) !== void 0;
}
function Lle(e) {
  return "lookup" in e;
}
function Ble(e) {
  return "data" in e;
}
function Ule(e) {
  return "selection" in e;
}
function Mle(e) {
  return "pivot" in e;
}
function Vle(e) {
  return "density" in e;
}
function Wle(e) {
  return "quantile" in e;
}
function Gle(e) {
  return "regression" in e;
}
function Hle(e) {
  return "loess" in e;
}
function Yle(e) {
  return "sample" in e;
}
function Xle(e) {
  return "window" in e;
}
function Jle(e) {
  return "joinaggregate" in e;
}
function Zle(e) {
  return "flatten" in e;
}
function Kle(e) {
  return "calculate" in e;
}
function Qle(e) {
  return "bin" in e;
}
function ede(e) {
  return "impute" in e;
}
function tde(e) {
  return "timeUnit" in e;
}
function ide(e) {
  return "aggregate" in e;
}
function nde(e) {
  return "stack" in e;
}
function ade(e) {
  return "fold" in e;
}
function ode(e) {
  return e.map((t) => zz(t) ? {
    filter: eh(t.filter, vre)
  } : t);
}
const rde = "view", mp = "[", bp = "]", Pz = "{", Nz = "}", sde = ":", qz = ",", lde = "@", dde = ">", fde = /[[\]{}]/, ude = {
  "*": 1,
  arc: 1,
  area: 1,
  group: 1,
  image: 1,
  line: 1,
  path: 1,
  rect: 1,
  rule: 1,
  shape: 1,
  symbol: 1,
  text: 1,
  trail: 1
};
let Lz, Bz;
function Wl(e, t, i) {
  return Lz = t || rde, Bz = ude, Uz(e.trim()).map(Ov);
}
function cde(e) {
  return Bz[e];
}
function Zd(e, t, i, n, a) {
  const o = e.length;
  let r = 0, s;
  for (; t < o; ++t) {
    if (s = e[t], !r && s === i) return t;
    a && a.indexOf(s) >= 0 ? --r : n && n.indexOf(s) >= 0 && ++r;
  }
  return t;
}
function Uz(e) {
  const t = [], i = e.length;
  let n = 0, a = 0;
  for (; a < i; )
    a = Zd(e, a, qz, mp + Pz, bp + Nz), t.push(e.substring(n, a).trim()), n = ++a;
  if (t.length === 0)
    throw "Empty event selector: " + e;
  return t;
}
function Ov(e) {
  return e[0] === "[" ? hde(e) : pde(e);
}
function hde(e) {
  const t = e.length;
  let i = 1, n;
  if (i = Zd(e, i, bp, mp, bp), i === t)
    throw "Empty between selector: " + e;
  if (n = Uz(e.substring(1, i)), n.length !== 2)
    throw "Between selector must have two elements: " + e;
  if (e = e.slice(i + 1).trim(), e[0] !== dde)
    throw "Expected '>' after between selector: " + e;
  n = n.map(Ov);
  const a = Ov(e.slice(1).trim());
  return a.between ? {
    between: n,
    stream: a
  } : (a.between = n, a);
}
function pde(e) {
  const t = {
    source: Lz
  }, i = [];
  let n = [0, 0], a = 0, o = 0, r = e.length, s = 0, l, d;
  if (e[r - 1] === Nz) {
    if (s = e.lastIndexOf(Pz), s >= 0) {
      try {
        n = gde(e.substring(s + 1, r - 1));
      } catch {
        throw "Invalid throttle specification: " + e;
      }
      e = e.slice(0, s).trim(), r = e.length;
    } else throw "Unmatched right brace: " + e;
    s = 0;
  }
  if (!r) throw e;
  if (e[0] === lde && (a = ++s), l = Zd(e, s, sde), l < r && (i.push(e.substring(o, l).trim()), o = s = ++l), s = Zd(e, s, mp), s === r)
    i.push(e.substring(o, r).trim());
  else if (i.push(e.substring(o, s).trim()), d = [], o = ++s, o === r) throw "Unmatched left bracket: " + e;
  for (; s < r; ) {
    if (s = Zd(e, s, bp), s === r) throw "Unmatched left bracket: " + e;
    if (d.push(e.substring(o, s).trim()), s < r - 1 && e[++s] !== mp) throw "Expected left bracket: " + e;
    o = ++s;
  }
  if (!(r = i.length) || fde.test(i[r - 1]))
    throw "Invalid event selector: " + e;
  return r > 1 ? (t.type = i[1], a ? t.markname = i[0].slice(1) : cde(i[0]) ? t.marktype = i[0] : t.source = i[0]) : t.type = i[0], t.type.slice(-1) === "!" && (t.consume = !0, t.type = t.type.slice(0, -1)), d != null && (t.filter = d), n[0] && (t.throttle = n[0]), n[1] && (t.debounce = n[1]), t;
}
function gde(e) {
  const t = e.split(qz);
  if (!e.length || t.length > 2) throw e;
  return t.map((i) => {
    const n = +i;
    if (n !== n) throw e;
    return n;
  });
}
function Gl(e, t, i, n) {
  const a = J1(t) && t.condition, o = n(t);
  if (a) {
    const s = Ze(a).map((l) => {
      const d = n(l), f = dse(l) ? pP(e, l.selection) : xp(e, l.test);
      return Object.assign({ test: f }, d);
    });
    return {
      [i]: [...s, ...o !== void 0 ? [o] : []]
    };
  } else
    return o !== void 0 ? { [i]: o } : {};
}
function pw(e, t = "text") {
  const i = e.encoding[t];
  return Gl(e, i, t, (n) => em(n, e.config));
}
function em(e, t, i = "datum") {
  if (e) {
    if (hn(e))
      return Ue(e.value);
    if (ie(e)) {
      const { format: n, formatType: a } = fp(e);
      return W1({ fieldOrDatumDef: e, format: n, formatType: a, expr: i, config: t });
    }
  }
}
function Mz(e, t = {}) {
  const { encoding: i, markDef: n, config: a, stack: o } = e, r = i.tooltip;
  if (X(r))
    return { tooltip: Y2({ tooltip: r }, o, a, t) };
  {
    const s = t.reactiveGeom ? "datum.datum" : "datum";
    return Gl(e, r, "tooltip", (l) => {
      const d = em(l, a, s);
      if (d)
        return d;
      if (l === null)
        return;
      let f = $e("tooltip", n, a);
      if (f === !0 && (f = { content: "encoding" }), re(f))
        return { value: f };
      if (Je(f))
        return ee(f) ? f : f.content === "encoding" ? Y2(i, o, a, t) : { signal: s };
    });
  }
}
function Vz(e, t, i, { reactiveGeom: n } = {}) {
  const a = {}, o = n ? "datum.datum" : "datum", r = [];
  function s(d, f) {
    const u = cs(f), c = Gi(d) ? d : Object.assign(Object.assign({}, d), {
      type: e[u].type
      // for secondary field def, copy type from main channel
    }), h = c.title || Q1(c, i), p = Ze(h).join(", ");
    let g;
    if (Un(f)) {
      const m = f === "x" ? "x2" : "y2", b = Mn(e[m]);
      if (Zt(c.bin) && b) {
        const y = M(c, { expr: o }), v = M(b, { expr: o }), { format: w, formatType: x } = fp(c);
        g = Bg(y, v, w, x, i), a[m] = !0;
      } else if (t && t.fieldChannel === f && t.offset === "normalize") {
        const { format: y, formatType: v } = fp(c);
        g = W1({ fieldOrDatumDef: c, format: y, formatType: v, expr: o, config: i, normalizeStack: !0 }).signal;
      }
    }
    g = g ?? em(c, i, o).signal, r.push({ channel: f, key: p, value: g });
  }
  nw(e, (d, f) => {
    V(d) ? s(d, f) : Vg(d) && s(d.condition, f);
  });
  const l = {};
  for (const { channel: d, key: f, value: u } of r)
    !a[d] && !l[f] && (l[f] = u);
  return l;
}
function Y2(e, t, i, { reactiveGeom: n } = {}) {
  const a = Vz(e, t, i, { reactiveGeom: n }), o = vu(a).map(([r, s]) => `"${r}": ${s}`);
  return o.length > 0 ? { signal: `{${o.join(", ")}}` } : void 0;
}
function mde(e) {
  const { markDef: t, config: i } = e, n = $e("aria", t, i);
  return n === !1 ? {} : Object.assign(Object.assign(Object.assign({}, n ? { aria: n } : {}), bde(e)), yde(e));
}
function bde(e) {
  const { mark: t, markDef: i, config: n } = e;
  if (n.aria === !1)
    return {};
  const a = $e("ariaRoleDescription", i, n);
  return a != null ? { ariaRoleDescription: { value: a } } : t in gre ? {} : { ariaRoleDescription: { value: t } };
}
function yde(e) {
  const { encoding: t, markDef: i, config: n, stack: a } = e, o = t.description;
  if (o)
    return Gl(e, o, "description", (l) => em(l, e.config));
  const r = $e("description", i, n);
  if (r != null)
    return {
      description: Ue(r)
    };
  if (n.aria === !1)
    return {};
  const s = Vz(t, a, n);
  if (!De(s))
    return {
      description: {
        signal: vu(s).map(([l, d], f) => `"${f > 0 ? "; " : ""}${l}: " + (${d})`).join(" + ")
      }
    };
}
function dt(e, t, i = {}) {
  const { markDef: n, encoding: a, config: o } = t, { vgChannel: r } = i;
  let { defaultRef: s, defaultValue: l } = i;
  s === void 0 && (l = l ?? $e(e, n, o, { vgChannel: r, ignoreVgConfig: !0 }), l !== void 0 && (s = Ue(l)));
  const d = a[e];
  return Gl(t, d, r ?? e, (f) => jj({
    channel: e,
    channelDef: f,
    markDef: n,
    config: o,
    scaleName: t.scaleName(e),
    scale: t.getScaleComponent(e),
    stack: null,
    defaultRef: s
  }));
}
function Wz(e, t = { filled: void 0 }) {
  var i, n, a, o;
  const { markDef: r, encoding: s, config: l } = e, { type: d } = r, f = (i = t.filled) !== null && i !== void 0 ? i : $e("filled", r, l), u = Q(["bar", "point", "circle", "square", "geoshape"], d) ? "transparent" : void 0, c = (a = (n = $e(f === !0 ? "color" : void 0, r, l, { vgChannel: "fill" })) !== null && n !== void 0 ? n : (
    // need to add this manually as getMarkConfig normally drops config.mark[channel] if vgChannel is specified
    l.mark[f === !0 && "color"]
  )) !== null && a !== void 0 ? a : (
    // If there is no fill, always fill symbols, bar, geoshape
    // with transparent fills https://github.com/vega/vega-lite/issues/1316
    u
  ), h = (o = $e(f === !1 ? "color" : void 0, r, l, { vgChannel: "stroke" })) !== null && o !== void 0 ? o : (
    // need to add this manually as getMarkConfig normally drops config.mark[channel] if vgChannel is specified
    l.mark[f === !1 && "color"]
  ), p = f ? "fill" : "stroke", g = Object.assign(Object.assign({}, c ? { fill: Ue(c) } : {}), h ? { stroke: Ue(h) } : {});
  return r.color && (f ? r.fill : r.stroke) && U(hj("property", { fill: "fill" in r, stroke: "stroke" in r })), Object.assign(Object.assign(Object.assign(Object.assign({}, g), dt("color", e, {
    vgChannel: p,
    defaultValue: f ? c : h
  })), dt("fill", e, {
    // if there is encoding.fill, include default fill just in case we have conditional-only fill encoding
    defaultValue: s.fill ? c : void 0
  })), dt("stroke", e, {
    // if there is encoding.stroke, include default fill just in case we have conditional-only stroke encoding
    defaultValue: s.stroke ? h : void 0
  }));
}
function vde(e) {
  const { encoding: t, mark: i } = e, n = t.order;
  return !Go(i) && hn(n) ? Gl(e, n, "zindex", (a) => Ue(a.value)) : {};
}
function qf(e, t) {
  const i = Uae(e), n = t[i];
  if (n)
    return n;
}
function Rt(e, t, { defaultPos: i, vgChannel: n, isMidPoint: a }) {
  const { encoding: o, markDef: r, config: s, stack: l } = t, d = o[e], f = o[ra(e)], u = t.scaleName(e), c = t.getScaleComponent(e), h = qf(e, r), p = gw({
    model: t,
    defaultPos: i,
    channel: e,
    scaleName: u,
    scale: c
  }), g = !d && Un(e) && (o.latitude || o.longitude) ? (
    // use geopoint output if there are lat/long and there is no point position overriding lat/long.
    { field: t.getName(e) }
  ) : _de({
    channel: e,
    channelDef: d,
    channel2Def: f,
    markDef: r,
    config: s,
    isMidPoint: a,
    scaleName: u,
    scale: c,
    stack: l,
    offset: h,
    defaultRef: p
  });
  return g ? { [n || e]: g } : void 0;
}
function _de(e) {
  const { channel: t, channelDef: i, isMidPoint: n, scaleName: a, stack: o, offset: r, markDef: s, config: l } = e;
  if (ie(i) && o && t === o.fieldChannel) {
    if (V(i)) {
      const d = Fu({
        channel: t,
        fieldDef: i,
        isMidPoint: n,
        markDef: s,
        stack: o,
        config: l
      });
      if (d !== void 0)
        return dp({
          scaleName: a,
          fieldOrDatumDef: i,
          startSuffix: "start",
          band: d,
          offset: r
        });
    }
    return Fr(i, a, { suffix: "end" }, { offset: r });
  }
  return M1(e);
}
function gw({ model: e, defaultPos: t, channel: i, scaleName: n, scale: a }) {
  const { markDef: o, config: r } = e;
  return () => {
    const s = cs(i), l = So(i), d = $e(i, o, r, { vgChannel: l });
    if (d !== void 0)
      return Jd(i, d);
    switch (t) {
      case "zeroOrMin":
      case "zeroOrMax":
        if (n) {
          const f = a.get("type");
          if (!Q([tt.LOG, tt.TIME, tt.UTC], f)) {
            if (a.domainDefinitelyIncludesZero())
              return {
                scale: n,
                value: 0
              };
          }
        }
        if (t === "zeroOrMin")
          return s === "y" ? { field: { group: "height" } } : { value: 0 };
        switch (s) {
          case "radius":
            return {
              signal: `min(${e.width.signal},${e.height.signal})/2`
            };
          case "theta":
            return { signal: "2*PI" };
          case "x":
            return { field: { group: "width" } };
          case "y":
            return { value: 0 };
        }
        break;
      case "mid": {
        const f = e[sa(i)];
        return Object.assign(Object.assign({}, f), { mult: 0.5 });
      }
    }
  };
}
const xde = {
  left: "x",
  center: "xc",
  right: "x2"
}, wde = {
  top: "y",
  middle: "yc",
  bottom: "y2"
};
function Gz(e, t, i, n = "middle") {
  if (e === "radius" || e === "theta")
    return So(e);
  const a = e === "x" ? "align" : "baseline", o = $e(a, t, i);
  let r;
  return ee(o) ? (U(xoe(a)), r = void 0) : r = o, e === "x" ? xde[r || (n === "top" ? "left" : "center")] : wde[r || n];
}
function yp(e, t, { defaultPos: i, defaultPos2: n, range: a }) {
  return a ? Hz(e, t, { defaultPos: i, defaultPos2: n }) : Rt(e, t, { defaultPos: i });
}
function Hz(e, t, { defaultPos: i, defaultPos2: n }) {
  const { markDef: a, config: o } = t, r = ra(e), s = sa(e), l = $de(t, n, r), d = l[s] ? (
    // If there is width/height, we need to position the marks based on the alignment.
    Gz(e, a, o)
  ) : (
    // Otherwise, make sure to apply to the right Vg Channel (for arc mark)
    So(e)
  );
  return Object.assign(Object.assign({}, Rt(e, t, { defaultPos: i, vgChannel: d })), l);
}
function $de(e, t, i) {
  const { encoding: n, mark: a, markDef: o, stack: r, config: s } = e, l = cs(i), d = sa(i), f = So(i), u = n[l], c = e.scaleName(l), h = e.getScaleComponent(l), p = i in n || i in o ? qf(i, e.markDef) : qf(l, e.markDef);
  if (!u && (i === "x2" || i === "y2") && (n.latitude || n.longitude))
    return { [f]: { field: e.getName(i) } };
  const g = kde({
    channel: i,
    channelDef: u,
    channel2Def: n[i],
    markDef: o,
    config: s,
    scaleName: c,
    scale: h,
    stack: r,
    offset: p,
    defaultRef: void 0
  });
  return g !== void 0 ? { [f]: g } : uc(i, o) || uc(i, {
    [i]: cp(i, o, s.style),
    [d]: cp(d, o, s.style)
  }) || uc(i, s[a]) || uc(i, s.mark) || {
    [f]: gw({
      model: e,
      defaultPos: t,
      channel: i,
      scaleName: c,
      scale: h
    })()
  };
}
function kde({ channel: e, channelDef: t, channel2Def: i, markDef: n, config: a, scaleName: o, scale: r, stack: s, offset: l, defaultRef: d }) {
  return ie(t) && s && // If fieldChannel is X and channel is X2 (or Y and Y2)
  e.charAt(0) === s.fieldChannel.charAt(0) ? Fr(t, o, { suffix: "start" }, { offset: l }) : M1({
    channel: e,
    channelDef: i,
    scaleName: o,
    scale: r,
    stack: s,
    markDef: n,
    config: a,
    offset: l,
    defaultRef: d
  });
}
function uc(e, t) {
  const i = sa(e), n = So(e);
  if (t[n] !== void 0)
    return { [n]: Jd(e, t[n]) };
  if (t[e] !== void 0)
    return { [n]: Jd(e, t[e]) };
  if (t[i])
    return { [i]: Jd(e, t[i]) };
}
function To(e, t, i) {
  var n, a, o, r;
  const { config: s, encoding: l, markDef: d, stack: f } = e, u = ra(t), c = sa(t), h = l[t], p = l[u], g = e.getScaleComponent(t), m = g ? g.get("type") : void 0, b = e.scaleName(t), y = d.orient, v = (a = (n = l[c]) !== null && n !== void 0 ? n : l.size) !== null && a !== void 0 ? a : $e("size", d, s, { vgChannel: c }), w = i === "bar" && (t === "x" ? y === "vertical" : y === "horizontal");
  if (V(h) && (qe(h.bin) || Zt(h.bin) || h.timeUnit && !p) && !v && !bi(m)) {
    const x = Fu({ channel: t, fieldDef: h, stack: f, markDef: d, config: s }), $ = (o = e.component.axes[t]) === null || o === void 0 ? void 0 : o[0], _ = (r = $ == null ? void 0 : $.get("translate")) !== null && r !== void 0 ? r : 0.5;
    return Ede({
      fieldDef: h,
      fieldDef2: p,
      channel: t,
      markDef: d,
      scaleName: b,
      band: x,
      axisTranslate: _,
      spacing: Un(t) ? $e("binSpacing", d, s) : void 0,
      reverse: g.get("reverse"),
      config: s
    });
  } else return (ie(h) && bi(m) || w) && !p ? Ode(i, h, t, e) : Hz(t, e, { defaultPos: "zeroOrMax", defaultPos2: "zeroOrMin" });
}
function Ade(e, t, i, n, a, o) {
  if (n) {
    const l = n.get("type");
    if (l === "point" || l === "band") {
      if (a[e].discreteBandSize !== void 0)
        return { value: a[e].discreteBandSize };
      if (l === tt.POINT) {
        const d = n.get("range");
        return Wo(d) && nt(d.step) ? { value: d.step - 2 } : { value: cw - 2 };
      } else
        return { scale: i, band: o };
    } else
      return { value: a[e].continuousBandSize };
  }
  const r = pp(a.view, t), s = Ke(
    // No scale is like discrete bar (with one item)
    a[e].discreteBandSize,
    r - 2
  );
  return s !== void 0 ? { value: s } : void 0;
}
function Ode(e, t, i, n) {
  var a;
  const { markDef: o, encoding: r, config: s, stack: l } = n, d = o.orient, f = n.scaleName(i), u = n.getScaleComponent(i), c = sa(i), h = ra(i), p = d === "horizontal" && i === "y" || d === "vertical" && i === "x", g = $e(p ? "size" : c, o, s, {
    vgChannel: c
  });
  let m;
  (r.size || g !== void 0) && (p ? m = dt("size", n, { vgChannel: c, defaultValue: g }) : U(Soe(o.type)));
  const b = (a = ie(t) ? Fu({ channel: i, fieldDef: t, markDef: o, stack: l, config: s }) : void 0) !== null && a !== void 0 ? a : 1;
  m = m || { [c]: Ade(e, c, f, u, s, b) };
  const y = (u == null ? void 0 : u.get("type")) !== "band" || !("band" in m[c]), v = Gz(i, o, s, y ? "middle" : "top"), w = qf(i, o), x = M1({
    channel: i,
    channelDef: t,
    markDef: o,
    config: s,
    scaleName: f,
    scale: u,
    stack: l,
    offset: w,
    defaultRef: gw({ model: n, defaultPos: "mid", channel: i, scaleName: f, scale: u }),
    band: y ? 0.5 : (1 - b) / 2
  });
  if (c)
    return Object.assign({ [v]: x }, m);
  {
    const $ = So(h), _ = m[c], k = w ? Object.assign(Object.assign({}, _), { offset: w }) : _;
    return {
      [v]: x,
      // posRef might be an array that wraps position invalid test
      [$]: X(x) ? [x[0], Object.assign(Object.assign({}, x[1]), { offset: k })] : Object.assign(Object.assign({}, x), { offset: k })
    };
  }
}
function md(e, t, i, n, a) {
  if (ij(e))
    return 0;
  const o = e === "x" || e === "y2" ? -t / 2 : t / 2;
  if (ee(i) || ee(a) || ee(n)) {
    const r = Da(i), s = Da(a), l = Da(n), d = l ? `${l} + ` : "", f = r ? `(${r} ? -1 : 1) * ` : "", u = s ? `(${s} + ${o})` : o;
    return {
      signal: d + f + u
    };
  } else
    return a = a || 0, n + (i ? -a - o : +a + o);
}
function Ede({ fieldDef: e, fieldDef2: t, channel: i, band: n, scaleName: a, markDef: o, spacing: r = 0, axisTranslate: s, reverse: l, config: d }) {
  const f = ra(i), u = So(i), c = So(f), h = qf(i, o);
  if (qe(e.bin) || e.timeUnit)
    return {
      [c]: X2({
        channel: i,
        fieldDef: e,
        scaleName: a,
        markDef: o,
        band: (1 - n) / 2,
        offset: md(f, r, l, s, h),
        config: d
      }),
      [u]: X2({
        channel: i,
        fieldDef: e,
        scaleName: a,
        markDef: o,
        band: 1 - (1 - n) / 2,
        offset: md(i, r, l, s, h),
        config: d
      })
    };
  if (Zt(e.bin)) {
    const p = Fr(e, a, {}, { offset: md(f, r, l, s, h) });
    if (V(t))
      return {
        [c]: p,
        [u]: Fr(t, a, {}, { offset: md(i, r, l, s, h) })
      };
    if (Ou(e.bin) && e.bin.step)
      return {
        [c]: p,
        [u]: {
          signal: `scale("${a}", ${M(e, { expr: "datum" })} + ${e.bin.step})`,
          offset: md(i, r, l, s, h)
        }
      };
  }
  U(mj(f));
}
function X2({ channel: e, fieldDef: t, scaleName: i, markDef: n, band: a, offset: o, config: r }) {
  const s = dp({
    scaleName: i,
    fieldOrDatumDef: t,
    band: a,
    offset: o
  });
  return Ij({
    fieldDef: t,
    channel: e,
    markDef: n,
    ref: s,
    config: r
  });
}
const Dde = /* @__PURE__ */ new Set(["aria"]);
function Hi(e, t) {
  const { fill: i = void 0, stroke: n = void 0 } = t.color === "include" ? Wz(e) : {};
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Sde(e.markDef, t)), J2(e, "fill", i)), J2(e, "stroke", n)), dt("opacity", e)), dt("fillOpacity", e)), dt("strokeOpacity", e)), dt("strokeWidth", e)), dt("strokeDash", e)), vde(e)), Mz(e)), pw(e, "href")), mde(e));
}
function J2(e, t, i) {
  const { config: n, mark: a, markDef: o } = e;
  if ($e("invalid", o, n) === "hide" && i && !Go(a)) {
    const s = Fde(e, { invalid: !0, channels: Ig });
    if (s)
      return {
        [t]: [
          // prepend the invalid case
          // TODO: support custom value
          { test: s, value: null },
          ...Ze(i)
        ]
      };
  }
  return i ? { [t]: i } : {};
}
function Sde(e, t) {
  return pre.reduce((i, n) => (!Dde.has(n) && e[n] !== void 0 && t[n] !== "ignore" && (i[n] = Ue(e[n])), i), {});
}
function Fde(e, { invalid: t = !1, channels: i }) {
  const n = i.reduce((o, r) => {
    const s = e.getScaleComponent(r);
    if (s) {
      const l = s.get("type"), d = e.vgField(r, { expr: "datum" });
      d && Wi(l) && (o[d] = !0);
    }
    return o;
  }, {}), a = q(n);
  if (a.length > 0) {
    const o = t ? "||" : "&&";
    return a.map((r) => V1(r, t)).join(` ${o} `);
  }
}
function mw(e) {
  const { config: t, markDef: i } = e;
  if ($e("invalid", i, t)) {
    const a = Tde(e, { channels: Vi });
    if (a)
      return { defined: { signal: a } };
  }
  return {};
}
function Tde(e, { invalid: t = !1, channels: i }) {
  const n = i.reduce((o, r) => {
    const s = e.getScaleComponent(r);
    if (s) {
      const l = s.get("type"), d = e.vgField(r, { expr: "datum" });
      d && Wi(l) && (o[d] = !0);
    }
    return o;
  }, {}), a = q(n);
  if (a.length > 0) {
    const o = t ? "||" : "&&";
    return a.map((r) => V1(r, t)).join(` ${o} `);
  }
}
function Z2(e, t) {
  if (t !== void 0)
    return { [e]: Ue(t) };
}
const Sb = "voronoi", Yz = {
  has: (e) => e.type !== "interval" && e.nearest,
  parse: (e, t) => {
    if (t.events)
      for (const i of t.events)
        i.markname = e.getName(Sb);
  },
  marks: (e, t, i) => {
    const { x: n, y: a } = t.project.hasChannel, o = e.mark;
    if (Go(o))
      return U(Qae(o)), i;
    const r = {
      name: e.getName(Sb),
      type: "path",
      interactive: !0,
      from: { data: e.getName("marks") },
      encode: {
        update: Object.assign({ fill: { value: "transparent" }, strokeWidth: { value: 0.35 }, stroke: { value: "transparent" }, isVoronoi: { value: !0 } }, Mz(e, { reactiveGeom: !0 }))
      },
      transform: [
        {
          type: "voronoi",
          x: { expr: n || !a ? "datum.datum.x || 0" : "0" },
          y: { expr: a || !n ? "datum.datum.y || 0" : "0" },
          size: [e.getSizeSignalRef("width"), e.getSizeSignalRef("height")]
        }
      ]
    };
    let s = 0, l = !1;
    return i.forEach((d, f) => {
      var u;
      const c = (u = d.name) !== null && u !== void 0 ? u : "";
      c === e.component.mark[0].name ? s = f : c.indexOf(Sb) >= 0 && (l = !0);
    }), l || i.splice(s + 1, 0, r), i;
  }
};
class Fe {
  constructor(t, i) {
    this.debugName = i, this._children = [], this._parent = null, t && (this.parent = t);
  }
  /**
   * Clone this node with a deep copy but don't clone links to children or parents.
   */
  clone() {
    throw new Error("Cannot clone node");
  }
  get parent() {
    return this._parent;
  }
  /**
   * Set the parent of the node and also add this node to the parent's children.
   */
  set parent(t) {
    this._parent = t, t && t.addChild(this);
  }
  get children() {
    return this._children;
  }
  numChildren() {
    return this._children.length;
  }
  addChild(t, i) {
    if (this._children.indexOf(t) > -1) {
      U(doe);
      return;
    }
    i !== void 0 ? this._children.splice(i, 0, t) : this._children.push(t);
  }
  removeChild(t) {
    const i = this._children.indexOf(t);
    return this._children.splice(i, 1), i;
  }
  /**
   * Remove node from the dataflow.
   */
  remove() {
    let t = this._parent.removeChild(this);
    for (const i of this._children)
      i._parent = this._parent, this._parent.addChild(i, t++);
  }
  /**
   * Insert another node as a parent of this node.
   */
  insertAsParentOf(t) {
    const i = t.parent;
    i.removeChild(this), this.parent = i, t.parent = this;
  }
  swapWithParent() {
    const t = this._parent, i = t.parent;
    for (const n of this._children)
      n.parent = t;
    this._children = [], t.removeChild(this), t.parent.removeChild(t), this.parent = i, t.parent = this;
  }
}
class ii extends Fe {
  /**
   * @param source The name of the source. Will change in assemble.
   * @param type The type of the output node.
   * @param refCounts A global ref counter map.
   */
  constructor(t, i, n, a) {
    super(t, i), this.type = n, this.refCounts = a, this._source = this._name = i, this.refCounts && !(this._name in this.refCounts) && (this.refCounts[this._name] = 0);
  }
  clone() {
    const t = new this.constructor();
    return t.debugName = "clone_" + this.debugName, t._source = this._source, t._name = "clone_" + this._name, t.type = this.type, t.refCounts = this.refCounts, t.refCounts[t._name] = 0, t;
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return this._hash === void 0 && (this._hash = `Output ${YI()}`), this._hash;
  }
  /**
   * Request the datasource name and increase the ref counter.
   *
   * During the parsing phase, this will return the simple name such as 'main' or 'raw'.
   * It is crucial to request the name from an output node to mark it as a required node.
   * If nobody ever requests the name, this datasource will not be instantiated in the assemble phase.
   *
   * In the assemble phase, this will return the correct name.
   */
  getSource() {
    return this.refCounts[this._name]++, this._source;
  }
  isRequired() {
    return !!this.refCounts[this._name];
  }
  setSource(t) {
    this._source = t;
  }
}
var K2 = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class Pn extends Fe {
  constructor(t, i) {
    super(t), this.formula = i;
  }
  clone() {
    return new Pn(null, se(this.formula));
  }
  static makeFromEncoding(t, i) {
    const n = i.reduceFieldDef((a, o, r) => {
      const { field: s, timeUnit: l } = o, d = Ye(i) ? i.encoding[ra(r)] : void 0, f = Ye(i) && X1(r, o, d, i.stack, i.markDef, i.config);
      if (l) {
        const u = M(o, { forAs: !0 });
        a[fe({
          as: u,
          field: s,
          timeUnit: l
        })] = Object.assign({
          as: u,
          field: s,
          timeUnit: l
        }, f ? { band: !0 } : {});
      }
      return a;
    }, {});
    return De(n) ? null : new Pn(t, n);
  }
  static makeFromTransform(t, i) {
    const n = Object.assign({}, i), { timeUnit: a } = n, o = K2(n, ["timeUnit"]), r = ni(a), s = Object.assign(Object.assign({}, o), { timeUnit: r });
    return new Pn(t, {
      [fe(s)]: s
    });
  }
  /**
   * Merge together TimeUnitNodes assigning the children of `other` to `this`
   * and removing `other`.
   */
  merge(t) {
    this.formula = Object.assign({}, this.formula);
    for (const i in t.formula)
      (!this.formula[i] || t.formula[i].band) && (this.formula[i] = t.formula[i]);
    for (const i of t.children)
      t.removeChild(i), i.parent = this;
    t.remove();
  }
  /**
   * Remove time units coming from the other node.
   */
  removeFormulas(t) {
    const i = {};
    for (const [n, a] of vu(this.formula))
      t.has(a.as) || (i[n] = a);
    this.formula = i;
  }
  producedFields() {
    return new Set(Aa(this.formula).map((t) => t.as));
  }
  dependentFields() {
    return new Set(Aa(this.formula).map((t) => t.field));
  }
  hash() {
    return `TimeUnit ${fe(this.formula)}`;
  }
  assemble() {
    const t = [];
    for (const i of Aa(this.formula)) {
      const { field: n, as: a, timeUnit: o } = i, r = ni(o), { unit: s, utc: l } = r, d = K2(r, ["unit", "utc"]);
      t.push(Object.assign(Object.assign(Object.assign(Object.assign({ field: Ia(n), type: "timeunit" }, s ? { units: S1(s) } : {}), l ? { timezone: "utc" } : {}), d), { as: [a, `${a}_end`] }));
    }
    return t;
  }
}
var Cde = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
const Cu = "_tuple_fields";
class Rde {
  constructor(...t) {
    this.items = t, this.hasChannel = {}, this.hasField = {};
  }
}
const Ide = {
  has: () => !0,
  parse: (e, t, i) => {
    var n, a, o;
    const r = t.name, s = (n = t.project) !== null && n !== void 0 ? n : t.project = new Rde(), l = {}, d = {}, f = /* @__PURE__ */ new Set(), u = (c, h) => {
      const p = h === "visual" ? c.channel : c.field;
      let g = Ne(`${r}_${p}`);
      for (let m = 1; f.has(g); m++)
        g = Ne(`${r}_${p}_${m}`);
      return f.add(g), { [h]: g };
    };
    if (!i.fields && !i.encodings) {
      const c = e.config.selection[i.type];
      if (i.init)
        for (const h of Ze(i.init))
          for (const p of q(h))
            Lae(p) ? (i.encodings || (i.encodings = [])).push(p) : i.type === "interval" ? (U(ooe), i.encodings = c.encodings) : (i.fields || (i.fields = [])).push(p);
      else
        i.encodings = c.encodings, i.fields = c.fields;
    }
    for (const c of (a = i.fields) !== null && a !== void 0 ? a : []) {
      const h = { type: "E", field: c };
      h.signals = Object.assign({}, u(h, "data")), s.items.push(h), s.hasField[c] = h;
    }
    for (const c of (o = i.encodings) !== null && o !== void 0 ? o : []) {
      const h = e.fieldDef(c);
      if (h) {
        let p = h.field;
        if (h.aggregate) {
          U(Kae(c, h.aggregate));
          continue;
        } else if (!p) {
          U(v2(c));
          continue;
        }
        if (h.timeUnit) {
          p = e.vgField(c);
          const g = {
            timeUnit: h.timeUnit,
            as: p,
            field: h.field
          };
          d[fe(g)] = g;
        }
        if (!l[p]) {
          let g = "E";
          if (t.type === "interval") {
            const b = e.getScaleComponent(c).get("type");
            Wi(b) && (g = "R");
          } else h.bin && (g = "R-RE");
          const m = { field: p, channel: c, type: g };
          m.signals = Object.assign(Object.assign({}, u(m, "data")), u(m, "visual")), s.items.push(l[p] = m), s.hasField[p] = s.hasChannel[c] = l[p];
        }
      } else
        U(v2(c));
    }
    if (i.init) {
      const c = (h) => s.items.map((p) => h[p.channel] !== void 0 ? h[p.channel] : h[p.field]);
      if (i.type === "interval")
        t.init = c(i.init);
      else {
        const h = Ze(i.init);
        t.init = h.map(c);
      }
    }
    De(d) || (s.timeUnit = new Pn(null, d));
  },
  signals: (e, t, i) => {
    const n = t.name + Cu;
    return i.filter((o) => o.name === n).length > 0 ? i : i.concat({
      name: n,
      value: t.project.items.map((o) => {
        const r = Cde(o, ["signals", "hasLegend"]);
        return r.field = Ia(r.field), r;
      })
    });
  }
}, Xz = {
  has: (e) => e.type === "single" && e.resolve === "global" && e.bind && e.bind !== "scales" && !dw(e.bind),
  parse: (e, t, i, n) => {
    n.on || delete t.events, n.clear || delete t.clear;
  },
  topLevelSignals: (e, t, i) => {
    const n = t.name, a = t.project, o = t.bind, r = t.init && t.init[0], s = Yz.has(t) ? "(item().isVoronoi ? datum.datum : datum)" : "datum";
    return a.items.forEach((l, d) => {
      var f, u;
      const c = Ne(`${n}_${l.field}`);
      i.filter((p) => p.name === c).length || i.unshift(Object.assign(Object.assign({ name: c }, r ? { init: hl(r[d]) } : { value: null }), { on: t.events ? [
        {
          events: t.events,
          update: `datum && item().mark.marktype !== 'group' ? ${s}[${he(l.field)}] : null`
        }
      ] : [], bind: (u = (f = o[l.field]) !== null && f !== void 0 ? f : o[l.channel]) !== null && u !== void 0 ? u : o }));
    }), i;
  },
  signals: (e, t, i) => {
    const n = t.name, a = t.project, o = i.filter((d) => d.name === n + Wn)[0], r = n + Cu, s = a.items.map((d) => Ne(`${n}_${d.field}`)), l = s.map((d) => `${d} !== null`).join(" && ");
    return s.length && (o.update = `${l} ? {fields: ${r}, values: [${s.join(", ")}]} : null`), delete o.value, delete o.on, i;
  }
}, vp = "_toggle", Jz = {
  has: (e) => e.type === "multi" && !!e.toggle,
  signals: (e, t, i) => i.concat({
    name: t.name + vp,
    value: !1,
    on: [{ events: t.events, update: t.toggle }]
  }),
  modifyExpr: (e, t) => {
    const i = t.name + Wn, n = t.name + vp;
    return `${n} ? null : ${i}, ` + (t.resolve === "global" ? `${n} ? null : true, ` : `${n} ? null : {unit: ${Sa(e)}}, `) + `${n} ? ${i} : null`;
  }
}, jde = {
  has: (e) => e.clear !== void 0 && e.clear !== !1,
  parse: (e, t, i) => {
    i.clear && (t.clear = re(i.clear) ? Wl(i.clear, "scope") : i.clear);
  },
  topLevelSignals: (e, t, i) => {
    if (Xz.has(t))
      for (const n of t.project.items) {
        const a = i.findIndex((o) => o.name === Ne(`${t.name}_${n.field}`));
        a !== -1 && i[a].on.push({ events: t.clear, update: "null" });
      }
    return i;
  },
  signals: (e, t, i) => {
    function n(a, o) {
      a !== -1 && i[a].on && i[a].on.push({ events: t.clear, update: o });
    }
    if (t.type === "interval")
      for (const a of t.project.items) {
        const o = i.findIndex((r) => r.name === a.signals.visual);
        if (n(o, "[0, 0]"), o === -1) {
          const r = i.findIndex((s) => s.name === a.signals.data);
          n(r, "null");
        }
      }
    else {
      let a = i.findIndex((o) => o.name === t.name + Wn);
      n(a, "null"), Jz.has(t) && (a = i.findIndex((o) => o.name === t.name + vp), n(a, "false"));
    }
    return i;
  }
}, Co = {
  has: (e) => e.type === "interval" && e.resolve === "global" && e.bind && e.bind === "scales",
  parse: (e, t) => {
    const i = t.scales = [];
    for (const n of t.project.items) {
      const a = n.channel;
      if (!Vo(a))
        continue;
      const o = e.getScaleComponent(a), r = o ? o.get("type") : void 0;
      if (!o || !Wi(r)) {
        U(toe);
        continue;
      }
      const s = { selection: t.name, field: n.field };
      o.set("selectionExtent", s, !0), i.push(n);
    }
  },
  topLevelSignals: (e, t, i) => {
    const n = t.scales.filter((r) => i.filter((s) => s.name === r.signals.data).length === 0);
    if (!e.parent || Dv(e) || n.length === 0)
      return i;
    const a = i.filter((r) => r.name === t.name)[0];
    let o = a.update;
    if (o.indexOf(oP) >= 0)
      a.update = `{${n.map((r) => `${he(r.field)}: ${r.signals.data}`).join(", ")}}`;
    else {
      for (const r of n) {
        const s = `${he(r.field)}: ${r.signals.data}`;
        o.indexOf(s) < 0 && (o = `${o.substring(0, o.length - 1)}, ${s}}`);
      }
      a.update = o;
    }
    return i.concat(n.map((r) => ({ name: r.signals.data })));
  },
  signals: (e, t, i) => {
    if (e.parent && !Dv(e))
      for (const n of t.scales) {
        const a = i.filter((o) => o.name === n.signals.data)[0];
        a.push = "outer", delete a.value, delete a.update;
      }
    return i;
  }
};
function Ev(e, t) {
  return `domain(${he(e.scaleName(t))})`;
}
function Dv(e) {
  var t;
  return e.parent && Jl(e.parent) && ((t = !e.parent.parent) !== null && t !== void 0 ? t : Dv(e.parent.parent));
}
const Zz = {
  has: (e) => {
    const t = e.resolve === "global" && e.bind && dw(e.bind), i = e.project.items.length === 1 && e.project.items[0].field !== cl;
    return t && !i && U(ioe), t && i;
  },
  parse: (e, t, i, n) => {
    var a;
    if (n.on || delete t.events, n.clear || delete t.clear, n.on || n.clear) {
      const s = 'event.item && indexof(event.item.mark.role, "legend") < 0';
      for (const l of t.events)
        l.filter = Ze((a = l.filter) !== null && a !== void 0 ? a : []), l.filter.indexOf(s) < 0 && l.filter.push(s);
    }
    const o = Ob(t.bind) ? t.bind.legend : "click", r = re(o) ? Wl(o, "view") : Ze(o);
    t.bind = { legend: { merge: r } };
  },
  topLevelSignals: (e, t, i) => {
    const n = t.name, a = Ob(t.bind) && t.bind.legend, o = (r) => (s) => {
      const l = se(s);
      return l.markname = r, l;
    };
    for (const r of t.project.items) {
      if (!r.hasLegend)
        continue;
      const s = `${Ne(r.field)}_legend`, l = `${n}_${s}`;
      if (i.filter((f) => f.name === l).length === 0) {
        const f = a.merge.map(o(`${s}_symbols`)).concat(a.merge.map(o(`${s}_labels`))).concat(a.merge.map(o(`${s}_entries`)));
        i.unshift(Object.assign(Object.assign({ name: l }, t.init ? {} : { value: null }), { on: [
          // Legend entries do not store values, so we need to walk the scenegraph to the symbol datum.
          { events: f, update: "datum.value || item().items[0].items[0].datum.value", force: !0 },
          { events: a.merge, update: `!event.item || !datum ? null : ${l}`, force: !0 }
        ] }));
      }
    }
    return i;
  },
  signals: (e, t, i) => {
    const n = t.name, a = t.project, o = i.find((c) => c.name === n + Wn), r = n + Cu, s = a.items.filter((c) => c.hasLegend).map((c) => Ne(`${n}_${Ne(c.field)}_legend`)), d = `${s.map((c) => `${c} !== null`).join(" && ")} ? {fields: ${r}, values: [${s.join(", ")}]} : null`;
    t.events && s.length > 0 ? o.on.push({
      events: s.map((c) => ({ signal: c })),
      update: d
    }) : s.length > 0 && (o.update = d, delete o.value, delete o.on);
    const f = i.find((c) => c.name === n + vp), u = Ob(t.bind) && t.bind.legend;
    return f && (t.events ? f.on.push(Object.assign(Object.assign({}, f.on[0]), { events: u })) : f.on[0].events = u), i;
  }
};
function zde(e, t, i) {
  var n;
  const a = (n = e.fieldDef(t)) === null || n === void 0 ? void 0 : n.field;
  ps(e, (o) => {
    var r, s;
    const l = (r = o.project.hasField[a]) !== null && r !== void 0 ? r : o.project.hasChannel[t];
    if (l && Zz.has(o)) {
      const d = (s = i.get("selections")) !== null && s !== void 0 ? s : [];
      d.push(o.name), i.set("selections", d, !1), l.hasLegend = !0;
    }
  });
}
const Kz = "_translate_anchor", Qz = "_translate_delta", Pde = {
  has: (e) => e.type === "interval" && e.translate,
  signals: (e, t, i) => {
    const n = t.name, a = Co.has(t), o = n + Kz, { x: r, y: s } = t.project.hasChannel;
    let l = Wl(t.translate, "scope");
    return a || (l = l.map((d) => (d.between[0].markname = n + Kd, d))), i.push({
      name: o,
      value: {},
      on: [
        {
          events: l.map((d) => d.between[0]),
          update: "{x: x(unit), y: y(unit)" + (r !== void 0 ? ", extent_x: " + (a ? Ev(e, Me) : `slice(${r.signals.visual})`) : "") + (s !== void 0 ? ", extent_y: " + (a ? Ev(e, lt) : `slice(${s.signals.visual})`) : "") + "}"
        }
      ]
    }, {
      name: n + Qz,
      value: {},
      on: [
        {
          events: l,
          update: `{x: ${o}.x - x(unit), y: ${o}.y - y(unit)}`
        }
      ]
    }), r !== void 0 && Q2(e, t, r, "width", i), s !== void 0 && Q2(e, t, s, "height", i), i;
  }
};
function Q2(e, t, i, n, a) {
  var o;
  const r = t.name, s = r + Kz, l = r + Qz, d = i.channel, f = Co.has(t), u = a.filter((w) => w.name === i.signals[f ? "data" : "visual"])[0], c = e.getSizeSignalRef(n).signal, h = e.getScaleComponent(d), p = h.get("type"), g = f && d === Me ? "-" : "", m = `${s}.extent_${d}`, b = `${g}${l}.${d} / ` + (f ? `${c}` : `span(${m})`), v = `${f ? p === "log" ? "panLog" : p === "pow" ? "panPow" : "panLinear" : "panLinear"}(${m}, ${b}` + (f && p === "pow" ? `, ${(o = h.get("exponent")) !== null && o !== void 0 ? o : 1}` : "") + ")";
  u.on.push({
    events: { signal: l },
    update: f ? v : `clampRange(${v}, 0, ${c})`
  });
}
const eP = "_zoom_anchor", tP = "_zoom_delta", Nde = {
  has: (e) => e.type === "interval" && e.zoom,
  signals: (e, t, i) => {
    const n = t.name, a = Co.has(t), o = n + tP, { x: r, y: s } = t.project.hasChannel, l = he(e.scaleName(Me)), d = he(e.scaleName(lt));
    let f = Wl(t.zoom, "scope");
    return a || (f = f.map((u) => (u.markname = n + Kd, u))), i.push({
      name: n + eP,
      on: [
        {
          events: f,
          update: a ? "{" + [l ? `x: invert(${l}, x(unit))` : "", d ? `y: invert(${d}, y(unit))` : ""].filter((u) => !!u).join(", ") + "}" : "{x: x(unit), y: y(unit)}"
        }
      ]
    }, {
      name: o,
      on: [
        {
          events: f,
          force: !0,
          update: "pow(1.001, event.deltaY * pow(16, event.deltaMode))"
        }
      ]
    }), r !== void 0 && eO(e, t, r, "width", i), s !== void 0 && eO(e, t, s, "height", i), i;
  }
};
function eO(e, t, i, n, a) {
  var o;
  const r = t.name, s = i.channel, l = Co.has(t), d = a.filter((y) => y.name === i.signals[l ? "data" : "visual"])[0], f = e.getSizeSignalRef(n).signal, u = e.getScaleComponent(s), c = u.get("type"), h = l ? Ev(e, s) : d.name, p = r + tP, g = `${r}${eP}.${s}`, b = `${l ? c === "log" ? "zoomLog" : c === "pow" ? "zoomPow" : "zoomLinear" : "zoomLinear"}(${h}, ${g}, ${p}` + (l && c === "pow" ? `, ${(o = u.get("exponent")) !== null && o !== void 0 ? o : 1}` : "") + ")";
  d.on.push({
    events: { signal: p },
    update: l ? b : `clampRange(${b}, 0, ${f})`
  });
}
const qde = [Ide, Jz, Co, Zz, Pde, Nde, Xz, Yz, jde];
function tm(e, t) {
  for (const i of qde)
    i.has(e) && t(i);
}
var Lde = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function hl(e, t = !0, i = rae) {
  if (X(e)) {
    const n = e.map((a) => hl(a, t, i));
    return t ? `[${n.join(", ")}]` : n;
  } else if (hs(e))
    return i(t ? zf(e) : nre(e));
  return t ? i(JSON.stringify(e)) : e;
}
function Bde(e, t) {
  return ps(e, (i, n) => {
    const a = i.name;
    let o = n.modifyExpr(e, i);
    t.push(...n.signals(e, i)), tm(i, (r) => {
      r.signals && (t = r.signals(e, i, t)), r.modifyExpr && (o = r.modifyExpr(e, i, o));
    }), t.push({
      name: a + Kde,
      on: [
        {
          events: { signal: i.name + Wn },
          update: `modify(${he(i.name + Xr)}, ${o})`
        }
      ]
    });
  }), bw(t);
}
function Ude(e, t) {
  if (e.component.selection && q(e.component.selection).length) {
    const i = he(e.getName("cell"));
    t.unshift({
      name: "facet",
      value: {},
      on: [
        {
          events: Wl("mousemove", "scope"),
          update: `isTuple(facet) ? facet : group(${i}).datum`
        }
      ]
    });
  }
  return bw(t);
}
function Mde(e, t) {
  let i = !1;
  return ps(e, (n, a) => {
    const o = n.name, r = he(o + Xr);
    if (t.filter((l) => l.name === o).length === 0) {
      const l = n.resolve === "global" ? "union" : n.resolve, d = n.type === "multi" ? ", true)" : ")";
      t.push({
        name: n.name,
        update: `${oP}(${r}, ${he(l)}${d}`
      });
    }
    i = !0, a.topLevelSignals && (t = a.topLevelSignals(e, n, t)), tm(n, (l) => {
      l.topLevelSignals && (t = l.topLevelSignals(e, n, t));
    });
  }), i && t.filter((a) => a.name === "unit").length === 0 && t.unshift({
    name: "unit",
    value: {},
    on: [{ events: "mousemove", update: "isTuple(group()) ? group() : unit" }]
  }), bw(t);
}
function Vde(e, t) {
  const i = [...t];
  return ps(e, (n) => {
    const a = { name: n.name + Xr };
    if (n.init) {
      const r = n.project.items.map((l) => Lde(l, ["signals"])), s = n.init.map((l) => hl(l, !1));
      a.values = n.type === "interval" ? [{ unit: Sa(e, { escape: !1 }), fields: r, values: s }] : s.map((l) => ({ unit: Sa(e, { escape: !1 }), fields: r, values: l }));
    }
    i.filter((r) => r.name === n.name + Xr).length || i.push(a);
  }), i;
}
function iP(e, t) {
  return ps(e, (i, n) => {
    t = n.marks ? n.marks(e, i, t) : t, tm(i, (a) => {
      a.marks && (t = a.marks(e, i, t));
    });
  }), t;
}
function Wde(e, t) {
  for (const i of e.children)
    Ye(i) && (t = iP(i, t));
  return t;
}
function Gde(e, t) {
  const i = t.selection, n = e.getSelectionComponent(i, Ne(i));
  return { signal: gP(n, t) };
}
function bw(e) {
  return e.map((t) => (t.on && !t.on.length && delete t.on, t));
}
var Hde = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
const Kd = "_brush", Sv = "_scale_trigger", Yde = {
  signals: (e, t) => {
    const i = t.name, n = i + Cu, a = Co.has(t), o = [], r = [], s = [];
    if (t.translate && !a) {
      const f = `!event.item || event.item.mark.name !== ${he(i + Kd)}`;
      nP(t, (u, c) => {
        var h;
        const p = Ze((h = c.between[0].filter) !== null && h !== void 0 ? h : c.between[0].filter = []);
        return p.indexOf(f) < 0 && p.push(f), u;
      });
    }
    t.project.items.forEach((f, u) => {
      const c = f.channel;
      if (c !== Me && c !== lt) {
        U("Interval selections only support x and y encoding channels.");
        return;
      }
      const h = t.init ? t.init[u] : null, p = Xde(e, t, f, h), g = f.signals.data, m = f.signals.visual, b = he(e.scaleName(c)), y = e.getScaleComponent(c).get("type"), v = Wi(y) ? "+" : "";
      o.push(...p), r.push(g), s.push({
        scaleName: e.scaleName(c),
        expr: `(!isArray(${g}) || (${v}invert(${b}, ${m})[0] === ${v}${g}[0] && ${v}invert(${b}, ${m})[1] === ${v}${g}[1]))`
      });
    }), a || o.push({
      name: i + Sv,
      value: {},
      on: [
        {
          events: s.map((f) => ({ scale: f.scaleName })),
          update: s.map((f) => f.expr).join(" && ") + ` ? ${i + Sv} : {}`
        }
      ]
    });
    const l = t.init, d = `unit: ${Sa(e)}, fields: ${n}, values`;
    return o.concat(Object.assign(Object.assign({ name: i + Wn }, l ? { init: `{${d}: ${hl(l)}}` } : {}), { on: [
      {
        events: [{ signal: r.join(" || ") }],
        update: r.join(" && ") + ` ? {${d}: [${r}]} : null`
      }
    ] }));
  },
  modifyExpr: (e, t) => t.name + Wn + ", " + (t.resolve === "global" ? "true" : `{unit: ${Sa(e)}}`),
  marks: (e, t, i) => {
    const n = t.name, { x: a, y: o } = t.project.hasChannel, r = a && a.signals.visual, s = o && o.signals.visual, l = `data(${he(t.name + Xr)})`;
    if (Co.has(t))
      return i;
    const d = {
      x: a !== void 0 ? { signal: `${r}[0]` } : { value: 0 },
      y: o !== void 0 ? { signal: `${s}[0]` } : { value: 0 },
      x2: a !== void 0 ? { signal: `${r}[1]` } : { field: { group: "width" } },
      y2: o !== void 0 ? { signal: `${s}[1]` } : { field: { group: "height" } }
    };
    if (t.resolve === "global")
      for (const m of q(d))
        d[m] = [
          Object.assign({ test: `${l}.length && ${l}[0].unit === ${Sa(e)}` }, d[m]),
          { value: 0 }
        ];
    const f = t.mark, { fill: u, fillOpacity: c, cursor: h } = f, p = Hde(f, ["fill", "fillOpacity", "cursor"]), g = q(p).reduce((m, b) => (m[b] = [
      {
        test: [a !== void 0 && `${r}[0] !== ${r}[1]`, o !== void 0 && `${s}[0] !== ${s}[1]`].filter((y) => y).join(" && "),
        value: p[b]
      },
      { value: null }
    ], m), {});
    return [
      {
        name: n + Kd + "_bg",
        type: "rect",
        clip: !0,
        encode: {
          enter: {
            fill: { value: u },
            fillOpacity: { value: c }
          },
          update: d
        }
      },
      ...i,
      {
        name: n + Kd,
        type: "rect",
        clip: !0,
        encode: {
          enter: Object.assign(Object.assign({}, h ? { cursor: { value: h } } : {}), { fill: { value: "transparent" } }),
          update: Object.assign(Object.assign({}, d), g)
        }
      }
    ];
  }
};
function Xde(e, t, i, n) {
  const a = i.channel, o = i.signals.visual, r = i.signals.data, s = Co.has(t), l = he(e.scaleName(a)), d = e.getScaleComponent(a), f = d ? d.get("type") : void 0, u = (g) => `scale(${l}, ${g})`, c = e.getSizeSignalRef(a === Me ? "width" : "height").signal, h = `${a}(unit)`, p = nP(t, (g, m) => [
    ...g,
    { events: m.between[0], update: `[${h}, ${h}]` },
    { events: m, update: `[${o}[0], clamp(${h}, 0, ${c})]` }
    // Brush End
  ]);
  return p.push({
    events: { signal: t.name + Sv },
    update: Wi(f) ? `[${u(`${r}[0]`)}, ${u(`${r}[1]`)}]` : "[0, 0]"
  }), s ? [{ name: r, on: [] }] : [
    Object.assign(Object.assign({ name: o }, n ? { init: hl(n, !0, u) } : { value: [] }), { on: p }),
    Object.assign(Object.assign({ name: r }, n ? { init: hl(n) } : {}), { on: [
      {
        events: { signal: o },
        update: `${o}[0] === ${o}[1] ? null : invert(${l}, ${o})`
      }
    ] })
  ];
}
function nP(e, t) {
  return e.events.reduce((i, n) => n.between ? t(i, n) : (U(`${n} is not an ordered event stream for interval selections.`), i), []);
}
function aP(e, t) {
  const i = t.name, n = i + Cu, a = t.project, o = "(item().isVoronoi ? datum.datum : datum)", r = a.items.map((d) => {
    const f = e.fieldDef(d.channel);
    return f && f.bin ? `[${o}[${he(e.vgField(d.channel, {}))}], ${o}[${he(e.vgField(d.channel, { binSuffix: "end" }))}]]` : `${o}[${he(d.field)}]`;
  }).join(", "), s = `unit: ${Sa(e)}, fields: ${n}, values`, l = t.events;
  return [
    {
      name: i + Wn,
      on: l ? [
        {
          events: l,
          update: `datum && item().mark.marktype !== 'group' ? {${s}: [${r}]} : null`,
          force: !0
        }
      ] : []
    }
  ];
}
const Jde = {
  signals: aP,
  modifyExpr: (e, t) => t.name + Wn + ", " + (t.resolve === "global" ? "null" : `{unit: ${Sa(e)}}`)
}, Zde = {
  signals: aP,
  modifyExpr: (e, t) => t.name + Wn + ", " + (t.resolve === "global" ? "true" : `{unit: ${Sa(e)}}`)
}, Xr = "_store", Wn = "_tuple", Kde = "_modify", oP = "vlSelectionResolve", Qde = { single: Zde, multi: Jde, interval: Yde };
function ps(e, t) {
  const i = e.component.selection;
  if (i) {
    for (const n of Aa(i))
      if (t(n, Qde[n.type]) === !0)
        break;
  }
}
function efe(e) {
  let t = e.parent;
  for (; t && !fn(t); )
    t = t.parent;
  return t;
}
function Sa(e, { escape: t } = { escape: !0 }) {
  let i = t ? he(e.name) : e.name;
  const n = efe(e);
  if (n) {
    const { facet: a } = n;
    for (const o of Li)
      a[o] && (i += ` + '__facet_${o}_' + (facet[${he(n.vgField(o))}])`);
  }
  return i;
}
function yw(e) {
  let t = !1;
  return ps(e, (i) => {
    t = t || i.project.items.some((n) => n.field === cl);
  }), t;
}
const tfe = "RawCode", ife = "Literal", nfe = "Property", afe = "Identifier", ofe = "ArrayExpression", rfe = "BinaryExpression", sfe = "CallExpression", lfe = "ConditionalExpression", dfe = "LogicalExpression", ffe = "MemberExpression", ufe = "ObjectExpression", cfe = "UnaryExpression";
function wn(e) {
  this.type = e;
}
wn.prototype.visit = function(e) {
  let t, i, n;
  if (e(this)) return 1;
  for (t = hfe(this), i = 0, n = t.length; i < n; ++i)
    if (t[i].visit(e)) return 1;
};
function hfe(e) {
  switch (e.type) {
    case ofe:
      return e.elements;
    case rfe:
    case dfe:
      return [e.left, e.right];
    case sfe:
      return [e.callee].concat(e.arguments);
    case lfe:
      return [e.test, e.consequent, e.alternate];
    case ffe:
      return [e.object, e.property];
    case ufe:
      return e.properties;
    case nfe:
      return [e.key, e.value];
    case cfe:
      return [e.argument];
    case afe:
    case ife:
    case tfe:
    default:
      return [];
  }
}
var la, Y, I, qt, Ee, im = 1, Ru = 2, Jr = 3, Yo = 4, nm = 5, gs = 6, di = 7, Iu = 8, pfe = 9;
la = {};
la[im] = "Boolean";
la[Ru] = "<end>";
la[Jr] = "Identifier";
la[Yo] = "Keyword";
la[nm] = "Null";
la[gs] = "Numeric";
la[di] = "Punctuator";
la[Iu] = "String";
la[pfe] = "RegularExpression";
var gfe = "ArrayExpression", mfe = "BinaryExpression", bfe = "CallExpression", yfe = "ConditionalExpression", rP = "Identifier", vfe = "Literal", _fe = "LogicalExpression", xfe = "MemberExpression", wfe = "ObjectExpression", $fe = "Property", kfe = "UnaryExpression", gt = "Unexpected token %0", Afe = "Unexpected number", Ofe = "Unexpected string", Efe = "Unexpected identifier", Dfe = "Unexpected reserved word", Sfe = "Unexpected end of input", Fv = "Invalid regular expression", Fb = "Invalid regular expression: missing /", sP = "Octal literals are not allowed in strict mode.", Ffe = "Duplicate data property in object literal not allowed in strict mode", xt = "ILLEGAL", Lf = "Disabled.", Tfe = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0-\\u08B2\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0980\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005-\\u3007\\u3021-\\u3029\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA69D\\uA6A0-\\uA6EF\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uA9E0-\\uA9E4\\uA9E6-\\uA9EF\\uA9FA-\\uA9FE\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA7E-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]"), Cfe = new RegExp("[\\xAA\\xB5\\xBA\\xC0-\\xD6\\xD8-\\xF6\\xF8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0300-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u037F\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u0483-\\u0487\\u048A-\\u052F\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u0591-\\u05BD\\u05BF\\u05C1\\u05C2\\u05C4\\u05C5\\u05C7\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0610-\\u061A\\u0620-\\u0669\\u066E-\\u06D3\\u06D5-\\u06DC\\u06DF-\\u06E8\\u06EA-\\u06FC\\u06FF\\u0710-\\u074A\\u074D-\\u07B1\\u07C0-\\u07F5\\u07FA\\u0800-\\u082D\\u0840-\\u085B\\u08A0-\\u08B2\\u08E4-\\u0963\\u0966-\\u096F\\u0971-\\u0983\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BC-\\u09C4\\u09C7\\u09C8\\u09CB-\\u09CE\\u09D7\\u09DC\\u09DD\\u09DF-\\u09E3\\u09E6-\\u09F1\\u0A01-\\u0A03\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A3C\\u0A3E-\\u0A42\\u0A47\\u0A48\\u0A4B-\\u0A4D\\u0A51\\u0A59-\\u0A5C\\u0A5E\\u0A66-\\u0A75\\u0A81-\\u0A83\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABC-\\u0AC5\\u0AC7-\\u0AC9\\u0ACB-\\u0ACD\\u0AD0\\u0AE0-\\u0AE3\\u0AE6-\\u0AEF\\u0B01-\\u0B03\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3C-\\u0B44\\u0B47\\u0B48\\u0B4B-\\u0B4D\\u0B56\\u0B57\\u0B5C\\u0B5D\\u0B5F-\\u0B63\\u0B66-\\u0B6F\\u0B71\\u0B82\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BBE-\\u0BC2\\u0BC6-\\u0BC8\\u0BCA-\\u0BCD\\u0BD0\\u0BD7\\u0BE6-\\u0BEF\\u0C00-\\u0C03\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C39\\u0C3D-\\u0C44\\u0C46-\\u0C48\\u0C4A-\\u0C4D\\u0C55\\u0C56\\u0C58\\u0C59\\u0C60-\\u0C63\\u0C66-\\u0C6F\\u0C81-\\u0C83\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBC-\\u0CC4\\u0CC6-\\u0CC8\\u0CCA-\\u0CCD\\u0CD5\\u0CD6\\u0CDE\\u0CE0-\\u0CE3\\u0CE6-\\u0CEF\\u0CF1\\u0CF2\\u0D01-\\u0D03\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D-\\u0D44\\u0D46-\\u0D48\\u0D4A-\\u0D4E\\u0D57\\u0D60-\\u0D63\\u0D66-\\u0D6F\\u0D7A-\\u0D7F\\u0D82\\u0D83\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0DCA\\u0DCF-\\u0DD4\\u0DD6\\u0DD8-\\u0DDF\\u0DE6-\\u0DEF\\u0DF2\\u0DF3\\u0E01-\\u0E3A\\u0E40-\\u0E4E\\u0E50-\\u0E59\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB9\\u0EBB-\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EC8-\\u0ECD\\u0ED0-\\u0ED9\\u0EDC-\\u0EDF\\u0F00\\u0F18\\u0F19\\u0F20-\\u0F29\\u0F35\\u0F37\\u0F39\\u0F3E-\\u0F47\\u0F49-\\u0F6C\\u0F71-\\u0F84\\u0F86-\\u0F97\\u0F99-\\u0FBC\\u0FC6\\u1000-\\u1049\\u1050-\\u109D\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u135D-\\u135F\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u16EE-\\u16F8\\u1700-\\u170C\\u170E-\\u1714\\u1720-\\u1734\\u1740-\\u1753\\u1760-\\u176C\\u176E-\\u1770\\u1772\\u1773\\u1780-\\u17D3\\u17D7\\u17DC\\u17DD\\u17E0-\\u17E9\\u180B-\\u180D\\u1810-\\u1819\\u1820-\\u1877\\u1880-\\u18AA\\u18B0-\\u18F5\\u1900-\\u191E\\u1920-\\u192B\\u1930-\\u193B\\u1946-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19B0-\\u19C9\\u19D0-\\u19D9\\u1A00-\\u1A1B\\u1A20-\\u1A5E\\u1A60-\\u1A7C\\u1A7F-\\u1A89\\u1A90-\\u1A99\\u1AA7\\u1AB0-\\u1ABD\\u1B00-\\u1B4B\\u1B50-\\u1B59\\u1B6B-\\u1B73\\u1B80-\\u1BF3\\u1C00-\\u1C37\\u1C40-\\u1C49\\u1C4D-\\u1C7D\\u1CD0-\\u1CD2\\u1CD4-\\u1CF6\\u1CF8\\u1CF9\\u1D00-\\u1DF5\\u1DFC-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u200C\\u200D\\u203F\\u2040\\u2054\\u2071\\u207F\\u2090-\\u209C\\u20D0-\\u20DC\\u20E1\\u20E5-\\u20F0\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2160-\\u2188\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D7F-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2DE0-\\u2DFF\\u2E2F\\u3005-\\u3007\\u3021-\\u302F\\u3031-\\u3035\\u3038-\\u303C\\u3041-\\u3096\\u3099\\u309A\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA62B\\uA640-\\uA66F\\uA674-\\uA67D\\uA67F-\\uA69D\\uA69F-\\uA6F1\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA7AD\\uA7B0\\uA7B1\\uA7F7-\\uA827\\uA840-\\uA873\\uA880-\\uA8C4\\uA8D0-\\uA8D9\\uA8E0-\\uA8F7\\uA8FB\\uA900-\\uA92D\\uA930-\\uA953\\uA960-\\uA97C\\uA980-\\uA9C0\\uA9CF-\\uA9D9\\uA9E0-\\uA9FE\\uAA00-\\uAA36\\uAA40-\\uAA4D\\uAA50-\\uAA59\\uAA60-\\uAA76\\uAA7A-\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEF\\uAAF2-\\uAAF6\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uAB30-\\uAB5A\\uAB5C-\\uAB5F\\uAB64\\uAB65\\uABC0-\\uABEA\\uABEC\\uABED\\uABF0-\\uABF9\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE00-\\uFE0F\\uFE20-\\uFE2D\\uFE33\\uFE34\\uFE4D-\\uFE4F\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF10-\\uFF19\\uFF21-\\uFF3A\\uFF3F\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]");
function am(e, t) {
  if (!e)
    throw new Error("ASSERT: " + t);
}
function va(e) {
  return e >= 48 && e <= 57;
}
function vw(e) {
  return "0123456789abcdefABCDEF".indexOf(e) >= 0;
}
function Qd(e) {
  return "01234567".indexOf(e) >= 0;
}
function Rfe(e) {
  return e === 32 || e === 9 || e === 11 || e === 12 || e === 160 || e >= 5760 && [5760, 6158, 8192, 8193, 8194, 8195, 8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279].indexOf(e) >= 0;
}
function Bf(e) {
  return e === 10 || e === 13 || e === 8232 || e === 8233;
}
function ju(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e === 92 || // \ (backslash)
  e >= 128 && Tfe.test(String.fromCharCode(e));
}
function _p(e) {
  return e === 36 || e === 95 || // $ (dollar) and _ (underscore)
  e >= 65 && e <= 90 || // A..Z
  e >= 97 && e <= 122 || // a..z
  e >= 48 && e <= 57 || // 0..9
  e === 92 || // \ (backslash)
  e >= 128 && Cfe.test(String.fromCharCode(e));
}
const Ife = {
  if: 1,
  in: 1,
  do: 1,
  var: 1,
  for: 1,
  new: 1,
  try: 1,
  let: 1,
  this: 1,
  else: 1,
  case: 1,
  void: 1,
  with: 1,
  enum: 1,
  while: 1,
  break: 1,
  catch: 1,
  throw: 1,
  const: 1,
  yield: 1,
  class: 1,
  super: 1,
  return: 1,
  typeof: 1,
  delete: 1,
  switch: 1,
  export: 1,
  import: 1,
  public: 1,
  static: 1,
  default: 1,
  finally: 1,
  extends: 1,
  package: 1,
  private: 1,
  function: 1,
  continue: 1,
  debugger: 1,
  interface: 1,
  protected: 1,
  instanceof: 1,
  implements: 1
};
function lP() {
  for (; I < qt; ) {
    const e = Y.charCodeAt(I);
    if (Rfe(e) || Bf(e))
      ++I;
    else
      break;
  }
}
function Tv(e) {
  var t, i, n, a = 0;
  for (i = e === "u" ? 4 : 2, t = 0; t < i; ++t)
    I < qt && vw(Y[I]) ? (n = Y[I++], a = a * 16 + "0123456789abcdef".indexOf(n.toLowerCase())) : me({}, gt, xt);
  return String.fromCharCode(a);
}
function jfe() {
  var e, t, i, n;
  for (e = Y[I], t = 0, e === "}" && me({}, gt, xt); I < qt && (e = Y[I++], !!vw(e)); )
    t = t * 16 + "0123456789abcdef".indexOf(e.toLowerCase());
  return (t > 1114111 || e !== "}") && me({}, gt, xt), t <= 65535 ? String.fromCharCode(t) : (i = (t - 65536 >> 10) + 55296, n = (t - 65536 & 1023) + 56320, String.fromCharCode(i, n));
}
function dP() {
  var e, t;
  for (e = Y.charCodeAt(I++), t = String.fromCharCode(e), e === 92 && (Y.charCodeAt(I) !== 117 && me({}, gt, xt), ++I, e = Tv("u"), (!e || e === "\\" || !ju(e.charCodeAt(0))) && me({}, gt, xt), t = e); I < qt && (e = Y.charCodeAt(I), !!_p(e)); )
    ++I, t += String.fromCharCode(e), e === 92 && (t = t.substr(0, t.length - 1), Y.charCodeAt(I) !== 117 && me({}, gt, xt), ++I, e = Tv("u"), (!e || e === "\\" || !_p(e.charCodeAt(0))) && me({}, gt, xt), t += e);
  return t;
}
function zfe() {
  var e, t;
  for (e = I++; I < qt; ) {
    if (t = Y.charCodeAt(I), t === 92)
      return I = e, dP();
    if (_p(t))
      ++I;
    else
      break;
  }
  return Y.slice(e, I);
}
function Pfe() {
  var e, t, i;
  return e = I, t = Y.charCodeAt(I) === 92 ? dP() : zfe(), t.length === 1 ? i = Jr : Ife.hasOwnProperty(t) ? i = Yo : t === "null" ? i = nm : t === "true" || t === "false" ? i = im : i = Jr, {
    type: i,
    value: t,
    start: e,
    end: I
  };
}
function Tb() {
  var e = I, t = Y.charCodeAt(I), i, n = Y[I], a, o, r;
  switch (t) {
    case 46:
    case 40:
    case 41:
    case 59:
    case 44:
    case 123:
    case 125:
    case 91:
    case 93:
    case 58:
    case 63:
    case 126:
      return ++I, {
        type: di,
        value: String.fromCharCode(t),
        start: e,
        end: I
      };
    default:
      if (i = Y.charCodeAt(I + 1), i === 61)
        switch (t) {
          case 43:
          case 45:
          case 47:
          case 60:
          case 62:
          case 94:
          case 124:
          case 37:
          case 38:
          case 42:
            return I += 2, {
              type: di,
              value: String.fromCharCode(t) + String.fromCharCode(i),
              start: e,
              end: I
            };
          case 33:
          case 61:
            return I += 2, Y.charCodeAt(I) === 61 && ++I, {
              type: di,
              value: Y.slice(e, I),
              start: e,
              end: I
            };
        }
  }
  if (r = Y.substr(I, 4), r === ">>>=")
    return I += 4, {
      type: di,
      value: r,
      start: e,
      end: I
    };
  if (o = r.substr(0, 3), o === ">>>" || o === "<<=" || o === ">>=")
    return I += 3, {
      type: di,
      value: o,
      start: e,
      end: I
    };
  if (a = o.substr(0, 2), n === a[1] && "+-<>&|".indexOf(n) >= 0 || a === "=>")
    return I += 2, {
      type: di,
      value: a,
      start: e,
      end: I
    };
  if (a === "//" && me({}, gt, xt), "<>=!+-*%&|^/".indexOf(n) >= 0)
    return ++I, {
      type: di,
      value: n,
      start: e,
      end: I
    };
  me({}, gt, xt);
}
function Nfe(e) {
  let t = "";
  for (; I < qt && vw(Y[I]); )
    t += Y[I++];
  return t.length === 0 && me({}, gt, xt), ju(Y.charCodeAt(I)) && me({}, gt, xt), {
    type: gs,
    value: parseInt("0x" + t, 16),
    start: e,
    end: I
  };
}
function qfe(e) {
  let t = "0" + Y[I++];
  for (; I < qt && Qd(Y[I]); )
    t += Y[I++];
  return (ju(Y.charCodeAt(I)) || va(Y.charCodeAt(I))) && me({}, gt, xt), {
    type: gs,
    value: parseInt(t, 8),
    octal: !0,
    start: e,
    end: I
  };
}
function tO() {
  var e, t, i;
  if (i = Y[I], am(va(i.charCodeAt(0)) || i === ".", "Numeric literal must start with a decimal digit or a decimal point"), t = I, e = "", i !== ".") {
    if (e = Y[I++], i = Y[I], e === "0") {
      if (i === "x" || i === "X")
        return ++I, Nfe(t);
      if (Qd(i))
        return qfe(t);
      i && va(i.charCodeAt(0)) && me({}, gt, xt);
    }
    for (; va(Y.charCodeAt(I)); )
      e += Y[I++];
    i = Y[I];
  }
  if (i === ".") {
    for (e += Y[I++]; va(Y.charCodeAt(I)); )
      e += Y[I++];
    i = Y[I];
  }
  if (i === "e" || i === "E")
    if (e += Y[I++], i = Y[I], (i === "+" || i === "-") && (e += Y[I++]), va(Y.charCodeAt(I)))
      for (; va(Y.charCodeAt(I)); )
        e += Y[I++];
    else
      me({}, gt, xt);
  return ju(Y.charCodeAt(I)) && me({}, gt, xt), {
    type: gs,
    value: parseFloat(e),
    start: t,
    end: I
  };
}
function Lfe() {
  var e = "", t, i, n, a, o = !1;
  for (t = Y[I], am(t === "'" || t === '"', "String literal must starts with a quote"), i = I, ++I; I < qt; )
    if (n = Y[I++], n === t) {
      t = "";
      break;
    } else if (n === "\\")
      if (n = Y[I++], !n || !Bf(n.charCodeAt(0)))
        switch (n) {
          case "u":
          case "x":
            Y[I] === "{" ? (++I, e += jfe()) : e += Tv(n);
            break;
          case "n":
            e += `
`;
            break;
          case "r":
            e += "\r";
            break;
          case "t":
            e += "	";
            break;
          case "b":
            e += "\b";
            break;
          case "f":
            e += "\f";
            break;
          case "v":
            e += "\v";
            break;
          default:
            Qd(n) ? (a = "01234567".indexOf(n), a !== 0 && (o = !0), I < qt && Qd(Y[I]) && (o = !0, a = a * 8 + "01234567".indexOf(Y[I++]), "0123".indexOf(n) >= 0 && I < qt && Qd(Y[I]) && (a = a * 8 + "01234567".indexOf(Y[I++]))), e += String.fromCharCode(a)) : e += n;
            break;
        }
      else
        n === "\r" && Y[I] === `
` && ++I;
    else {
      if (Bf(n.charCodeAt(0)))
        break;
      e += n;
    }
  return t !== "" && me({}, gt, xt), {
    type: Iu,
    value: e,
    octal: o,
    start: i,
    end: I
  };
}
function Bfe(e, t) {
  let i = e;
  t.indexOf("u") >= 0 && (i = i.replace(/\\u\{([0-9a-fA-F]+)\}/g, (n, a) => {
    if (parseInt(a, 16) <= 1114111)
      return "x";
    me({}, Fv);
  }).replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g, "x"));
  try {
    new RegExp(i);
  } catch {
    me({}, Fv);
  }
  try {
    return new RegExp(e, t);
  } catch {
    return null;
  }
}
function Ufe() {
  var e, t, i, n, a;
  for (e = Y[I], am(e === "/", "Regular expression literal must start with a slash"), t = Y[I++], i = !1, n = !1; I < qt; )
    if (e = Y[I++], t += e, e === "\\")
      e = Y[I++], Bf(e.charCodeAt(0)) && me({}, Fb), t += e;
    else if (Bf(e.charCodeAt(0)))
      me({}, Fb);
    else if (i)
      e === "]" && (i = !1);
    else if (e === "/") {
      n = !0;
      break;
    } else e === "[" && (i = !0);
  return n || me({}, Fb), a = t.substr(1, t.length - 2), {
    value: a,
    literal: t
  };
}
function Mfe() {
  var e, t, i;
  for (t = "", i = ""; I < qt && (e = Y[I], !!_p(e.charCodeAt(0))); )
    ++I, e === "\\" && I < qt ? me({}, gt, xt) : (i += e, t += e);
  return i.search(/[^gimuy]/g) >= 0 && me({}, Fv, i), {
    value: i,
    literal: t
  };
}
function Vfe() {
  var e, t, i, n;
  return Ee = null, lP(), e = I, t = Ufe(), i = Mfe(), n = Bfe(t.value, i.value), {
    literal: t.literal + i.literal,
    value: n,
    regex: {
      pattern: t.value,
      flags: i.value
    },
    start: e,
    end: I
  };
}
function Wfe(e) {
  return e.type === Jr || e.type === Yo || e.type === im || e.type === nm;
}
function fP() {
  if (lP(), I >= qt)
    return {
      type: Ru,
      start: I,
      end: I
    };
  const e = Y.charCodeAt(I);
  return ju(e) ? Pfe() : e === 40 || e === 41 || e === 59 ? Tb() : e === 39 || e === 34 ? Lfe() : e === 46 ? va(Y.charCodeAt(I + 1)) ? tO() : Tb() : va(e) ? tO() : Tb();
}
function hi() {
  const e = Ee;
  return I = e.end, Ee = fP(), I = e.end, e;
}
function uP() {
  const e = I;
  Ee = fP(), I = e;
}
function Gfe(e) {
  const t = new wn(gfe);
  return t.elements = e, t;
}
function iO(e, t, i) {
  const n = new wn(e === "||" || e === "&&" ? _fe : mfe);
  return n.operator = e, n.left = t, n.right = i, n;
}
function Hfe(e, t) {
  const i = new wn(bfe);
  return i.callee = e, i.arguments = t, i;
}
function Yfe(e, t, i) {
  const n = new wn(yfe);
  return n.test = e, n.consequent = t, n.alternate = i, n;
}
function _w(e) {
  const t = new wn(rP);
  return t.name = e, t;
}
function Rd(e) {
  const t = new wn(vfe);
  return t.value = e.value, t.raw = Y.slice(e.start, e.end), e.regex && (t.raw === "//" && (t.raw = "/(?:)/"), t.regex = e.regex), t;
}
function nO(e, t, i) {
  const n = new wn(xfe);
  return n.computed = e === "[", n.object = t, n.property = i, n.computed || (i.member = !0), n;
}
function Xfe(e) {
  const t = new wn(wfe);
  return t.properties = e, t;
}
function aO(e, t, i) {
  const n = new wn($fe);
  return n.key = t, n.value = i, n.kind = e, n;
}
function Jfe(e, t) {
  const i = new wn(kfe);
  return i.operator = e, i.argument = t, i.prefix = !0, i;
}
function me(e, t) {
  var i, n = Array.prototype.slice.call(arguments, 2), a = t.replace(/%(\d)/g, (o, r) => (am(r < n.length, "Message reference must be in range"), n[r]));
  throw i = new Error(a), i.index = I, i.description = a, i;
}
function om(e) {
  e.type === Ru && me(e, Sfe), e.type === gs && me(e, Afe), e.type === Iu && me(e, Ofe), e.type === Jr && me(e, Efe), e.type === Yo && me(e, Dfe), me(e, gt, e.value);
}
function Lt(e) {
  const t = hi();
  (t.type !== di || t.value !== e) && om(t);
}
function Pe(e) {
  return Ee.type === di && Ee.value === e;
}
function Cb(e) {
  return Ee.type === Yo && Ee.value === e;
}
function Zfe() {
  const e = [];
  for (I = Ee.start, Lt("["); !Pe("]"); )
    Pe(",") ? (hi(), e.push(null)) : (e.push(Zr()), Pe("]") || Lt(","));
  return hi(), Gfe(e);
}
function oO() {
  I = Ee.start;
  const e = hi();
  return e.type === Iu || e.type === gs ? (e.octal && me(e, sP), Rd(e)) : _w(e.value);
}
function Kfe() {
  var e, t, i, n;
  if (I = Ee.start, e = Ee, e.type === Jr)
    return i = oO(), Lt(":"), n = Zr(), aO("init", i, n);
  if (e.type === Ru || e.type === di)
    om(e);
  else
    return t = oO(), Lt(":"), n = Zr(), aO("init", t, n);
}
function Qfe() {
  var e = [], t, i, n, a = {}, o = String;
  for (I = Ee.start, Lt("{"); !Pe("}"); )
    t = Kfe(), t.key.type === rP ? i = t.key.name : i = o(t.key.value), n = "$" + i, Object.prototype.hasOwnProperty.call(a, n) ? me({}, Ffe) : a[n] = !0, e.push(t), Pe("}") || Lt(",");
  return Lt("}"), Xfe(e);
}
function eue() {
  Lt("(");
  const e = xw();
  return Lt(")"), e;
}
const tue = {
  if: 1
};
function iue() {
  var e, t, i;
  if (Pe("("))
    return eue();
  if (Pe("["))
    return Zfe();
  if (Pe("{"))
    return Qfe();
  if (e = Ee.type, I = Ee.start, e === Jr || tue[Ee.value])
    i = _w(hi().value);
  else if (e === Iu || e === gs)
    Ee.octal && me(Ee, sP), i = Rd(hi());
  else {
    if (e === Yo)
      throw new Error(Lf);
    e === im ? (t = hi(), t.value = t.value === "true", i = Rd(t)) : e === nm ? (t = hi(), t.value = null, i = Rd(t)) : Pe("/") || Pe("/=") ? (i = Rd(Vfe()), uP()) : om(hi());
  }
  return i;
}
function nue() {
  const e = [];
  if (Lt("("), !Pe(")"))
    for (; I < qt && (e.push(Zr()), !Pe(")")); )
      Lt(",");
  return Lt(")"), e;
}
function aue() {
  I = Ee.start;
  const e = hi();
  return Wfe(e) || om(e), _w(e.value);
}
function oue() {
  return Lt("."), aue();
}
function rue() {
  Lt("[");
  const e = xw();
  return Lt("]"), e;
}
function sue() {
  var e, t, i;
  for (e = iue(); ; )
    if (Pe("."))
      i = oue(), e = nO(".", e, i);
    else if (Pe("("))
      t = nue(), e = Hfe(e, t);
    else if (Pe("["))
      i = rue(), e = nO("[", e, i);
    else
      break;
  return e;
}
function rO() {
  const e = sue();
  if (Ee.type === di && (Pe("++") || Pe("--")))
    throw new Error(Lf);
  return e;
}
function ih() {
  var e, t;
  if (Ee.type !== di && Ee.type !== Yo)
    t = rO();
  else {
    if (Pe("++") || Pe("--"))
      throw new Error(Lf);
    if (Pe("+") || Pe("-") || Pe("~") || Pe("!"))
      e = hi(), t = ih(), t = Jfe(e.value, t);
    else {
      if (Cb("delete") || Cb("void") || Cb("typeof"))
        throw new Error(Lf);
      t = rO();
    }
  }
  return t;
}
function sO(e) {
  let t = 0;
  if (e.type !== di && e.type !== Yo)
    return 0;
  switch (e.value) {
    case "||":
      t = 1;
      break;
    case "&&":
      t = 2;
      break;
    case "|":
      t = 3;
      break;
    case "^":
      t = 4;
      break;
    case "&":
      t = 5;
      break;
    case "==":
    case "!=":
    case "===":
    case "!==":
      t = 6;
      break;
    case "<":
    case ">":
    case "<=":
    case ">=":
    case "instanceof":
    case "in":
      t = 7;
      break;
    case "<<":
    case ">>":
    case ">>>":
      t = 8;
      break;
    case "+":
    case "-":
      t = 9;
      break;
    case "*":
    case "/":
    case "%":
      t = 11;
      break;
  }
  return t;
}
function lue() {
  var e, t, i, n, a, o, r, s, l, d;
  if (e = Ee, l = ih(), n = Ee, a = sO(n), a === 0)
    return l;
  for (n.prec = a, hi(), t = [e, Ee], r = ih(), o = [l, n, r]; (a = sO(Ee)) > 0; ) {
    for (; o.length > 2 && a <= o[o.length - 2].prec; )
      r = o.pop(), s = o.pop().value, l = o.pop(), t.pop(), i = iO(s, l, r), o.push(i);
    n = hi(), n.prec = a, o.push(n), t.push(Ee), i = ih(), o.push(i);
  }
  for (d = o.length - 1, i = o[d], t.pop(); d > 1; )
    t.pop(), i = iO(o[d - 1].value, o[d - 2], i), d -= 2;
  return i;
}
function Zr() {
  var e, t, i;
  return e = lue(), Pe("?") && (hi(), t = Zr(), Lt(":"), i = Zr(), e = Yfe(e, t, i)), e;
}
function xw() {
  const e = Zr();
  if (Pe(","))
    throw new Error(Lf);
  return e;
}
function due(e) {
  Y = e, I = 0, qt = Y.length, Ee = null, uP();
  const t = xw();
  if (Ee.type !== Ru)
    throw new Error("Unexpect token after expression.");
  return t;
}
function Cv(e) {
  const t = [];
  return e.type === "Identifier" ? [e.name] : e.type === "Literal" ? [e.value] : (e.type === "MemberExpression" && (t.push(...Cv(e.object)), t.push(...Cv(e.property))), t);
}
function cP(e) {
  return e.object.type === "MemberExpression" ? cP(e.object) : e.object.name === "datum";
}
function hP(e) {
  const t = due(e), i = /* @__PURE__ */ new Set();
  return t.visit((n) => {
    n.type === "MemberExpression" && cP(n) && i.add(Cv(n).slice(1).join("."));
  }), i;
}
class Hl extends Fe {
  constructor(t, i, n) {
    super(t), this.model = i, this.filter = n, this.expr = xp(this.model, this.filter, this), this._dependentFields = hP(this.expr);
  }
  clone() {
    return new Hl(null, this.model, se(this.filter));
  }
  dependentFields() {
    return this._dependentFields;
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  assemble() {
    return {
      type: "filter",
      expr: this.expr
    };
  }
  hash() {
    return `Filter ${this.expr}`;
  }
}
var fue = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function uue(e, t) {
  var i;
  const n = {}, a = e.config.selection;
  for (const o of q(t ?? {})) {
    const r = se(t[o]), s = a[r.type], l = fue(s, ["fields", "encodings"]);
    for (const u in l)
      u === "encodings" && r.fields || u === "fields" && r.encodings || (u === "mark" && (r[u] = Object.assign(Object.assign({}, l[u]), r[u])), (r[u] === void 0 || r[u] === !0) && (r[u] = (i = l[u]) !== null && i !== void 0 ? i : r[u]));
    const d = Ne(o), f = n[d] = Object.assign(Object.assign({}, r), { name: d, events: re(r.on) ? Wl(r.on, "scope") : se(r.on) });
    tm(f, (u) => {
      u.has(f) && u.parse && u.parse(e, f, r, t[o]);
    });
  }
  return n;
}
function pP(e, t, i, n = "datum") {
  const a = [];
  function o(s) {
    const l = Ne(s), d = e.getSelectionComponent(l, s), f = he(l + Xr);
    if (d.project.timeUnit) {
      const u = i ?? e.component.data.raw, c = d.project.timeUnit.clone();
      u.parent ? c.insertAsParentOf(u) : u.parent = c;
    }
    return d.empty !== "none" && a.push(f), `vlSelectionTest(${f}, ${n}` + (d.resolve === "global" ? ")" : `, ${he(d.resolve)})`);
  }
  const r = Us(t, o);
  return (a.length ? "!(" + a.map((s) => `length(data(${s}))`).join(" || ") + ") || " : "") + `(${r})`;
}
function gP(e, t) {
  const i = t.encoding;
  let n = t.field;
  if (!i && !n)
    n = e.project.items[0].field, e.project.items.length > 1 && U(`A "field" or "encoding" must be specified when using a selection as a scale domain. Using "field": ${he(n)}.`);
  else if (i && !n) {
    const a = e.project.items.filter((o) => o.channel === i);
    !a.length || a.length > 1 ? (n = e.project.items[0].field, U((a.length ? "Multiple " : "No ") + `matching ${he(i)} encoding found for selection ${he(t.selection)}. Using "field": ${he(n)}.`)) : n = a[0].field;
  }
  return `${e.name}[${he(n)}]`;
}
function cue(e, t) {
  ps(e, (i) => {
    const n = i.name, a = e.getName(`lookup_${n}`);
    e.component.data.outputNodes[a] = i.materialized = new ii(new Hl(t, e, { selection: n }), a, Ce.Lookup, e.component.data.outputNodeRefCounts);
  });
}
function xp(e, t, i) {
  return Us(t, (n) => re(n) ? n : mre(n) ? pP(e, n.selection, i) : kj(n));
}
var cc = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function hue(e, t) {
  if (e)
    return X(e) && !io(e) ? e.map((i) => Q1(i, t)).join(", ") : e;
}
function Rb(e, t, i, n) {
  var a, o, r;
  e.encode = (a = e.encode) !== null && a !== void 0 ? a : {}, e.encode[t] = (o = e.encode[t]) !== null && o !== void 0 ? o : {}, e.encode[t].update = (r = e.encode[t].update) !== null && r !== void 0 ? r : {}, e.encode[t].update[i] = n;
}
function Id(e, t, i, n = { header: !1 }) {
  var a, o;
  const r = e.combine(), { disable: s, orient: l, scale: d, labelExpr: f, title: u, zindex: c } = r, h = cc(r, ["disable", "orient", "scale", "labelExpr", "title", "zindex"]);
  if (!s) {
    for (const p in h) {
      const g = $ae[p], m = h[p];
      if (g && g !== t && g !== "both")
        delete h[p];
      else if (xu(m)) {
        const { condition: b } = m, y = cc(m, ["condition"]), v = Ze(b), w = h2[p];
        if (w) {
          const { vgProp: x, part: $ } = w, _ = [
            ...v.map((k) => {
              const { test: A } = k, E = cc(k, ["test"]);
              return Object.assign({ test: xp(null, A) }, E);
            }),
            y
          ];
          Rb(h, $, x, _), delete h[p];
        } else if (w === null) {
          const x = {
            signal: v.map(($) => {
              const { test: _ } = $, k = cc($, ["test"]);
              return `${xp(null, _)} ? ${C2(k)} : `;
            }).join("") + C2(y)
          };
          h[p] = x;
        }
      } else if (ee(m)) {
        const b = h2[p];
        if (b) {
          const { vgProp: y, part: v } = b;
          Rb(h, v, y, m), delete h[p];
        }
      }
    }
    if (t === "grid") {
      if (!h.grid)
        return;
      if (h.encode) {
        const { grid: p } = h.encode;
        h.encode = Object.assign({}, p ? { grid: p } : {}), De(h.encode) && delete h.encode;
      }
      return Object.assign(Object.assign({
        scale: d,
        orient: l
      }, h), {
        domain: !1,
        labels: !1,
        aria: !1,
        // Always set min/maxExtent to 0 to ensure that `config.axis*.minExtent` and `config.axis*.maxExtent`
        // would not affect gridAxis
        maxExtent: 0,
        minExtent: 0,
        ticks: !1,
        zindex: Ke(c, 0)
        // put grid behind marks by default
      });
    } else {
      if (!n.header && e.mainExtracted)
        return;
      if (f !== void 0) {
        let g = f;
        !((o = (a = h.encode) === null || a === void 0 ? void 0 : a.labels) === null || o === void 0) && o.update && ee(h.encode.labels.update.text) && (g = Vr(f, "datum.label", h.encode.labels.update.text.signal)), Rb(h, "labels", "text", { signal: g });
      }
      if (h.labelAlign === null && delete h.labelAlign, h.encode) {
        for (const g of ZI)
          e.hasAxisPart(g) || delete h.encode[g];
        De(h.encode) && delete h.encode;
      }
      const p = hue(u, i);
      return Object.assign(Object.assign(Object.assign(Object.assign({
        scale: d,
        orient: l,
        grid: !1
      }, p ? { title: p } : {}), h), i.aria === !1 ? { aria: !1 } : {}), {
        zindex: Ke(c, 0)
        // put axis line above marks by default
      });
    }
  }
}
function mP(e) {
  const { axes: t } = e.component, i = [];
  for (const n of Vi)
    if (t[n]) {
      for (const a of t[n])
        if (!a.get("disable") && !a.get("gridScale")) {
          const o = n === "x" ? "height" : "width", r = e.getSizeSignalRef(o).signal;
          o !== r && i.push({
            name: o,
            update: r
          });
        }
    }
  return i;
}
function pue(e, t) {
  const { x: i = [], y: n = [] } = e;
  return [
    ...i.map((a) => Id(a, "grid", t)),
    ...n.map((a) => Id(a, "grid", t)),
    ...i.map((a) => Id(a, "main", t)),
    ...n.map((a) => Id(a, "main", t))
  ].filter((a) => a);
}
function lO(e, t, i, n) {
  return Object.assign.apply(null, [
    {},
    ...e.map((a) => {
      if (a === "axisOrient") {
        const o = i === "x" ? "bottom" : "left", r = t[i === "x" ? "axisBottom" : "axisLeft"] || {}, s = t[i === "x" ? "axisTop" : "axisRight"] || {}, l = /* @__PURE__ */ new Set([...q(r), ...q(s)]), d = {};
        for (const f of l.values())
          d[f] = {
            // orient is surely signal in this case
            signal: `${n.signal} === "${o}" ? ${Da(r[f])} : ${Da(s[f])}`
          };
        return d;
      }
      return t[a];
    })
  ]);
}
function gue(e, t, i, n) {
  const a = t === "band" ? ["axisDiscrete", "axisBand"] : t === "point" ? ["axisDiscrete", "axisPoint"] : Ere(t) ? ["axisQuantitative"] : t === "time" || t === "utc" ? ["axisTemporal"] : [], o = e === "x" ? "axisX" : "axisY", r = ee(i) ? "axisOrient" : "axis" + _u(i), s = [
    // technically Vega does have axisBand, but if we make another separation here,
    // it will further introduce complexity in the code
    ...a,
    ...a.map((d) => o + d.substr(4))
  ], l = ["axis", r, o];
  return {
    vlOnlyAxisConfig: lO(s, n, e, i),
    vgAxisConfig: lO(l, n, e, i),
    axisConfigStyle: mue([...l, ...s], n)
  };
}
function mue(e, t) {
  var i;
  const n = [{}];
  for (const a of e) {
    let o = (i = t[a]) === null || i === void 0 ? void 0 : i.style;
    if (o) {
      o = Ze(o);
      for (const r of o)
        n.push(t.style[r]);
    }
  }
  return Object.assign.apply(null, n);
}
function Rv(e, t, i, n = {}) {
  var a;
  const o = iz(e, i, t);
  if (o !== void 0)
    return {
      configFrom: "style",
      configValue: o
    };
  for (const r of ["vlOnlyAxisConfig", "vgAxisConfig", "axisConfigStyle"])
    if (((a = n[r]) === null || a === void 0 ? void 0 : a[e]) !== void 0)
      return { configFrom: r, configValue: n[r][e] };
  return {};
}
const dO = {
  scale: ({ model: e, channel: t }) => e.scaleName(t),
  format: ({ fieldOrDatumDef: e, config: t, axis: i }) => {
    const { format: n, formatType: a } = i;
    return Nj(e, e.type, n, a, t, !0);
  },
  formatType: ({ axis: e, fieldOrDatumDef: t, scaleType: i }) => {
    const { formatType: n } = e;
    return qj(n, t, i);
  },
  grid: ({ fieldOrDatumDef: e, axis: t, scaleType: i }) => {
    var n;
    return V(e) && Zt(e.bin) ? !1 : (n = t.grid) !== null && n !== void 0 ? n : bue(i, e);
  },
  gridScale: ({ model: e, channel: t }) => yue(e, t),
  labelAlign: ({ axis: e, labelAngle: t, orient: i, channel: n }) => e.labelAlign || yP(t, i, n),
  labelAngle: ({ labelAngle: e }) => e,
  labelBaseline: ({ axis: e, labelAngle: t, orient: i, channel: n }) => e.labelBaseline || bP(t, i, n),
  labelFlush: ({ axis: e, fieldOrDatumDef: t, channel: i }) => {
    var n;
    return (n = e.labelFlush) !== null && n !== void 0 ? n : _ue(t.type, i);
  },
  labelOverlap: ({ axis: e, fieldOrDatumDef: t, scaleType: i }) => {
    var n;
    return (n = e.labelOverlap) !== null && n !== void 0 ? n : xue(t.type, i, V(t) && !!t.timeUnit, V(t) ? t.sort : void 0);
  },
  // we already calculate orient in parse
  orient: ({ orient: e }) => e,
  tickCount: ({ channel: e, model: t, axis: i, fieldOrDatumDef: n, scaleType: a }) => {
    var o;
    const r = e === "x" ? "width" : e === "y" ? "height" : void 0, s = r ? t.getSizeSignalRef(r) : void 0;
    return (o = i.tickCount) !== null && o !== void 0 ? o : $ue({ fieldOrDatumDef: n, scaleType: a, size: s, values: i.values });
  },
  title: ({ axis: e, model: t, channel: i }) => {
    if (e.title !== void 0)
      return e.title;
    const n = vP(t, i);
    if (n !== void 0)
      return n;
    const a = t.typedFieldDef(i), o = i === "x" ? "x2" : "y2", r = t.fieldDef(o);
    return az(a ? [F2(a)] : [], V(r) ? [F2(r)] : []);
  },
  values: ({ axis: e, fieldOrDatumDef: t }) => kue(e, t),
  zindex: ({ axis: e, fieldOrDatumDef: t, mark: i }) => {
    var n;
    return (n = e.zindex) !== null && n !== void 0 ? n : Aue(i, t);
  }
};
function bue(e, t) {
  return !bi(e) && V(t) && !qe(t == null ? void 0 : t.bin);
}
function yue(e, t) {
  const i = t === "x" ? "y" : "x";
  if (e.getScaleComponent(i))
    return e.scaleName(i);
}
function vue(e, t, i, n, a) {
  const o = t == null ? void 0 : t.labelAngle;
  if (o !== void 0)
    return ee(o) ? o : jf(o);
  {
    const { configValue: r } = Rv("labelAngle", n, t == null ? void 0 : t.style, a);
    return r !== void 0 ? jf(r) : i === Me && Q([q1, N1], e.type) && !(V(e) && e.timeUnit) ? 270 : void 0;
  }
}
function Iv(e) {
  return `(((${e.signal} % 360) + 360) % 360)`;
}
function bP(e, t, i, n) {
  if (e !== void 0)
    if (i === "x") {
      if (ee(e)) {
        const a = Iv(e), o = ee(t) ? `(${t.signal} === "top")` : t === "top";
        return {
          signal: `(45 < ${a} && ${a} < 135) || (225 < ${a} && ${a} < 315) ? "middle" :(${a} <= 45 || 315 <= ${a}) === ${o} ? "bottom" : "top"`
        };
      }
      if (45 < e && e < 135 || 225 < e && e < 315)
        return "middle";
      if (ee(t)) {
        const a = e <= 45 || 315 <= e ? "===" : "!==";
        return { signal: `${t.signal} ${a} "top" ? "bottom" : "top"` };
      }
      return (e <= 45 || 315 <= e) == (t === "top") ? "bottom" : "top";
    } else {
      if (ee(e)) {
        const a = Iv(e), o = ee(t) ? `(${t.signal} === "left")` : t === "left";
        return {
          signal: `${a} <= 45 || 315 <= ${a} || (135 <= ${a} && ${a} <= 225) ? ${n ? '"middle"' : "null"} : (45 <= ${a} && ${a} <= 135) === ${o} ? "top" : "bottom"`
        };
      }
      if (e <= 45 || 315 <= e || 135 <= e && e <= 225)
        return n ? "middle" : null;
      if (ee(t)) {
        const a = 45 <= e && e <= 135 ? "===" : "!==";
        return { signal: `${t.signal} ${a} "left" ? "top" : "bottom"` };
      }
      return (45 <= e && e <= 135) == (t === "left") ? "top" : "bottom";
    }
}
function yP(e, t, i) {
  if (e === void 0)
    return;
  const n = i === "x", a = n ? 0 : 90, o = n ? "bottom" : "left";
  if (ee(e)) {
    const r = Iv(e), s = ee(t) ? `(${t.signal} === "${o}")` : t === o;
    return {
      signal: `(${a ? "(" + r + " + 90)" : r} % 180 === 0) ? ${n ? null : '"center"'} :(${a} < ${r} && ${r} < ${180 + a}) === ${s} ? "left" : "right"`
    };
  }
  if ((e + a) % 180 === 0)
    return n ? null : "center";
  if (ee(t)) {
    const r = a < e && e < 180 + a ? "===" : "!==";
    return {
      signal: `${`${t.signal} ${r} "${o}"`} ? "left" : "right"`
    };
  }
  return (a < e && e < 180 + a) == (t === o) ? "left" : "right";
}
function _ue(e, t) {
  if (t === "x" && Q(["quantitative", "temporal"], e))
    return !0;
}
function xue(e, t, i, n) {
  if (i && !Je(n) || e !== "nominal" && e !== "ordinal")
    return t === "log" || t === "symlog" ? "greedy" : !0;
}
function wue(e) {
  return e === "x" ? "bottom" : "left";
}
function $ue({ fieldOrDatumDef: e, scaleType: t, size: i, values: n }) {
  var a;
  if (!n && !bi(t) && t !== "log") {
    if (V(e)) {
      if (qe(e.bin))
        return { signal: `ceil(${i.signal}/10)` };
      if (e.timeUnit && Q(["month", "hours", "day", "quarter"], (a = ni(e.timeUnit)) === null || a === void 0 ? void 0 : a.unit))
        return;
    }
    return { signal: `ceil(${i.signal}/40)` };
  }
}
function vP(e, t) {
  const i = t === "x" ? "x2" : "y2", n = e.fieldDef(t), a = e.fieldDef(i), o = n ? n.title : void 0, r = a ? a.title : void 0;
  if (o && r)
    return oz(o, r);
  if (o)
    return o;
  if (r)
    return r;
  if (o !== void 0)
    return o;
  if (r !== void 0)
    return r;
}
function kue(e, t) {
  const i = e.values;
  if (X(i))
    return Kj(t, i);
  if (ee(i))
    return i;
}
function Aue(e, t) {
  return e === "rect" && Gj(t) ? 1 : 0;
}
class pl extends Fe {
  constructor(t, i) {
    super(t), this.transform = i, this._dependentFields = hP(this.transform.calculate);
  }
  clone() {
    return new pl(null, se(this.transform));
  }
  static parseAllForSortIndex(t, i) {
    return i.forEachFieldDef((n, a) => {
      if (Gg(n) && Mj(n.sort)) {
        const { field: o, timeUnit: r } = n, s = n.sort, l = s.map((d, f) => `${kj({ field: o, timeUnit: r, equal: d })} ? ${f} : `).join("") + s.length;
        t = new pl(t, {
          calculate: l,
          as: gl(n, a, { forAs: !0 })
        });
      }
    }), t;
  }
  producedFields() {
    return /* @__PURE__ */ new Set([this.transform.as]);
  }
  dependentFields() {
    return this._dependentFields;
  }
  assemble() {
    return {
      type: "formula",
      expr: this.transform.calculate,
      as: this.transform.as
    };
  }
  hash() {
    return `Calculate ${fe(this.transform)}`;
  }
}
function gl(e, t, i) {
  return M(e, Object.assign({ prefix: t, suffix: "sort_index" }, i ?? {}));
}
function rm(e, t) {
  return Q(["top", "bottom"], t) ? "column" : Q(["left", "right"], t) || e === "row" ? "row" : "column";
}
function ml(e, t, i, n) {
  const a = n === "row" ? i.headerRow : n === "column" ? i.headerColumn : i.headerFacet;
  return Ke((t || {})[e], a[e], i.header[e]);
}
function sm(e, t, i, n) {
  const a = {};
  for (const o of e) {
    const r = ml(o, t || {}, i, n);
    r !== void 0 && (a[o] = r);
  }
  return a;
}
const ww = ["row", "column"], $w = ["header", "footer"];
function Oue(e, t) {
  const i = e.component.layoutHeaders[t].title, n = e.config ? e.config : void 0, a = e.component.layoutHeaders[t].facetFieldDef ? e.component.layoutHeaders[t].facetFieldDef : void 0, { titleAnchor: o, titleAngle: r, titleOrient: s } = sm(["titleAnchor", "titleAngle", "titleOrient"], a.header, n, t), l = rm(t, s), d = jf(r);
  return {
    name: `${t}-title`,
    type: "group",
    role: `${l}-title`,
    title: Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ text: i }, t === "row" ? { orient: "left" } : {}), { style: "guide-title" }), xP(d, l)), _P(l, d, o)), wP(n, a, t, Vse, _z))
  };
}
function _P(e, t, i = "middle") {
  switch (i) {
    case "start":
      return { align: "left" };
    case "end":
      return { align: "right" };
  }
  const n = yP(t, e === "row" ? "left" : "top", e === "row" ? "y" : "x");
  return n ? { align: n } : {};
}
function xP(e, t) {
  const i = bP(e, t === "row" ? "left" : "top", t === "row" ? "y" : "x", !0);
  return i ? { baseline: i } : {};
}
function Eue(e, t) {
  const i = e.component.layoutHeaders[t], n = [];
  for (const a of $w)
    if (i[a])
      for (const o of i[a]) {
        const r = Sue(e, t, a, i, o);
        r != null && n.push(r);
      }
  return n;
}
function Due(e, t) {
  var i;
  const { sort: n } = e;
  return zn(n) ? {
    field: M(n, { expr: "datum" }),
    order: (i = n.order) !== null && i !== void 0 ? i : "ascending"
  } : X(n) ? {
    field: gl(e, t, { expr: "datum" }),
    order: "ascending"
  } : {
    field: M(e, { expr: "datum" }),
    order: n ?? "ascending"
  };
}
function jv(e, t, i) {
  const { format: n, formatType: a, labelAngle: o, labelAnchor: r, labelOrient: s, labelExpr: l } = sm(["format", "formatType", "labelAngle", "labelAnchor", "labelOrient", "labelExpr"], e.header, i, t), d = W1({ fieldOrDatumDef: e, format: n, formatType: a, expr: "parent", config: i }).signal, f = rm(t, s);
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ text: {
    signal: l ? Vr(Vr(l, "datum.label", d), "datum.value", M(e, { expr: "parent" })) : d
  } }, t === "row" ? { orient: "left" } : {}), { style: "guide-label", frame: "group" }), xP(o, f)), _P(f, o, r)), wP(i, e, t, Wse, xz));
}
function Sue(e, t, i, n, a) {
  if (a) {
    let o = null;
    const { facetFieldDef: r } = n, s = e.config ? e.config : void 0;
    if (r && a.labels) {
      const { labelOrient: u } = sm(["labelOrient"], r.header, s, t);
      (t === "row" && !Q(["top", "bottom"], u) || t === "column" && !Q(["left", "right"], u)) && (o = jv(r, t, s));
    }
    const l = fn(e) && !Su(e.facet), d = a.axes, f = (d == null ? void 0 : d.length) > 0;
    if (o || f) {
      const u = t === "row" ? "height" : "width";
      return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name: e.getName(`${t}_${i}`), type: "group", role: `${t}-${i}` }, n.facetFieldDef ? {
        from: { data: e.getName(t + "_domain") },
        sort: Due(r, t)
      } : {}), f && l ? {
        from: { data: e.getName(`facet_domain_${t}`) }
      } : {}), o ? { title: o } : {}), a.sizeSignal ? {
        encode: {
          update: {
            [u]: a.sizeSignal
          }
        }
      } : {}), f ? { axes: d } : {});
    }
  }
  return null;
}
const Fue = {
  column: {
    start: 0,
    end: 1
  },
  row: {
    start: 1,
    end: 0
  }
};
function Tue(e, t) {
  return Fue[t][e];
}
function Cue(e, t) {
  const i = {};
  for (const n of Li) {
    const a = e[n];
    if (a != null && a.facetFieldDef) {
      const { titleAnchor: o, titleOrient: r } = sm(["titleAnchor", "titleOrient"], a.facetFieldDef.header, t, n), s = rm(n, r), l = Tue(o, s);
      l !== void 0 && (i[s] = l);
    }
  }
  return De(i) ? void 0 : i;
}
function wP(e, t, i, n, a) {
  const o = {};
  for (const r of n) {
    if (!a[r])
      continue;
    const s = ml(r, t == null ? void 0 : t.header, e, i);
    s !== void 0 && (o[a[r]] = s);
  }
  return o;
}
function kw(e) {
  return [
    ...hc(e, "width"),
    ...hc(e, "height"),
    ...hc(e, "childWidth"),
    ...hc(e, "childHeight")
  ];
}
function hc(e, t) {
  const i = t === "width" ? "x" : "y", n = e.component.layoutSize.get(t);
  if (!n || n === "merged")
    return [];
  const a = e.getSizeSignalRef(t).signal;
  if (n === "step") {
    const o = e.getScaleComponent(i);
    if (o) {
      const r = o.get("type"), s = o.get("range");
      if (bi(r) && Wo(s)) {
        const l = e.scaleName(i);
        return fn(e.parent) && e.parent.component.resolve.scale[i] === "independent" ? [fO(l, s)] : [
          fO(l, s),
          {
            name: a,
            update: $P(l, o, `domain('${l}').length`)
          }
        ];
      }
    }
    throw new Error("layout size is step although width/height is not step.");
  } else if (n == "container") {
    const o = a.endsWith("width"), r = o ? "containerSize()[0]" : "containerSize()[1]", s = kv(e.config.view, o ? "width" : "height"), l = `isFinite(${r}) ? ${r} : ${s}`;
    return [{ name: a, init: l, on: [{ update: l, events: "window:resize" }] }];
  } else
    return [
      {
        name: a,
        value: n
      }
    ];
}
function fO(e, t) {
  return {
    name: e + "_step",
    value: t.step
  };
}
function $P(e, t, i) {
  const n = t.get("type"), a = t.get("padding"), o = Ke(t.get("paddingOuter"), a);
  let r = t.get("paddingInner");
  return r = n === "band" ? (
    // only band has real paddingInner
    r !== void 0 ? r : a
  ) : (
    // For point, as calculated in https://github.com/vega/vega-scale/blob/master/src/band.js#L128,
    // it's equivalent to have paddingInner = 1 since there is only n-1 steps between n points.
    1
  ), `bandspace(${i}, ${Da(r)}, ${Da(o)}) * ${e}_step`;
}
function kP(e) {
  return e === "childWidth" ? "width" : e === "childHeight" ? "height" : e;
}
function AP(e, t) {
  return q(e).reduce((i, n) => {
    const a = e[n];
    return Object.assign(Object.assign({}, i), Gl(t, a, n, (o) => Ue(o.value)));
  }, {});
}
function Rue(e, t) {
  if (Jl(t) || fn(t))
    return "shared";
  if (Tw(t))
    return Un(e) ? "independent" : "shared";
  throw new Error("invalid model type for resolve");
}
function Aw(e, t) {
  const i = e.scale[t], n = Un(t) ? "axis" : "legend";
  return i === "independent" ? (e[n][t] === "shared" && U(Ioe(t)), "independent") : e[n][t] || "shared";
}
const Iue = Object.assign(Object.assign({}, Yse), {
  disable: 1,
  labelExpr: 1,
  selections: 1,
  // channel scales
  opacity: 1,
  shape: 1,
  stroke: 1,
  fill: 1,
  size: 1,
  strokeWidth: 1,
  strokeDash: 1,
  // encode
  encode: 1
}), OP = q(Iue);
class jue extends Ga {
}
const uO = {
  symbols: zue,
  gradient: Pue,
  labels: Nue,
  entries: que
};
function zue(e, { fieldOrDatumDef: t, model: i, channel: n, legendCmpt: a, legendType: o }) {
  var r, s, l, d, f, u, c, h;
  if (o !== "symbol")
    return;
  const { markDef: p, encoding: g, config: m, mark: b } = i, y = p.filled && b !== "trail";
  let v = Object.assign(Object.assign({}, $se({}, i, Hre)), Wz(i, { filled: y }));
  const w = (r = a.get("symbolOpacity")) !== null && r !== void 0 ? r : m.legend.symbolOpacity, x = (s = a.get("symbolFillColor")) !== null && s !== void 0 ? s : m.legend.symbolFillColor, $ = (l = a.get("symbolStrokeColor")) !== null && l !== void 0 ? l : m.legend.symbolStrokeColor, _ = w === void 0 ? (d = EP(g.opacity)) !== null && d !== void 0 ? d : p.opacity : void 0;
  if (v.fill) {
    if (n === "fill" || y && n === gi)
      delete v.fill;
    else if (v.fill.field)
      x ? delete v.fill : (v.fill = Ue((f = m.legend.symbolBaseFillColor) !== null && f !== void 0 ? f : "black"), v.fillOpacity = Ue(_ ?? 1));
    else if (X(v.fill)) {
      const k = (h = (c = zv((u = g.fill) !== null && u !== void 0 ? u : g.color)) !== null && c !== void 0 ? c : p.fill) !== null && h !== void 0 ? h : y && p.color;
      k && (v.fill = Ue(k));
    }
  }
  if (v.stroke) {
    if (n === "stroke" || !y && n === gi)
      delete v.stroke;
    else if (v.stroke.field || $)
      delete v.stroke;
    else if (X(v.stroke)) {
      const k = Ke(zv(g.stroke || g.color), p.stroke, y ? p.color : void 0);
      k && (v.stroke = { value: k });
    }
  }
  if (n !== Va) {
    const k = V(t) && SP(i, a, t);
    k ? v.opacity = [
      Object.assign({ test: k }, Ue(_ ?? 1)),
      Ue(m.legend.unselectedOpacity)
    ] : _ && (v.opacity = Ue(_));
  }
  return v = Object.assign(Object.assign({}, v), e), De(v) ? void 0 : v;
}
function Pue(e, { model: t, legendType: i, legendCmpt: n }) {
  var a;
  if (i !== "gradient")
    return;
  const { config: o, markDef: r, encoding: s } = t;
  let l = {};
  const f = ((a = n.get("gradientOpacity")) !== null && a !== void 0 ? a : o.legend.gradientOpacity) === void 0 ? EP(s.opacity) || r.opacity : void 0;
  return f && (l.opacity = Ue(f)), l = Object.assign(Object.assign({}, l), e), De(l) ? void 0 : l;
}
function Nue(e, { fieldOrDatumDef: t, model: i, channel: n, legendCmpt: a }) {
  const o = i.legend(n) || {}, r = i.config, s = V(t) ? SP(i, a, t) : void 0, l = s ? [{ test: s, value: 1 }, { value: r.legend.unselectedOpacity }] : void 0, { format: d, formatType: f } = o, u = Hr(f) ? G1({
    fieldOrDatumDef: t,
    field: "datum.value",
    format: d,
    formatType: f,
    config: r
  }) : void 0, c = Object.assign(Object.assign(Object.assign({}, l ? { opacity: l } : {}), u ? { text: u } : {}), e);
  return De(c) ? void 0 : c;
}
function que(e, { legendCmpt: t }) {
  const i = t.get("selections");
  return i != null && i.length ? Object.assign(Object.assign({}, e), { fill: { value: "transparent" } }) : e;
}
function EP(e) {
  return DP(e, (t, i) => Math.max(t, i.value));
}
function zv(e) {
  return DP(e, (t, i) => Ke(t, i.value));
}
function DP(e, t) {
  if (use(e))
    return Ze(e.condition).reduce(t, e.value);
  if (hn(e))
    return e.value;
}
function SP(e, t, i) {
  const n = t.get("selections");
  if (!(n != null && n.length))
    return;
  const a = he(i.field);
  return n.map((o) => `(!length(data(${he(Ne(o) + Xr)})) || (${o}[${a}] && indexof(${o}[${a}], datum.value) >= 0))`).join(" || ");
}
const cO = {
  direction: ({ direction: e }) => e,
  format: ({ fieldOrDatumDef: e, legend: t, config: i }) => {
    const { format: n, formatType: a } = t;
    return Nj(e, e.type, n, a, i, !1);
  },
  formatType: ({ legend: e, fieldOrDatumDef: t, scaleType: i }) => {
    const { formatType: n } = e;
    return qj(n, t, i);
  },
  gradientLength: (e) => {
    var t, i;
    const { legend: n, legendConfig: a } = e;
    return (i = (t = n.gradientLength) !== null && t !== void 0 ? t : a.gradientLength) !== null && i !== void 0 ? i : Gue(e);
  },
  labelOverlap: ({ legend: e, legendConfig: t, scaleType: i }) => {
    var n, a;
    return (a = (n = e.labelOverlap) !== null && n !== void 0 ? n : t.labelOverlap) !== null && a !== void 0 ? a : Hue(i);
  },
  symbolType: ({ legend: e, markDef: t, channel: i, encoding: n }) => {
    var a;
    return (a = e.symbolType) !== null && a !== void 0 ? a : Bue(t.type, i, n.shape, t.shape);
  },
  title: ({ fieldOrDatumDef: e, config: t }) => Vs(e, t, { allowDisabling: !0 }),
  type: ({ legendType: e, scaleType: t, channel: i }) => {
    if (Ms(i) && sn(t)) {
      if (e === "gradient")
        return;
    } else if (e === "symbol")
      return;
    return e;
  },
  values: ({ fieldOrDatumDef: e, legend: t }) => Lue(t, e)
};
function Lue(e, t) {
  const i = e.values;
  if (X(i))
    return Kj(t, i);
  if (ee(i))
    return i;
}
function Bue(e, t, i, n) {
  var a;
  if (t !== "shape") {
    const o = (a = zv(i)) !== null && a !== void 0 ? a : n;
    if (o)
      return o;
  }
  switch (e) {
    case "bar":
    case "rect":
    case "image":
    case "square":
      return "square";
    case "line":
    case "trail":
    case "rule":
      return "stroke";
    case "arc":
    case "point":
    case "circle":
    case "tick":
    case "geoshape":
    case "area":
    case "text":
      return "circle";
  }
}
function Uue(e) {
  const { legend: t } = e;
  return Ke(t.type, Mue(e));
}
function Mue({ channel: e, timeUnit: t, scaleType: i }) {
  if (Ms(e)) {
    if (Q(["quarter", "month", "day"], t))
      return "symbol";
    if (sn(i))
      return "gradient";
  }
  return "symbol";
}
function Vue({ legendConfig: e, legendType: t, orient: i, legend: n }) {
  var a, o;
  return (o = (a = n.direction) !== null && a !== void 0 ? a : e[t ? "gradientDirection" : "symbolDirection"]) !== null && o !== void 0 ? o : Wue(i, t);
}
function Wue(e, t) {
  switch (e) {
    case "top":
    case "bottom":
      return "horizontal";
    case "left":
    case "right":
    case "none":
    case void 0:
      return;
    default:
      return t === "gradient" ? "horizontal" : void 0;
  }
}
function Gue({ legendConfig: e, model: t, direction: i, orient: n, scaleType: a }) {
  const { gradientHorizontalMaxLength: o, gradientHorizontalMinLength: r, gradientVerticalMaxLength: s, gradientVerticalMinLength: l } = e;
  if (sn(a))
    return i === "horizontal" ? n === "top" || n === "bottom" ? hO(t, "width", r, o) : r : hO(t, "height", l, s);
}
function hO(e, t, i, n) {
  return { signal: `clamp(${e.getSizeSignalRef(t).signal}, ${i}, ${n})` };
}
function Hue(e) {
  if (Q(["quantile", "threshold", "log", "symlog"], e))
    return "greedy";
}
function FP(e) {
  const t = Ye(e) ? Yue(e) : Kue(e);
  return e.component.legends = t, t;
}
function Yue(e) {
  const { encoding: t } = e, i = {};
  for (const n of [gi, ...$z]) {
    const a = rt(t[n]);
    !a || !e.getScaleComponent(n) || n === mi && V(a) && a.type === Vl || (i[n] = Zue(e, n));
  }
  return i;
}
function Xue(e, t) {
  const i = e.scaleName(t);
  if (e.mark === "trail") {
    if (t === "color")
      return { stroke: i };
    if (t === "size")
      return { strokeWidth: i };
  }
  return t === "color" ? e.markDef.filled ? { fill: i } : { stroke: i } : { [t]: i };
}
function Jue(e, t, i, n) {
  switch (t) {
    case "disable":
      return i !== void 0;
    case "values":
      return !!(i != null && i.values);
    case "title":
      if (t === "title" && e === (n == null ? void 0 : n.title))
        return !0;
  }
  return e === (i || {})[t];
}
function Zue(e, t) {
  var i, n, a;
  let o = e.legend(t);
  const { markDef: r, encoding: s, config: l } = e, d = l.legend, f = new jue({}, Xue(e, t));
  zde(e, t, f);
  const u = o !== void 0 ? !o : d.disable;
  if (f.set("disable", u, o !== void 0), u)
    return f;
  o = o || {};
  const c = e.getScaleComponent(t).get("type"), h = rt(s[t]), p = V(h) ? (i = ni(h.timeUnit)) === null || i === void 0 ? void 0 : i.unit : void 0, g = o.orient || l.legend.orient || "right", m = Uue({ legend: o, channel: t, timeUnit: p, scaleType: c }), b = Vue({ legend: o, legendType: m, orient: g, legendConfig: d }), y = {
    legend: o,
    channel: t,
    model: e,
    markDef: r,
    encoding: s,
    fieldOrDatumDef: h,
    legendConfig: d,
    config: l,
    scaleType: c,
    orient: g,
    legendType: m,
    direction: b
  };
  for (const _ of OP) {
    if (m === "gradient" && _.startsWith("symbol") || m === "symbol" && _.startsWith("gradient"))
      continue;
    const k = _ in cO ? cO[_](y) : o[_];
    if (k !== void 0) {
      const A = Jue(k, _, o, e.fieldDef(t));
      (A || l.legend[_] === void 0) && f.set(_, k, A);
    }
  }
  const v = (n = o == null ? void 0 : o.encoding) !== null && n !== void 0 ? n : {}, w = f.get("selections"), x = {}, $ = { fieldOrDatumDef: h, model: e, channel: t, legendCmpt: f, legendType: m };
  for (const _ of ["labels", "legend", "title", "symbols", "gradient", "entries"]) {
    const k = AP((a = v[_]) !== null && a !== void 0 ? a : {}, e), A = _ in uO ? uO[_](k, $) : k;
    A !== void 0 && !De(A) && (x[_] = Object.assign(Object.assign(Object.assign({}, w != null && w.length && V(h) ? { name: `${Ne(h.field)}_legend_${_}` } : {}), w != null && w.length ? { interactive: !!w } : {}), { update: A }));
  }
  return De(x) || f.set("encode", x, !!(o != null && o.encoding)), f;
}
function Kue(e) {
  const { legends: t, resolve: i } = e.component;
  for (const n of e.children) {
    FP(n);
    for (const a of q(n.component.legends))
      i.legend[a] = Aw(e.component.resolve, a), i.legend[a] === "shared" && (t[a] = TP(t[a], n.component.legends[a]), t[a] || (i.legend[a] = "independent", delete t[a]));
  }
  for (const n of q(t))
    for (const a of e.children)
      a.component.legends[n] && i.legend[n] === "shared" && delete a.component.legends[n];
  return t;
}
function TP(e, t) {
  var i, n, a, o;
  if (!e)
    return t.clone();
  const r = e.getWithExplicit("orient"), s = t.getWithExplicit("orient");
  if (r.explicit && s.explicit && r.value !== s.value)
    return;
  let l = !1;
  for (const d of OP) {
    const f = Fo(
      e.getWithExplicit(d),
      t.getWithExplicit(d),
      d,
      "legend",
      // Tie breaker function
      (u, c) => {
        switch (d) {
          case "symbolType":
            return Que(u, c);
          case "title":
            return rz(u, c);
          case "type":
            return l = !0, vi("symbol");
        }
        return Qg(u, c, d, "legend");
      }
    );
    e.setWithExplicit(d, f);
  }
  return l && (!((n = (i = e.implicit) === null || i === void 0 ? void 0 : i.encode) === null || n === void 0) && n.gradient && op(e.implicit, ["encode", "gradient"]), !((o = (a = e.explicit) === null || a === void 0 ? void 0 : a.encode) === null || o === void 0) && o.gradient && op(e.explicit, ["encode", "gradient"])), e;
}
function Que(e, t) {
  return t.value === "circle" ? t : e;
}
var ece = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function tce(e, t, i, n) {
  var a, o, r;
  e.encode = (a = e.encode) !== null && a !== void 0 ? a : {}, e.encode[t] = (o = e.encode[t]) !== null && o !== void 0 ? o : {}, e.encode[t].update = (r = e.encode[t].update) !== null && r !== void 0 ? r : {}, e.encode[t].update[i] = n;
}
function CP(e) {
  const t = e.component.legends, i = {};
  for (const a of q(t)) {
    const o = e.getScaleComponent(a), r = Ie(o.get("domains"));
    if (i[r])
      for (const s of i[r])
        TP(s, t[a]) || i[r].push(t[a]);
    else
      i[r] = [t[a].clone()];
  }
  return Aa(i).flat().map((a) => ice(a, e.config)).filter((a) => a !== void 0);
}
function ice(e, t) {
  var i, n, a;
  const o = e.combine(), { disable: r, labelExpr: s, selections: l } = o, d = ece(o, ["disable", "labelExpr", "selections"]);
  if (!r) {
    if (t.aria === !1 && d.aria == null && (d.aria = !1), !((i = d.encode) === null || i === void 0) && i.symbols) {
      const f = d.encode.symbols.update;
      f.fill && f.fill.value !== "transparent" && !f.stroke && !d.stroke && (f.stroke = { value: "transparent" });
      for (const u of $z)
        d[u] && delete f[u];
    }
    if (d.title || delete d.title, s !== void 0) {
      let f = s;
      !((a = (n = d.encode) === null || n === void 0 ? void 0 : n.labels) === null || a === void 0) && a.update && ee(d.encode.labels.update.text) && (f = Vr(s, "datum.label", d.encode.labels.update.text.signal)), tce(d, "labels", "text", { signal: f });
    }
    return d;
  }
}
function nce(e) {
  return Jl(e) || Tw(e) ? ace(e) : RP(e);
}
function ace(e) {
  return e.children.reduce((t, i) => t.concat(i.assembleProjections()), RP(e));
}
function RP(e) {
  const t = e.component.projection;
  if (!t || t.merged)
    return [];
  const i = t.combine(), { name: n } = i;
  if (t.data) {
    const a = {
      signal: `[${t.size.map((r) => r.signal).join(", ")}]`
    }, o = t.data.reduce((r, s) => {
      const l = ee(s) ? s.signal : `data('${e.lookupDataSource(s)}')`;
      return Q(r, l) || r.push(l), r;
    }, []);
    if (o.length <= 0)
      throw new Error("Projection's fit didn't find any data sources");
    return [
      Object.assign({
        name: n,
        size: a,
        fit: {
          signal: o.length > 1 ? `[${o.join(", ")}]` : o[0]
        }
      }, i)
    ];
  } else
    return [
      Object.assign(Object.assign({ name: n }, { translate: { signal: "[width / 2, height / 2]" } }), i)
    ];
}
const oce = [
  "type",
  "clipAngle",
  "clipExtent",
  "center",
  "rotate",
  "precision",
  "reflectX",
  "reflectY",
  "coefficient",
  "distance",
  "fraction",
  "lobes",
  "parallel",
  "radius",
  "ratio",
  "spacing",
  "tilt"
];
class IP extends Ga {
  constructor(t, i, n, a) {
    super(
      Object.assign({}, i),
      // all explicit properties of projection
      { name: t }
      // name as initial implicit property
    ), this.specifiedProjection = i, this.size = n, this.data = a, this.merged = !1;
  }
  /**
   * Whether the projection parameters should fit provided data.
   */
  get isFit() {
    return !!this.data;
  }
}
function jP(e) {
  e.component.projection = Ye(e) ? rce(e) : dce(e);
}
function rce(e) {
  var t;
  if (e.hasProjection) {
    const i = e.specifiedProjection, n = !(i && (i.scale != null || i.translate != null)), a = n ? [e.getSizeSignalRef("width"), e.getSizeSignalRef("height")] : void 0, o = n ? sce(e) : void 0;
    return new IP(e.projectionName(!0), Object.assign(Object.assign({}, (t = e.config.projection) !== null && t !== void 0 ? t : {}), i ?? {}), a, o);
  }
}
function sce(e) {
  const t = [], { encoding: i } = e;
  for (const n of [
    [na, ia],
    [Mi, xn]
  ])
    (rt(i[n[0]]) || rt(i[n[1]])) && t.push({
      signal: e.getName(`geojson_${t.length}`)
    });
  return e.channelHasField(mi) && e.typedFieldDef(mi).type === Vl && t.push({
    signal: e.getName(`geojson_${t.length}`)
  }), t.length === 0 && t.push(e.requestDataName(Ce.Main)), t;
}
function lce(e, t) {
  const i = p1(oce, (a) => !!(!Ps(e.explicit, a) && !Ps(t.explicit, a) || Ps(e.explicit, a) && Ps(t.explicit, a) && // some properties might be signals or objects and require hashing for comparison
  Ie(e.get(a)) === Ie(t.get(a))));
  if (Ie(e.size) === Ie(t.size)) {
    if (i)
      return e;
    if (Ie(e.explicit) === Ie({}))
      return t;
    if (Ie(t.explicit) === Ie({}))
      return e;
  }
  return null;
}
function dce(e) {
  if (e.children.length === 0)
    return;
  let t;
  for (const n of e.children)
    jP(n);
  const i = p1(e.children, (n) => {
    const a = n.component.projection;
    if (a)
      if (t) {
        const o = lce(t, a);
        return o && (t = o), !!o;
      } else
        return t = a, !0;
    else return !0;
  });
  if (t && i) {
    const n = e.projectionName(!0), a = new IP(n, t.specifiedProjection, t.size, se(t.data));
    for (const o of e.children) {
      const r = o.component.projection;
      r && (r.isFit && a.data.push(...o.component.projection.data), o.renameProjection(r.get("name"), n), r.merged = !0);
    }
    return a;
  }
}
var fce = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function uce(e, t, i, n) {
  var a, o;
  if (Tu(t, i)) {
    const r = Ye(e) ? (o = (a = e.axis(i)) !== null && a !== void 0 ? a : e.legend(i)) !== null && o !== void 0 ? o : {} : {}, s = M(t, { expr: "datum" }), l = M(t, { expr: "datum", binSuffix: "end" });
    return {
      formulaAs: M(t, { binSuffix: "range", forAs: !0 }),
      formula: Bg(s, l, r.format, r.formatType, n)
    };
  }
  return {};
}
function zP(e, t) {
  return `${fj(e)}_${t}`;
}
function cce(e, t) {
  return {
    signal: e.getName(`${t}_bins`),
    extentSignal: e.getName(`${t}_extent`)
  };
}
function Ow(e, t, i) {
  var n;
  const a = (n = Hg(i, void 0)) !== null && n !== void 0 ? n : {}, o = zP(a, t);
  return e.getName(`${o}_bins`);
}
function hce(e) {
  return "as" in e;
}
function pO(e, t, i) {
  let n, a;
  hce(e) ? n = re(e.as) ? [e.as, `${e.as}_end`] : [e.as[0], e.as[1]] : n = [M(e, { forAs: !0 }), M(e, { binSuffix: "end", forAs: !0 })];
  const o = Object.assign({}, Hg(t, void 0)), r = zP(o, e.field), { signal: s, extentSignal: l } = cce(i, r);
  if (jg(o.extent)) {
    const f = o.extent, u = f.selection;
    a = gP(i.getSelectionComponent(Ne(u), u), f), delete o.extent;
  }
  const d = Object.assign(Object.assign(Object.assign({ bin: o, field: e.field, as: [n] }, s ? { signal: s } : {}), l ? { extentSignal: l } : {}), a ? { span: a } : {});
  return { key: r, binComponent: d };
}
class Nn extends Fe {
  constructor(t, i) {
    super(t), this.bins = i;
  }
  clone() {
    return new Nn(null, se(this.bins));
  }
  static makeFromEncoding(t, i) {
    const n = i.reduceFieldDef((a, o, r) => {
      if (Gi(o) && qe(o.bin)) {
        const { key: s, binComponent: l } = pO(o, o.bin, i);
        a[s] = Object.assign(Object.assign(Object.assign({}, l), a[s]), uce(i, o, r, i.config));
      }
      return a;
    }, {});
    return De(n) ? null : new Nn(t, n);
  }
  /**
   * Creates a bin node from BinTransform.
   * The optional parameter should provide
   */
  static makeFromTransform(t, i, n) {
    const { key: a, binComponent: o } = pO(i, i.bin, n);
    return new Nn(t, {
      [a]: o
    });
  }
  /**
   * Merge bin nodes. This method either integrates the bin config from the other node
   * or if this node already has a bin config, renames the corresponding signal in the model.
   */
  merge(t, i) {
    for (const n of q(t.bins))
      n in this.bins ? (i(t.bins[n].signal, this.bins[n].signal), this.bins[n].as = Tn([...this.bins[n].as, ...t.bins[n].as], fe)) : this.bins[n] = t.bins[n];
    for (const n of t.children)
      t.removeChild(n), n.parent = this;
    t.remove();
  }
  producedFields() {
    return new Set(Aa(this.bins).map((t) => t.as).flat(2));
  }
  dependentFields() {
    return new Set(Aa(this.bins).map((t) => t.field));
  }
  hash() {
    return `Bin ${fe(this.bins)}`;
  }
  assemble() {
    return Aa(this.bins).flatMap((t) => {
      const i = [], [n, ...a] = t.as, o = t.bin, { extent: r } = o, s = fce(o, ["extent"]), l = Object.assign(Object.assign(Object.assign({ type: "bin", field: Ia(t.field), as: n, signal: t.signal }, jg(r) ? { extent: null } : { extent: r }), t.span ? { span: { signal: `span(${t.span})` } } : {}), s);
      !r && t.extentSignal && (i.push({
        type: "extent",
        field: Ia(t.field),
        signal: t.extentSignal
      }), l.extent = { signal: t.extentSignal }), i.push(l);
      for (const d of a)
        for (let f = 0; f < 2; f++)
          i.push({
            type: "formula",
            expr: M({ field: n[f] }, { expr: "datum" }),
            as: d[f]
          });
      return t.formula && i.push({
        type: "formula",
        expr: t.formula,
        as: t.formulaAs
      }), i;
    });
  }
}
function pce(e, t, i, n) {
  const a = Ye(n) ? n.encoding[ra(t)] : void 0;
  if (Gi(i) && Ye(n) && X1(t, i, a, n.stack, n.markDef, n.config))
    e.add(M(i, {})), e.add(M(i, { suffix: "end" })), i.bin && Tu(i, t) && e.add(M(i, { binSuffix: "range" }));
  else if (jae(t)) {
    const o = Iae(t);
    e.add(n.getName(o));
  } else
    e.add(M(i));
  return e;
}
function gce(e, t) {
  var i;
  for (const n of q(t)) {
    const a = t[n];
    for (const o of q(a))
      n in e ? e[n][o] = /* @__PURE__ */ new Set([...(i = e[n][o]) !== null && i !== void 0 ? i : [], ...a[o]]) : e[n] = { [o]: a[o] };
  }
}
class dn extends Fe {
  /**
   * @param dimensions string set for dimensions
   * @param measures dictionary mapping field name => dict of aggregation functions and names to use
   */
  constructor(t, i, n) {
    super(t), this.dimensions = i, this.measures = n;
  }
  clone() {
    return new dn(null, new Set(this.dimensions), se(this.measures));
  }
  get groupBy() {
    return this.dimensions;
  }
  static makeFromEncoding(t, i) {
    let n = !1;
    i.forEachFieldDef((r) => {
      r.aggregate && (n = !0);
    });
    const a = {}, o = /* @__PURE__ */ new Set();
    return !n || (i.forEachFieldDef((r, s) => {
      var l, d, f, u;
      const { aggregate: c, field: h } = r;
      if (c)
        if (c === "count")
          a["*"] = (l = a["*"]) !== null && l !== void 0 ? l : {}, a["*"].count = /* @__PURE__ */ new Set([M(r, { forAs: !0 })]);
        else {
          if (ja(c) || No(c)) {
            const p = ja(c) ? "argmin" : "argmax", g = c[p];
            a[g] = (d = a[g]) !== null && d !== void 0 ? d : {}, a[g][p] = /* @__PURE__ */ new Set([M({ op: p, field: g }, { forAs: !0 })]);
          } else
            a[h] = (f = a[h]) !== null && f !== void 0 ? f : {}, a[h][c] = /* @__PURE__ */ new Set([M(r, { forAs: !0 })]);
          Vo(s) && i.scaleDomain(s) === "unaggregated" && (a[h] = (u = a[h]) !== null && u !== void 0 ? u : {}, a[h].min = /* @__PURE__ */ new Set([M({ field: h, aggregate: "min" }, { forAs: !0 })]), a[h].max = /* @__PURE__ */ new Set([M({ field: h, aggregate: "max" }, { forAs: !0 })]));
        }
      else
        pce(o, s, r, i);
    }), o.size + q(a).length === 0) ? null : new dn(t, o, a);
  }
  static makeFromTransform(t, i) {
    var n, a, o;
    const r = /* @__PURE__ */ new Set(), s = {};
    for (const l of i.aggregate) {
      const { op: d, field: f, as: u } = l;
      d && (d === "count" ? (s["*"] = (n = s["*"]) !== null && n !== void 0 ? n : {}, s["*"].count = /* @__PURE__ */ new Set([u || M(l, { forAs: !0 })])) : (s[f] = (a = s[f]) !== null && a !== void 0 ? a : {}, s[f][d] = /* @__PURE__ */ new Set([u || M(l, { forAs: !0 })])));
    }
    for (const l of (o = i.groupby) !== null && o !== void 0 ? o : [])
      r.add(l);
    return r.size + q(s).length === 0 ? null : new dn(t, r, s);
  }
  merge(t) {
    return WI(this.dimensions, t.dimensions) ? (gce(this.measures, t.measures), !0) : (Joe("different dimensions, cannot merge"), !1);
  }
  addDimensions(t) {
    t.forEach(this.dimensions.add, this.dimensions);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([...this.dimensions, ...q(this.measures)]);
  }
  producedFields() {
    const t = /* @__PURE__ */ new Set();
    for (const i of q(this.measures))
      for (const n of q(this.measures[i])) {
        const a = this.measures[i][n];
        a.size === 0 ? t.add(`${n}_${i}`) : a.forEach(t.add, t);
      }
    return t;
  }
  hash() {
    return `Aggregate ${fe({ dimensions: this.dimensions, measures: this.measures })}`;
  }
  assemble() {
    const t = [], i = [], n = [];
    for (const o of q(this.measures))
      for (const r of q(this.measures[o]))
        for (const s of this.measures[o][r])
          n.push(s), t.push(r), i.push(o === "*" ? null : Ia(o));
    return {
      type: "aggregate",
      groupby: [...this.dimensions].map(Ia),
      ops: t,
      fields: i,
      as: n
    };
  }
}
class Yl extends Fe {
  /**
   * @param model The facet model.
   * @param name The name that this facet source will have.
   * @param data The source data for this facet data.
   */
  constructor(t, i, n, a) {
    super(t), this.model = i, this.name = n, this.data = a;
    for (const o of Li) {
      const r = i.facet[o];
      if (r) {
        const { bin: s, sort: l } = r;
        this[o] = Object.assign({ name: i.getName(`${o}_domain`), fields: [M(r), ...qe(s) ? [M(r, { binSuffix: "end" })] : []] }, zn(l) ? { sortField: l } : X(l) ? { sortIndexField: gl(r, o) } : {});
      }
    }
    this.childModel = i.child;
  }
  hash() {
    let t = "Facet";
    for (const i of Li)
      this[i] && (t += ` ${i.charAt(0)}:${fe(this[i])}`);
    return t;
  }
  get fields() {
    var t;
    const i = [];
    for (const n of Li)
      !((t = this[n]) === null || t === void 0) && t.fields && i.push(...this[n].fields);
    return i;
  }
  dependentFields() {
    const t = new Set(this.fields);
    for (const i of Li)
      this[i] && (this[i].sortField && t.add(this[i].sortField.field), this[i].sortIndexField && t.add(this[i].sortIndexField));
    return t;
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  /**
   * The name to reference this source is its name.
   */
  getSource() {
    return this.name;
  }
  getChildIndependentFieldsWithStep() {
    const t = {};
    for (const i of Vi) {
      const n = this.childModel.component.scales[i];
      if (n && !n.merged) {
        const a = n.get("type"), o = n.get("range");
        if (bi(a) && Wo(o)) {
          const r = lm(this.childModel, i), s = Fw(r);
          s ? t[i] = s : U(A1(i));
        }
      }
    }
    return t;
  }
  assembleRowColumnHeaderData(t, i, n) {
    const a = { row: "y", column: "x" }[t], o = [], r = [], s = [];
    n && n[a] && (i ? (o.push(`distinct_${n[a]}`), r.push("max")) : (o.push(n[a]), r.push("distinct")), s.push(`distinct_${n[a]}`));
    const { sortField: l, sortIndexField: d } = this[t];
    if (l) {
      const { op: f = Ug, field: u } = l;
      o.push(u), r.push(f), s.push(M(l, { forAs: !0 }));
    } else d && (o.push(d), r.push("max"), s.push(d));
    return {
      name: this[t].name,
      // Use data from the crossed one if it exist
      source: i ?? this.data,
      transform: [
        Object.assign({ type: "aggregate", groupby: this[t].fields }, o.length ? {
          fields: o,
          ops: r,
          as: s
        } : {})
      ]
    };
  }
  assembleFacetHeaderData(t) {
    var i, n;
    const { columns: a } = this.model.layout, { layoutHeaders: o } = this.model.component, r = [], s = {};
    for (const f of ww) {
      for (const u of $w) {
        const c = (i = o[f] && o[f][u]) !== null && i !== void 0 ? i : [];
        for (const h of c)
          if (((n = h.axes) === null || n === void 0 ? void 0 : n.length) > 0) {
            s[f] = !0;
            break;
          }
      }
      if (s[f]) {
        const u = `length(data("${this.facet.name}"))`, c = f === "row" ? a ? { signal: `ceil(${u} / ${a})` } : 1 : a ? { signal: `min(${u}, ${a})` } : { signal: u };
        r.push({
          name: `${this.facet.name}_${f}`,
          transform: [
            {
              type: "sequence",
              start: 0,
              stop: c
            }
          ]
        });
      }
    }
    const { row: l, column: d } = s;
    return (l || d) && r.unshift(this.assembleRowColumnHeaderData("facet", null, t)), r;
  }
  assemble() {
    var t, i;
    const n = [];
    let a = null;
    const o = this.getChildIndependentFieldsWithStep(), { column: r, row: s, facet: l } = this;
    if (r && s && (o.x || o.y)) {
      a = `cross_${this.column.name}_${this.row.name}`;
      const d = [].concat((t = o.x) !== null && t !== void 0 ? t : [], (i = o.y) !== null && i !== void 0 ? i : []), f = d.map(() => "distinct");
      n.push({
        name: a,
        source: this.data,
        transform: [
          {
            type: "aggregate",
            groupby: this.fields,
            fields: d,
            ops: f
          }
        ]
      });
    }
    for (const d of [Ea, Oa])
      this[d] && n.push(this.assembleRowColumnHeaderData(d, a, o));
    if (l) {
      const d = this.assembleFacetHeaderData(o);
      d && n.push(...d);
    }
    return n;
  }
}
function gO(e) {
  return e[0] === "'" && e[e.length - 1] === "'" || e[0] === '"' && e[e.length - 1] === '"' ? e.slice(1, -1) : e;
}
function mce(e, t) {
  const i = b1(e);
  if (t === "number")
    return `toNumber(${i})`;
  if (t === "boolean")
    return `toBoolean(${i})`;
  if (t === "string")
    return `toString(${i})`;
  if (t === "date")
    return `toDate(${i})`;
  if (t === "flatten")
    return i;
  if (t.indexOf("date:") === 0) {
    const n = gO(t.slice(5, t.length));
    return `timeParse(${i},'${n}')`;
  } else if (t.indexOf("utc:") === 0) {
    const n = gO(t.slice(4, t.length));
    return `utcParse(${i},'${n}')`;
  } else
    return U(loe(t)), null;
}
function bce(e) {
  const t = {};
  return Qc(e.filter, (i) => {
    var n;
    if ($j(i)) {
      let a = null;
      F1(i) ? a = Qt(i.equal) : C1(i) ? a = Qt(i.lte) : T1(i) ? a = Qt(i.lt) : R1(i) ? a = Qt(i.gt) : I1(i) ? a = Qt(i.gte) : j1(i) ? a = i.range[0] : z1(i) && (a = ((n = i.oneOf) !== null && n !== void 0 ? n : i.in)[0]), a && (hs(a) ? t[i.field] = "date" : nt(a) ? t[i.field] = "number" : re(a) && (t[i.field] = "string")), i.timeUnit && (t[i.field] = "date");
    }
  }), t;
}
function yce(e) {
  const t = {};
  function i(n) {
    ul(n) ? t[n.field] = "date" : n.type === "quantitative" && Sae(n.aggregate) ? t[n.field] = "number" : ll(n.field) > 1 ? n.field in t || (t[n.field] = "flatten") : Gg(n) && zn(n.sort) && ll(n.sort.field) > 1 && (n.sort.field in t || (t[n.sort.field] = "flatten"));
  }
  if ((Ye(e) || fn(e)) && e.forEachFieldDef((n, a) => {
    if (Gi(n))
      i(n);
    else {
      const o = cs(a), r = e.fieldDef(o);
      i(Object.assign(Object.assign({}, n), { type: r.type }));
    }
  }), Ye(e)) {
    const { mark: n, markDef: a, encoding: o } = e;
    if (Go(n) && // No need to sort by dimension if we have a connected scatterplot (order channel is present)
    !e.encoding.order) {
      const r = a.orient === "horizontal" ? "y" : "x", s = o[r];
      V(s) && s.type === "quantitative" && !(s.field in t) && (t[s.field] = "number");
    }
  }
  return t;
}
function vce(e) {
  const t = {};
  if (Ye(e) && e.component.selection)
    for (const i of q(e.component.selection)) {
      const n = e.component.selection[i];
      for (const a of n.project.items)
        !a.channel && ll(a.field) > 1 && (t[a.field] = "flatten");
    }
  return t;
}
class It extends Fe {
  constructor(t, i) {
    super(t), this._parse = i;
  }
  clone() {
    return new It(null, se(this._parse));
  }
  hash() {
    return `Parse ${fe(this._parse)}`;
  }
  /**
   * Creates a parse node from a data.format.parse and updates ancestorParse.
   */
  static makeExplicit(t, i, n) {
    let a = {};
    const o = i.data;
    return !Cr(o) && o && o.format && o.format.parse && (a = o.format.parse), this.makeWithAncestors(t, a, {}, n);
  }
  /**
   * Creates a parse node from "explicit" parse and "implicit" parse and updates ancestorParse.
   */
  static makeWithAncestors(t, i, n, a) {
    for (const s of q(n)) {
      const l = a.getWithExplicit(s);
      l.value !== void 0 && (l.explicit || l.value === n[s] || l.value === "derived" || n[s] === "flatten" ? delete n[s] : U(x2(s, n[s], l.value)));
    }
    for (const s of q(i)) {
      const l = a.get(s);
      l !== void 0 && (l === i[s] ? delete i[s] : U(x2(s, i[s], l)));
    }
    const o = new Ga(i, n);
    a.copyAll(o);
    const r = {};
    for (const s of q(o.combine())) {
      const l = o.get(s);
      l !== null && (r[s] = l);
    }
    return q(r).length === 0 || a.parseNothing ? null : new It(t, r);
  }
  get parse() {
    return this._parse;
  }
  merge(t) {
    this._parse = Object.assign(Object.assign({}, this._parse), t.parse), t.remove();
  }
  /**
   * Assemble an object for Vega's format.parse property.
   */
  assembleFormatParse() {
    const t = {};
    for (const i of q(this._parse)) {
      const n = this._parse[i];
      ll(i) === 1 && (t[i] = n);
    }
    return t;
  }
  // format parse depends and produces all fields in its parse
  producedFields() {
    return new Set(q(this._parse));
  }
  dependentFields() {
    return new Set(q(this._parse));
  }
  assembleTransforms(t = !1) {
    return q(this._parse).filter((i) => t ? ll(i) > 1 : !0).map((i) => {
      const n = mce(i, this._parse[i]);
      return n ? {
        type: "formula",
        expr: n,
        as: y1(i)
        // Vega output is always flattened
      } : null;
    }).filter((i) => i !== null);
  }
}
class Ro extends Fe {
  clone() {
    return new Ro(null);
  }
  constructor(t) {
    super(t);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    return /* @__PURE__ */ new Set([cl]);
  }
  hash() {
    return "Identifier";
  }
  assemble() {
    return { type: "identifier", as: cl };
  }
}
class zu extends Fe {
  constructor(t, i) {
    super(t), this.params = i;
  }
  clone() {
    return new zu(null, this.params);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
  }
  hash() {
    return `Graticule ${fe(this.params)}`;
  }
  assemble() {
    return Object.assign({ type: "graticule" }, this.params === !0 ? {} : this.params);
  }
}
class Pu extends Fe {
  constructor(t, i) {
    super(t), this.params = i;
  }
  clone() {
    return new Pu(null, this.params);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    var t;
    return /* @__PURE__ */ new Set([(t = this.params.as) !== null && t !== void 0 ? t : "data"]);
  }
  hash() {
    return `Hash ${fe(this.params)}`;
  }
  assemble() {
    return Object.assign({ type: "sequence" }, this.params);
  }
}
class Kr extends Fe {
  constructor(t) {
    super(null), t = t ?? { name: "source" };
    let i;
    if (Cr(t) || (i = t.format ? Object.assign({}, Oi(t.format, ["parse"])) : {}), gp(t))
      this._data = { values: t.values };
    else if (Nf(t)) {
      if (this._data = { url: t.url }, !i.type) {
        let n = /(?:\.([^.]+))?$/.exec(t.url)[1];
        Q(["json", "csv", "tsv", "dsv", "topojson"], n) || (n = "json"), i.type = n;
      }
    } else jz(t) ? this._data = { values: [{ type: "Sphere" }] } : (Rz(t) || Cr(t)) && (this._data = {});
    this._generator = Cr(t), t.name && (this._name = t.name), i && !De(i) && (this._data.format = i);
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
  }
  get data() {
    return this._data;
  }
  hasName() {
    return !!this._name;
  }
  get isGenerator() {
    return this._generator;
  }
  get dataName() {
    return this._name;
  }
  set dataName(t) {
    this._name = t;
  }
  set parent(t) {
    throw new Error("Source nodes have to be roots.");
  }
  remove() {
    throw new Error("Source nodes are roots and cannot be removed.");
  }
  hash() {
    throw new Error("Cannot hash sources");
  }
  assemble() {
    return Object.assign(Object.assign({ name: this._name }, this._data), { transform: [] });
  }
}
var mO = function(e, t, i) {
  if (!t.has(e))
    throw new TypeError("attempted to set private field on non-instance");
  return t.set(e, i), i;
}, _ce = function(e, t) {
  if (!t.has(e))
    throw new TypeError("attempted to get private field on non-instance");
  return t.get(e);
}, jd;
function Ew(e) {
  return e instanceof Kr || e instanceof zu || e instanceof Pu;
}
class Dw {
  constructor() {
    jd.set(this, void 0), mO(this, jd, !1);
  }
  // Once true, #modified is never set to false
  setModified() {
    mO(this, jd, !0);
  }
  get modifiedFlag() {
    return _ce(this, jd);
  }
}
jd = /* @__PURE__ */ new WeakMap();
class ms extends Dw {
  /**
   * Compute a map of node depths that we can use to determine a topological sort order.
   */
  getNodeDepths(t, i, n) {
    n.set(t, i);
    for (const a of t.children)
      this.getNodeDepths(a, i + 1, n);
    return n;
  }
  /**
   * Run the optimizer on all nodes starting from the leaves.
   */
  optimize(t) {
    const n = [...this.getNodeDepths(t, 0, /* @__PURE__ */ new Map()).entries()].sort((a, o) => o[1] - a[1]);
    for (const a of n)
      this.run(a[0]);
    return this.modifiedFlag;
  }
}
class Sw extends Dw {
  /**
   * Run the optimizer depth first on all nodes starting from the roots.
   */
  optimize(t) {
    this.run(t);
    for (const i of t.children)
      this.optimize(i);
    return this.modifiedFlag;
  }
}
class xce extends Sw {
  mergeNodes(t, i) {
    const n = i.shift();
    for (const a of i)
      t.removeChild(a), a.parent = n, a.remove();
  }
  run(t) {
    const i = t.children.map((a) => a.hash()), n = {};
    for (let a = 0; a < i.length; a++)
      n[i[a]] === void 0 ? n[i[a]] = [t.children[a]] : n[i[a]].push(t.children[a]);
    for (const a of q(n))
      n[a].length > 1 && (this.setModified(), this.mergeNodes(t, n[a]));
  }
}
class wce extends Sw {
  constructor(t) {
    super(), this.requiresSelectionId = t && yw(t);
  }
  run(t) {
    t instanceof Ro && (this.requiresSelectionId && (Ew(t.parent) || t.parent instanceof dn || t.parent instanceof It) || (this.setModified(), t.remove()));
  }
}
class $ce extends Dw {
  optimize(t) {
    return this.run(t, /* @__PURE__ */ new Set()), this.modifiedFlag;
  }
  run(t, i) {
    let n = /* @__PURE__ */ new Set();
    t instanceof Pn && (n = t.producedFields(), g1(n, i) && (this.setModified(), t.removeFormulas(i), t.producedFields.length === 0 && t.remove()));
    for (const a of t.children)
      this.run(a, /* @__PURE__ */ new Set([...i, ...n]));
  }
}
class kce extends Sw {
  constructor() {
    super();
  }
  run(t) {
    t instanceof ii && !t.isRequired() && (this.setModified(), t.remove());
  }
}
class Ace extends ms {
  run(t) {
    if (!Ew(t) && !(t.numChildren() > 1)) {
      for (const i of t.children)
        if (i instanceof It)
          if (t instanceof It)
            this.setModified(), t.merge(i);
          else {
            if (m1(t.producedFields(), i.dependentFields()))
              continue;
            this.setModified(), i.swapWithParent();
          }
    }
  }
}
class Oce extends ms {
  run(t) {
    const i = [...t.children], n = t.children.filter((a) => a instanceof It);
    if (t.numChildren() > 1 && n.length >= 1) {
      const a = {}, o = /* @__PURE__ */ new Set();
      for (const r of n) {
        const s = r.parse;
        for (const l of q(s))
          l in a ? a[l] !== s[l] && o.add(l) : a[l] = s[l];
      }
      for (const r of o)
        delete a[r];
      if (!De(a)) {
        this.setModified();
        const r = new It(t, a);
        for (const s of i) {
          if (s instanceof It)
            for (const l of q(a))
              delete s.parse[l];
          t.removeChild(s), s.parent = r, s instanceof It && q(s.parse).length === 0 && s.remove();
        }
      }
    }
  }
}
class Ece extends ms {
  run(t) {
    t instanceof ii || t.numChildren() > 0 || t instanceof Yl || t instanceof Kr || (this.setModified(), t.remove());
  }
}
class Dce extends ms {
  run(t) {
    const i = t.children.filter((a) => a instanceof Pn), n = i.pop();
    for (const a of i)
      this.setModified(), n.merge(a);
  }
}
class Sce extends ms {
  run(t) {
    const i = t.children.filter((a) => a instanceof dn), n = {};
    for (const a of i) {
      const o = fe(a.groupBy);
      o in n || (n[o] = []), n[o].push(a);
    }
    for (const a of q(n)) {
      const o = n[a];
      if (o.length > 1) {
        const r = o.pop();
        for (const s of o)
          r.merge(s) && (t.removeChild(s), s.parent = r, s.remove(), this.setModified());
      }
    }
  }
}
class Fce extends ms {
  constructor(t) {
    super(), this.model = t;
  }
  run(t) {
    const i = !(Ew(t) || t instanceof Hl || t instanceof It || t instanceof Ro), n = [], a = [];
    for (const o of t.children)
      o instanceof Nn && (i && !m1(t.producedFields(), o.dependentFields()) ? n.push(o) : a.push(o));
    if (n.length > 0) {
      const o = n.pop();
      for (const r of n)
        o.merge(r, this.model.renameSignal.bind(this.model));
      this.setModified(), t instanceof Nn ? t.merge(o, this.model.renameSignal.bind(this.model)) : o.swapWithParent();
    }
    if (a.length > 1) {
      const o = a.pop();
      for (const r of a)
        o.merge(r, this.model.renameSignal.bind(this.model));
      this.setModified();
    }
  }
}
class Tce extends ms {
  run(t) {
    const i = [...t.children];
    if (!sl(i, (r) => r instanceof ii) || t.numChildren() <= 1)
      return;
    const a = [];
    let o;
    for (const r of i)
      if (r instanceof ii) {
        let s = r;
        for (; s.numChildren() === 1; ) {
          const [l] = s.children;
          if (l instanceof ii)
            s = l;
          else
            break;
        }
        a.push(...s.children), o ? (t.removeChild(r), r.parent = o.parent, o.parent.removeChild(o), o.parent = s, this.setModified()) : o = s;
      } else
        a.push(r);
    if (a.length) {
      this.setModified();
      for (const r of a)
        r.parent.removeChild(r), r.parent = o;
    }
  }
}
class bs extends Fe {
  constructor(t, i) {
    super(t), this.transform = i;
  }
  clone() {
    return new bs(null, se(this.transform));
  }
  addDimensions(t) {
    this.transform.groupby = Tn(this.transform.groupby.concat(t), (i) => i);
  }
  dependentFields() {
    const t = /* @__PURE__ */ new Set();
    return this.transform.groupby && this.transform.groupby.forEach(t.add, t), this.transform.joinaggregate.map((i) => i.field).filter((i) => i !== void 0).forEach(t.add, t), t;
  }
  producedFields() {
    return new Set(this.transform.joinaggregate.map(this.getDefaultName));
  }
  getDefaultName(t) {
    var i;
    return (i = t.as) !== null && i !== void 0 ? i : M(t);
  }
  hash() {
    return `JoinAggregateTransform ${fe(this.transform)}`;
  }
  assemble() {
    const t = [], i = [], n = [];
    for (const o of this.transform.joinaggregate)
      i.push(o.op), n.push(this.getDefaultName(o)), t.push(o.field === void 0 ? null : o.field);
    const a = this.transform.groupby;
    return Object.assign({
      type: "joinaggregate",
      as: n,
      ops: i,
      fields: t
    }, a !== void 0 ? { groupby: a } : {});
  }
}
function Cce(e) {
  return e.stack.stackBy.reduce((t, i) => {
    const n = i.fieldDef, a = M(n);
    return a && t.push(a), t;
  }, []);
}
function Rce(e) {
  return X(e) && e.every((t) => re(t)) && e.length > 1;
}
class Fa extends Fe {
  constructor(t, i) {
    super(t), this._stack = i;
  }
  clone() {
    return new Fa(null, se(this._stack));
  }
  static makeFromTransform(t, i) {
    const { stack: n, groupby: a, as: o, offset: r = "zero" } = i, s = [], l = [];
    if (i.sort !== void 0)
      for (const u of i.sort)
        s.push(u.field), l.push(Ke(u.order, "ascending"));
    const d = {
      field: s,
      order: l
    };
    let f;
    return Rce(o) ? f = o : re(o) ? f = [o, o + "_end"] : f = [i.stack + "_start", i.stack + "_end"], new Fa(t, {
      stackField: n,
      groupby: a,
      offset: r,
      sort: d,
      facetby: [],
      as: f
    });
  }
  static makeFromEncoding(t, i) {
    const n = i.stack, { encoding: a } = i;
    if (!n)
      return null;
    const { groupbyChannel: o, fieldChannel: r, offset: s, impute: l } = n;
    let d;
    if (o) {
      const h = a[o];
      d = Mn(h);
    }
    const f = Cce(i), u = i.encoding.order;
    let c;
    return X(u) || V(u) ? c = nz(u) : c = f.reduce((h, p) => (h.field.push(p), h.order.push(r === "y" ? "descending" : "ascending"), h), { field: [], order: [] }), new Fa(t, {
      dimensionFieldDef: d,
      stackField: i.vgField(r),
      facetby: [],
      stackby: f,
      sort: c,
      offset: s,
      impute: l,
      as: [
        i.vgField(r, { suffix: "start", forAs: !0 }),
        i.vgField(r, { suffix: "end", forAs: !0 })
      ]
    });
  }
  get stack() {
    return this._stack;
  }
  addDimensions(t) {
    this._stack.facetby.push(...t);
  }
  dependentFields() {
    const t = /* @__PURE__ */ new Set();
    return t.add(this._stack.stackField), this.getGroupbyFields().forEach(t.add, t), this._stack.facetby.forEach(t.add, t), this._stack.sort.field.forEach(t.add, t), t;
  }
  producedFields() {
    return new Set(this._stack.as);
  }
  hash() {
    return `Stack ${fe(this._stack)}`;
  }
  getGroupbyFields() {
    const { dimensionFieldDef: t, impute: i, groupby: n } = this._stack;
    return t ? t.bin ? i ? [M(t, { binSuffix: "mid" })] : [
      // For binned group by field without impute, we need both bin (start) and bin_end
      M(t, {}),
      M(t, { binSuffix: "end" })
    ] : [M(t)] : n ?? [];
  }
  assemble() {
    const t = [], { facetby: i, dimensionFieldDef: n, stackField: a, stackby: o, sort: r, offset: s, impute: l, as: d } = this._stack;
    if (l && n) {
      const { band: f = 0.5, bin: u } = n;
      u && t.push({
        type: "formula",
        expr: `${f}*` + M(n, { expr: "datum" }) + `+${1 - f}*` + M(n, { expr: "datum", binSuffix: "end" }),
        as: M(n, { binSuffix: "mid", forAs: !0 })
      }), t.push({
        type: "impute",
        field: a,
        groupby: [...o, ...i],
        key: M(n, { binSuffix: "mid" }),
        method: "value",
        value: 0
      });
    }
    return t.push({
      type: "stack",
      groupby: [...this.getGroupbyFields(), ...i],
      field: a,
      sort: r,
      as: d,
      offset: s
    }), t;
  }
}
class Xl extends Fe {
  constructor(t, i) {
    super(t), this.transform = i;
  }
  clone() {
    return new Xl(null, se(this.transform));
  }
  addDimensions(t) {
    this.transform.groupby = Tn(this.transform.groupby.concat(t), (i) => i);
  }
  dependentFields() {
    var t, i;
    const n = /* @__PURE__ */ new Set();
    return ((t = this.transform.groupby) !== null && t !== void 0 ? t : []).forEach(n.add, n), ((i = this.transform.sort) !== null && i !== void 0 ? i : []).forEach((a) => n.add(a.field)), this.transform.window.map((a) => a.field).filter((a) => a !== void 0).forEach(n.add, n), n;
  }
  producedFields() {
    return new Set(this.transform.window.map(this.getDefaultName));
  }
  getDefaultName(t) {
    var i;
    return (i = t.as) !== null && i !== void 0 ? i : M(t);
  }
  hash() {
    return `WindowTransform ${fe(this.transform)}`;
  }
  assemble() {
    var t;
    const i = [], n = [], a = [], o = [];
    for (const c of this.transform.window)
      n.push(c.op), a.push(this.getDefaultName(c)), o.push(c.param === void 0 ? null : c.param), i.push(c.field === void 0 ? null : c.field);
    const r = this.transform.frame, s = this.transform.groupby;
    if (r && r[0] === null && r[1] === null && n.every((c) => v1(c)))
      return Object.assign({ type: "joinaggregate", as: a, ops: n, fields: i }, s !== void 0 ? { groupby: s } : {});
    const l = [], d = [];
    if (this.transform.sort !== void 0)
      for (const c of this.transform.sort)
        l.push(c.field), d.push((t = c.order) !== null && t !== void 0 ? t : "ascending");
    const f = {
      field: l,
      order: d
    }, u = this.transform.ignorePeers;
    return Object.assign(Object.assign(Object.assign({
      type: "window",
      params: o,
      as: a,
      ops: n,
      fields: i,
      sort: f
    }, u !== void 0 ? { ignorePeers: u } : {}), s !== void 0 ? { groupby: s } : {}), r !== void 0 ? { frame: r } : {});
  }
}
function Ice(e) {
  function t(i) {
    if (!(i instanceof Yl)) {
      const n = i.clone();
      if (n instanceof ii) {
        const a = Nv + n.getSource();
        n.setSource(a), e.model.component.data.outputNodes[a] = n;
      } else (n instanceof dn || n instanceof Fa || n instanceof Xl || n instanceof bs) && n.addDimensions(e.fields);
      for (const a of i.children.flatMap(t))
        a.parent = n;
      return [n];
    }
    return i.children.flatMap(t);
  }
  return t;
}
function Pv(e) {
  if (e instanceof Yl)
    if (e.numChildren() === 1 && !(e.children[0] instanceof ii)) {
      const t = e.children[0];
      (t instanceof dn || t instanceof Fa || t instanceof Xl || t instanceof bs) && t.addDimensions(e.fields), t.swapWithParent(), Pv(e);
    } else {
      const t = e.model.component.data.main;
      PP(t);
      const i = Ice(e), n = e.children.map(i).flat();
      for (const a of n)
        a.parent = t;
    }
  else
    e.children.map(Pv);
}
function PP(e) {
  if (e instanceof ii && e.type === Ce.Main && e.numChildren() === 1) {
    const t = e.children[0];
    t instanceof Yl || (t.swapWithParent(), PP(e));
  }
}
const Nv = "scale_", pc = 5;
function qv(e) {
  for (const t of e) {
    for (const i of t.children)
      if (i.parent !== t)
        return !1;
    if (!qv(t.children))
      return !1;
  }
  return !0;
}
function Yi(e, t) {
  let i = !1;
  for (const n of t)
    i = e.optimize(n) || i;
  return i;
}
function bO(e, t, i) {
  let n = e.sources, a = !1;
  return a = Yi(new kce(), n) || a, a = Yi(new wce(t), n) || a, n = n.filter((o) => o.numChildren() > 0), a = Yi(new Ece(), n) || a, n = n.filter((o) => o.numChildren() > 0), i || (a = Yi(new Ace(), n) || a, a = Yi(new Fce(t), n) || a, a = Yi(new $ce(), n) || a, a = Yi(new Oce(), n) || a, a = Yi(new Sce(), n) || a, a = Yi(new Dce(), n) || a, a = Yi(new xce(), n) || a, a = Yi(new Tce(), n) || a), e.sources = n, a;
}
function jce(e, t) {
  qv(e.sources);
  let i = 0, n = 0;
  for (let a = 0; a < pc && bO(e, t, !0); a++)
    i++;
  e.sources.map(Pv);
  for (let a = 0; a < pc && bO(e, t, !1); a++)
    n++;
  qv(e.sources), Math.max(i, n) === pc && U(`Maximum optimization runs(${pc}) reached.`);
}
class Ei {
  constructor(t) {
    Object.defineProperty(this, "signal", {
      enumerable: !0,
      get: t
    });
  }
  static fromName(t, i) {
    return new Ei(() => t(i));
  }
}
var zce = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function NP(e) {
  Ye(e) ? Pce(e) : Nce(e);
}
function Pce(e) {
  const t = e.component.scales;
  for (const i of q(t)) {
    const n = Lce(e, i);
    if (t[i].setWithExplicit("domains", n), Uce(e, i), e.component.data.isFaceted) {
      let o = e;
      for (; !fn(o) && o.parent; )
        o = o.parent;
      if (o.component.resolve.scale[i] === "shared")
        for (const s of n.value)
          wa(s) && (s.data = Nv + s.data.replace(Nv, ""));
    }
  }
}
function Nce(e) {
  for (const i of e.children)
    NP(i);
  const t = e.component.scales;
  for (const i of q(t)) {
    let n, a = null;
    for (const o of e.children) {
      const r = o.component.scales[i];
      if (r) {
        n === void 0 ? n = r.getWithExplicit("domains") : n = Fo(n, r.getWithExplicit("domains"), "domains", "scale", Lv);
        const s = r.get("selectionExtent");
        a && s && a.selection !== s.selection && U(aoe), a = s;
      }
    }
    t[i].setWithExplicit("domains", n), a && t[i].set("selectionExtent", a, !0);
  }
}
function qce(e, t, i, n) {
  if (e === "unaggregated") {
    const { valid: a, reason: o } = yO(t, i);
    if (!a) {
      U(o);
      return;
    }
  } else if (e === void 0 && n.useUnaggregatedDomain) {
    const { valid: a } = yO(t, i);
    if (a)
      return "unaggregated";
  }
  return e;
}
function Lce(e, t) {
  const i = e.getScaleComponent(t).get("type"), { encoding: n } = e, a = qce(e.scaleDomain(t), e.typedFieldDef(t), i, e.config.scale);
  return a !== e.scaleDomain(t) && (e.specifiedScales[t] = Object.assign(Object.assign({}, e.specifiedScales[t]), { domain: a })), t === "x" && rt(n.x2) ? rt(n.x) ? Fo(Za(i, a, e, "x"), Za(i, a, e, "x2"), "domain", "scale", Lv) : Za(i, a, e, "x2") : t === "y" && rt(n.y2) ? rt(n.y) ? Fo(Za(i, a, e, "y"), Za(i, a, e, "y2"), "domain", "scale", Lv) : Za(i, a, e, "y2") : Za(i, a, e, t);
}
function Bce(e, t, i) {
  return e.map((n) => ({ signal: `{data: ${Yg(n, { timeUnit: i, type: t })}}` }));
}
function Ib(e, t, i) {
  var n;
  const a = (n = ni(i)) === null || n === void 0 ? void 0 : n.unit;
  return t === "temporal" || a ? Bce(e, t, a) : [e];
}
function Za(e, t, i, n) {
  const { encoding: a } = i, o = rt(a[n]), { type: r } = o, s = o.timeUnit;
  if (zre(t)) {
    const u = Za(e, void 0, i, n), c = Ib(t.unionWith, r, s);
    return ya([...u.value, ...c]);
  } else {
    if (ee(t))
      return ya([t]);
    if (t && t !== "unaggregated" && !Oj(t))
      return ya(Ib(t, r, s));
  }
  const l = i.stack;
  if (l && n === l.fieldChannel) {
    if (l.offset === "normalize")
      return vi([[0, 1]]);
    const u = i.requestDataName(Ce.Main);
    return vi([
      {
        data: u,
        field: i.vgField(n, { suffix: "start" })
      },
      {
        data: u,
        field: i.vgField(n, { suffix: "end" })
      }
    ]);
  }
  const d = Vo(n) && V(o) ? Mce(i, n, e) : void 0;
  if (Ho(o)) {
    const u = Ib([o.datum], r, s);
    return vi(u);
  }
  const f = o;
  if (t === "unaggregated") {
    const u = i.requestDataName(Ce.Main), { field: c } = o;
    return vi([
      {
        data: u,
        field: M({ field: c, aggregate: "min" })
      },
      {
        data: u,
        field: M({ field: c, aggregate: "max" })
      }
    ]);
  } else if (qe(f.bin)) {
    if (bi(e))
      return vi(e === "bin-ordinal" ? [] : [
        {
          // If sort by aggregation of a specified sort field, we need to use RAW table,
          // so we can aggregate values for the scale independently from the main aggregation.
          data: If(d) ? i.requestDataName(Ce.Main) : i.requestDataName(Ce.Raw),
          // Use range if we added it and the scale does not support computing a range as a signal.
          field: i.vgField(n, Tu(f, n) ? { binSuffix: "range" } : {}),
          // we have to use a sort object if sort = true to make the sort correct by bin start
          sort: d === !0 || !Je(d) ? {
            field: i.vgField(n, {}),
            op: "min"
            // min or max doesn't matter since we sort by the start of the bin range
          } : d
        }
      ]);
    {
      const { bin: u } = f;
      if (qe(u)) {
        const c = Ow(i, f.field, u);
        return vi([
          new Ei(() => {
            const h = i.getSignalName(c);
            return `[${h}.start, ${h}.stop]`;
          })
        ]);
      } else
        return vi([
          {
            data: i.requestDataName(Ce.Main),
            field: i.vgField(n, {})
          }
        ]);
    }
  } else if (f.timeUnit && Q(["time", "utc"], e) && X1(n, f, Ye(i) ? i.encoding[ra(n)] : void 0, i.stack, i.markDef, i.config)) {
    const u = i.requestDataName(Ce.Main);
    return vi([
      {
        data: u,
        field: i.vgField(n)
      },
      {
        data: u,
        field: i.vgField(n, { suffix: "end" })
      }
    ]);
  } else return vi(d ? [
    {
      // If sort by aggregation of a specified sort field, we need to use RAW table,
      // so we can aggregate values for the scale independently from the main aggregation.
      data: If(d) ? i.requestDataName(Ce.Main) : i.requestDataName(Ce.Raw),
      field: i.vgField(n),
      sort: d
    }
  ] : [
    {
      data: i.requestDataName(Ce.Main),
      field: i.vgField(n)
    }
  ]);
}
function jb(e, t) {
  const { op: i, field: n, order: a } = e;
  return Object.assign(Object.assign({
    // Apply default op
    op: i ?? (t ? "sum" : Ug)
  }, n ? { field: Ia(n) } : {}), a ? { order: a } : {});
}
function Uce(e, t) {
  var i;
  const n = e.component.scales[t], a = e.specifiedScales[t].domain, o = (i = e.fieldDef(t)) === null || i === void 0 ? void 0 : i.bin, r = Oj(a) && a, s = Ou(o) && jg(o.extent) && o.extent;
  (r || s) && n.set("selectionExtent", r ?? s, !0);
}
function Mce(e, t, i) {
  if (!bi(i))
    return;
  const n = e.fieldDef(t), a = n.sort;
  if (Mj(a))
    return {
      op: "min",
      field: gl(n, t),
      order: "ascending"
    };
  const { stack: o } = e, r = o ? [...o.groupbyField ? [o.groupbyField] : [], ...o.stackBy.map((s) => s.fieldDef.field)] : void 0;
  if (zn(a)) {
    const s = o && !Q(r, a.field);
    return jb(a, s);
  } else if (Uj(a)) {
    const { encoding: s, order: l } = a, d = e.fieldDef(s), { aggregate: f, field: u } = d, c = o && !Q(r, u);
    if (ja(f) || No(f))
      return jb({
        field: M(d),
        order: l
      }, c);
    if (v1(f) || !f)
      return jb({
        op: f,
        field: u,
        order: l
      }, c);
  } else {
    if (a === "descending")
      return {
        op: "min",
        field: e.vgField(t),
        order: "descending"
      };
    if (Q([
      "ascending",
      void 0
      /* default =ascending*/
    ], a))
      return !0;
  }
}
function yO(e, t) {
  const { aggregate: i, type: n } = e;
  return i ? re(i) && !Cae[i] ? {
    valid: !1,
    reason: Eoe(i)
  } : n === "quantitative" && t === "log" ? {
    valid: !1,
    reason: Doe(e)
  } : { valid: !0 } : {
    valid: !1,
    reason: Ooe(e)
  };
}
function Lv(e, t, i, n) {
  return e.explicit && t.explicit && U(Roe(i, n, e.value, t.value)), { explicit: e.explicit, value: [...e.value, ...t.value] };
}
function Vce(e) {
  const t = Tn(e.map((r) => wa(r) ? zce(r, ["sort"]) : r), fe), i = Tn(e.map((r) => {
    if (wa(r)) {
      const s = r.sort;
      return s !== void 0 && !If(s) && ("op" in s && s.op === "count" && delete s.field, s.order === "ascending" && delete s.order), s;
    }
  }).filter((r) => r !== void 0), fe);
  if (t.length === 0)
    return;
  if (t.length === 1) {
    const r = e[0];
    if (wa(r) && i.length > 0) {
      let s = i[0];
      if (i.length > 1)
        U($2), s = !0;
      else if (Je(s) && "field" in s) {
        const l = s.field;
        r.field === l && (s = s.order ? { order: s.order } : !0);
      }
      return Object.assign(Object.assign({}, r), { sort: s });
    }
    return r;
  }
  const n = Tn(i.map((r) => If(r) || !("op" in r) || re(r.op) && r.op in Eae ? r : (U(joe(r)), !0)), fe);
  let a;
  n.length === 1 ? a = n[0] : n.length > 1 && (U($2), a = !0);
  const o = Tn(e.map((r) => wa(r) ? r.data : null), (r) => r);
  return o.length === 1 && o[0] !== null ? Object.assign({ data: o[0], fields: t.map((s) => s.field) }, a ? { sort: a } : {}) : Object.assign({ fields: t }, a ? { sort: a } : {});
}
function Fw(e) {
  if (wa(e) && re(e.field))
    return e.field;
  if (ure(e)) {
    let t;
    for (const i of e.fields)
      if (wa(i) && re(i.field)) {
        if (!t)
          t = i.field;
        else if (t !== i.field)
          return U(zoe), t;
      }
    return U(Poe), t;
  } else if (cre(e)) {
    U(Noe);
    const t = e.fields[0];
    return re(t) ? t : void 0;
  }
}
function lm(e, t) {
  const n = e.component.scales[t].get("domains").map((a) => (wa(a) && (a.data = e.lookupDataSource(a.data)), a));
  return Vce(n);
}
var Wce = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function qP(e) {
  return Jl(e) || Tw(e) ? e.children.reduce((t, i) => t.concat(qP(i)), vO(e)) : vO(e);
}
function vO(e) {
  return q(e.component.scales).reduce((t, i) => {
    const n = e.component.scales[i];
    if (n.merged)
      return t;
    const a = n.combine(), { name: o, type: r, selectionExtent: s, domains: l, range: d, reverse: f } = a, u = Wce(a, ["name", "type", "selectionExtent", "domains", "range", "reverse"]), c = Gce(a.range, o, i, e);
    let h;
    s && (h = Gde(e, s));
    const p = lm(e, i);
    return t.push(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({
      name: o,
      type: r
    }, p ? { domain: p } : {}), h ? { domainRaw: h } : {}), { range: c }), f !== void 0 ? { reverse: f } : {}), u)), t;
  }, []);
}
function Gce(e, t, i, n) {
  if (Un(i)) {
    if (Wo(e))
      return {
        step: { signal: t + "_step" }
      };
  } else if (Je(e) && wa(e))
    return Object.assign(Object.assign({}, e), { data: n.lookupDataSource(e.data) });
  return e;
}
class LP extends Ga {
  constructor(t, i) {
    super(
      {},
      // no initial explicit property
      { name: t }
      // name as initial implicit property
    ), this.merged = !1, this.setWithExplicit("type", i);
  }
  /**
   * Whether the scale definitely includes zero in the domain
   */
  domainDefinitelyIncludesZero() {
    return this.get("zero") !== !1 ? !0 : sl(this.get("domains"), (t) => X(t) && t.length === 2 && t[0] <= 0 && t[1] >= 0);
  }
}
const Hce = ["range", "scheme"];
function BP(e) {
  return e === "x" ? "width" : e === "y" ? "height" : void 0;
}
function Yce(e) {
  const t = e.component.scales;
  for (const i of Ig) {
    const n = t[i];
    if (!n)
      continue;
    const a = Xce(i, e);
    n.setWithExplicit("range", a);
  }
}
function _O(e, t) {
  const i = e.fieldDef(t);
  if (i && i.bin && qe(i.bin)) {
    const n = Ow(e, i.field, i.bin), a = BP(t), o = e.getName(a);
    return new Ei(() => {
      const r = e.getSignalName(n), s = `(${r}.stop - ${r}.start) / ${r}.step`;
      return `${e.getSignalName(o)} / (${s})`;
    });
  }
}
function Xce(e, t) {
  const i = t.specifiedScales[e], { size: n } = t, o = t.getScaleComponent(e).get("type");
  for (const d of Hce)
    if (i[d] !== void 0) {
      const f = _v(o, d), u = Ej(e, d);
      if (!f)
        U(pj(o, d, e));
      else if (u)
        U(u);
      else
        switch (d) {
          case "range": {
            const c = i.range;
            if (X(c)) {
              if (Un(e))
                return ya(c.map((h) => {
                  if (h === "width" || h === "height") {
                    const p = t.getName(h), g = t.getSignalName.bind(t);
                    return Ei.fromName(g, p);
                  }
                  return h;
                }));
            } else if (Je(c))
              return ya({
                data: t.requestDataName(Ce.Main),
                field: c.field,
                sort: { op: "min", field: t.vgField(e) }
              });
            return ya(c);
          }
          case "scheme":
            return ya(Jce(i[d]));
        }
    }
  if (e === Me || e === lt) {
    const d = e === Me ? "width" : "height", f = n[d];
    if (Vn(f)) {
      if (bi(o))
        return ya({ step: f.step });
      U(gj(d));
    }
  }
  const { rangeMin: r, rangeMax: s } = i, l = Zce(e, t);
  return (r !== void 0 || s !== void 0) && // it's ok to check just rangeMin's compatibility since rangeMin/rangeMax are the same
  _v(o, "rangeMin") && X(l) && l.length === 2 ? ya([r ?? l[0], s ?? l[1]]) : vi(l);
}
function Jce(e) {
  return jre(e) ? Object.assign({ scheme: e.name }, Oi(e, ["name"])) : { scheme: e };
}
function Zce(e, t) {
  const { size: i, config: n, mark: a, encoding: o } = t, r = t.getSignalName.bind(t), { type: s } = rt(o[e]), d = t.getScaleComponent(e).get("type"), { domain: f, domainMid: u } = t.specifiedScales[e];
  switch (e) {
    case Me:
    case lt: {
      if (Q(["point", "band"], d)) {
        if (e === Me && !i.width) {
          const p = Pf(n.view, "width");
          if (Vn(p))
            return p;
        } else if (e === lt && !i.height) {
          const p = Pf(n.view, "height");
          if (Vn(p))
            return p;
        }
      }
      const c = BP(e), h = t.getName(c);
      return e === lt && Wi(d) ? [Ei.fromName(r, h), 0] : [0, Ei.fromName(r, h)];
    }
    case Ma: {
      const c = t.component.scales[e].get("zero"), h = UP(a, c, n), p = ehe(a, i, t, n);
      return sp(d) ? Qce(h, p, Kce(d, n, f, e)) : [h, p];
    }
    case _n:
      return [0, Math.PI * 2];
    case us:
      return [0, 360];
    case ta:
      return [
        0,
        new Ei(() => {
          const c = t.getSignalName("width"), h = t.getSignalName("height");
          return `min(${c},${h})/2`;
        })
      ];
    case Bo:
      return [n.scale.minStrokeWidth, n.scale.maxStrokeWidth];
    case Uo:
      return [
        // TODO: add this to Vega's config.range?
        [1, 0],
        [4, 2],
        [2, 1],
        [1, 1],
        [1, 2, 4, 2]
      ];
    case mi:
      return "symbol";
    case gi:
    case aa:
    case oa:
      return d === "ordinal" ? s === "nominal" ? "category" : "ordinal" : u !== void 0 ? "diverging" : a === "rect" || a === "geoshape" ? "heatmap" : "ramp";
    case Va:
    case qo:
    case Lo:
      return [n.scale.minOpacity, n.scale.maxOpacity];
  }
  throw new Error(`Scale range undefined for channel ${e}`);
}
function Kce(e, t, i, n) {
  switch (e) {
    case "quantile":
      return t.scale.quantileCount;
    case "quantize":
      return t.scale.quantizeCount;
    case "threshold":
      return i !== void 0 && X(i) ? i.length + 1 : (U(Hoe(n)), 3);
  }
}
function Qce(e, t, i) {
  const n = () => {
    const a = Da(t), o = Da(e), r = `(${a} - ${o}) / (${i} - 1)`;
    return `sequence(${o}, ${a} + ${r}, ${r})`;
  };
  return ee(t) ? new Ei(n) : { signal: n() };
}
function UP(e, t, i) {
  if (t)
    return ee(t) ? { signal: `${t.signal} ? 0 : ${UP(e, !1, i)}` } : 0;
  switch (e) {
    case "bar":
    case "tick":
      return i.scale.minBandSize;
    case "line":
    case "trail":
    case "rule":
      return i.scale.minStrokeWidth;
    case "text":
      return i.scale.minFontSize;
    case "point":
    case "square":
    case "circle":
      return i.scale.minSize;
  }
  throw new Error(zg("size", e));
}
const xO = 0.95;
function ehe(e, t, i, n) {
  const a = {
    x: _O(i, "x"),
    y: _O(i, "y")
  };
  switch (e) {
    case "bar":
    case "tick": {
      if (n.scale.maxBandSize !== void 0)
        return n.scale.maxBandSize;
      const o = wO(t, a, n.view);
      return nt(o) ? o - 1 : new Ei(() => `${o.signal} - 1`);
    }
    case "line":
    case "trail":
    case "rule":
      return n.scale.maxStrokeWidth;
    case "text":
      return n.scale.maxFontSize;
    case "point":
    case "square":
    case "circle": {
      if (n.scale.maxSize)
        return n.scale.maxSize;
      const o = wO(t, a, n.view);
      return nt(o) ? Math.pow(xO * o, 2) : new Ei(() => `pow(${xO} * ${o.signal}, 2)`);
    }
  }
  throw new Error(zg("size", e));
}
function wO(e, t, i) {
  const n = Vn(e.width) ? e.width.step : pp(i, "width"), a = Vn(e.height) ? e.height.step : pp(i, "height");
  return t.x || t.y ? new Ei(() => `min(${[
    t.x ? t.x.signal : n,
    t.y ? t.y.signal : a
  ].join(", ")})`) : Math.min(n, a);
}
function MP(e, t) {
  Ye(e) ? the(e, t) : WP(e, t);
}
function the(e, t) {
  const i = e.component.scales, { config: n, encoding: a, markDef: o, specifiedScales: r } = e;
  for (const s of q(i)) {
    const l = r[s], d = i[s], f = e.getScaleComponent(s), u = rt(a[s]), c = l[t], h = f.get("type"), p = f.get("padding"), g = f.get("paddingInner"), m = _v(h, t), b = Ej(s, t);
    if (c !== void 0 && (m ? b && U(b) : U(pj(h, t, s))), m && b === void 0)
      if (c !== void 0) {
        const y = u.timeUnit, v = u.type;
        switch (t) {
          case "domainMax":
          case "domainMin":
            hs(l[t]) || v === "temporal" || y ? d.set(t, { signal: Yg(l[t], { type: v, timeUnit: y }) }, !0) : d.set(t, l[t], !0);
            break;
          default:
            d.copyKeyFromObject(t, l);
        }
      } else {
        const y = t in $O ? $O[t]({
          model: e,
          channel: s,
          fieldOrDatumDef: u,
          scaleType: h,
          scalePadding: p,
          scalePaddingInner: g,
          domain: l.domain,
          markDef: o,
          config: n
        }) : n.scale[t];
        y !== void 0 && d.set(t, y, !1);
      }
  }
}
const $O = {
  bins: ({ model: e, fieldOrDatumDef: t }) => V(t) ? ihe(e, t) : void 0,
  interpolate: ({ channel: e, fieldOrDatumDef: t }) => nhe(e, t.type),
  nice: ({ scaleType: e, channel: t, fieldOrDatumDef: i }) => ahe(e, t, i),
  padding: ({ channel: e, scaleType: t, fieldOrDatumDef: i, markDef: n, config: a }) => ohe(e, t, a.scale, i, n, a.bar),
  paddingInner: ({ scalePadding: e, channel: t, markDef: i, config: n }) => rhe(e, t, i.type, n.scale),
  paddingOuter: ({ scalePadding: e, channel: t, scaleType: i, markDef: n, scalePaddingInner: a, config: o }) => she(e, t, i, n.type, a, o.scale),
  reverse: ({ fieldOrDatumDef: e, scaleType: t, channel: i, config: n }) => {
    const a = V(e) ? e.sort : void 0;
    return lhe(t, a, i, n.scale);
  },
  zero: ({ channel: e, fieldOrDatumDef: t, domain: i, markDef: n, scaleType: a }) => dhe(e, t, i, n, a)
};
function VP(e) {
  Ye(e) ? Yce(e) : WP(e, "range");
}
function WP(e, t) {
  const i = e.component.scales;
  for (const n of e.children)
    t === "range" ? VP(n) : MP(n, t);
  for (const n of q(i)) {
    let a;
    for (const o of e.children) {
      const r = o.component.scales[n];
      if (r) {
        const s = r.getWithExplicit(t);
        a = Fo(a, s, t, "scale", Cz((l, d) => {
          switch (t) {
            case "range":
              return l.step && d.step ? l.step - d.step : 0;
          }
          return 0;
        }));
      }
    }
    i[n].setWithExplicit(t, a);
  }
}
function ihe(e, t) {
  const i = t.bin;
  if (qe(i)) {
    const n = Ow(e, t.field, i);
    return new Ei(() => e.getSignalName(n));
  } else if (Zt(i) && Ou(i) && i.step !== void 0)
    return {
      step: i.step
    };
}
function nhe(e, t) {
  if (Q([gi, aa, oa], e) && t !== "nominal")
    return "hcl";
}
function ahe(e, t, i) {
  var n;
  if (!(!((n = Mn(i)) === null || n === void 0) && n.bin || Q([tt.TIME, tt.UTC], e)))
    return t in Mo ? !0 : void 0;
}
function ohe(e, t, i, n, a, o) {
  if (e in Mo) {
    if (sn(t)) {
      if (i.continuousPadding !== void 0)
        return i.continuousPadding;
      const { type: r, orient: s } = a;
      if (r === "bar" && !(V(n) && (n.bin || n.timeUnit)) && (s === "vertical" && e === "x" || s === "horizontal" && e === "y"))
        return o.continuousBandSize;
    }
    if (t === tt.POINT)
      return i.pointPadding;
  }
}
function rhe(e, t, i, n) {
  if (e === void 0 && t in Mo) {
    const { bandPaddingInner: a, barBandPaddingInner: o, rectBandPaddingInner: r } = n;
    return Ke(a, i === "bar" ? o : r);
  }
}
function she(e, t, i, n, a, o) {
  if (e === void 0 && t in Mo && i === tt.BAND) {
    const { bandPaddingOuter: r } = o;
    return Ke(
      r,
      /* By default, paddingOuter is paddingInner / 2. The reason is that
        size (width/height) = step * (cardinality - paddingInner + 2 * paddingOuter).
        and we want the width/height to be integer by default.
        Note that step (by default) and cardinality are integers.) */
      ee(a) ? { signal: `${a.signal}/2` } : a / 2
    );
  }
}
function lhe(e, t, i, n) {
  if (i === "x" && n.xReverse !== void 0)
    return Wi(e) && t === "descending" ? ee(n.xReverse) ? { signal: `!${n.xReverse.signal}` } : !n.xReverse : n.xReverse;
  if (Wi(e) && t === "descending")
    return !0;
}
function dhe(e, t, i, n, a) {
  if (!!i && i !== "unaggregated" && Wi(a)) {
    if (X(i)) {
      const r = i[0], s = i[i.length - 1];
      if (r <= 0 && s >= 0)
        return !0;
    }
    return !1;
  }
  if (e === "size" && t.type === "quantitative" && !sp(a))
    return !0;
  if (!(V(t) && t.bin) && Q([...Vi, ...Vae], e)) {
    const { orient: r, type: s } = n;
    return !(Q(["bar", "area", "line", "trail"], s) && (r === "horizontal" && e === "y" || r === "vertical" && e === "x"));
  }
  return !1;
}
function fhe(e, t, i, n) {
  const a = uhe(t, i, n), { type: o } = e;
  return Vo(t) ? o !== void 0 ? Bre(t, o) ? V(i) && !Lre(o, i.type) ? (U(Toe(o, a)), a) : o : (U(Foe(t, o, a)), a) : a : null;
}
function uhe(e, t, i) {
  var n;
  switch (t.type) {
    case "nominal":
    case "ordinal":
      if (Ms(e) || kb(e) === "discrete")
        return e === "shape" && t.type === "ordinal" && U(Ab(e, "ordinal")), "ordinal";
      if (e in Mo) {
        if (Q(["rect", "bar", "image", "rule"], i))
          return "band";
      } else if (i === "arc" && e in $1)
        return "band";
      return t.band !== void 0 || Z1(t) && (!((n = t.axis) === null || n === void 0) && n.tickBand) ? "band" : "point";
    case "temporal":
      return Ms(e) ? "time" : kb(e) === "discrete" ? (U(Ab(e, "temporal")), "ordinal") : V(t) && t.timeUnit && ni(t.timeUnit).utc ? "utc" : "time";
    case "quantitative":
      return Ms(e) ? V(t) && qe(t.bin) ? "bin-ordinal" : "linear" : kb(e) === "discrete" ? (U(Ab(e, "quantitative")), "ordinal") : "linear";
    case "geojson":
      return;
  }
  throw new Error(cj(t.type));
}
function che(e, { ignoreRange: t } = {}) {
  GP(e), NP(e);
  for (const i of qre)
    MP(e, i);
  t || VP(e);
}
function GP(e) {
  Ye(e) ? e.component.scales = hhe(e) : e.component.scales = ghe(e);
}
function hhe(e) {
  const { encoding: t, mark: i } = e;
  return Ig.reduce((n, a) => {
    const o = rt(t[a]);
    if (o && i === Fj && a === mi && o.type === Vl)
      return n;
    let r = o && o.scale;
    if (o && r !== null && r !== !1) {
      r = r ?? {};
      const s = fhe(r, a, o, i);
      n[a] = new LP(e.scaleName(a + "", !0), {
        value: s,
        explicit: r.type === s
      });
    }
    return n;
  }, {});
}
const phe = Cz((e, t) => A2(e) - A2(t));
function ghe(e) {
  var t;
  const i = e.component.scales = {}, n = {}, a = e.component.resolve;
  for (const o of e.children) {
    GP(o);
    for (const r of q(o.component.scales))
      if (a.scale[r] = (t = a.scale[r]) !== null && t !== void 0 ? t : Rue(r, e), a.scale[r] === "shared") {
        const s = n[r], l = o.component.scales[r].getWithExplicit("type");
        s ? wre(s.value, l.value) ? n[r] = Fo(s, l, "type", "scale", phe) : (a.scale[r] = "independent", delete n[r]) : n[r] = l;
      }
  }
  for (const o of q(n)) {
    const r = e.scaleName(o, !0), s = n[o];
    i[o] = new LP(r, s);
    for (const l of e.children) {
      const d = l.component.scales[o];
      d && (l.renameScale(d.get("name"), r), d.merged = !0);
    }
  }
  return i;
}
var zb = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class Pb {
  constructor() {
    this.nameMap = {};
  }
  rename(t, i) {
    this.nameMap[t] = i;
  }
  has(t) {
    return this.nameMap[t] !== void 0;
  }
  get(t) {
    for (; this.nameMap[t] && t !== this.nameMap[t]; )
      t = this.nameMap[t];
    return t;
  }
}
function Ye(e) {
  return (e == null ? void 0 : e.type) === "unit";
}
function fn(e) {
  return (e == null ? void 0 : e.type) === "facet";
}
function Tw(e) {
  return (e == null ? void 0 : e.type) === "concat";
}
function Jl(e) {
  return (e == null ? void 0 : e.type) === "layer";
}
class Cw {
  constructor(t, i, n, a, o, r, s) {
    var l, d;
    this.type = i, this.parent = n, this.config = o, this.children = [], this.correctDataNames = (f) => (f.from && f.from.data && (f.from.data = this.lookupDataSource(f.from.data)), f.from && f.from.facet && f.from.facet.data && (f.from.facet.data = this.lookupDataSource(f.from.facet.data)), f), this.parent = n, this.config = o, this.view = en(s), this.name = (l = t.name) !== null && l !== void 0 ? l : a, this.title = io(t.title) ? { text: t.title } : t.title ? this.initTitle(t.title) : void 0, this.scaleNameMap = n ? n.scaleNameMap : new Pb(), this.projectionNameMap = n ? n.projectionNameMap : new Pb(), this.signalNameMap = n ? n.signalNameMap : new Pb(), this.data = t.data, this.description = t.description, this.transforms = ode((d = t.transform) !== null && d !== void 0 ? d : []), this.layout = i === "layer" || i === "unit" ? {} : ele(t, i, o), this.component = {
      data: {
        sources: n ? n.component.data.sources : [],
        outputNodes: n ? n.component.data.outputNodes : {},
        outputNodeRefCounts: n ? n.component.data.outputNodeRefCounts : {},
        // data is faceted if the spec is a facet spec or the parent has faceted data and data is undefined
        isFaceted: Mg(t) || n && n.component.data.isFaceted && t.data === void 0
      },
      layoutSize: new Ga(),
      layoutHeaders: { row: {}, column: {}, facet: {} },
      mark: null,
      resolve: Object.assign({ scale: {}, axis: {}, legend: {} }, r ? se(r) : {}),
      selection: null,
      scales: null,
      projection: null,
      axes: {},
      legends: {}
    };
  }
  initTitle(t) {
    const i = q(t), n = {
      text: Qt(t.text)
    };
    for (const a of i)
      n[a] = Qt(t[a]);
    return n;
  }
  get width() {
    return this.getSizeSignalRef("width");
  }
  get height() {
    return this.getSizeSignalRef("height");
  }
  parse() {
    this.parseScale(), this.parseLayoutSize(), this.renameTopLevelLayoutSizeSignal(), this.parseSelections(), this.parseProjection(), this.parseData(), this.parseAxesAndHeaders(), this.parseLegends(), this.parseMarkGroup();
  }
  parseScale() {
    che(this);
  }
  parseProjection() {
    jP(this);
  }
  /**
   * Rename top-level spec's size to be just width / height, ignoring model name.
   * This essentially merges the top-level spec's width/height signals with the width/height signals
   * to help us reduce redundant signals declaration.
   */
  renameTopLevelLayoutSizeSignal() {
    this.getName("width") !== "width" && this.renameSignal(this.getName("width"), "width"), this.getName("height") !== "height" && this.renameSignal(this.getName("height"), "height");
  }
  parseLegends() {
    FP(this);
  }
  assembleGroupStyle() {
    var t, i;
    if (this.type === "unit" || this.type === "layer")
      return (i = (t = this.view) === null || t === void 0 ? void 0 : t.style) !== null && i !== void 0 ? i : "cell";
  }
  assembleEncodeFromView(t) {
    const i = zb(t, ["style"]), n = {};
    for (const a of q(i)) {
      const o = i[a];
      o !== void 0 && (n[a] = Ue(o));
    }
    return n;
  }
  assembleGroupEncodeEntry(t) {
    let i = {};
    return this.view && (i = this.assembleEncodeFromView(this.view)), !t && (this.description && (i.description = Ue(this.description)), this.type === "unit" || this.type === "layer") ? Object.assign({ width: this.getSizeSignalRef("width"), height: this.getSizeSignalRef("height") }, i ?? {}) : De(i) ? void 0 : i;
  }
  assembleLayout() {
    if (!this.layout)
      return;
    const t = this.layout, { spacing: i } = t, n = zb(t, ["spacing"]), { component: a, config: o } = this, r = Cue(a.layoutHeaders, o);
    return Object.assign(Object.assign(Object.assign({ padding: i }, this.assembleDefaultLayout()), n), r ? { titleBand: r } : {});
  }
  assembleDefaultLayout() {
    return {};
  }
  assembleHeaderMarks() {
    const { layoutHeaders: t } = this.component;
    let i = [];
    for (const n of Li)
      t[n].title && i.push(Oue(this, n));
    for (const n of ww)
      i = i.concat(Eue(this, n));
    return i;
  }
  assembleAxes() {
    return pue(this.component.axes, this.config);
  }
  assembleLegends() {
    return CP(this);
  }
  assembleProjections() {
    return nce(this);
  }
  assembleTitle() {
    var t, i, n;
    const a = (t = this.title) !== null && t !== void 0 ? t : {}, { encoding: o } = a, r = zb(a, ["encoding"]), s = Object.assign(Object.assign(Object.assign({}, Qj(this.config.title).nonMark), r), o ? { encode: { update: o } } : {});
    if (s.text)
      return Q(["unit", "layer"], this.type) ? Q(["middle", void 0], s.anchor) && (s.frame = (i = s.frame) !== null && i !== void 0 ? i : "group") : s.anchor = (n = s.anchor) !== null && n !== void 0 ? n : "start", De(s) ? void 0 : s;
  }
  /**
   * Assemble the mark group for this model. We accept optional `signals` so that we can include concat top-level signals with the top-level model's local signals.
   */
  assembleGroup(t = []) {
    const i = {};
    t = t.concat(this.assembleSignals()), t.length > 0 && (i.signals = t);
    const n = this.assembleLayout();
    n && (i.layout = n), i.marks = [].concat(this.assembleHeaderMarks(), this.assembleMarks());
    const a = !this.parent || fn(this.parent) ? qP(this) : [];
    a.length > 0 && (i.scales = a);
    const o = this.assembleAxes();
    o.length > 0 && (i.axes = o);
    const r = this.assembleLegends();
    return r.length > 0 && (i.legends = r), i;
  }
  getName(t) {
    return Ne((this.name ? this.name + "_" : "") + t);
  }
  getDataName(t) {
    return this.getName(Ce[t].toLowerCase());
  }
  /**
   * Request a data source name for the given data source type and mark that data source as required.
   * This method should be called in parse, so that all used data source can be correctly instantiated in assembleData().
   * You can lookup the correct dataset name in assemble with `lookupDataSource`.
   */
  requestDataName(t) {
    const i = this.getDataName(t), n = this.component.data.outputNodeRefCounts;
    return n[i] = (n[i] || 0) + 1, i;
  }
  getSizeSignalRef(t) {
    if (fn(this.parent)) {
      const i = kP(t), n = Rg(i), a = this.component.scales[n];
      if (a && !a.merged) {
        const o = a.get("type"), r = a.get("range");
        if (bi(o) && Wo(r)) {
          const s = a.get("name"), l = lm(this, n), d = Fw(l);
          if (d) {
            const f = M({ aggregate: "distinct", field: d }, { expr: "datum" });
            return {
              signal: $P(s, a, f)
            };
          } else
            return U(A1(n)), null;
        }
      }
    }
    return {
      signal: this.signalNameMap.get(this.getName(t))
    };
  }
  /**
   * Lookup the name of the datasource for an output node. You probably want to call this in assemble.
   */
  lookupDataSource(t) {
    const i = this.component.data.outputNodes[t];
    return i ? i.getSource() : t;
  }
  getSignalName(t) {
    return this.signalNameMap.get(t);
  }
  renameSignal(t, i) {
    this.signalNameMap.rename(t, i);
  }
  renameScale(t, i) {
    this.scaleNameMap.rename(t, i);
  }
  renameProjection(t, i) {
    this.projectionNameMap.rename(t, i);
  }
  /**
   * @return scale name for a given channel after the scale has been parsed and named.
   */
  scaleName(t, i) {
    if (i)
      return this.getName(t);
    if (
      // If there is a scale for the channel, there should be a local scale component for it
      oj(t) && Vo(t) && this.component.scales[t] || // in the scale name map (the scale get merged by its parent)
      this.scaleNameMap.has(this.getName(t))
    )
      return this.scaleNameMap.get(this.getName(t));
  }
  /**
   * @return projection name after the projection has been parsed and named.
   */
  projectionName(t) {
    if (t)
      return this.getName("projection");
    if (this.component.projection && !this.component.projection.merged || this.projectionNameMap.has(this.getName("projection")))
      return this.projectionNameMap.get(this.getName("projection"));
  }
  /**
   * Traverse a model's hierarchy to get the scale component for a particular channel.
   */
  getScaleComponent(t) {
    if (!this.component.scales)
      throw new Error("getScaleComponent cannot be called before parseScale(). Make sure you have called parseScale or use parseUnitModelWithScale().");
    const i = this.component.scales[t];
    return i && !i.merged ? i : this.parent ? this.parent.getScaleComponent(t) : void 0;
  }
  /**
   * Traverse a model's hierarchy to get a particular selection component.
   */
  getSelectionComponent(t, i) {
    let n = this.component.selection[t];
    if (!n && this.parent && (n = this.parent.getSelectionComponent(t, i)), !n)
      throw new Error(eoe(i));
    return n;
  }
  /**
   * Returns true if the model has a signalRef for an axis orient.
   */
  hasAxisOrientSignalRef() {
    var t, i;
    return ((t = this.component.axes.x) === null || t === void 0 ? void 0 : t.some((n) => n.hasOrientSignalRef())) || ((i = this.component.axes.y) === null || i === void 0 ? void 0 : i.some((n) => n.hasOrientSignalRef()));
  }
}
class HP extends Cw {
  /** Get "field" reference for Vega */
  vgField(t, i = {}) {
    const n = this.fieldDef(t);
    if (n)
      return M(n, i);
  }
  reduceFieldDef(t, i) {
    return Dse(this.getMapping(), (n, a, o) => {
      const r = Mn(a);
      return r ? t(n, r, o) : n;
    }, i);
  }
  forEachFieldDef(t, i) {
    nw(this.getMapping(), (n, a) => {
      const o = Mn(n);
      o && t(o, a);
    }, i);
  }
}
var mhe = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class dm extends Fe {
  constructor(t, i) {
    var n, a, o;
    super(t), this.transform = i, this.transform = se(i);
    const r = (n = this.transform.as) !== null && n !== void 0 ? n : [void 0, void 0];
    this.transform.as = [(a = r[0]) !== null && a !== void 0 ? a : "value", (o = r[1]) !== null && o !== void 0 ? o : "density"];
  }
  clone() {
    return new dm(null, se(this.transform));
  }
  dependentFields() {
    var t;
    return /* @__PURE__ */ new Set([this.transform.density, ...(t = this.transform.groupby) !== null && t !== void 0 ? t : []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `DensityTransform ${fe(this.transform)}`;
  }
  assemble() {
    const t = this.transform, { density: i } = t, n = mhe(t, ["density"]);
    return Object.assign({ type: "kde", field: i }, n);
  }
}
class Uf extends Fe {
  constructor(t, i) {
    super(t), this.filter = i;
  }
  clone() {
    return new Uf(null, Object.assign({}, this.filter));
  }
  static make(t, i) {
    const { config: n, mark: a, markDef: o } = i;
    if ($e("invalid", o, n) !== "filter")
      return null;
    const s = i.reduceFieldDef((l, d, f) => {
      const u = Vo(f) && i.getScaleComponent(f);
      if (u) {
        const c = u.get("type");
        Wi(c) && d.aggregate !== "count" && !Go(a) && (l[d.field] = d);
      }
      return l;
    }, {});
    return q(s).length ? new Uf(t, s) : null;
  }
  dependentFields() {
    return new Set(q(this.filter));
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return `FilterInvalid ${fe(this.filter)}`;
  }
  /**
   * Create the VgTransforms for each of the filtered fields.
   */
  assemble() {
    const t = q(this.filter).reduce((i, n) => {
      const a = this.filter[n], o = M(a, { expr: "datum" });
      return a !== null && (a.type === "temporal" ? i.push(`(isDate(${o}) || (isValid(${o}) && isFinite(+${o})))`) : a.type === "quantitative" && (i.push(`isValid(${o})`), i.push(`isFinite(+${o})`))), i;
    }, []);
    return t.length > 0 ? {
      type: "filter",
      expr: t.join(" && ")
    } : null;
  }
}
class fm extends Fe {
  constructor(t, i) {
    super(t), this.transform = i, this.transform = se(i);
    const { flatten: n, as: a = [] } = this.transform;
    this.transform.as = n.map((o, r) => {
      var s;
      return (s = a[r]) !== null && s !== void 0 ? s : o;
    });
  }
  clone() {
    return new fm(this.parent, se(this.transform));
  }
  dependentFields() {
    return new Set(this.transform.flatten);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `FlattenTransform ${fe(this.transform)}`;
  }
  assemble() {
    const { flatten: t, as: i } = this.transform;
    return {
      type: "flatten",
      fields: t,
      as: i
    };
  }
}
class um extends Fe {
  constructor(t, i) {
    var n, a, o;
    super(t), this.transform = i, this.transform = se(i);
    const r = (n = this.transform.as) !== null && n !== void 0 ? n : [void 0, void 0];
    this.transform.as = [(a = r[0]) !== null && a !== void 0 ? a : "key", (o = r[1]) !== null && o !== void 0 ? o : "value"];
  }
  clone() {
    return new um(null, se(this.transform));
  }
  dependentFields() {
    return new Set(this.transform.fold);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `FoldTransform ${fe(this.transform)}`;
  }
  assemble() {
    const { fold: t, as: i } = this.transform;
    return {
      type: "fold",
      fields: t,
      as: i
    };
  }
}
class Ws extends Fe {
  constructor(t, i, n, a) {
    super(t), this.fields = i, this.geojson = n, this.signal = a;
  }
  clone() {
    return new Ws(null, se(this.fields), this.geojson, this.signal);
  }
  static parseAll(t, i) {
    if (i.component.projection && !i.component.projection.isFit)
      return t;
    let n = 0;
    for (const a of [
      [na, ia],
      [Mi, xn]
    ]) {
      const o = a.map((r) => {
        const s = rt(i.encoding[r]);
        return V(s) ? s.field : Ho(s) ? { expr: `${s.datum}` } : hn(s) ? { expr: `${s.value}` } : void 0;
      });
      (o[0] || o[1]) && (t = new Ws(t, o, null, i.getName(`geojson_${n++}`)));
    }
    if (i.channelHasField(mi)) {
      const a = i.typedFieldDef(mi);
      a.type === Vl && (t = new Ws(t, null, a.field, i.getName(`geojson_${n++}`)));
    }
    return t;
  }
  dependentFields() {
    var t;
    const i = ((t = this.fields) !== null && t !== void 0 ? t : []).filter(re);
    return /* @__PURE__ */ new Set([...this.geojson ? [this.geojson] : [], ...i]);
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return `GeoJSON ${this.geojson} ${this.signal} ${fe(this.fields)}`;
  }
  assemble() {
    return Object.assign(Object.assign(Object.assign({ type: "geojson" }, this.fields ? { fields: this.fields } : {}), this.geojson ? { geojson: this.geojson } : {}), { signal: this.signal });
  }
}
class Mf extends Fe {
  constructor(t, i, n, a) {
    super(t), this.projection = i, this.fields = n, this.as = a;
  }
  clone() {
    return new Mf(null, this.projection, se(this.fields), se(this.as));
  }
  static parseAll(t, i) {
    if (!i.projectionName())
      return t;
    for (const n of [
      [na, ia],
      [Mi, xn]
    ]) {
      const a = n.map((r) => {
        const s = rt(i.encoding[r]);
        return V(s) ? s.field : Ho(s) ? { expr: `${s.datum}` } : hn(s) ? { expr: `${s.value}` } : void 0;
      }), o = n[0] === Mi ? "2" : "";
      (a[0] || a[1]) && (t = new Mf(t, i.projectionName(), a, [
        i.getName("x" + o),
        i.getName("y" + o)
      ]));
    }
    return t;
  }
  dependentFields() {
    return new Set(this.fields.filter(re));
  }
  producedFields() {
    return new Set(this.as);
  }
  hash() {
    return `Geopoint ${this.projection} ${fe(this.fields)} ${fe(this.as)}`;
  }
  assemble() {
    return {
      type: "geopoint",
      projection: this.projection,
      fields: this.fields,
      as: this.as
    };
  }
}
class Rr extends Fe {
  constructor(t, i) {
    super(t), this.transform = i;
  }
  clone() {
    return new Rr(null, se(this.transform));
  }
  dependentFields() {
    var t;
    return /* @__PURE__ */ new Set([this.transform.impute, this.transform.key, ...(t = this.transform.groupby) !== null && t !== void 0 ? t : []]);
  }
  producedFields() {
    return /* @__PURE__ */ new Set([this.transform.impute]);
  }
  processSequence(t) {
    const { start: i = 0, stop: n, step: a } = t;
    return { signal: `sequence(${[i, n, ...a ? [a] : []].join(",")})` };
  }
  static makeFromTransform(t, i) {
    return new Rr(t, i);
  }
  static makeFromEncoding(t, i) {
    const n = i.encoding, a = n.x, o = n.y;
    if (V(a) && V(o)) {
      const r = a.impute ? a : o.impute ? o : void 0;
      if (r === void 0)
        return;
      const s = a.impute ? o : o.impute ? a : void 0, { method: l, value: d, frame: f, keyvals: u } = r.impute, c = lz(i.mark, n);
      return new Rr(t, Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ impute: r.field, key: s.field }, l ? { method: l } : {}), d !== void 0 ? { value: d } : {}), f ? { frame: f } : {}), u !== void 0 ? { keyvals: u } : {}), c.length ? { groupby: c } : {}));
    }
    return null;
  }
  hash() {
    return `Impute ${fe(this.transform)}`;
  }
  assemble() {
    const { impute: t, key: i, keyvals: n, method: a, groupby: o, value: r, frame: s = [null, null] } = this.transform, l = Object.assign(Object.assign(Object.assign(Object.assign({ type: "impute", field: t, key: i }, n ? { keyvals: qle(n) ? this.processSequence(n) : n } : {}), { method: "value" }), o ? { groupby: o } : {}), { value: !a || a === "value" ? r : null });
    if (a && a !== "value") {
      const d = Object.assign({ type: "window", as: [`imputed_${t}_value`], ops: [a], fields: [t], frame: s, ignorePeers: !1 }, o ? { groupby: o } : {}), f = {
        type: "formula",
        expr: `datum.${t} === null ? datum.imputed_${t}_value : datum.${t}`,
        as: t
      };
      return [l, d, f];
    } else
      return [l];
  }
}
var bhe = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class cm extends Fe {
  constructor(t, i) {
    var n, a, o;
    super(t), this.transform = i, this.transform = se(i);
    const r = (n = this.transform.as) !== null && n !== void 0 ? n : [void 0, void 0];
    this.transform.as = [(a = r[0]) !== null && a !== void 0 ? a : i.on, (o = r[1]) !== null && o !== void 0 ? o : i.loess];
  }
  clone() {
    return new cm(null, se(this.transform));
  }
  dependentFields() {
    var t;
    return /* @__PURE__ */ new Set([this.transform.loess, this.transform.on, ...(t = this.transform.groupby) !== null && t !== void 0 ? t : []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `LoessTransform ${fe(this.transform)}`;
  }
  assemble() {
    const t = this.transform, { loess: i, on: n } = t, a = bhe(t, ["loess", "on"]);
    return Object.assign({ type: "loess", x: n, y: i }, a);
  }
}
class Vf extends Fe {
  constructor(t, i, n) {
    super(t), this.transform = i, this.secondary = n;
  }
  clone() {
    return new Vf(null, se(this.transform), this.secondary);
  }
  static make(t, i, n, a) {
    const o = i.component.data.sources, { from: r } = n;
    let s = null;
    if (Ble(r)) {
      let l = JP(r.data, o);
      l || (l = new Kr(r.data), o.push(l));
      const d = i.getName(`lookup_${a}`);
      s = new ii(l, d, Ce.Lookup, i.component.data.outputNodeRefCounts), i.component.data.outputNodes[d] = s;
    } else if (Ule(r)) {
      const l = r.selection;
      if (n = Object.assign({ as: l }, n), s = i.getSelectionComponent(Ne(l), l).materialized, !s)
        throw new Error(noe(l));
    }
    return new Vf(t, n, s.getSource());
  }
  dependentFields() {
    return /* @__PURE__ */ new Set([this.transform.lookup]);
  }
  producedFields() {
    return new Set(this.transform.as ? Ze(this.transform.as) : this.transform.from.fields);
  }
  hash() {
    return `Lookup ${fe({ transform: this.transform, secondary: this.secondary })}`;
  }
  assemble() {
    let t;
    if (this.transform.from.fields)
      t = Object.assign({ values: this.transform.from.fields }, this.transform.as ? { as: Ze(this.transform.as) } : {});
    else {
      let i = this.transform.as;
      re(i) || (U(uoe), i = "_lookup"), t = {
        as: [i]
      };
    }
    return Object.assign(Object.assign({ type: "lookup", from: this.secondary, key: this.transform.from.key, fields: [this.transform.lookup] }, t), this.transform.default ? { default: this.transform.default } : {});
  }
}
var yhe = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class hm extends Fe {
  constructor(t, i) {
    var n, a, o;
    super(t), this.transform = i, this.transform = se(i);
    const r = (n = this.transform.as) !== null && n !== void 0 ? n : [void 0, void 0];
    this.transform.as = [(a = r[0]) !== null && a !== void 0 ? a : "prob", (o = r[1]) !== null && o !== void 0 ? o : "value"];
  }
  clone() {
    return new hm(null, se(this.transform));
  }
  dependentFields() {
    var t;
    return /* @__PURE__ */ new Set([this.transform.quantile, ...(t = this.transform.groupby) !== null && t !== void 0 ? t : []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `QuantileTransform ${fe(this.transform)}`;
  }
  assemble() {
    const t = this.transform, { quantile: i } = t, n = yhe(t, ["quantile"]);
    return Object.assign({ type: "quantile", field: i }, n);
  }
}
var vhe = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
class pm extends Fe {
  constructor(t, i) {
    var n, a, o;
    super(t), this.transform = i, this.transform = se(i);
    const r = (n = this.transform.as) !== null && n !== void 0 ? n : [void 0, void 0];
    this.transform.as = [(a = r[0]) !== null && a !== void 0 ? a : i.on, (o = r[1]) !== null && o !== void 0 ? o : i.regression];
  }
  clone() {
    return new pm(null, se(this.transform));
  }
  dependentFields() {
    var t;
    return /* @__PURE__ */ new Set([this.transform.regression, this.transform.on, ...(t = this.transform.groupby) !== null && t !== void 0 ? t : []]);
  }
  producedFields() {
    return new Set(this.transform.as);
  }
  hash() {
    return `RegressionTransform ${fe(this.transform)}`;
  }
  assemble() {
    const t = this.transform, { regression: i, on: n } = t, a = vhe(t, ["regression", "on"]);
    return Object.assign({ type: "regression", x: n, y: i }, a);
  }
}
class gm extends Fe {
  constructor(t, i) {
    super(t), this.transform = i;
  }
  clone() {
    return new gm(null, se(this.transform));
  }
  addDimensions(t) {
    var i;
    this.transform.groupby = Tn(((i = this.transform.groupby) !== null && i !== void 0 ? i : []).concat(t), (n) => n);
  }
  producedFields() {
  }
  dependentFields() {
    var t;
    return /* @__PURE__ */ new Set([this.transform.pivot, this.transform.value, ...(t = this.transform.groupby) !== null && t !== void 0 ? t : []]);
  }
  hash() {
    return `PivotTransform ${fe(this.transform)}`;
  }
  assemble() {
    const { pivot: t, value: i, groupby: n, limit: a, op: o } = this.transform;
    return Object.assign(Object.assign(Object.assign({ type: "pivot", field: t, value: i }, a !== void 0 ? { limit: a } : {}), o !== void 0 ? { op: o } : {}), n !== void 0 ? { groupby: n } : {});
  }
}
class mm extends Fe {
  constructor(t, i) {
    super(t), this.transform = i;
  }
  clone() {
    return new mm(null, se(this.transform));
  }
  dependentFields() {
    return /* @__PURE__ */ new Set();
  }
  producedFields() {
    return /* @__PURE__ */ new Set();
  }
  hash() {
    return `SampleTransform ${fe(this.transform)}`;
  }
  assemble() {
    return {
      type: "sample",
      size: this.transform.sample
    };
  }
}
function YP(e) {
  let t = 0;
  function i(n, a) {
    var o;
    if (n instanceof Kr && !n.isGenerator && !Nf(n.data) && (e.push(a), a = {
      name: null,
      source: a.name,
      transform: []
    }), n instanceof It && (n.parent instanceof Kr && !a.source ? (a.format = Object.assign(Object.assign({}, (o = a.format) !== null && o !== void 0 ? o : {}), { parse: n.assembleFormatParse() }), a.transform.push(...n.assembleTransforms(!0))) : a.transform.push(...n.assembleTransforms())), n instanceof Yl) {
      a.name || (a.name = `data_${t++}`), !a.source || a.transform.length > 0 ? (e.push(a), n.data = a.name) : n.data = a.source;
      for (const r of n.assemble())
        e.push(r);
      return;
    }
    switch ((n instanceof zu || n instanceof Pu || n instanceof Uf || n instanceof Hl || n instanceof pl || n instanceof Mf || n instanceof Ws || n instanceof dn || n instanceof Vf || n instanceof Xl || n instanceof bs || n instanceof um || n instanceof fm || n instanceof dm || n instanceof cm || n instanceof hm || n instanceof pm || n instanceof Ro || n instanceof mm || n instanceof gm) && a.transform.push(n.assemble()), (n instanceof Nn || n instanceof Pn || n instanceof Rr || n instanceof Fa) && a.transform.push(...n.assemble()), n instanceof ii && (a.source && a.transform.length === 0 ? n.setSource(a.source) : n.parent instanceof ii ? n.setSource(a.name) : (a.name || (a.name = `data_${t++}`), n.setSource(a.name), n.numChildren() === 1 && (e.push(a), a = {
      name: null,
      source: a.name,
      transform: []
    }))), n.numChildren()) {
      case 0:
        n instanceof ii && (!a.source || a.transform.length > 0) && e.push(a);
        break;
      case 1:
        i(n.children[0], a);
        break;
      default: {
        a.name || (a.name = `data_${t++}`);
        let r = a.name;
        !a.source || a.transform.length > 0 ? e.push(a) : r = a.source;
        for (const s of n.children)
          i(s, {
            name: null,
            source: r,
            transform: []
          });
        break;
      }
    }
  }
  return i;
}
function _he(e) {
  const t = [], i = YP(t);
  for (const n of e.children)
    i(n, {
      source: e.name,
      name: null,
      transform: []
    });
  return t;
}
function xhe(e, t) {
  var i, n;
  const a = [], o = YP(a);
  let r = 0;
  for (const l of e.sources) {
    l.hasName() || (l.dataName = `source_${r++}`);
    const d = l.assemble();
    o(l, d);
  }
  for (const l of a)
    l.transform.length === 0 && delete l.transform;
  let s = 0;
  for (const [l, d] of a.entries())
    ((i = d.transform) !== null && i !== void 0 ? i : []).length === 0 && !d.source && a.splice(s++, 0, a.splice(l, 1)[0]);
  for (const l of a)
    for (const d of (n = l.transform) !== null && n !== void 0 ? n : [])
      d.type === "lookup" && (d.from = e.outputNodes[d.from].getSource());
  for (const l of a)
    l.name in t && (l.values = t[l.name]);
  return a;
}
function whe(e) {
  return e === "top" || e === "left" || ee(e) ? "header" : "footer";
}
function $he(e) {
  for (const t of Li)
    khe(e, t);
  kO(e, "x"), kO(e, "y");
}
function khe(e, t) {
  var i;
  const { facet: n, config: a, child: o, component: r } = e;
  if (e.channelHasField(t)) {
    const s = n[t], l = ml("title", null, a, t);
    let d = Vs(s, a, {
      allowDisabling: !0,
      includeDefault: l === void 0 || !!l
    });
    o.component.layoutHeaders[t].title && (d = X(d) ? d.join(", ") : d, d += " / " + o.component.layoutHeaders[t].title, o.component.layoutHeaders[t].title = null);
    const f = ml("labelOrient", s, a, t), u = (i = s.header) !== null && i !== void 0 ? i : {}, c = Ke(u.labels, a.header.labels, !0), h = Q(["bottom", "right"], f) ? "footer" : "header";
    r.layoutHeaders[t] = {
      title: d,
      facetFieldDef: s,
      [h]: t === "facet" ? [] : [XP(e, t, c)]
    };
  }
}
function XP(e, t, i) {
  const n = t === "row" ? "height" : "width";
  return {
    labels: i,
    sizeSignal: e.child.component.layoutSize.get(n) ? e.child.getSizeSignalRef(n) : void 0,
    axes: []
  };
}
function kO(e, t) {
  var i;
  const { child: n } = e;
  if (n.component.axes[t]) {
    const { layoutHeaders: a, resolve: o } = e.component;
    if (o.axis[t] = Aw(o, t), o.axis[t] === "shared") {
      const r = t === "x" ? "column" : "row", s = a[r];
      for (const l of n.component.axes[t]) {
        const d = whe(l.get("orient"));
        s[d] = (i = s[d]) !== null && i !== void 0 ? i : [XP(e, r, !1)];
        const f = Id(l, "main", e.config, { header: !0 });
        f && s[d][0].axes.push(f), l.mainExtracted = !0;
      }
    }
  }
}
function Ahe(e) {
  Rw(e), wp(e, "width"), wp(e, "height");
}
function Ohe(e) {
  Rw(e);
  const t = e.layout.columns === 1 ? "width" : "childWidth", i = e.layout.columns === void 0 ? "height" : "childHeight";
  wp(e, t), wp(e, i);
}
function Rw(e) {
  for (const t of e.children)
    t.parseLayoutSize();
}
function wp(e, t) {
  const i = kP(t), n = Rg(i), a = e.component.resolve, o = e.component.layoutSize;
  let r;
  for (const s of e.children) {
    const l = s.component.layoutSize.getWithExplicit(i), d = a.scale[n];
    if (d === "independent" && l.value === "step") {
      r = void 0;
      break;
    }
    if (r) {
      if (d === "independent" && r.value !== l.value) {
        r = void 0;
        break;
      }
      r = Fo(r, l, i, "");
    } else
      r = l;
  }
  if (r) {
    for (const s of e.children)
      e.renameSignal(s.getName(i), e.getName(t)), s.component.layoutSize.set(i, "merged", !1);
    o.setWithExplicit(t, r);
  } else
    o.setWithExplicit(t, {
      explicit: !1,
      value: void 0
    });
}
function Ehe(e) {
  const { size: t, component: i } = e;
  for (const n of Vi) {
    const a = sa(n);
    if (t[a]) {
      const o = t[a];
      i.layoutSize.set(a, Vn(o) ? "step" : o, !0);
    } else {
      const o = Dhe(e, a);
      i.layoutSize.set(a, o, !1);
    }
  }
}
function Dhe(e, t) {
  const i = t === "width" ? "x" : "y", n = e.config, a = e.getScaleComponent(i);
  if (a) {
    const o = a.get("type"), r = a.get("range");
    if (bi(o)) {
      const s = Pf(n.view, t);
      return Wo(r) || Vn(s) ? "step" : s;
    } else
      return kv(n.view, t);
  } else {
    if (e.hasProjection || e.mark === "arc")
      return kv(n.view, t);
    {
      const o = Pf(n.view, t);
      return Vn(o) ? o.step : o;
    }
  }
}
var She = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function Bv(e, t, i) {
  return M(t, Object.assign({ suffix: `by_${M(e)}` }, i ?? {}));
}
class ef extends HP {
  constructor(t, i, n, a) {
    super(t, "facet", i, n, a, t.resolve), this.child = Nw(t.spec, this, this.getName("child"), void 0, a), this.children = [this.child], this.facet = this.initFacet(t.facet);
  }
  initFacet(t) {
    if (!Su(t))
      return { facet: this.initFacetFieldDef(t, "facet") };
    const i = q(t), n = {};
    for (const a of i) {
      if (!Q([Oa, Ea], a)) {
        U(zg(a, "facet"));
        break;
      }
      const o = t[a];
      if (o.field === void 0) {
        U(bv(o, a));
        break;
      }
      n[a] = this.initFacetFieldDef(o, a);
    }
    return n;
  }
  initFacetFieldDef(t, i) {
    const { header: n } = t, a = She(t, ["header"]), o = ew(a, i);
    return n && (o.header = en(n)), o;
  }
  channelHasField(t) {
    return !!this.facet[t];
  }
  fieldDef(t) {
    return this.facet[t];
  }
  parseData() {
    this.component.data = bm(this), this.child.parseData();
  }
  parseLayoutSize() {
    Rw(this);
  }
  parseSelections() {
    this.child.parseSelections(), this.component.selection = this.child.component.selection;
  }
  parseMarkGroup() {
    this.child.parseMarkGroup();
  }
  parseAxesAndHeaders() {
    this.child.parseAxesAndHeaders(), $he(this);
  }
  assembleSelectionTopLevelSignals(t) {
    return this.child.assembleSelectionTopLevelSignals(t);
  }
  assembleSignals() {
    return this.child.assembleSignals(), [];
  }
  assembleSelectionData(t) {
    return this.child.assembleSelectionData(t);
  }
  getHeaderLayoutMixins() {
    var t, i, n;
    const a = {};
    for (const o of Li)
      for (const r of $w) {
        const s = this.component.layoutHeaders[o], l = s[r], { facetFieldDef: d } = s;
        if (d) {
          const f = ml("titleOrient", d.header, this.config, o);
          if (Q(["right", "bottom"], f)) {
            const u = rm(o, f);
            a.titleAnchor = (t = a.titleAnchor) !== null && t !== void 0 ? t : {}, a.titleAnchor[u] = "end";
          }
        }
        if (l != null && l[0]) {
          const f = o === "row" ? "height" : "width", u = r === "header" ? "headerBand" : "footerBand";
          o !== "facet" && !this.child.component.layoutSize.get(f) && (a[u] = (i = a[u]) !== null && i !== void 0 ? i : {}, a[u][o] = 0.5), s.title && (a.offset = (n = a.offset) !== null && n !== void 0 ? n : {}, a.offset[o === "row" ? "rowTitle" : "columnTitle"] = 10);
        }
      }
    return a;
  }
  assembleDefaultLayout() {
    const { column: t, row: i } = this.facet, n = t ? this.columnDistinctSignal() : i ? 1 : void 0;
    let a = "all";
    return (!i && this.component.resolve.scale.x === "independent" || !t && this.component.resolve.scale.y === "independent") && (a = "none"), Object.assign(Object.assign(Object.assign({}, this.getHeaderLayoutMixins()), n ? { columns: n } : {}), { bounds: "full", align: a });
  }
  assembleLayoutSignals() {
    return this.child.assembleLayoutSignals();
  }
  columnDistinctSignal() {
    if (!(this.parent && this.parent instanceof ef))
      return { signal: `length(data('${this.getName("column_domain")}'))` };
  }
  assembleGroup(t) {
    return this.parent && this.parent instanceof ef ? Object.assign(Object.assign({}, this.channelHasField("column") ? {
      encode: {
        update: {
          // TODO(https://github.com/vega/vega-lite/issues/2759):
          // Correct the signal for facet of concat of facet_column
          columns: { field: M(this.facet.column, { prefix: "distinct" }) }
        }
      }
    } : {}), super.assembleGroup(t)) : super.assembleGroup(t);
  }
  /**
   * Aggregate cardinality for calculating size
   */
  getCardinalityAggregateForChild() {
    const t = [], i = [], n = [];
    if (this.child instanceof ef) {
      if (this.child.channelHasField("column")) {
        const a = M(this.child.facet.column);
        t.push(a), i.push("distinct"), n.push(`distinct_${a}`);
      }
    } else
      for (const a of Vi) {
        const o = this.child.component.scales[a];
        if (o && !o.merged) {
          const r = o.get("type"), s = o.get("range");
          if (bi(r) && Wo(s)) {
            const l = lm(this.child, a), d = Fw(l);
            d ? (t.push(d), i.push("distinct"), n.push(`distinct_${d}`)) : U(A1(a));
          }
        }
      }
    return { fields: t, ops: i, as: n };
  }
  assembleFacet() {
    const { name: t, data: i } = this.component.data.facetRoot, { row: n, column: a } = this.facet, { fields: o, ops: r, as: s } = this.getCardinalityAggregateForChild(), l = [];
    for (const f of Li) {
      const u = this.facet[f];
      if (u) {
        l.push(M(u));
        const { bin: c, sort: h } = u;
        if (qe(c) && l.push(M(u, { binSuffix: "end" })), zn(h)) {
          const { field: p, op: g = Ug } = h, m = Bv(u, h);
          n && a ? (o.push(m), r.push("max"), s.push(m)) : (o.push(p), r.push(g), s.push(m));
        } else if (X(h)) {
          const p = gl(u, f);
          o.push(p), r.push("max"), s.push(p);
        }
      }
    }
    const d = !!n && !!a;
    return Object.assign({
      name: t,
      data: i,
      groupby: l
    }, d || o.length > 0 ? {
      aggregate: Object.assign(Object.assign({}, d ? { cross: d } : {}), o.length ? { fields: o, ops: r, as: s } : {})
    } : {});
  }
  facetSortFields(t) {
    const { facet: i } = this, n = i[t];
    return n ? zn(n.sort) ? [Bv(n, n.sort, { expr: "datum" })] : X(n.sort) ? [gl(n, t, { expr: "datum" })] : [M(n, { expr: "datum" })] : [];
  }
  facetSortOrder(t) {
    const { facet: i } = this, n = i[t];
    if (n) {
      const { sort: a } = n;
      return [(zn(a) ? a.order : !X(a) && a) || "ascending"];
    }
    return [];
  }
  assembleLabelTitle() {
    var t;
    const { facet: i, config: n } = this;
    if (i.facet)
      return jv(i.facet, "facet", n);
    const a = {
      row: ["top", "bottom"],
      column: ["left", "right"]
    };
    for (const o of ww)
      if (i[o]) {
        const r = ml("labelOrient", (t = i[o]) === null || t === void 0 ? void 0 : t.header, n, o);
        if (Q(a[o], r))
          return jv(i[o], o, n);
      }
  }
  assembleMarks() {
    const { child: t } = this, i = this.component.data.facetRoot, n = _he(i), a = t.assembleGroupEncodeEntry(!1), o = this.assembleLabelTitle() || t.assembleTitle(), r = t.assembleGroupStyle();
    return [Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name: this.getName("cell"), type: "group" }, o ? { title: o } : {}), r ? { style: r } : {}), {
      from: {
        facet: this.assembleFacet()
      },
      // TODO: move this to after data
      sort: {
        field: Li.map((l) => this.facetSortFields(l)).flat(),
        order: Li.map((l) => this.facetSortOrder(l)).flat()
      }
    }), n.length > 0 ? { data: n } : {}), a ? { encode: { update: a } } : {}), t.assembleGroup(Ude(this, [])))];
  }
  getMapping() {
    return this.facet;
  }
}
function Fhe(e, t) {
  const { row: i, column: n } = t;
  if (i && n) {
    let a = null;
    for (const o of [i, n])
      if (zn(o.sort)) {
        const { field: r, op: s = Ug } = o.sort;
        e = a = new bs(e, {
          joinaggregate: [
            {
              op: s,
              field: r,
              as: Bv(o, o.sort, { forAs: !0 })
            }
          ],
          groupby: [M(o)]
        });
      }
    return a;
  }
  return null;
}
function JP(e, t) {
  var i, n, a, o;
  for (const r of t) {
    const s = r.data;
    if (e.name && r.hasName() && e.name !== r.dataName)
      continue;
    const l = (i = e.format) === null || i === void 0 ? void 0 : i.mesh, d = (n = s.format) === null || n === void 0 ? void 0 : n.feature;
    if (l && d)
      continue;
    const f = (a = e.format) === null || a === void 0 ? void 0 : a.feature;
    if ((f || d) && f !== d)
      continue;
    const u = (o = s.format) === null || o === void 0 ? void 0 : o.mesh;
    if (!((l || u) && l !== u)) {
      if (gp(e) && gp(s)) {
        if (Ml(e.values, s.values))
          return r;
      } else if (Nf(e) && Nf(s)) {
        if (e.url === s.url)
          return r;
      } else if (Rz(e) && e.name === r.dataName)
        return r;
    }
  }
  return null;
}
function The(e, t) {
  if (e.data || !e.parent) {
    if (e.data === null) {
      const n = new Kr({ values: [] });
      return t.push(n), n;
    }
    const i = JP(e.data, t);
    if (i)
      return Cr(e.data) || (i.data.format = VI({}, e.data.format, i.data.format)), !i.hasName() && e.data.name && (i.dataName = e.data.name), i;
    {
      const n = new Kr(e.data);
      return t.push(n), n;
    }
  } else
    return e.parent.component.data.facetRoot ? e.parent.component.data.facetRoot : e.parent.component.data.main;
}
function Che(e, t, i) {
  var n, a;
  let o = 0;
  for (const r of t.transforms) {
    let s, l;
    if (Kle(r))
      l = e = new pl(e, r), s = "derived";
    else if (zz(r)) {
      const d = bce(r);
      l = e = (n = It.makeWithAncestors(e, {}, d, i)) !== null && n !== void 0 ? n : e, e = new Hl(e, t, r.filter);
    } else if (Qle(r))
      l = e = Nn.makeFromTransform(e, r, t), s = "number";
    else if (tde(r))
      s = "date", i.getWithExplicit(r.field).value === void 0 && (e = new It(e, { [r.field]: s }), i.set(r.field, s, !1)), l = e = Pn.makeFromTransform(e, r);
    else if (ide(r))
      l = e = dn.makeFromTransform(e, r), s = "number", yw(t) && (e = new Ro(e));
    else if (Lle(r))
      l = e = Vf.make(e, t, r, o++), s = "derived";
    else if (Xle(r))
      l = e = new Xl(e, r), s = "number";
    else if (Jle(r))
      l = e = new bs(e, r), s = "number";
    else if (nde(r))
      l = e = Fa.makeFromTransform(e, r), s = "derived";
    else if (ade(r))
      l = e = new um(e, r), s = "derived";
    else if (Zle(r))
      l = e = new fm(e, r), s = "derived";
    else if (Mle(r))
      l = e = new gm(e, r), s = "derived";
    else if (Yle(r))
      e = new mm(e, r);
    else if (ede(r))
      l = e = Rr.makeFromTransform(e, r), s = "derived";
    else if (Vle(r))
      l = e = new dm(e, r), s = "derived";
    else if (Wle(r))
      l = e = new hm(e, r), s = "derived";
    else if (Gle(r))
      l = e = new pm(e, r), s = "derived";
    else if (Hle(r))
      l = e = new cm(e, r), s = "derived";
    else {
      U(foe(r));
      continue;
    }
    if (l && s !== void 0)
      for (const d of (a = l.producedFields()) !== null && a !== void 0 ? a : [])
        i.set(d, s, !1);
  }
  return e;
}
function bm(e) {
  var t, i, n, a, o, r, s, l, d, f;
  let u = The(e, e.component.data.sources);
  const { outputNodes: c, outputNodeRefCounts: h } = e.component.data, p = e.parent ? e.parent.component.data.ancestorParse.clone() : new Nle(), g = e.data;
  Cr(g) ? (Iz(g) ? u = new Pu(u, g.sequence) : hw(g) && (u = new zu(u, g.graticule)), p.parseNothing = !0) : ((t = g == null ? void 0 : g.format) === null || t === void 0 ? void 0 : t.parse) === null && (p.parseNothing = !0), u = (i = It.makeExplicit(u, e, p)) !== null && i !== void 0 ? i : u, u = new Ro(u);
  const m = e.parent && Jl(e.parent);
  (Ye(e) || fn(e)) && m && (u = (n = Nn.makeFromEncoding(u, e)) !== null && n !== void 0 ? n : u), e.transforms.length > 0 && (u = Che(u, e, p));
  const b = vce(e), y = yce(e);
  u = (a = It.makeWithAncestors(u, {}, Object.assign(Object.assign({}, b), y), p)) !== null && a !== void 0 ? a : u, Ye(e) && (u = Ws.parseAll(u, e), u = Mf.parseAll(u, e)), (Ye(e) || fn(e)) && (m || (u = (o = Nn.makeFromEncoding(u, e)) !== null && o !== void 0 ? o : u), u = (r = Pn.makeFromEncoding(u, e)) !== null && r !== void 0 ? r : u, u = pl.parseAllForSortIndex(u, e));
  const v = e.getDataName(Ce.Raw), w = new ii(u, v, Ce.Raw, h);
  if (c[v] = w, u = w, Ye(e)) {
    const k = dn.makeFromEncoding(u, e);
    k && (u = k, yw(e) && (u = new Ro(u))), u = (s = Rr.makeFromEncoding(u, e)) !== null && s !== void 0 ? s : u, u = (l = Fa.makeFromEncoding(u, e)) !== null && l !== void 0 ? l : u;
  }
  Ye(e) && (u = (d = Uf.make(u, e)) !== null && d !== void 0 ? d : u);
  const x = e.getDataName(Ce.Main), $ = new ii(u, x, Ce.Main, h);
  c[x] = $, u = $, Ye(e) && cue(e, $);
  let _ = null;
  if (fn(e)) {
    const k = e.getName("facet");
    u = (f = Fhe(u, e.facet)) !== null && f !== void 0 ? f : u, _ = new Yl(u, e, k, $.getSource()), c[k] = _;
  }
  return Object.assign(Object.assign({}, e.component.data), {
    outputNodes: c,
    outputNodeRefCounts: h,
    raw: w,
    main: $,
    facetRoot: _,
    ancestorParse: p
  });
}
class Rhe extends Cw {
  constructor(t, i, n, a) {
    var o, r, s, l;
    super(t, "concat", i, n, a, t.resolve), (((r = (o = t.resolve) === null || o === void 0 ? void 0 : o.axis) === null || r === void 0 ? void 0 : r.x) === "shared" || ((l = (s = t.resolve) === null || s === void 0 ? void 0 : s.axis) === null || l === void 0 ? void 0 : l.y) === "shared") && U(soe), this.children = this.getChildren(t).map((d, f) => Nw(d, this, this.getName("concat_" + f), void 0, a));
  }
  parseData() {
    this.component.data = bm(this);
    for (const t of this.children)
      t.parseData();
  }
  parseSelections() {
    this.component.selection = {};
    for (const t of this.children) {
      t.parseSelections();
      for (const i of q(t.component.selection))
        this.component.selection[i] = t.component.selection[i];
    }
  }
  parseMarkGroup() {
    for (const t of this.children)
      t.parseMarkGroup();
  }
  parseAxesAndHeaders() {
    for (const t of this.children)
      t.parseAxesAndHeaders();
  }
  getChildren(t) {
    return Zg(t) ? t.vconcat : uw(t) ? t.hconcat : t.concat;
  }
  parseLayoutSize() {
    Ohe(this);
  }
  parseAxisGroup() {
    return null;
  }
  assembleSelectionTopLevelSignals(t) {
    return this.children.reduce((i, n) => n.assembleSelectionTopLevelSignals(i), t);
  }
  assembleSignals() {
    return this.children.forEach((t) => t.assembleSignals()), [];
  }
  assembleLayoutSignals() {
    const t = kw(this);
    for (const i of this.children)
      t.push(...i.assembleLayoutSignals());
    return t;
  }
  assembleSelectionData(t) {
    return this.children.reduce((i, n) => n.assembleSelectionData(i), t);
  }
  assembleMarks() {
    return this.children.map((t) => {
      const i = t.assembleTitle(), n = t.assembleGroupStyle(), a = t.assembleGroupEncodeEntry(!1);
      return Object.assign(Object.assign(Object.assign(Object.assign({ type: "group", name: t.getName("group") }, i ? { title: i } : {}), n ? { style: n } : {}), a ? { encode: { update: a } } : {}), t.assembleGroup());
    });
  }
  assembleDefaultLayout() {
    const t = this.layout.columns;
    return Object.assign(Object.assign({}, t != null ? { columns: t } : {}), {
      bounds: "full",
      // Use align each so it can work with multiple plots with different size
      align: "each"
    });
  }
}
function Ihe(e) {
  return e === !1 || e === null;
}
const jhe = Object.assign(Object.assign({ disable: 1, gridScale: 1, scale: 1 }, KI), { labelExpr: 1, encode: 1 }), ZP = q(jhe);
class Iw extends Ga {
  constructor(t = {}, i = {}, n = !1) {
    super(), this.explicit = t, this.implicit = i, this.mainExtracted = n;
  }
  clone() {
    return new Iw(se(this.explicit), se(this.implicit), this.mainExtracted);
  }
  hasAxisPart(t) {
    return t === "axis" ? !0 : t === "grid" || t === "title" ? !!this.get(t) : !Ihe(this.get(t));
  }
  hasOrientSignalRef() {
    return ee(this.explicit.orient);
  }
}
function zhe(e, t, i) {
  var n;
  const { encoding: a, config: o } = e, r = (n = rt(a[t])) !== null && n !== void 0 ? n : rt(a[ra(t)]), s = e.axis(t) || {}, { format: l, formatType: d } = s;
  return Hr(d) ? Object.assign({ text: G1({
    fieldOrDatumDef: r,
    field: "datum.value",
    format: l,
    formatType: d,
    config: o
  }) }, i) : i;
}
function Phe(e) {
  return Vi.reduce((t, i) => (e.component.scales[i] && (t[i] = [Vhe(i, e)]), t), {});
}
const Nhe = {
  bottom: "top",
  top: "bottom",
  left: "right",
  right: "left"
};
function qhe(e) {
  var t;
  const { axes: i, resolve: n } = e.component, a = { top: 0, bottom: 0, right: 0, left: 0 };
  for (const o of e.children) {
    o.parseAxesAndHeaders();
    for (const r of q(o.component.axes))
      n.axis[r] = Aw(e.component.resolve, r), n.axis[r] === "shared" && (i[r] = Lhe(i[r], o.component.axes[r]), i[r] || (n.axis[r] = "independent", delete i[r]));
  }
  for (const o of Vi) {
    for (const r of e.children)
      if (r.component.axes[o]) {
        if (n.axis[o] === "independent") {
          i[o] = ((t = i[o]) !== null && t !== void 0 ? t : []).concat(r.component.axes[o]);
          for (const s of r.component.axes[o]) {
            const { value: l, explicit: d } = s.getWithExplicit("orient");
            if (!ee(l)) {
              if (a[l] > 0 && !d) {
                const f = Nhe[l];
                a[l] > a[f] && s.set("orient", f, !1);
              }
              a[l]++;
            }
          }
        }
        delete r.component.axes[o];
      }
    if (n.axis[o] === "independent" && i[o] && i[o].length > 1)
      for (const r of i[o])
        r.get("grid") && !r.explicit.grid && (r.implicit.grid = !1);
  }
}
function Lhe(e, t) {
  if (e) {
    if (e.length !== t.length)
      return;
    const i = e.length;
    for (let n = 0; n < i; n++) {
      const a = e[n], o = t[n];
      if (!!a != !!o)
        return;
      if (a && o) {
        const r = a.getWithExplicit("orient"), s = o.getWithExplicit("orient");
        if (r.explicit && s.explicit && r.value !== s.value)
          return;
        e[n] = Bhe(a, o);
      }
    }
  } else
    return t.map((i) => i.clone());
  return e;
}
function Bhe(e, t) {
  for (const i of ZP) {
    const n = Fo(
      e.getWithExplicit(i),
      t.getWithExplicit(i),
      i,
      "axis",
      // Tie breaker function
      (a, o) => {
        switch (i) {
          case "title":
            return rz(a, o);
          case "gridScale":
            return {
              explicit: a.explicit,
              value: Ke(a.value, o.value)
            };
        }
        return Qg(a, o, i, "axis");
      }
    );
    e.setWithExplicit(i, n);
  }
  return e;
}
function Uhe(e, t, i, n, a) {
  if (t === "disable")
    return i !== void 0;
  switch (i = i || {}, t) {
    case "titleAngle":
    case "labelAngle":
      return e === (ee(i.labelAngle) ? i.labelAngle : jf(i.labelAngle));
    case "values":
      return !!i.values;
    case "encode":
      return !!i.encoding || !!i.labelAngle;
    case "title":
      if (e === vP(n, a))
        return !0;
  }
  return e === i[t];
}
const Mhe = /* @__PURE__ */ new Set([
  "grid",
  "translate",
  // the rest are not axis configs in Vega, but are in VL, so we need to set too.
  "format",
  "formatType",
  "orient",
  "labelExpr",
  "tickCount",
  "position",
  "tickMinStep"
]);
function Vhe(e, t) {
  var i, n, a;
  let o = t.axis(e);
  const r = new Iw(), s = rt(t.encoding[e]), { mark: l, config: d } = t, f = (o == null ? void 0 : o.orient) || ((i = d[e === "x" ? "axisX" : "axisY"]) === null || i === void 0 ? void 0 : i.orient) || ((n = d.axis) === null || n === void 0 ? void 0 : n.orient) || wue(e), u = t.getScaleComponent(e).get("type"), c = gue(e, u, f, t.config), h = o !== void 0 ? !o : Rv("disable", d.style, o == null ? void 0 : o.style, c).configValue;
  if (r.set("disable", h, o !== void 0), h)
    return r;
  o = o || {};
  const p = vue(s, o, e, d.style, c), g = {
    fieldOrDatumDef: s,
    axis: o,
    channel: e,
    model: t,
    scaleType: u,
    orient: f,
    labelAngle: p,
    mark: l,
    config: d
  };
  for (const y of ZP) {
    const v = y in dO ? dO[y](g) : p2(y) ? o[y] : void 0, w = v !== void 0, x = Uhe(v, y, o, t, e);
    if (w && x)
      r.set(y, v, x);
    else {
      const { configValue: $ = void 0, configFrom: _ = void 0 } = p2(y) && y !== "values" ? Rv(y, d.style, o.style, c) : {}, k = $ !== void 0;
      w && !k ? r.set(y, v, x) : (
        // Cases need implicit values
        // 1. Axis config that aren't available in Vega
        (_ !== "vgAxisConfig" || // 2. Certain properties are always included (see `propsToAlwaysIncludeConfig`'s declaration for more details)
        Mhe.has(y) && k || // 3. Conditional axis values and signals
        xu($) || ee($)) && r.set(y, $, !1)
      );
    }
  }
  const m = (a = o.encoding) !== null && a !== void 0 ? a : {}, b = ZI.reduce((y, v) => {
    var w;
    if (!r.hasAxisPart(v))
      return y;
    const x = AP((w = m[v]) !== null && w !== void 0 ? w : {}, t), $ = v === "labels" ? zhe(t, e, x) : x;
    return $ !== void 0 && !De($) && (y[v] = { update: $ }), y;
  }, {});
  return De(b) || r.set("encode", b, !!o.encoding || o.labelAngle !== void 0), r;
}
function Whe({ encoding: e, size: t }) {
  for (const i of Vi) {
    const n = sa(i);
    Vn(t[n]) && Cn(e[i]) && (delete t[n], U(gj(n)));
  }
  return t;
}
function Ghe(e, t, i) {
  const n = en(e), a = $e("orient", n, i);
  if (n.orient = Jhe(n.type, t, a), a !== void 0 && a !== n.orient && U($oe(n.orient, a)), n.type === "bar" && n.orient) {
    const s = $e("cornerRadiusEnd", n, i);
    if (s !== void 0) {
      const l = n.orient === "horizontal" && t.x2 || n.orient === "vertical" && t.y2 ? ["cornerRadius"] : Kre[n.orient];
      for (const d of l)
        n[d] = s;
      n.cornerRadiusEnd !== void 0 && delete n.cornerRadiusEnd;
    }
  }
  return $e("opacity", n, i) === void 0 && (n.opacity = Yhe(n.type, t)), $e("cursor", n, i) === void 0 && (n.cursor = Hhe(n, t, i)), n;
}
function Hhe(e, t, i) {
  return t.href || e.href || $e("href", e, i) ? "pointer" : e.cursor;
}
function Yhe(e, t) {
  if (Q([Lg, L1, B1, U1], e) && !iw(t))
    return 0.7;
}
function Xhe(e, t, { graticule: i }) {
  if (i)
    return !1;
  const n = Yr("filled", e, t), a = e.type;
  return Ke(n, a !== Lg && a !== qg && a !== lp);
}
function Jhe(e, t, i) {
  switch (e) {
    case Lg:
    case B1:
    case U1:
    case Sj:
    case Mre:
    case Ure:
      return;
  }
  const { x: n, y: a, x2: o, y2: r } = t;
  switch (e) {
    case Ng:
      if (V(n) && (Zt(n.bin) || V(a) && a.aggregate && !n.aggregate))
        return "vertical";
      if (V(a) && (Zt(a.bin) || V(n) && n.aggregate && !a.aggregate))
        return "horizontal";
      if (r || o) {
        if (i)
          return i;
        if (!o && (V(n) && n.type === Gr && !qe(n.bin) || wv(n)))
          return "horizontal";
        if (!r && (V(a) && a.type === Gr && !qe(a.bin) || wv(a)))
          return "vertical";
      }
    case lp:
      if (o && !(V(n) && Zt(n.bin)) && r && !(V(a) && Zt(a.bin)))
        return;
    case Pg:
      if (r)
        return V(a) && Zt(a.bin) ? "horizontal" : "vertical";
      if (o)
        return V(n) && Zt(n.bin) ? "vertical" : "horizontal";
      if (e === lp) {
        if (n && !a)
          return "vertical";
        if (a && !n)
          return "horizontal";
      }
    case qg:
    case L1: {
      const s = Cn(n), l = Cn(a);
      if (s && !l)
        return e !== "tick" ? "horizontal" : "vertical";
      if (!s && l)
        return e !== "tick" ? "vertical" : "horizontal";
      if (s && l) {
        const d = n, f = a, u = d.type === fl, c = f.type === fl;
        return u && !c ? e !== "tick" ? "vertical" : "horizontal" : !u && c ? e !== "tick" ? "horizontal" : "vertical" : !d.aggregate && f.aggregate ? e !== "tick" ? "vertical" : "horizontal" : d.aggregate && !f.aggregate ? e !== "tick" ? "horizontal" : "vertical" : i || "vertical";
      } else
        return i || void 0;
    }
  }
  return "vertical";
}
const Zhe = {
  vgMark: "arc",
  encodeEntry: (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    size: "ignore",
    orient: "ignore",
    theta: "ignore"
  })), Rt("x", e, { defaultPos: "mid" })), Rt("y", e, { defaultPos: "mid" })), To(e, "radius", "arc")), To(e, "theta", "arc"))
}, Khe = {
  vgMark: "area",
  encodeEntry: (e) => Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    orient: "include",
    size: "ignore",
    theta: "ignore"
  })), yp("x", e, {
    defaultPos: "zeroOrMin",
    defaultPos2: "zeroOrMin",
    range: e.markDef.orient === "horizontal"
  })), yp("y", e, {
    defaultPos: "zeroOrMin",
    defaultPos2: "zeroOrMin",
    range: e.markDef.orient === "vertical"
  })), mw(e))
}, Qhe = {
  vgMark: "rect",
  encodeEntry: (e) => Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    orient: "ignore",
    size: "ignore",
    theta: "ignore"
  })), To(e, "x", "bar")), To(e, "y", "bar"))
}, epe = {
  vgMark: "shape",
  encodeEntry: (e) => Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    size: "ignore",
    orient: "ignore",
    theta: "ignore"
  })),
  postEncodingTransform: (e) => {
    const { encoding: t } = e, i = t.shape;
    return [Object.assign({ type: "geoshape", projection: e.projectionName() }, i && V(i) && i.type === Vl ? { field: M(i, { expr: "datum" }) } : {})];
  }
}, tpe = {
  vgMark: "image",
  encodeEntry: (e) => Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "ignore",
    orient: "ignore",
    size: "ignore",
    theta: "ignore"
  })), To(e, "x", "image")), To(e, "y", "image")), pw(e, "url"))
}, ipe = {
  vgMark: "line",
  encodeEntry: (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    size: "ignore",
    orient: "ignore",
    theta: "ignore"
  })), Rt("x", e, { defaultPos: "mid" })), Rt("y", e, { defaultPos: "mid" })), dt("size", e, {
    vgChannel: "strokeWidth"
    // VL's line size is strokeWidth
  })), mw(e))
}, npe = {
  vgMark: "trail",
  encodeEntry: (e) => Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    size: "include",
    orient: "ignore",
    theta: "ignore"
  })), Rt("x", e, { defaultPos: "mid" })), Rt("y", e, { defaultPos: "mid" })), dt("size", e)), mw(e))
};
function jw(e, t) {
  const { config: i } = e;
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    size: "include",
    orient: "ignore",
    theta: "ignore"
  })), Rt("x", e, { defaultPos: "mid" })), Rt("y", e, { defaultPos: "mid" })), dt("size", e)), dt("angle", e)), ape(e, i, t));
}
function ape(e, t, i) {
  return i ? { shape: { value: i } } : dt("shape", e);
}
const ope = {
  vgMark: "symbol",
  encodeEntry: (e) => jw(e)
}, rpe = {
  vgMark: "symbol",
  encodeEntry: (e) => jw(e, "circle")
}, spe = {
  vgMark: "symbol",
  encodeEntry: (e) => jw(e, "square")
}, lpe = {
  vgMark: "rect",
  encodeEntry: (e) => Object.assign(Object.assign(Object.assign({}, Hi(e, {
    align: "ignore",
    baseline: "ignore",
    color: "include",
    orient: "ignore",
    size: "ignore",
    theta: "ignore"
  })), To(e, "x", "rect")), To(e, "y", "rect"))
}, dpe = {
  vgMark: "rule",
  encodeEntry: (e) => {
    const { markDef: t } = e, i = t.orient;
    return !e.encoding.x && !e.encoding.y && !e.encoding.latitude && !e.encoding.longitude ? {} : Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      orient: "ignore",
      size: "ignore",
      theta: "ignore"
    })), yp("x", e, {
      defaultPos: i === "horizontal" ? "zeroOrMax" : "mid",
      defaultPos2: "zeroOrMin",
      range: i !== "vertical"
      // include x2 for horizontal or line segment rule
    })), yp("y", e, {
      defaultPos: i === "vertical" ? "zeroOrMax" : "mid",
      defaultPos2: "zeroOrMin",
      range: i !== "horizontal"
      // include y2 for vertical or line segment rule
    })), dt("size", e, {
      vgChannel: "strokeWidth"
      // VL's rule size is strokeWidth
    }));
  }
}, fpe = {
  vgMark: "text",
  encodeEntry: (e) => {
    const { config: t, encoding: i } = e;
    return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
      align: "include",
      baseline: "include",
      color: "include",
      size: "ignore",
      orient: "ignore",
      theta: "include"
    })), Rt("x", e, { defaultPos: "mid" })), Rt("y", e, { defaultPos: "mid" })), pw(e)), dt("size", e, {
      vgChannel: "fontSize"
      // VL's text size is fontSize
    })), dt("angle", e)), Z2("align", upe(e.markDef, i, t))), Z2("baseline", cpe(e.markDef, i, t))), Rt("radius", e, { defaultPos: null, isMidPoint: !0 })), Rt("theta", e, { defaultPos: null, isMidPoint: !0 }));
  }
};
function upe(e, t, i) {
  if ($e("align", e, i) === void 0)
    return "center";
}
function cpe(e, t, i) {
  if ($e("baseline", e, i) === void 0)
    return "middle";
}
const hpe = {
  vgMark: "rect",
  encodeEntry: (e) => {
    const { config: t, markDef: i } = e, n = i.orient, a = n === "horizontal" ? "width" : "height", o = n === "horizontal" ? "height" : "width";
    return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, Hi(e, {
      align: "ignore",
      baseline: "ignore",
      color: "include",
      orient: "ignore",
      size: "ignore",
      theta: "ignore"
    })), Rt("x", e, { defaultPos: "mid", vgChannel: "xc" })), Rt("y", e, { defaultPos: "mid", vgChannel: "yc" })), dt("size", e, {
      defaultValue: ppe(e),
      vgChannel: a
    })), { [o]: Ue($e("thickness", i, t)) });
  }
};
function ppe(e) {
  var t;
  const { config: i, markDef: n } = e, { orient: a } = n, o = a === "horizontal" ? "width" : "height", r = e.getScaleComponent(a === "horizontal" ? "x" : "y"), s = (t = $e("size", n, i, { vgChannel: o })) !== null && t !== void 0 ? t : i.tick.bandSize;
  if (s !== void 0)
    return s;
  {
    const l = r ? r.get("range") : void 0;
    return l && Wo(l) && nt(l.step) ? l.step * 3 / 4 : pp(i.view, o) * 3 / 4;
  }
}
const gc = {
  arc: Zhe,
  area: Khe,
  bar: Qhe,
  circle: rpe,
  geoshape: epe,
  image: tpe,
  line: ipe,
  point: ope,
  rect: lpe,
  rule: dpe,
  square: spe,
  text: fpe,
  tick: hpe,
  trail: npe
};
function gpe(e) {
  if (Q([qg, Pg, Vre], e.mark)) {
    const t = lz(e.mark, e.encoding);
    if (t.length > 0)
      return mpe(e, t);
  } else if (Q([Ng], e.mark)) {
    const t = yv.some((i) => $e(i, e.markDef, e.config));
    if (e.stack && !e.fieldDef("size") && t)
      return bpe(e);
  }
  return zw(e);
}
const AO = "faceted_path_";
function mpe(e, t) {
  return [
    {
      name: e.getName("pathgroup"),
      type: "group",
      from: {
        facet: {
          name: AO + e.requestDataName(Ce.Main),
          data: e.requestDataName(Ce.Main),
          groupby: t
        }
      },
      encode: {
        update: {
          width: { field: { group: "width" } },
          height: { field: { group: "height" } }
        }
      },
      // With subfacet for line/area group, need to use faceted data from above.
      marks: zw(e, { fromPrefix: AO })
    }
  ];
}
const OO = "stack_group_";
function bpe(e) {
  const [t] = zw(e, { fromPrefix: OO }), i = e.scaleName(e.stack.fieldChannel), n = (f = {}) => e.vgField(e.stack.fieldChannel, f), a = (f, u) => {
    const c = [
      n({ prefix: "min", suffix: "start", expr: u }),
      n({ prefix: "max", suffix: "start", expr: u }),
      n({ prefix: "min", suffix: "end", expr: u }),
      n({ prefix: "max", suffix: "end", expr: u })
    ];
    return `${f}(${c.map((h) => `scale('${i}',${h})`).join(",")})`;
  };
  let o, r;
  e.stack.fieldChannel === "x" ? (o = Object.assign(Object.assign({}, rl(t.encode.update, ["y", "yc", "y2", "height", ...yv])), { x: { signal: a("min", "datum") }, x2: { signal: a("max", "datum") }, clip: { value: !0 } }), r = {
    x: { field: { group: "x" }, mult: -1 },
    height: { field: { group: "height" } }
  }, t.encode.update = Object.assign(Object.assign({}, Oi(t.encode.update, ["y", "yc", "y2"])), { height: { field: { group: "height" } } })) : (o = Object.assign(Object.assign({}, rl(t.encode.update, ["x", "xc", "x2", "width"])), { y: { signal: a("min", "datum") }, y2: { signal: a("max", "datum") }, clip: { value: !0 } }), r = {
    y: { field: { group: "y" }, mult: -1 },
    width: { field: { group: "width" } }
  }, t.encode.update = Object.assign(Object.assign({}, Oi(t.encode.update, ["x", "xc", "x2"])), { width: { field: { group: "width" } } }));
  for (const f of yv) {
    const u = Yr(f, e.markDef, e.config);
    t.encode.update[f] ? (o[f] = t.encode.update[f], delete t.encode.update[f]) : u && (o[f] = Ue(u)), u && (t.encode.update[f] = { value: 0 });
  }
  const s = e.fieldDef(e.stack.groupbyChannel), l = M(s) ? [M(s)] : [];
  return (s != null && s.bin || s != null && s.timeUnit) && l.push(M(s, { binSuffix: "end" })), o = [
    "stroke",
    "strokeWidth",
    "strokeJoin",
    "strokeCap",
    "strokeDash",
    "strokeDashOffset",
    "strokeMiterLimit",
    "strokeOpacity"
  ].reduce((f, u) => {
    if (t.encode.update[u])
      return Object.assign(Object.assign({}, f), { [u]: t.encode.update[u] });
    {
      const c = Yr(u, e.markDef, e.config);
      return c !== void 0 ? Object.assign(Object.assign({}, f), { [u]: Ue(c) }) : f;
    }
  }, o), o.stroke && (o.strokeForeground = { value: !0 }, o.strokeOffset = { value: 0 }), [
    {
      type: "group",
      from: {
        facet: {
          data: e.requestDataName(Ce.Main),
          name: OO + e.requestDataName(Ce.Main),
          groupby: l,
          aggregate: {
            fields: [
              n({ suffix: "start" }),
              n({ suffix: "start" }),
              n({ suffix: "end" }),
              n({ suffix: "end" })
            ],
            ops: ["min", "max", "min", "max"]
          }
        }
      },
      encode: {
        update: o
      },
      marks: [
        {
          type: "group",
          encode: { update: r },
          marks: [t]
        }
      ]
    }
  ];
}
function ype(e) {
  const { encoding: t, stack: i, mark: n, markDef: a, config: o } = e, r = t.order;
  if (!(!X(r) && hn(r) && gv(r.value) || !r && gv($e("order", a, o)))) {
    if ((X(r) || V(r)) && !i)
      return nz(r, { expr: "datum" });
    if (Go(n)) {
      const s = a.orient === "horizontal" ? "y" : "x", l = t[s];
      if (V(l)) {
        const d = l.sort;
        if (X(d))
          return {
            field: M(l, { prefix: s, suffix: "sort_index", expr: "datum" })
          };
        if (zn(d))
          return {
            field: M({
              // FIXME: this op might not already exist?
              // FIXME: what if dimensionChannel (x or y) contains custom domain?
              aggregate: iw(e.encoding) ? d.op : void 0,
              field: d.field
            }, { expr: "datum" })
          };
        if (Uj(d)) {
          const f = e.fieldDef(d.encoding);
          return {
            field: M(f, { expr: "datum" }),
            order: d.order
          };
        } else return d === null ? void 0 : {
          field: M(l, {
            // For stack with imputation, we only have bin_mid
            binSuffix: e.stack && e.stack.impute ? "mid" : void 0,
            expr: "datum"
          })
        };
      }
      return;
    }
  }
}
function zw(e, t = { fromPrefix: "" }) {
  const { mark: i, markDef: n, encoding: a, config: o } = e, r = Ke(n.clip, vpe(e), _pe(e)), s = tz(n), l = a.key, d = ype(e), f = xpe(e), u = $e("aria", n, o), c = gc[i].postEncodingTransform ? gc[i].postEncodingTransform(e) : null;
  return [
    Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ name: e.getName("marks"), type: gc[i].vgMark }, r ? { clip: !0 } : {}), s ? { style: s } : {}), l ? { key: l.field } : {}), d ? { sort: d } : {}), f || {}), u === !1 ? { aria: u } : {}), { from: { data: t.fromPrefix + e.requestDataName(Ce.Main) }, encode: {
      update: gc[i].encodeEntry(e)
    } }), c ? {
      transform: c
    } : {})
  ];
}
function vpe(e) {
  const t = e.getScaleComponent("x"), i = e.getScaleComponent("y");
  return t && t.get("selectionExtent") || i && i.get("selectionExtent") ? !0 : void 0;
}
function _pe(e) {
  const t = e.component.projection;
  return t && !t.isFit ? !0 : void 0;
}
function xpe(e) {
  if (!e.component.selection)
    return null;
  const t = q(e.component.selection).length;
  let i = t, n = e.parent;
  for (; n && i === 0; )
    i = q(n.component.selection).length, n = n.parent;
  return i ? {
    interactive: t > 0 || !!e.encoding.tooltip
  } : null;
}
class KP extends HP {
  constructor(t, i, n, a = {}, o) {
    super(t, "unit", i, n, o, void 0, j2(t) ? t.view : void 0), this.specifiedScales = {}, this.specifiedAxes = {}, this.specifiedLegends = {}, this.specifiedProjection = {}, this.selection = {}, this.children = [];
    const r = za(t.mark) ? Object.assign({}, t.mark) : { type: t.mark }, s = r.type;
    r.filled === void 0 && (r.filled = Xhe(r, o, {
      graticule: t.data && hw(t.data)
    }));
    const l = this.encoding = Ose(t.encoding || {}, s, r.filled, o);
    this.markDef = Ghe(r, l, o), this.size = Whe({
      encoding: l,
      size: j2(t) ? Object.assign(Object.assign(Object.assign({}, a), t.width ? { width: t.width } : {}), t.height ? { height: t.height } : {}) : a
    }), this.stack = Ez(s, l), this.specifiedScales = this.initScales(s, l), this.specifiedAxes = this.initAxes(l), this.specifiedLegends = this.initLegends(l), this.specifiedProjection = t.projection, this.selection = t.selection;
  }
  get hasProjection() {
    const { encoding: t } = this, i = this.mark === Fj, n = t && zae.some((a) => ie(t[a]));
    return i || n;
  }
  /**
   * Return specified Vega-Lite scale domain for a particular channel
   * @param channel
   */
  scaleDomain(t) {
    const i = this.specifiedScales[t];
    return i ? i.domain : void 0;
  }
  axis(t) {
    return this.specifiedAxes[t];
  }
  legend(t) {
    return this.specifiedLegends[t];
  }
  initScales(t, i) {
    return Ig.reduce((n, a) => {
      var o;
      const r = rt(i[a]);
      return r && (n[a] = this.initScale((o = r.scale) !== null && o !== void 0 ? o : {})), n;
    }, {});
  }
  initScale(t) {
    const { domain: i, range: n } = t, a = en(t);
    return X(i) && (a.domain = i.map(Qt)), X(n) && (a.range = n.map(Qt)), a;
  }
  initAxes(t) {
    return Vi.reduce((i, n) => {
      const a = t[n];
      if (ie(a) || n === Me && ie(t.x2) || n === lt && ie(t.y2)) {
        const o = ie(a) ? a.axis : void 0;
        i[n] = o && this.initAxis(Object.assign({}, o));
      }
      return i;
    }, {});
  }
  initAxis(t) {
    const i = q(t), n = {};
    for (const a of i) {
      const o = t[a];
      n[a] = xu(o) ? ez(o) : Qt(o);
    }
    return n;
  }
  initLegends(t) {
    return Wae.reduce((i, n) => {
      const a = rt(t[n]);
      if (a && Hae(n)) {
        const o = a.legend;
        i[n] = o && en(o);
      }
      return i;
    }, {});
  }
  parseData() {
    this.component.data = bm(this);
  }
  parseLayoutSize() {
    Ehe(this);
  }
  parseSelections() {
    this.component.selection = uue(this, this.selection);
  }
  parseMarkGroup() {
    this.component.mark = gpe(this);
  }
  parseAxesAndHeaders() {
    this.component.axes = Phe(this);
  }
  assembleSelectionTopLevelSignals(t) {
    return Mde(this, t);
  }
  assembleSignals() {
    return [...mP(this), ...Bde(this, [])];
  }
  assembleSelectionData(t) {
    return Vde(this, t);
  }
  assembleLayout() {
    return null;
  }
  assembleLayoutSignals() {
    return kw(this);
  }
  assembleMarks() {
    var t;
    let i = (t = this.component.mark) !== null && t !== void 0 ? t : [];
    return (!this.parent || !Jl(this.parent)) && (i = iP(this, i)), i.map(this.correctDataNames);
  }
  getMapping() {
    return this.encoding;
  }
  get mark() {
    return this.markDef.type;
  }
  channelHasField(t) {
    return Tr(this.encoding, t);
  }
  fieldDef(t) {
    const i = this.encoding[t];
    return Mn(i);
  }
  typedFieldDef(t) {
    const i = this.fieldDef(t);
    return Gi(i) ? i : null;
  }
}
class Pw extends Cw {
  constructor(t, i, n, a, o) {
    super(t, "layer", i, n, o, t.resolve, t.view);
    const r = Object.assign(Object.assign(Object.assign({}, a), t.width ? { width: t.width } : {}), t.height ? { height: t.height } : {});
    this.children = t.layer.map((s, l) => {
      if (Kg(s))
        return new Pw(s, this, this.getName("layer_" + l), r, o);
      if (Wa(s))
        return new KP(s, this, this.getName("layer_" + l), r, o);
      throw new Error(k1(s));
    });
  }
  parseData() {
    this.component.data = bm(this);
    for (const t of this.children)
      t.parseData();
  }
  parseLayoutSize() {
    Ahe(this);
  }
  parseSelections() {
    this.component.selection = {};
    for (const t of this.children) {
      t.parseSelections();
      for (const i of q(t.component.selection))
        this.component.selection[i] = t.component.selection[i];
    }
  }
  parseMarkGroup() {
    for (const t of this.children)
      t.parseMarkGroup();
  }
  parseAxesAndHeaders() {
    qhe(this);
  }
  assembleSelectionTopLevelSignals(t) {
    return this.children.reduce((i, n) => n.assembleSelectionTopLevelSignals(i), t);
  }
  // TODO: Support same named selections across children.
  assembleSignals() {
    return this.children.reduce((t, i) => t.concat(i.assembleSignals()), mP(this));
  }
  assembleLayoutSignals() {
    return this.children.reduce((t, i) => t.concat(i.assembleLayoutSignals()), kw(this));
  }
  assembleSelectionData(t) {
    return this.children.reduce((i, n) => n.assembleSelectionData(i), t);
  }
  assembleTitle() {
    let t = super.assembleTitle();
    if (t)
      return t;
    for (const i of this.children)
      if (t = i.assembleTitle(), t)
        return t;
  }
  assembleLayout() {
    return null;
  }
  assembleMarks() {
    return Wde(this, this.children.flatMap((t) => t.assembleMarks()));
  }
  assembleLegends() {
    return this.children.reduce((t, i) => t.concat(i.assembleLegends()), CP(this));
  }
}
function Nw(e, t, i, n, a) {
  if (Mg(e))
    return new ef(e, t, i, a);
  if (Kg(e))
    return new Pw(e, t, i, n, a);
  if (Wa(e))
    return new KP(e, t, i, n, a);
  if (Zse(e))
    return new Rhe(e, t, i, a);
  throw new Error(k1(e));
}
var wpe = function(e, t) {
  var i = {};
  for (var n in e) Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) < 0 && (i[n] = e[n]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var a = 0, n = Object.getOwnPropertySymbols(e); a < n.length; a++)
      t.indexOf(n[a]) < 0 && Object.prototype.propertyIsEnumerable.call(e, n[a]) && (i[n[a]] = e[n[a]]);
  return i;
};
function $pe(e, t = {}) {
  t.logger && Yoe(t.logger), t.fieldTitle && Jj(t.fieldTitle);
  try {
    const i = Oz(UI(t.config, e.config)), n = Tz(e, i), a = Nw(n, null, "", void 0, i);
    return a.parse(), jce(a.component.data, a), {
      spec: Ape(a, kpe(e, n.autosize, i, a), e.datasets, e.usermeta),
      normalized: n
    };
  } finally {
    t.logger && Xoe(), t.fieldTitle && bse();
  }
}
function kpe(e, t, i, n) {
  const a = n.component.layoutSize.get("width"), o = n.component.layoutSize.get("height");
  if (t === void 0 ? (t = { type: "pad" }, n.hasAxisOrientSignalRef() && (t.resize = !0)) : re(t) && (t = { type: t }), a && o && jle(t.type)) {
    if (a === "step" && o === "step")
      U(y2()), t.type = "pad";
    else if (a === "step" || o === "step") {
      const r = a === "step" ? "width" : "height";
      U(y2(Rg(r)));
      const s = r === "width" ? "height" : "width";
      t.type = zle(s);
    }
  }
  return Object.assign(Object.assign(Object.assign({}, q(t).length === 1 && t.type ? t.type === "pad" ? {} : { autosize: t.type } : { autosize: t }), H2(i, !1)), H2(e, !0));
}
function Ape(e, t, i = {}, n) {
  const a = e.config ? cle(e.config) : void 0, o = [].concat(
    e.assembleSelectionData([]),
    // only assemble data in the root
    xhe(e.component.data, i)
  ), r = e.assembleProjections(), s = e.assembleTitle(), l = e.assembleGroupStyle(), d = e.assembleGroupEncodeEntry(!0);
  let f = e.assembleLayoutSignals();
  f = f.filter((h) => (h.name === "width" || h.name === "height") && h.value !== void 0 ? (t[h.name] = +h.value, !1) : !0);
  const { params: u } = t, c = wpe(t, ["params"]);
  return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({ $schema: "https://vega.github.io/schema/vega/v5.json" }, e.description ? { description: e.description } : {}), c), s ? { title: s } : {}), l ? { style: l } : {}), d ? { encode: { update: d } } : {}), { data: o }), r.length > 0 ? { projections: r } : {}), e.assembleGroup([
    ...f,
    ...e.assembleSelectionTopLevelSignals([]),
    ...kz(u)
  ])), a ? { config: a } : {}), n ? { usermeta: n } : {});
}
const Ope = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  accessPathDepth: ll,
  accessPathWithDatum: b1,
  compile: $pe,
  contains: Q,
  deepEqual: Ml,
  deleteNestedProperty: op,
  duplicate: se,
  entries: vu,
  every: p1,
  fieldIntersection: m1,
  flatAccessWithDatum: GI,
  getFirstDefined: Ke,
  hasIntersection: g1,
  hash: fe,
  internalField: XI,
  isBoolean: If,
  isEmpty: De,
  isEqual: _ae,
  isInternalField: JI,
  isNullOrFalse: gv,
  isNumeric: Eg,
  keys: q,
  logicalExpr: Us,
  mergeDeep: VI,
  normalize: Tz,
  normalizeAngle: jf,
  omit: Oi,
  pick: rl,
  prefixGenerator: mv,
  removePathFromField: y1,
  replaceAll: Vr,
  replacePathInField: Ia,
  resetIdCounter: wae,
  setEqual: WI,
  some: sl,
  stringify: Ie,
  titleCase: _u,
  unique: Tn,
  uniqueId: YI,
  vals: Aa,
  varName: Ne,
  version: tae
}, Symbol.toStringTag, { value: "Module" }));
function QP(e) {
  const [t, i] = /schema\/([\w-]+)\/([\w\.\-]+)\.json$/g.exec(e).slice(1, 3);
  return { library: t, version: i };
}
var Epe = "vega-themes", Dpe = "2.15.0", Spe = "Themes for stylized Vega and Vega-Lite visualizations.", Fpe = ["vega", "vega-lite", "themes", "style"], Tpe = "BSD-3-Clause", Cpe = {
  name: "UW Interactive Data Lab",
  url: "https://idl.cs.washington.edu"
}, Rpe = [{
  name: "Emily Gu",
  url: "https://github.com/emilygu"
}, {
  name: "Arvind Satyanarayan",
  url: "http://arvindsatya.com"
}, {
  name: "Jeffrey Heer",
  url: "https://idl.cs.washington.edu"
}, {
  name: "Dominik Moritz",
  url: "https://www.domoritz.de"
}], Ipe = "build/vega-themes.js", jpe = "build/vega-themes.module.js", zpe = "build/vega-themes.min.js", Ppe = "build/vega-themes.min.js", Npe = "build/vega-themes.module.d.ts", qpe = {
  type: "git",
  url: "https://github.com/vega/vega-themes.git"
}, Lpe = ["src", "build"], Bpe = {
  prebuild: "yarn clean",
  build: "rollup -c",
  clean: "rimraf build && rimraf examples/build",
  "copy:data": "rsync -r node_modules/vega-datasets/data/* examples/data",
  "copy:build": "rsync -r build/* examples/build",
  "deploy:gh": "yarn build && mkdir -p examples/build && rsync -r build/* examples/build && gh-pages -d examples",
  preversion: "yarn lint",
  serve: "browser-sync start -s -f build examples --serveStatic examples",
  start: "yarn build && concurrently --kill-others -n Server,Rollup 'yarn serve' 'rollup -c -w'",
  format: "eslint . --fix",
  lint: "eslint .",
  release: "release-it"
}, Upe = {
  "@babel/core": "^7.24.6",
  "@babel/plugin-transform-runtime": "^7.24.6",
  "@babel/preset-env": "^7.24.6",
  "@babel/preset-typescript": "^7.24.6",
  "@release-it/conventional-changelog": "^8.0.1",
  "@rollup/plugin-json": "^6.1.0",
  "@rollup/plugin-node-resolve": "^15.2.3",
  "@rollup/plugin-terser": "^0.4.4",
  "@typescript-eslint/eslint-plugin": "^7.11.0",
  "@typescript-eslint/parser": "^7.11.0",
  "browser-sync": "^3.0.2",
  concurrently: "^8.2.2",
  eslint: "^8.45.0",
  "eslint-config-prettier": "^9.1.0",
  "eslint-plugin-prettier": "^5.1.3",
  "gh-pages": "^6.1.1",
  prettier: "^3.2.5",
  "release-it": "^17.3.0",
  rollup: "^4.18.0",
  "rollup-plugin-bundle-size": "^1.0.3",
  "rollup-plugin-ts": "^3.4.5",
  typescript: "^5.4.5",
  vega: "^5.25.0",
  "vega-lite": "^5.9.3"
}, Mpe = {
  vega: "*",
  "vega-lite": "*"
}, Vpe = {}, Wpe = {
  name: Epe,
  version: Dpe,
  description: Spe,
  keywords: Fpe,
  license: Tpe,
  author: Cpe,
  contributors: Rpe,
  main: Ipe,
  module: jpe,
  unpkg: zpe,
  jsdelivr: Ppe,
  types: Npe,
  repository: qpe,
  files: Lpe,
  scripts: Bpe,
  devDependencies: Upe,
  peerDependencies: Mpe,
  dependencies: Vpe
};
const Ds = "#fff", EO = "#888", Gpe = {
  background: "#333",
  view: {
    stroke: EO
  },
  title: {
    color: Ds,
    subtitleColor: Ds
  },
  style: {
    "guide-label": {
      fill: Ds
    },
    "guide-title": {
      fill: Ds
    }
  },
  axis: {
    domainColor: Ds,
    gridColor: EO,
    tickColor: Ds
  }
}, or = "#4572a7", Hpe = {
  background: "#fff",
  arc: {
    fill: or
  },
  area: {
    fill: or
  },
  line: {
    stroke: or,
    strokeWidth: 2
  },
  path: {
    stroke: or
  },
  rect: {
    fill: or
  },
  shape: {
    stroke: or
  },
  symbol: {
    fill: or,
    strokeWidth: 1.5,
    size: 50
  },
  axis: {
    bandPosition: 0.5,
    grid: !0,
    gridColor: "#000000",
    gridOpacity: 1,
    gridWidth: 0.5,
    labelPadding: 10,
    tickSize: 5,
    tickWidth: 0.5
  },
  axisBand: {
    grid: !1,
    tickExtra: !0
  },
  legend: {
    labelBaseline: "middle",
    labelFontSize: 11,
    symbolSize: 50,
    symbolType: "square"
  },
  range: {
    category: ["#4572a7", "#aa4643", "#8aa453", "#71598e", "#4598ae", "#d98445", "#94aace", "#d09393", "#b9cc98", "#a99cbc"]
  }
}, rr = "#30a2da", Nb = "#cbcbcb", Ype = "#999", Xpe = "#333", DO = "#f0f0f0", SO = "#333", Jpe = {
  arc: {
    fill: rr
  },
  area: {
    fill: rr
  },
  axis: {
    domainColor: Nb,
    grid: !0,
    gridColor: Nb,
    gridWidth: 1,
    labelColor: Ype,
    labelFontSize: 10,
    titleColor: Xpe,
    tickColor: Nb,
    tickSize: 10,
    titleFontSize: 14,
    titlePadding: 10,
    labelPadding: 4
  },
  axisBand: {
    grid: !1
  },
  background: DO,
  group: {
    fill: DO
  },
  legend: {
    labelColor: SO,
    labelFontSize: 11,
    padding: 1,
    symbolSize: 30,
    symbolType: "square",
    titleColor: SO,
    titleFontSize: 14,
    titlePadding: 10
  },
  line: {
    stroke: rr,
    strokeWidth: 2
  },
  path: {
    stroke: rr,
    strokeWidth: 0.5
  },
  rect: {
    fill: rr
  },
  range: {
    category: ["#30a2da", "#fc4f30", "#e5ae38", "#6d904f", "#8b8b8b", "#b96db8", "#ff9e27", "#56cc60", "#52d2ca", "#52689e", "#545454", "#9fe4f8"],
    diverging: ["#cc0020", "#e77866", "#f6e7e1", "#d6e8ed", "#91bfd9", "#1d78b5"],
    heatmap: ["#d6e8ed", "#cee0e5", "#91bfd9", "#549cc6", "#1d78b5"]
  },
  point: {
    filled: !0,
    shape: "circle"
  },
  shape: {
    stroke: rr
  },
  bar: {
    binSpacing: 2,
    fill: rr,
    stroke: null
  },
  title: {
    anchor: "start",
    fontSize: 24,
    fontWeight: 600,
    offset: 20
  }
}, sr = "#000", Zpe = {
  group: {
    fill: "#e5e5e5"
  },
  arc: {
    fill: sr
  },
  area: {
    fill: sr
  },
  line: {
    stroke: sr
  },
  path: {
    stroke: sr
  },
  rect: {
    fill: sr
  },
  shape: {
    stroke: sr
  },
  symbol: {
    fill: sr,
    size: 40
  },
  axis: {
    domain: !1,
    grid: !0,
    gridColor: "#FFFFFF",
    gridOpacity: 1,
    labelColor: "#7F7F7F",
    labelPadding: 4,
    tickColor: "#7F7F7F",
    tickSize: 5.67,
    titleFontSize: 16,
    titleFontWeight: "normal"
  },
  legend: {
    labelBaseline: "middle",
    labelFontSize: 11,
    symbolSize: 40
  },
  range: {
    category: ["#000000", "#7F7F7F", "#1A1A1A", "#999999", "#333333", "#B0B0B0", "#4D4D4D", "#C9C9C9", "#666666", "#DCDCDC"]
  }
}, Kpe = 22, Qpe = "normal", FO = "Benton Gothic, sans-serif", TO = 11.5, ege = "normal", lr = "#82c6df", qb = "Benton Gothic Bold, sans-serif", CO = "normal", RO = 13, bd = {
  "category-6": ["#ec8431", "#829eb1", "#c89d29", "#3580b1", "#adc839", "#ab7fb4"],
  "fire-7": ["#fbf2c7", "#f9e39c", "#f8d36e", "#f4bb6a", "#e68a4f", "#d15a40", "#ab4232"],
  "fireandice-6": ["#e68a4f", "#f4bb6a", "#f9e39c", "#dadfe2", "#a6b7c6", "#849eae"],
  "ice-7": ["#edefee", "#dadfe2", "#c4ccd2", "#a6b7c6", "#849eae", "#607785", "#47525d"]
}, tge = {
  background: "#ffffff",
  title: {
    anchor: "start",
    color: "#000000",
    font: qb,
    fontSize: Kpe,
    fontWeight: Qpe
  },
  arc: {
    fill: lr
  },
  area: {
    fill: lr
  },
  line: {
    stroke: lr,
    strokeWidth: 2
  },
  path: {
    stroke: lr
  },
  rect: {
    fill: lr
  },
  shape: {
    stroke: lr
  },
  symbol: {
    fill: lr,
    size: 30
  },
  axis: {
    labelFont: FO,
    labelFontSize: TO,
    labelFontWeight: ege,
    titleFont: qb,
    titleFontSize: RO,
    titleFontWeight: CO
  },
  axisX: {
    labelAngle: 0,
    labelPadding: 4,
    tickSize: 3
  },
  axisY: {
    labelBaseline: "middle",
    maxExtent: 45,
    minExtent: 45,
    tickSize: 2,
    titleAlign: "left",
    titleAngle: 0,
    titleX: -45,
    titleY: -11
  },
  legend: {
    labelFont: FO,
    labelFontSize: TO,
    symbolType: "square",
    titleFont: qb,
    titleFontSize: RO,
    titleFontWeight: CO
  },
  range: {
    category: bd["category-6"],
    diverging: bd["fireandice-6"],
    heatmap: bd["fire-7"],
    ordinal: bd["fire-7"],
    ramp: bd["fire-7"]
  }
}, dr = "#ab5787", mc = "#979797", ige = {
  background: "#f9f9f9",
  arc: {
    fill: dr
  },
  area: {
    fill: dr
  },
  line: {
    stroke: dr
  },
  path: {
    stroke: dr
  },
  rect: {
    fill: dr
  },
  shape: {
    stroke: dr
  },
  symbol: {
    fill: dr,
    size: 30
  },
  axis: {
    domainColor: mc,
    domainWidth: 0.5,
    gridWidth: 0.2,
    labelColor: mc,
    tickColor: mc,
    tickWidth: 0.2,
    titleColor: mc
  },
  axisBand: {
    grid: !1
  },
  axisX: {
    grid: !0,
    tickSize: 10
  },
  axisY: {
    domain: !1,
    grid: !0,
    tickSize: 0
  },
  legend: {
    labelFontSize: 11,
    padding: 1,
    symbolSize: 30,
    symbolType: "square"
  },
  range: {
    category: ["#ab5787", "#51b2e5", "#703c5c", "#168dd9", "#d190b6", "#00609f", "#d365ba", "#154866", "#666666", "#c4c4c4"]
  }
}, fr = "#3e5c69", nge = {
  background: "#fff",
  arc: {
    fill: fr
  },
  area: {
    fill: fr
  },
  line: {
    stroke: fr
  },
  path: {
    stroke: fr
  },
  rect: {
    fill: fr
  },
  shape: {
    stroke: fr
  },
  symbol: {
    fill: fr
  },
  axis: {
    domainWidth: 0.5,
    grid: !0,
    labelPadding: 2,
    tickSize: 5,
    tickWidth: 0.5,
    titleFontWeight: "normal"
  },
  axisBand: {
    grid: !1
  },
  axisX: {
    gridWidth: 0.2
  },
  axisY: {
    gridDash: [3],
    gridWidth: 0.4
  },
  legend: {
    labelFontSize: 11,
    padding: 1,
    symbolType: "square"
  },
  range: {
    category: ["#3e5c69", "#6793a6", "#182429", "#0570b0", "#3690c0", "#74a9cf", "#a6bddb", "#e2ddf2"]
  }
}, Ii = "#1696d2", IO = "#000000", age = "#FFFFFF", bc = "Lato", Lb = "Lato", oge = "Lato", rge = "#DEDDDD", sge = 18, yd = {
  "main-colors": ["#1696d2", "#d2d2d2", "#000000", "#fdbf11", "#ec008b", "#55b748", "#5c5859", "#db2b27"],
  "shades-blue": ["#CFE8F3", "#A2D4EC", "#73BFE2", "#46ABDB", "#1696D2", "#12719E", "#0A4C6A", "#062635"],
  "shades-gray": ["#F5F5F5", "#ECECEC", "#E3E3E3", "#DCDBDB", "#D2D2D2", "#9D9D9D", "#696969", "#353535"],
  "shades-yellow": ["#FFF2CF", "#FCE39E", "#FDD870", "#FCCB41", "#FDBF11", "#E88E2D", "#CA5800", "#843215"],
  "shades-magenta": ["#F5CBDF", "#EB99C2", "#E46AA7", "#E54096", "#EC008B", "#AF1F6B", "#761548", "#351123"],
  "shades-green": ["#DCEDD9", "#BCDEB4", "#98CF90", "#78C26D", "#55B748", "#408941", "#2C5C2D", "#1A2E19"],
  "shades-black": ["#D5D5D4", "#ADABAC", "#848081", "#5C5859", "#332D2F", "#262223", "#1A1717", "#0E0C0D"],
  "shades-red": ["#F8D5D4", "#F1AAA9", "#E9807D", "#E25552", "#DB2B27", "#A4201D", "#6E1614", "#370B0A"],
  "one-group": ["#1696d2", "#000000"],
  "two-groups-cat-1": ["#1696d2", "#000000"],
  "two-groups-cat-2": ["#1696d2", "#fdbf11"],
  "two-groups-cat-3": ["#1696d2", "#db2b27"],
  "two-groups-seq": ["#a2d4ec", "#1696d2"],
  "three-groups-cat": ["#1696d2", "#fdbf11", "#000000"],
  "three-groups-seq": ["#a2d4ec", "#1696d2", "#0a4c6a"],
  "four-groups-cat-1": ["#000000", "#d2d2d2", "#fdbf11", "#1696d2"],
  "four-groups-cat-2": ["#1696d2", "#ec0008b", "#fdbf11", "#5c5859"],
  "four-groups-seq": ["#cfe8f3", "#73bf42", "#1696d2", "#0a4c6a"],
  "five-groups-cat-1": ["#1696d2", "#fdbf11", "#d2d2d2", "#ec008b", "#000000"],
  "five-groups-cat-2": ["#1696d2", "#0a4c6a", "#d2d2d2", "#fdbf11", "#332d2f"],
  "five-groups-seq": ["#cfe8f3", "#73bf42", "#1696d2", "#0a4c6a", "#000000"],
  "six-groups-cat-1": ["#1696d2", "#ec008b", "#fdbf11", "#000000", "#d2d2d2", "#55b748"],
  "six-groups-cat-2": ["#1696d2", "#d2d2d2", "#ec008b", "#fdbf11", "#332d2f", "#0a4c6a"],
  "six-groups-seq": ["#cfe8f3", "#a2d4ec", "#73bfe2", "#46abdb", "#1696d2", "#12719e"],
  "diverging-colors": ["#ca5800", "#fdbf11", "#fdd870", "#fff2cf", "#cfe8f3", "#73bfe2", "#1696d2", "#0a4c6a"]
}, lge = {
  background: age,
  title: {
    anchor: "start",
    fontSize: sge,
    font: bc
  },
  axisX: {
    domain: !0,
    domainColor: IO,
    domainWidth: 1,
    grid: !1,
    labelFontSize: 12,
    labelFont: Lb,
    labelAngle: 0,
    tickColor: IO,
    tickSize: 5,
    titleFontSize: 12,
    titlePadding: 10,
    titleFont: bc
  },
  axisY: {
    domain: !1,
    domainWidth: 1,
    grid: !0,
    gridColor: rge,
    gridWidth: 1,
    labelFontSize: 12,
    labelFont: Lb,
    labelPadding: 8,
    ticks: !1,
    titleFontSize: 12,
    titlePadding: 10,
    titleFont: bc,
    titleAngle: 0,
    titleY: -10,
    titleX: 18
  },
  legend: {
    labelFontSize: 12,
    labelFont: Lb,
    symbolSize: 100,
    titleFontSize: 12,
    titlePadding: 10,
    titleFont: bc,
    orient: "right",
    offset: 10
  },
  view: {
    stroke: "transparent"
  },
  range: {
    category: yd["six-groups-cat-1"],
    diverging: yd["diverging-colors"],
    heatmap: yd["diverging-colors"],
    ordinal: yd["six-groups-seq"],
    ramp: yd["shades-blue"]
  },
  area: {
    fill: Ii
  },
  rect: {
    fill: Ii
  },
  line: {
    color: Ii,
    stroke: Ii,
    strokeWidth: 5
  },
  trail: {
    color: Ii,
    stroke: Ii,
    strokeWidth: 0,
    size: 1
  },
  path: {
    stroke: Ii,
    strokeWidth: 0.5
  },
  point: {
    filled: !0
  },
  text: {
    font: oge,
    color: Ii,
    fontSize: 11,
    align: "center",
    fontWeight: 400,
    size: 11
  },
  style: {
    bar: {
      fill: Ii,
      stroke: null
    }
  },
  arc: {
    fill: Ii
  },
  shape: {
    stroke: Ii
  },
  symbol: {
    fill: Ii,
    size: 30
  }
}, ur = "#3366CC", jO = "#ccc", yc = "Arial, sans-serif", dge = {
  arc: {
    fill: ur
  },
  area: {
    fill: ur
  },
  path: {
    stroke: ur
  },
  rect: {
    fill: ur
  },
  shape: {
    stroke: ur
  },
  symbol: {
    stroke: ur
  },
  circle: {
    fill: ur
  },
  background: "#fff",
  padding: {
    top: 10,
    right: 10,
    bottom: 10,
    left: 10
  },
  style: {
    "guide-label": {
      font: yc,
      fontSize: 12
    },
    "guide-title": {
      font: yc,
      fontSize: 12
    },
    "group-title": {
      font: yc,
      fontSize: 12
    }
  },
  title: {
    font: yc,
    fontSize: 14,
    fontWeight: "bold",
    dy: -3,
    anchor: "start"
  },
  axis: {
    gridColor: jO,
    tickColor: jO,
    domain: !1,
    grid: !0
  },
  range: {
    category: ["#4285F4", "#DB4437", "#F4B400", "#0F9D58", "#AB47BC", "#00ACC1", "#FF7043", "#9E9D24", "#5C6BC0", "#F06292", "#00796B", "#C2185B"],
    heatmap: ["#c6dafc", "#5e97f6", "#2a56c6"]
  }
}, qw = (e) => e * (1 / 3 + 1), zO = qw(9), PO = qw(10), NO = qw(12), vd = "Segoe UI", qO = "wf_standard-font, helvetica, arial, sans-serif", LO = "#252423", _d = "#605E5C", BO = "transparent", fge = "#C8C6C4", Ji = "#118DFF", uge = "#12239E", cge = "#E66C37", hge = "#6B007B", pge = "#E044A7", gge = "#744EC2", mge = "#D9B300", bge = "#D64550", e3 = Ji, t3 = "#DEEFFF", UO = [t3, e3], yge = [t3, "#c7e4ff", "#b0d9ff", "#9aceff", "#83c3ff", "#6cb9ff", "#55aeff", "#3fa3ff", "#2898ff", e3], vge = {
  view: {
    stroke: BO
  },
  background: BO,
  font: vd,
  header: {
    titleFont: qO,
    titleFontSize: NO,
    titleColor: LO,
    labelFont: vd,
    labelFontSize: PO,
    labelColor: _d
  },
  axis: {
    ticks: !1,
    grid: !1,
    domain: !1,
    labelColor: _d,
    labelFontSize: zO,
    titleFont: qO,
    titleColor: LO,
    titleFontSize: NO,
    titleFontWeight: "normal"
  },
  axisQuantitative: {
    tickCount: 3,
    grid: !0,
    gridColor: fge,
    gridDash: [1, 5],
    labelFlush: !1
  },
  axisBand: {
    tickExtra: !0
  },
  axisX: {
    labelPadding: 5
  },
  axisY: {
    labelPadding: 10
  },
  bar: {
    fill: Ji
  },
  line: {
    stroke: Ji,
    strokeWidth: 3,
    strokeCap: "round",
    strokeJoin: "round"
  },
  text: {
    font: vd,
    fontSize: zO,
    fill: _d
  },
  arc: {
    fill: Ji
  },
  area: {
    fill: Ji,
    line: !0,
    opacity: 0.6
  },
  path: {
    stroke: Ji
  },
  rect: {
    fill: Ji
  },
  point: {
    fill: Ji,
    filled: !0,
    size: 75
  },
  shape: {
    stroke: Ji
  },
  symbol: {
    fill: Ji,
    strokeWidth: 1.5,
    size: 50
  },
  legend: {
    titleFont: vd,
    titleFontWeight: "bold",
    titleColor: _d,
    labelFont: vd,
    labelFontSize: PO,
    labelColor: _d,
    symbolType: "circle",
    symbolSize: 75
  },
  range: {
    category: [Ji, uge, cge, hge, pge, gge, mge, bge],
    diverging: UO,
    heatmap: UO,
    ordinal: yge
  }
}, Bb = 'IBM Plex Sans,system-ui,-apple-system,BlinkMacSystemFont,".sfnstext-regular",sans-serif', _ge = 'IBM Plex Sans Condensed, system-ui, -apple-system, BlinkMacSystemFont, ".SFNSText-Regular", sans-serif', Ub = 400, vc = {
  textPrimary: {
    g90: "#f4f4f4",
    g100: "#f4f4f4",
    white: "#161616",
    g10: "#161616"
  },
  textSecondary: {
    g90: "#c6c6c6",
    g100: "#c6c6c6",
    white: "#525252",
    g10: "#525252"
  },
  // layer
  layerAccent01: {
    white: "#e0e0e0",
    g10: "#e0e0e0",
    g90: "#525252",
    g100: "#393939"
  },
  // grid
  gridBg: {
    white: "#ffffff",
    g10: "#ffffff",
    g90: "#161616",
    g100: "#161616"
  }
}, xge = ["#8a3ffc", "#33b1ff", "#007d79", "#ff7eb6", "#fa4d56", "#fff1f1", "#6fdc8c", "#4589ff", "#d12771", "#d2a106", "#08bdba", "#bae6ff", "#ba4e00", "#d4bbff"], wge = ["#6929c4", "#1192e8", "#005d5d", "#9f1853", "#fa4d56", "#570408", "#198038", "#002d9c", "#ee538b", "#b28600", "#009d9a", "#012749", "#8a3800", "#a56eff"];
function ym({
  theme: e,
  background: t
}) {
  const i = ["white", "g10"].includes(e) ? "light" : "dark", n = vc.gridBg[e], a = vc.textPrimary[e], o = vc.textSecondary[e], r = i === "dark" ? xge : wge, s = i === "dark" ? "#d4bbff" : "#6929c4";
  return {
    background: t,
    arc: {
      fill: s
    },
    area: {
      fill: s
    },
    path: {
      stroke: s
    },
    rect: {
      fill: s
    },
    shape: {
      stroke: s
    },
    symbol: {
      stroke: s
    },
    circle: {
      fill: s
    },
    view: {
      fill: n,
      stroke: n
    },
    group: {
      fill: n
    },
    title: {
      color: a,
      anchor: "start",
      dy: -15,
      fontSize: 16,
      font: Bb,
      fontWeight: 600
    },
    axis: {
      // Axis labels
      labelColor: o,
      labelFontSize: 12,
      labelFont: _ge,
      labelFontWeight: Ub,
      // Axis titles
      titleColor: a,
      titleFontWeight: 600,
      titleFontSize: 12,
      // MISC
      grid: !0,
      gridColor: vc.layerAccent01[e],
      labelAngle: 0
    },
    axisX: {
      titlePadding: 10
    },
    axisY: {
      titlePadding: 2.5
    },
    style: {
      "guide-label": {
        font: Bb,
        fill: o,
        fontWeight: Ub
      },
      "guide-title": {
        font: Bb,
        fill: o,
        fontWeight: Ub
      }
    },
    range: {
      category: r,
      diverging: ["#750e13", "#a2191f", "#da1e28", "#fa4d56", "#ff8389", "#ffb3b8", "#ffd7d9", "#fff1f1", "#e5f6ff", "#bae6ff", "#82cfff", "#33b1ff", "#1192e8", "#0072c3", "#00539a", "#003a6d"],
      heatmap: ["#f6f2ff", "#e8daff", "#d4bbff", "#be95ff", "#a56eff", "#8a3ffc", "#6929c4", "#491d8b", "#31135e", "#1c0f30"]
    }
  };
}
const $ge = ym({
  theme: "white",
  background: "#ffffff"
}), kge = ym({
  theme: "g10",
  background: "#f4f4f4"
}), Age = ym({
  theme: "g90",
  background: "#262626"
}), Oge = ym({
  theme: "g100",
  background: "#161616"
}), Ege = Wpe.version, Dge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  carbong10: kge,
  carbong100: Oge,
  carbong90: Age,
  carbonwhite: $ge,
  dark: Gpe,
  excel: Hpe,
  fivethirtyeight: Jpe,
  ggplot2: Zpe,
  googlecharts: dge,
  latimes: tge,
  powerbi: vge,
  quartz: ige,
  urbaninstitute: lge,
  version: Ege,
  vox: nge
}, Symbol.toStringTag, { value: "Module" }));
function Zl(e, t, i) {
  return e.fields = t || [], e.fname = i, e;
}
function Sge(e) {
  return e.length === 1 ? Fge(e[0]) : Tge(e);
}
const Fge = (e) => function(t) {
  return t[e];
}, Tge = (e) => {
  const t = e.length;
  return function(i) {
    for (let n = 0; n < t; ++n)
      i = i[e[n]];
    return i;
  };
};
function Mb(e) {
  throw Error(e);
}
function Cge(e) {
  const t = [], i = e.length;
  let n = null, a = 0, o = "", r, s, l;
  e = e + "";
  function d() {
    t.push(o + e.substring(r, s)), o = "", r = s + 1;
  }
  for (r = s = 0; s < i; ++s)
    if (l = e[s], l === "\\")
      o += e.substring(r, s++), r = s;
    else if (l === n)
      d(), n = null, a = -1;
    else {
      if (n)
        continue;
      r === a && l === '"' || r === a && l === "'" ? (r = s + 1, n = l) : l === "." && !a ? s > r ? d() : r = s + 1 : l === "[" ? (s > r && d(), a = r = s + 1) : l === "]" && (a || Mb("Access path missing open bracket: " + e), a > 0 && d(), a = 0, r = s + 1);
    }
  return a && Mb("Access path missing closing bracket: " + e), n && Mb("Access path missing closing quote: " + e), s > r && (s++, d()), t;
}
function Rge(e, t, i) {
  const n = Cge(e);
  return e = n.length === 1 ? n[0] : e, Zl(Sge(n), [e], e);
}
Rge("id");
Zl((e) => e, [], "identity");
Zl(() => 0, [], "zero");
Zl(() => 1, [], "one");
Zl(() => !0, [], "true");
Zl(() => !1, [], "false");
var Ige = Array.isArray;
function MO(e) {
  return e === Object(e);
}
function jge(e) {
  return typeof e == "string";
}
function zge(e, t, i, n) {
  if (Ige(e))
    return `[${e.map((a) => t(jge(a) ? a : VO(a, i))).join(", ")}]`;
  if (MO(e)) {
    let a = "";
    const {
      title: o,
      image: r,
      ...s
    } = e;
    o && (a += `<h2>${t(o)}</h2>`), r && (a += `<img src="${new URL(t(r), n || location.href).href}">`);
    const l = Object.keys(s);
    if (l.length > 0) {
      a += "<table>";
      for (const d of l) {
        let f = s[d];
        f !== void 0 && (MO(f) && (f = VO(f, i)), a += `<tr><td class="key">${t(d)}</td><td class="value">${t(f)}</td></tr>`);
      }
      a += "</table>";
    }
    return a || "{}";
  }
  return t(e);
}
function Pge(e) {
  const t = [];
  return function(i, n) {
    if (typeof n != "object" || n === null)
      return n;
    const a = t.indexOf(this) + 1;
    return t.length = a, t.length > e ? "[Object]" : t.indexOf(n) >= 0 ? "[Circular]" : (t.push(n), n);
  };
}
function VO(e, t) {
  return JSON.stringify(e, Pge(t));
}
var Nge = `#vg-tooltip-element {
  visibility: hidden;
  padding: 8px;
  position: fixed;
  z-index: 1000;
  font-family: sans-serif;
  font-size: 11px;
  border-radius: 3px;
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
  /* The default theme is the light theme. */
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid #d9d9d9;
  color: black;
}
#vg-tooltip-element.visible {
  visibility: visible;
}
#vg-tooltip-element h2 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 13px;
}
#vg-tooltip-element table {
  border-spacing: 0;
}
#vg-tooltip-element table tr {
  border: none;
}
#vg-tooltip-element table tr td {
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 2px;
  padding-bottom: 2px;
}
#vg-tooltip-element table tr td.key {
  color: #808080;
  max-width: 150px;
  text-align: right;
  padding-right: 4px;
}
#vg-tooltip-element table tr td.value {
  display: block;
  max-width: 300px;
  max-height: 7em;
  text-align: left;
}
#vg-tooltip-element.dark-theme {
  background-color: rgba(32, 32, 32, 0.9);
  border: 1px solid #f5f5f5;
  color: white;
}
#vg-tooltip-element.dark-theme td.key {
  color: #bfbfbf;
}
`;
const i3 = "vg-tooltip-element", qge = {
  /**
   * X offset.
   */
  offsetX: 10,
  /**
   * Y offset.
   */
  offsetY: 10,
  /**
   * ID of the tooltip element.
   */
  id: i3,
  /**
   * ID of the tooltip CSS style.
   */
  styleId: "vega-tooltip-style",
  /**
   * The name of the theme. You can use the CSS class called [THEME]-theme to style the tooltips.
   *
   * There are two predefined themes: "light" (default) and "dark".
   */
  theme: "light",
  /**
   * Do not use the default styles provided by Vega Tooltip. If you enable this option, you need to use your own styles. It is not necessary to disable the default style when using a custom theme.
   */
  disableDefaultStyle: !1,
  /**
   * HTML sanitizer function that removes dangerous HTML to prevent XSS.
   *
   * This should be a function from string to string. You may replace it with a formatter such as a markdown formatter.
   */
  sanitize: Lge,
  /**
   * The maximum recursion depth when printing objects in the tooltip.
   */
  maxDepth: 2,
  /**
   * A function to customize the rendered HTML of the tooltip.
   * @param value A value string, or object of value strings keyed by field
   * @param sanitize The `sanitize` function from `options.sanitize`
   * @param baseURL The `baseURL` from `options.baseURL`
   * @returns {string} The returned string will become the `innerHTML` of the tooltip element
   */
  formatTooltip: zge,
  /**
   * The baseurl to use in image paths.
   */
  baseURL: ""
};
function Lge(e) {
  return String(e).replace(/&/g, "&amp;").replace(/</g, "&lt;");
}
function Bge(e) {
  if (!/^[A-Za-z]+[-:.\w]*$/.test(e))
    throw new Error("Invalid HTML ID");
  return Nge.toString().replace(i3, e);
}
function Uge(e, t, i, n) {
  let a = e.clientX + i;
  a + t.width > window.innerWidth && (a = +e.clientX - i - t.width);
  let o = e.clientY + n;
  return o + t.height > window.innerHeight && (o = +e.clientY - n - t.height), {
    x: a,
    y: o
  };
}
class Mge {
  /**
   * The handler function. We bind this to this function in the constructor.
   */
  /**
   * Complete tooltip options.
   */
  /**
   * The tooltip html element.
   */
  /**
   * Create the tooltip handler and initialize the element and style.
   *
   * @param options Tooltip Options
   */
  constructor(t) {
    this.options = {
      ...qge,
      ...t
    };
    const i = this.options.id;
    if (this.el = null, this.call = this.tooltipHandler.bind(this), !this.options.disableDefaultStyle && !document.getElementById(this.options.styleId)) {
      const n = document.createElement("style");
      n.setAttribute("id", this.options.styleId), n.innerHTML = Bge(i);
      const a = document.head;
      a.childNodes.length > 0 ? a.insertBefore(n, a.childNodes[0]) : a.appendChild(n);
    }
  }
  /**
   * The tooltip handler function.
   */
  tooltipHandler(t, i, n, a) {
    if (this.el = document.getElementById(this.options.id), this.el || (this.el = document.createElement("div"), this.el.setAttribute("id", this.options.id), this.el.classList.add("vg-tooltip"), (document.fullscreenElement ?? document.body).appendChild(this.el)), a == null || a === "") {
      this.el.classList.remove("visible", `${this.options.theme}-theme`);
      return;
    }
    this.el.innerHTML = this.options.formatTooltip(a, this.options.sanitize, this.options.maxDepth, this.options.baseURL), this.el.classList.add("visible", `${this.options.theme}-theme`);
    const {
      x: o,
      y: r
    } = Uge(i, this.el.getBoundingClientRect(), this.options.offsetX, this.options.offsetY);
    this.el.style.top = `${r}px`, this.el.style.left = `${o}px`;
  }
}
var Vb = {};
function Vge(e) {
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
class Wge {
  constructor() {
    this.max = 1e3, this.map = /* @__PURE__ */ new Map();
  }
  get(t) {
    const i = this.map.get(t);
    if (i !== void 0)
      return this.map.delete(t), this.map.set(t, i), i;
  }
  delete(t) {
    return this.map.delete(t);
  }
  set(t, i) {
    if (!this.delete(t) && i !== void 0) {
      if (this.map.size >= this.max) {
        const a = this.map.keys().next().value;
        this.delete(a);
      }
      this.map.set(t, i);
    }
    return this;
  }
}
var Gge = Wge;
const Hge = Object.freeze({
  loose: !0
}), Yge = Object.freeze({}), Xge = (e) => e ? typeof e != "object" ? Hge : e : Yge;
var Lw = Xge, Uv = { exports: {} };
const Jge = "2.0.0", n3 = 256, Zge = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
9007199254740991, Kge = 16, Qge = n3 - 6, eme = ["major", "premajor", "minor", "preminor", "patch", "prepatch", "prerelease"];
var Bw = {
  MAX_LENGTH: n3,
  MAX_SAFE_COMPONENT_LENGTH: Kge,
  MAX_SAFE_BUILD_LENGTH: Qge,
  MAX_SAFE_INTEGER: Zge,
  RELEASE_TYPES: eme,
  SEMVER_SPEC_VERSION: Jge,
  FLAG_INCLUDE_PRERELEASE: 1,
  FLAG_LOOSE: 2
};
const tme = typeof process == "object" && Vb && Vb.NODE_DEBUG && /\bsemver\b/i.test(Vb.NODE_DEBUG) ? (...e) => console.error("SEMVER", ...e) : () => {
};
var vm = tme;
(function(e, t) {
  const {
    MAX_SAFE_COMPONENT_LENGTH: i,
    MAX_SAFE_BUILD_LENGTH: n,
    MAX_LENGTH: a
  } = Bw, o = vm;
  t = e.exports = {};
  const r = t.re = [], s = t.safeRe = [], l = t.src = [], d = t.t = {};
  let f = 0;
  const u = "[a-zA-Z0-9-]", c = [["\\s", 1], ["\\d", a], [u, n]], h = (g) => {
    for (const [m, b] of c)
      g = g.split(`${m}*`).join(`${m}{0,${b}}`).split(`${m}+`).join(`${m}{1,${b}}`);
    return g;
  }, p = (g, m, b) => {
    const y = h(m), v = f++;
    o(g, v, m), d[g] = v, l[v] = m, r[v] = new RegExp(m, b ? "g" : void 0), s[v] = new RegExp(y, b ? "g" : void 0);
  };
  p("NUMERICIDENTIFIER", "0|[1-9]\\d*"), p("NUMERICIDENTIFIERLOOSE", "\\d+"), p("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${u}*`), p("MAINVERSION", `(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})\\.(${l[d.NUMERICIDENTIFIER]})`), p("MAINVERSIONLOOSE", `(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})\\.(${l[d.NUMERICIDENTIFIERLOOSE]})`), p("PRERELEASEIDENTIFIER", `(?:${l[d.NUMERICIDENTIFIER]}|${l[d.NONNUMERICIDENTIFIER]})`), p("PRERELEASEIDENTIFIERLOOSE", `(?:${l[d.NUMERICIDENTIFIERLOOSE]}|${l[d.NONNUMERICIDENTIFIER]})`), p("PRERELEASE", `(?:-(${l[d.PRERELEASEIDENTIFIER]}(?:\\.${l[d.PRERELEASEIDENTIFIER]})*))`), p("PRERELEASELOOSE", `(?:-?(${l[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[d.PRERELEASEIDENTIFIERLOOSE]})*))`), p("BUILDIDENTIFIER", `${u}+`), p("BUILD", `(?:\\+(${l[d.BUILDIDENTIFIER]}(?:\\.${l[d.BUILDIDENTIFIER]})*))`), p("FULLPLAIN", `v?${l[d.MAINVERSION]}${l[d.PRERELEASE]}?${l[d.BUILD]}?`), p("FULL", `^${l[d.FULLPLAIN]}$`), p("LOOSEPLAIN", `[v=\\s]*${l[d.MAINVERSIONLOOSE]}${l[d.PRERELEASELOOSE]}?${l[d.BUILD]}?`), p("LOOSE", `^${l[d.LOOSEPLAIN]}$`), p("GTLT", "((?:<|>)?=?)"), p("XRANGEIDENTIFIERLOOSE", `${l[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`), p("XRANGEIDENTIFIER", `${l[d.NUMERICIDENTIFIER]}|x|X|\\*`), p("XRANGEPLAIN", `[v=\\s]*(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:\\.(${l[d.XRANGEIDENTIFIER]})(?:${l[d.PRERELEASE]})?${l[d.BUILD]}?)?)?`), p("XRANGEPLAINLOOSE", `[v=\\s]*(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[d.XRANGEIDENTIFIERLOOSE]})(?:${l[d.PRERELEASELOOSE]})?${l[d.BUILD]}?)?)?`), p("XRANGE", `^${l[d.GTLT]}\\s*${l[d.XRANGEPLAIN]}$`), p("XRANGELOOSE", `^${l[d.GTLT]}\\s*${l[d.XRANGEPLAINLOOSE]}$`), p("COERCEPLAIN", `(^|[^\\d])(\\d{1,${i}})(?:\\.(\\d{1,${i}}))?(?:\\.(\\d{1,${i}}))?`), p("COERCE", `${l[d.COERCEPLAIN]}(?:$|[^\\d])`), p("COERCEFULL", l[d.COERCEPLAIN] + `(?:${l[d.PRERELEASE]})?(?:${l[d.BUILD]})?(?:$|[^\\d])`), p("COERCERTL", l[d.COERCE], !0), p("COERCERTLFULL", l[d.COERCEFULL], !0), p("LONETILDE", "(?:~>?)"), p("TILDETRIM", `(\\s*)${l[d.LONETILDE]}\\s+`, !0), t.tildeTrimReplace = "$1~", p("TILDE", `^${l[d.LONETILDE]}${l[d.XRANGEPLAIN]}$`), p("TILDELOOSE", `^${l[d.LONETILDE]}${l[d.XRANGEPLAINLOOSE]}$`), p("LONECARET", "(?:\\^)"), p("CARETTRIM", `(\\s*)${l[d.LONECARET]}\\s+`, !0), t.caretTrimReplace = "$1^", p("CARET", `^${l[d.LONECARET]}${l[d.XRANGEPLAIN]}$`), p("CARETLOOSE", `^${l[d.LONECARET]}${l[d.XRANGEPLAINLOOSE]}$`), p("COMPARATORLOOSE", `^${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]})$|^$`), p("COMPARATOR", `^${l[d.GTLT]}\\s*(${l[d.FULLPLAIN]})$|^$`), p("COMPARATORTRIM", `(\\s*)${l[d.GTLT]}\\s*(${l[d.LOOSEPLAIN]}|${l[d.XRANGEPLAIN]})`, !0), t.comparatorTrimReplace = "$1$2$3", p("HYPHENRANGE", `^\\s*(${l[d.XRANGEPLAIN]})\\s+-\\s+(${l[d.XRANGEPLAIN]})\\s*$`), p("HYPHENRANGELOOSE", `^\\s*(${l[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[d.XRANGEPLAINLOOSE]})\\s*$`), p("STAR", "(<|>)?=?\\s*\\*"), p("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$"), p("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
})(Uv, Uv.exports);
var Uw = Uv.exports;
const WO = /^[0-9]+$/, a3 = (e, t) => {
  const i = WO.test(e), n = WO.test(t);
  return i && n && (e = +e, t = +t), e === t ? 0 : i && !n ? -1 : n && !i ? 1 : e < t ? -1 : 1;
}, ime = (e, t) => a3(t, e);
var nme = {
  compareIdentifiers: a3,
  rcompareIdentifiers: ime
};
const _c = vm, {
  MAX_LENGTH: GO,
  MAX_SAFE_INTEGER: xc
} = Bw, {
  safeRe: HO,
  t: YO
} = Uw, ame = Lw, {
  compareIdentifiers: Ss
} = nme;
let ome = class On {
  constructor(t, i) {
    if (i = ame(i), t instanceof On) {
      if (t.loose === !!i.loose && t.includePrerelease === !!i.includePrerelease)
        return t;
      t = t.version;
    } else if (typeof t != "string")
      throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);
    if (t.length > GO)
      throw new TypeError(`version is longer than ${GO} characters`);
    _c("SemVer", t, i), this.options = i, this.loose = !!i.loose, this.includePrerelease = !!i.includePrerelease;
    const n = t.trim().match(i.loose ? HO[YO.LOOSE] : HO[YO.FULL]);
    if (!n)
      throw new TypeError(`Invalid Version: ${t}`);
    if (this.raw = t, this.major = +n[1], this.minor = +n[2], this.patch = +n[3], this.major > xc || this.major < 0)
      throw new TypeError("Invalid major version");
    if (this.minor > xc || this.minor < 0)
      throw new TypeError("Invalid minor version");
    if (this.patch > xc || this.patch < 0)
      throw new TypeError("Invalid patch version");
    n[4] ? this.prerelease = n[4].split(".").map((a) => {
      if (/^[0-9]+$/.test(a)) {
        const o = +a;
        if (o >= 0 && o < xc)
          return o;
      }
      return a;
    }) : this.prerelease = [], this.build = n[5] ? n[5].split(".") : [], this.format();
  }
  format() {
    return this.version = `${this.major}.${this.minor}.${this.patch}`, this.prerelease.length && (this.version += `-${this.prerelease.join(".")}`), this.version;
  }
  toString() {
    return this.version;
  }
  compare(t) {
    if (_c("SemVer.compare", this.version, this.options, t), !(t instanceof On)) {
      if (typeof t == "string" && t === this.version)
        return 0;
      t = new On(t, this.options);
    }
    return t.version === this.version ? 0 : this.compareMain(t) || this.comparePre(t);
  }
  compareMain(t) {
    return t instanceof On || (t = new On(t, this.options)), Ss(this.major, t.major) || Ss(this.minor, t.minor) || Ss(this.patch, t.patch);
  }
  comparePre(t) {
    if (t instanceof On || (t = new On(t, this.options)), this.prerelease.length && !t.prerelease.length)
      return -1;
    if (!this.prerelease.length && t.prerelease.length)
      return 1;
    if (!this.prerelease.length && !t.prerelease.length)
      return 0;
    let i = 0;
    do {
      const n = this.prerelease[i], a = t.prerelease[i];
      if (_c("prerelease compare", i, n, a), n === void 0 && a === void 0)
        return 0;
      if (a === void 0)
        return 1;
      if (n === void 0)
        return -1;
      if (n === a)
        continue;
      return Ss(n, a);
    } while (++i);
  }
  compareBuild(t) {
    t instanceof On || (t = new On(t, this.options));
    let i = 0;
    do {
      const n = this.build[i], a = t.build[i];
      if (_c("build compare", i, n, a), n === void 0 && a === void 0)
        return 0;
      if (a === void 0)
        return 1;
      if (n === void 0)
        return -1;
      if (n === a)
        continue;
      return Ss(n, a);
    } while (++i);
  }
  // preminor will bump the version up to the next minor release, and immediately
  // down to pre-release. premajor and prepatch work the same way.
  inc(t, i, n) {
    switch (t) {
      case "premajor":
        this.prerelease.length = 0, this.patch = 0, this.minor = 0, this.major++, this.inc("pre", i, n);
        break;
      case "preminor":
        this.prerelease.length = 0, this.patch = 0, this.minor++, this.inc("pre", i, n);
        break;
      case "prepatch":
        this.prerelease.length = 0, this.inc("patch", i, n), this.inc("pre", i, n);
        break;
      case "prerelease":
        this.prerelease.length === 0 && this.inc("patch", i, n), this.inc("pre", i, n);
        break;
      case "major":
        (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) && this.major++, this.minor = 0, this.patch = 0, this.prerelease = [];
        break;
      case "minor":
        (this.patch !== 0 || this.prerelease.length === 0) && this.minor++, this.patch = 0, this.prerelease = [];
        break;
      case "patch":
        this.prerelease.length === 0 && this.patch++, this.prerelease = [];
        break;
      case "pre": {
        const a = Number(n) ? 1 : 0;
        if (!i && n === !1)
          throw new Error("invalid increment argument: identifier is empty");
        if (this.prerelease.length === 0)
          this.prerelease = [a];
        else {
          let o = this.prerelease.length;
          for (; --o >= 0; )
            typeof this.prerelease[o] == "number" && (this.prerelease[o]++, o = -2);
          if (o === -1) {
            if (i === this.prerelease.join(".") && n === !1)
              throw new Error("invalid increment argument: identifier already exists");
            this.prerelease.push(a);
          }
        }
        if (i) {
          let o = [i, a];
          n === !1 && (o = [i]), Ss(this.prerelease[0], i) === 0 ? isNaN(this.prerelease[1]) && (this.prerelease = o) : this.prerelease = o;
        }
        break;
      }
      default:
        throw new Error(`invalid increment argument: ${t}`);
    }
    return this.raw = this.format(), this.build.length && (this.raw += `+${this.build.join(".")}`), this;
  }
};
var Mw = ome;
const XO = Mw, rme = (e, t, i) => new XO(e, i).compare(new XO(t, i));
var Kl = rme;
const sme = Kl, lme = (e, t, i) => sme(e, t, i) === 0;
var dme = lme;
const fme = Kl, ume = (e, t, i) => fme(e, t, i) !== 0;
var cme = ume;
const hme = Kl, pme = (e, t, i) => hme(e, t, i) > 0;
var gme = pme;
const mme = Kl, bme = (e, t, i) => mme(e, t, i) >= 0;
var yme = bme;
const vme = Kl, _me = (e, t, i) => vme(e, t, i) < 0;
var xme = _me;
const wme = Kl, $me = (e, t, i) => wme(e, t, i) <= 0;
var kme = $me;
const Ame = dme, Ome = cme, Eme = gme, Dme = yme, Sme = xme, Fme = kme, Tme = (e, t, i, n) => {
  switch (t) {
    case "===":
      return typeof e == "object" && (e = e.version), typeof i == "object" && (i = i.version), e === i;
    case "!==":
      return typeof e == "object" && (e = e.version), typeof i == "object" && (i = i.version), e !== i;
    case "":
    case "=":
    case "==":
      return Ame(e, i, n);
    case "!=":
      return Ome(e, i, n);
    case ">":
      return Eme(e, i, n);
    case ">=":
      return Dme(e, i, n);
    case "<":
      return Sme(e, i, n);
    case "<=":
      return Fme(e, i, n);
    default:
      throw new TypeError(`Invalid operator: ${t}`);
  }
};
var Cme = Tme, Wb, JO;
function Rme() {
  if (JO) return Wb;
  JO = 1;
  const e = Symbol("SemVer ANY");
  class t {
    static get ANY() {
      return e;
    }
    constructor(f, u) {
      if (u = i(u), f instanceof t) {
        if (f.loose === !!u.loose)
          return f;
        f = f.value;
      }
      f = f.trim().split(/\s+/).join(" "), r("comparator", f, u), this.options = u, this.loose = !!u.loose, this.parse(f), this.semver === e ? this.value = "" : this.value = this.operator + this.semver.version, r("comp", this);
    }
    parse(f) {
      const u = this.options.loose ? n[a.COMPARATORLOOSE] : n[a.COMPARATOR], c = f.match(u);
      if (!c)
        throw new TypeError(`Invalid comparator: ${f}`);
      this.operator = c[1] !== void 0 ? c[1] : "", this.operator === "=" && (this.operator = ""), c[2] ? this.semver = new s(c[2], this.options.loose) : this.semver = e;
    }
    toString() {
      return this.value;
    }
    test(f) {
      if (r("Comparator.test", f, this.options.loose), this.semver === e || f === e)
        return !0;
      if (typeof f == "string")
        try {
          f = new s(f, this.options);
        } catch {
          return !1;
        }
      return o(f, this.operator, this.semver, this.options);
    }
    intersects(f, u) {
      if (!(f instanceof t))
        throw new TypeError("a Comparator is required");
      return this.operator === "" ? this.value === "" ? !0 : new l(f.value, u).test(this.value) : f.operator === "" ? f.value === "" ? !0 : new l(this.value, u).test(f.semver) : (u = i(u), u.includePrerelease && (this.value === "<0.0.0-0" || f.value === "<0.0.0-0") || !u.includePrerelease && (this.value.startsWith("<0.0.0") || f.value.startsWith("<0.0.0")) ? !1 : !!(this.operator.startsWith(">") && f.operator.startsWith(">") || this.operator.startsWith("<") && f.operator.startsWith("<") || this.semver.version === f.semver.version && this.operator.includes("=") && f.operator.includes("=") || o(this.semver, "<", f.semver, u) && this.operator.startsWith(">") && f.operator.startsWith("<") || o(this.semver, ">", f.semver, u) && this.operator.startsWith("<") && f.operator.startsWith(">")));
    }
  }
  Wb = t;
  const i = Lw, {
    safeRe: n,
    t: a
  } = Uw, o = Cme, r = vm, s = Mw, l = o3();
  return Wb;
}
var Gb, ZO;
function o3() {
  if (ZO) return Gb;
  ZO = 1;
  class e {
    constructor(D, j) {
      if (j = n(j), D instanceof e)
        return D.loose === !!j.loose && D.includePrerelease === !!j.includePrerelease ? D : new e(D.raw, j);
      if (D instanceof a)
        return this.raw = D.value, this.set = [[D]], this.format(), this;
      if (this.options = j, this.loose = !!j.loose, this.includePrerelease = !!j.includePrerelease, this.raw = D.trim().split(/\s+/).join(" "), this.set = this.raw.split("||").map((F) => this.parseRange(F.trim())).filter((F) => F.length), !this.set.length)
        throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
      if (this.set.length > 1) {
        const F = this.set[0];
        if (this.set = this.set.filter((P) => !p(P[0])), this.set.length === 0)
          this.set = [F];
        else if (this.set.length > 1) {
          for (const P of this.set)
            if (P.length === 1 && g(P[0])) {
              this.set = [P];
              break;
            }
        }
      }
      this.format();
    }
    format() {
      return this.range = this.set.map((D) => D.join(" ").trim()).join("||").trim(), this.range;
    }
    toString() {
      return this.range;
    }
    parseRange(D) {
      const F = ((this.options.includePrerelease && c) | (this.options.loose && h)) + ":" + D, P = i.get(F);
      if (P)
        return P;
      const N = this.options.loose, L = N ? s[l.HYPHENRANGELOOSE] : s[l.HYPHENRANGE];
      D = D.replace(L, S(this.options.includePrerelease)), o("hyphen replace", D), D = D.replace(s[l.COMPARATORTRIM], d), o("comparator trim", D), D = D.replace(s[l.TILDETRIM], f), o("tilde trim", D), D = D.replace(s[l.CARETTRIM], u), o("caret trim", D);
      let K = D.split(" ").map((ke) => b(ke, this.options)).join(" ").split(/\s+/).map((ke) => E(ke, this.options));
      N && (K = K.filter((ke) => (o("loose invalid filter", ke, this.options), !!ke.match(s[l.COMPARATORLOOSE])))), o("range list", K);
      const te = /* @__PURE__ */ new Map(), ce = K.map((ke) => new a(ke, this.options));
      for (const ke of ce) {
        if (p(ke))
          return [ke];
        te.set(ke.value, ke);
      }
      te.size > 1 && te.has("") && te.delete("");
      const Ve = [...te.values()];
      return i.set(F, Ve), Ve;
    }
    intersects(D, j) {
      if (!(D instanceof e))
        throw new TypeError("a Range is required");
      return this.set.some((F) => m(F, j) && D.set.some((P) => m(P, j) && F.every((N) => P.every((L) => N.intersects(L, j)))));
    }
    // if ANY of the sets match ALL of its comparators, then pass
    test(D) {
      if (!D)
        return !1;
      if (typeof D == "string")
        try {
          D = new r(D, this.options);
        } catch {
          return !1;
        }
      for (let j = 0; j < this.set.length; j++)
        if (z(this.set[j], D, this.options))
          return !0;
      return !1;
    }
  }
  Gb = e;
  const t = Gge, i = new t(), n = Lw, a = Rme(), o = vm, r = Mw, {
    safeRe: s,
    t: l,
    comparatorTrimReplace: d,
    tildeTrimReplace: f,
    caretTrimReplace: u
  } = Uw, {
    FLAG_INCLUDE_PRERELEASE: c,
    FLAG_LOOSE: h
  } = Bw, p = (O) => O.value === "<0.0.0-0", g = (O) => O.value === "", m = (O, D) => {
    let j = !0;
    const F = O.slice();
    let P = F.pop();
    for (; j && F.length; )
      j = F.every((N) => P.intersects(N, D)), P = F.pop();
    return j;
  }, b = (O, D) => (o("comp", O, D), O = x(O, D), o("caret", O), O = v(O, D), o("tildes", O), O = _(O, D), o("xrange", O), O = A(O, D), o("stars", O), O), y = (O) => !O || O.toLowerCase() === "x" || O === "*", v = (O, D) => O.trim().split(/\s+/).map((j) => w(j, D)).join(" "), w = (O, D) => {
    const j = D.loose ? s[l.TILDELOOSE] : s[l.TILDE];
    return O.replace(j, (F, P, N, L, K) => {
      o("tilde", O, F, P, N, L, K);
      let te;
      return y(P) ? te = "" : y(N) ? te = `>=${P}.0.0 <${+P + 1}.0.0-0` : y(L) ? te = `>=${P}.${N}.0 <${P}.${+N + 1}.0-0` : K ? (o("replaceTilde pr", K), te = `>=${P}.${N}.${L}-${K} <${P}.${+N + 1}.0-0`) : te = `>=${P}.${N}.${L} <${P}.${+N + 1}.0-0`, o("tilde return", te), te;
    });
  }, x = (O, D) => O.trim().split(/\s+/).map((j) => $(j, D)).join(" "), $ = (O, D) => {
    o("caret", O, D);
    const j = D.loose ? s[l.CARETLOOSE] : s[l.CARET], F = D.includePrerelease ? "-0" : "";
    return O.replace(j, (P, N, L, K, te) => {
      o("caret", O, P, N, L, K, te);
      let ce;
      return y(N) ? ce = "" : y(L) ? ce = `>=${N}.0.0${F} <${+N + 1}.0.0-0` : y(K) ? N === "0" ? ce = `>=${N}.${L}.0${F} <${N}.${+L + 1}.0-0` : ce = `>=${N}.${L}.0${F} <${+N + 1}.0.0-0` : te ? (o("replaceCaret pr", te), N === "0" ? L === "0" ? ce = `>=${N}.${L}.${K}-${te} <${N}.${L}.${+K + 1}-0` : ce = `>=${N}.${L}.${K}-${te} <${N}.${+L + 1}.0-0` : ce = `>=${N}.${L}.${K}-${te} <${+N + 1}.0.0-0`) : (o("no pr"), N === "0" ? L === "0" ? ce = `>=${N}.${L}.${K}${F} <${N}.${L}.${+K + 1}-0` : ce = `>=${N}.${L}.${K}${F} <${N}.${+L + 1}.0-0` : ce = `>=${N}.${L}.${K} <${+N + 1}.0.0-0`), o("caret return", ce), ce;
    });
  }, _ = (O, D) => (o("replaceXRanges", O, D), O.split(/\s+/).map((j) => k(j, D)).join(" ")), k = (O, D) => {
    O = O.trim();
    const j = D.loose ? s[l.XRANGELOOSE] : s[l.XRANGE];
    return O.replace(j, (F, P, N, L, K, te) => {
      o("xRange", O, F, P, N, L, K, te);
      const ce = y(N), Ve = ce || y(L), ke = Ve || y(K), We = ke;
      return P === "=" && We && (P = ""), te = D.includePrerelease ? "-0" : "", ce ? P === ">" || P === "<" ? F = "<0.0.0-0" : F = "*" : P && We ? (Ve && (L = 0), K = 0, P === ">" ? (P = ">=", Ve ? (N = +N + 1, L = 0, K = 0) : (L = +L + 1, K = 0)) : P === "<=" && (P = "<", Ve ? N = +N + 1 : L = +L + 1), P === "<" && (te = "-0"), F = `${P + N}.${L}.${K}${te}`) : Ve ? F = `>=${N}.0.0${te} <${+N + 1}.0.0-0` : ke && (F = `>=${N}.${L}.0${te} <${N}.${+L + 1}.0-0`), o("xRange return", F), F;
    });
  }, A = (O, D) => (o("replaceStars", O, D), O.trim().replace(s[l.STAR], "")), E = (O, D) => (o("replaceGTE0", O, D), O.trim().replace(s[D.includePrerelease ? l.GTE0PRE : l.GTE0], "")), S = (O) => (D, j, F, P, N, L, K, te, ce, Ve, ke, We) => (y(F) ? j = "" : y(P) ? j = `>=${F}.0.0${O ? "-0" : ""}` : y(N) ? j = `>=${F}.${P}.0${O ? "-0" : ""}` : L ? j = `>=${j}` : j = `>=${j}${O ? "-0" : ""}`, y(ce) ? te = "" : y(Ve) ? te = `<${+ce + 1}.0.0-0` : y(ke) ? te = `<${ce}.${+Ve + 1}.0-0` : We ? te = `<=${ce}.${Ve}.${ke}-${We}` : O ? te = `<${ce}.${Ve}.${+ke + 1}-0` : te = `<=${te}`, `${j} ${te}`.trim()), z = (O, D, j) => {
    for (let F = 0; F < O.length; F++)
      if (!O[F].test(D))
        return !1;
    if (D.prerelease.length && !j.includePrerelease) {
      for (let F = 0; F < O.length; F++)
        if (o(O[F].semver), O[F].semver !== a.ANY && O[F].semver.prerelease.length > 0) {
          const P = O[F].semver;
          if (P.major === D.major && P.minor === D.minor && P.patch === D.patch)
            return !0;
        }
      return !1;
    }
    return !0;
  };
  return Gb;
}
const Ime = o3(), jme = (e, t, i) => {
  try {
    t = new Ime(t, i);
  } catch {
    return !1;
  }
  return t.test(e);
};
var zme = jme, r3 = /* @__PURE__ */ Vge(zme);
function Pme(e, t, i) {
  const n = e.open(t), a = 1e4, o = 250, {
    origin: r
  } = new URL(t);
  let s = ~~(a / o);
  function l(f) {
    f.source === n && (s = 0, e.removeEventListener("message", l, !1));
  }
  e.addEventListener("message", l, !1);
  function d() {
    s <= 0 || (n.postMessage(i, r), setTimeout(d, o), s -= 1);
  }
  setTimeout(d, o);
}
var Nme = `.vega-embed {
  position: relative;
  display: inline-block;
  box-sizing: border-box;
}
.vega-embed.has-actions {
  padding-right: 38px;
}
.vega-embed details:not([open]) > :not(summary) {
  display: none !important;
}
.vega-embed summary {
  list-style: none;
  position: absolute;
  top: 0;
  right: 0;
  padding: 6px;
  z-index: 1000;
  background: white;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
  color: #1b1e23;
  border: 1px solid #aaa;
  border-radius: 999px;
  opacity: 0.2;
  transition: opacity 0.4s ease-in;
  cursor: pointer;
  line-height: 0px;
}
.vega-embed summary::-webkit-details-marker {
  display: none;
}
.vega-embed summary:active {
  box-shadow: #aaa 0px 0px 0px 1px inset;
}
.vega-embed summary svg {
  width: 14px;
  height: 14px;
}
.vega-embed details[open] summary {
  opacity: 0.7;
}
.vega-embed:hover summary, .vega-embed:focus-within summary {
  opacity: 1 !important;
  transition: opacity 0.2s ease;
}
.vega-embed .vega-actions {
  position: absolute;
  z-index: 1001;
  top: 35px;
  right: -9px;
  display: flex;
  flex-direction: column;
  padding-bottom: 8px;
  padding-top: 8px;
  border-radius: 4px;
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.2);
  border: 1px solid #d9d9d9;
  background: white;
  animation-duration: 0.15s;
  animation-name: scale-in;
  animation-timing-function: cubic-bezier(0.2, 0, 0.13, 1.5);
  text-align: left;
}
.vega-embed .vega-actions a {
  padding: 8px 16px;
  font-family: sans-serif;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  color: #434a56;
  text-decoration: none;
}
.vega-embed .vega-actions a:hover, .vega-embed .vega-actions a:focus {
  background-color: #f7f7f9;
  color: black;
}
.vega-embed .vega-actions::before, .vega-embed .vega-actions::after {
  content: "";
  display: inline-block;
  position: absolute;
}
.vega-embed .vega-actions::before {
  left: auto;
  right: 14px;
  top: -16px;
  border: 8px solid rgba(0, 0, 0, 0);
  border-bottom-color: #d9d9d9;
}
.vega-embed .vega-actions::after {
  left: auto;
  right: 15px;
  top: -14px;
  border: 7px solid rgba(0, 0, 0, 0);
  border-bottom-color: #fff;
}
.vega-embed .chart-wrapper.fit-x {
  width: 100%;
}
.vega-embed .chart-wrapper.fit-y {
  height: 100%;
}

.vega-embed-wrapper {
  max-width: 100%;
  overflow: auto;
  padding-right: 14px;
}

@keyframes scale-in {
  from {
    opacity: 0;
    transform: scale(0.6);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
`;
function s3(e, ...t) {
  for (const i of t)
    qme(e, i);
  return e;
}
function qme(e, t) {
  for (const i of Object.keys(t))
    Sp(e, i, t[i], !0);
}
const En = Vne;
let Wf = Ope;
const wc = typeof window < "u" ? window : void 0;
var nE;
Wf === void 0 && ((nE = wc == null ? void 0 : wc.vl) != null && nE.compile) && (Wf = wc.vl);
const Lme = {
  export: {
    svg: !0,
    png: !0
  },
  source: !0,
  compiled: !0,
  editor: !0
}, Bme = {
  CLICK_TO_VIEW_ACTIONS: "Click to view actions",
  COMPILED_ACTION: "View Compiled Vega",
  EDITOR_ACTION: "Open in Vega Editor",
  PNG_ACTION: "Save as PNG",
  SOURCE_ACTION: "View Source",
  SVG_ACTION: "Save as SVG"
}, zd = {
  vega: "Vega",
  "vega-lite": "Vega-Lite"
}, $p = {
  vega: En.version,
  "vega-lite": Wf ? Wf.version : "not available"
}, Ume = {
  vega: (e) => e,
  "vega-lite": (e, t) => Wf.compile(e, {
    config: t
  }).spec
}, Mme = `
<svg viewBox="0 0 16 16" fill="currentColor" stroke="none" stroke-width="1" stroke-linecap="round" stroke-linejoin="round">
  <circle r="2" cy="8" cx="2"></circle>
  <circle r="2" cy="8" cx="8"></circle>
  <circle r="2" cy="8" cx="14"></circle>
</svg>`, Vme = "chart-wrapper";
function Wme(e) {
  return typeof e == "function";
}
function KO(e, t, i, n) {
  const a = `<html><head>${t}</head><body><pre><code class="json">`, o = `</code></pre>${i}</body></html>`, r = window.open("");
  r.document.write(a + e + o), r.document.title = `${zd[n]} JSON Source`;
}
function Gme(e, t) {
  if (e.$schema) {
    const i = QP(e.$schema);
    t && t !== i.library && console.warn(`The given visualization spec is written in ${zd[i.library]}, but mode argument sets ${zd[t] ?? t}.`);
    const n = i.library;
    return r3($p[n], `^${i.version.slice(1)}`) || console.warn(`The input spec uses ${zd[n]} ${i.version}, but the current version of ${zd[n]} is v${$p[n]}.`), n;
  }
  return "mark" in e || "encoding" in e || "layer" in e || "hconcat" in e || "vconcat" in e || "facet" in e || "repeat" in e ? "vega-lite" : "marks" in e || "signals" in e || "scales" in e || "axes" in e ? "vega" : t ?? "vega";
}
function l3(e) {
  return !!(e && "load" in e);
}
function QO(e) {
  return l3(e) ? e : En.loader(e);
}
function Hme(e) {
  var i;
  const t = ((i = e.usermeta) == null ? void 0 : i.embedOptions) ?? {};
  return Ir(t.defaultStyle) && (t.defaultStyle = !1), t;
}
async function Yme(e, t, i = {}) {
  let n, a;
  Ir(t) ? (a = QO(i.loader), n = JSON.parse(await a.load(t))) : n = t;
  const o = Hme(n), r = o.loader;
  (!a || r) && (a = QO(i.loader ?? r));
  const s = await eE(o, a), l = await eE(i, a), d = {
    ...s3(l, s),
    config: r0(l.config ?? {}, s.config ?? {})
  };
  return await Jme(e, n, d, a);
}
async function eE(e, t) {
  const i = Ir(e.config) ? JSON.parse(await t.load(e.config)) : e.config ?? {}, n = Ir(e.patch) ? JSON.parse(await t.load(e.patch)) : e.patch;
  return {
    ...e,
    ...n ? {
      patch: n
    } : {},
    ...i ? {
      config: i
    } : {}
  };
}
function Xme(e) {
  const t = e.getRootNode ? e.getRootNode() : document;
  return t instanceof ShadowRoot ? {
    root: t,
    rootContainer: t
  } : {
    root: document,
    rootContainer: document.head ?? document.body
  };
}
async function Jme(e, t, i = {}, n) {
  const a = i.theme ? r0(Dge[i.theme], i.config ?? {}) : i.config, o = qD(i.actions) ? i.actions : s3({}, Lme, i.actions ?? {}), r = {
    ...Bme,
    ...i.i18n
  }, s = i.renderer ?? "canvas", l = i.logLevel ?? En.Warn, d = i.downloadFileName ?? "visualization", f = typeof e == "string" ? document.querySelector(e) : e;
  if (!f)
    throw new Error(`${e} does not exist`);
  if (i.defaultStyle !== !1) {
    const x = "vega-embed-style", {
      root: $,
      rootContainer: _
    } = Xme(f);
    if (!$.getElementById(x)) {
      const k = document.createElement("style");
      k.id = x, k.innerHTML = i.defaultStyle === void 0 || i.defaultStyle === !0 ? Nme.toString() : i.defaultStyle, _.appendChild(k);
    }
  }
  const u = Gme(t, i.mode);
  let c = Ume[u](t, a);
  if (u === "vega-lite" && c.$schema) {
    const x = QP(c.$schema);
    r3($p.vega, `^${x.version.slice(1)}`) || console.warn(`The compiled spec uses Vega ${x.version}, but current version is v${$p.vega}.`);
  }
  f.classList.add("vega-embed"), o && f.classList.add("has-actions"), f.innerHTML = "";
  let h = f;
  if (o) {
    const x = document.createElement("div");
    x.classList.add(Vme), f.appendChild(x), h = x;
  }
  const p = i.patch;
  if (p && (c = p instanceof Function ? p(c) : Ep(c, p, !0, !1).newDocument), i.formatLocale && En.formatLocale(i.formatLocale), i.timeFormatLocale && En.timeFormatLocale(i.timeFormatLocale), i.expressionFunctions)
    for (const x in i.expressionFunctions) {
      const $ = i.expressionFunctions[x];
      "fn" in $ ? En.expressionFunction(x, $.fn, $.visitor) : $ instanceof Function && En.expressionFunction(x, $);
    }
  const {
    ast: g
  } = i, m = En.parse(c, u === "vega-lite" ? {} : a, {
    ast: g
  }), b = new (i.viewClass || En.View)(m, {
    loader: n,
    logLevel: l,
    renderer: s,
    ...g ? {
      expr: En.expressionInterpreter ?? i.expr ?? eae
    } : {}
  });
  if (b.addSignalListener("autosize", (x, $) => {
    const {
      type: _
    } = $;
    _ == "fit-x" ? (h.classList.add("fit-x"), h.classList.remove("fit-y")) : _ == "fit-y" ? (h.classList.remove("fit-x"), h.classList.add("fit-y")) : _ == "fit" ? h.classList.add("fit-x", "fit-y") : h.classList.remove("fit-x", "fit-y");
  }), i.tooltip !== !1) {
    const {
      loader: x,
      tooltip: $
    } = i, _ = x && !l3(x) ? x == null ? void 0 : x.baseURL : void 0, k = Wme($) ? $ : (
      // user provided boolean true or tooltip options
      new Mge({
        baseURL: _,
        ...$ === !0 ? {} : $
      }).call
    );
    b.tooltip(k);
  }
  let {
    hover: y
  } = i;
  if (y === void 0 && (y = u === "vega"), y) {
    const {
      hoverSet: x,
      updateSet: $
    } = typeof y == "boolean" ? {} : y;
    b.hover(x, $);
  }
  i && (i.width != null && b.width(i.width), i.height != null && b.height(i.height), i.padding != null && b.padding(i.padding)), await b.initialize(h, i.bind).runAsync();
  let v;
  if (o !== !1) {
    let x = f;
    if (i.defaultStyle !== !1 || i.forceActionsMenu) {
      const _ = document.createElement("details");
      _.title = r.CLICK_TO_VIEW_ACTIONS, f.append(_), x = _;
      const k = document.createElement("summary");
      k.innerHTML = Mme, _.append(k), v = (A) => {
        _.contains(A.target) || _.removeAttribute("open");
      }, document.addEventListener("click", v);
    }
    const $ = document.createElement("div");
    if (x.append($), $.classList.add("vega-actions"), o === !0 || o.export !== !1) {
      for (const _ of ["svg", "png"])
        if (o === !0 || o.export === !0 || o.export[_]) {
          const k = r[`${_.toUpperCase()}_ACTION`], A = document.createElement("a"), E = rf(i.scaleFactor) ? i.scaleFactor[_] : i.scaleFactor;
          A.text = k, A.href = "#", A.target = "_blank", A.download = `${d}.${_}`, A.addEventListener("mousedown", async function(S) {
            S.preventDefault();
            const z = await b.toImageURL(_, E);
            this.href = z;
          }), $.append(A);
        }
    }
    if (o === !0 || o.source !== !1) {
      const _ = document.createElement("a");
      _.text = r.SOURCE_ACTION, _.href = "#", _.addEventListener("click", function(k) {
        KO(wm(t), i.sourceHeader ?? "", i.sourceFooter ?? "", u), k.preventDefault();
      }), $.append(_);
    }
    if (u === "vega-lite" && (o === !0 || o.compiled !== !1)) {
      const _ = document.createElement("a");
      _.text = r.COMPILED_ACTION, _.href = "#", _.addEventListener("click", function(k) {
        KO(wm(c), i.sourceHeader ?? "", i.sourceFooter ?? "", "vega"), k.preventDefault();
      }), $.append(_);
    }
    if (o === !0 || o.editor !== !1) {
      const _ = i.editorUrl ?? "https://vega.github.io/editor/", k = document.createElement("a");
      k.text = r.EDITOR_ACTION, k.href = "#", k.addEventListener("click", function(A) {
        Pme(window, _, {
          config: a,
          mode: p ? "vega" : u,
          renderer: s,
          spec: wm(p ? c : t)
        }), A.preventDefault();
      }), $.append(k);
    }
  }
  function w() {
    v && document.removeEventListener("click", v), b.finalize();
  }
  return {
    view: b,
    spec: t,
    vgSpec: c,
    finalize: w,
    embedOptions: i
  };
}
const Zme = {}, Kme = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  default: Zme
}, Symbol.toStringTag, { value: "Module" })), Vw = /* @__PURE__ */ x3(Kme);
var et = {}, d3 = Vw, Mv = et.ValidationError = function(t, i, n, a, o, r) {
  if (Array.isArray(a) ? (this.path = a, this.property = a.reduce(function(l, d) {
    return l + f3(d);
  }, "instance")) : a !== void 0 && (this.property = a), t && (this.message = t), n) {
    var s = n.$id || n.id;
    this.schema = s || n;
  }
  i !== void 0 && (this.instance = i), this.name = o, this.argument = r, this.stack = this.toString();
};
Mv.prototype.toString = function() {
  return this.property + " " + this.message;
};
var _m = et.ValidatorResult = function(t, i, n, a) {
  this.instance = t, this.schema = i, this.options = n, this.path = a.path, this.propertyPath = a.propertyPath, this.errors = [], this.throwError = n && n.throwError, this.throwFirst = n && n.throwFirst, this.throwAll = n && n.throwAll, this.disableFormat = n && n.disableFormat === !0;
};
_m.prototype.addError = function(t) {
  var i;
  if (typeof t == "string")
    i = new Mv(t, this.instance, this.schema, this.path);
  else {
    if (!t) throw new Error("Missing error detail");
    if (!t.message) throw new Error("Missing error message");
    if (!t.name) throw new Error("Missing validator type");
    i = new Mv(t.message, this.instance, this.schema, this.path, t.name, t.argument);
  }
  if (this.errors.push(i), this.throwFirst)
    throw new Qr(this);
  if (this.throwError)
    throw i;
  return i;
};
_m.prototype.importErrors = function(t) {
  typeof t == "string" || t && t.validatorType ? this.addError(t) : t && t.errors && (this.errors = this.errors.concat(t.errors));
};
function Qme(e, t) {
  return t + ": " + e.toString() + `
`;
}
_m.prototype.toString = function(t) {
  return this.errors.map(Qme).join("");
};
Object.defineProperty(_m.prototype, "valid", { get: function() {
  return !this.errors.length;
} });
et.ValidatorResultError = Qr;
function Qr(e) {
  Error.captureStackTrace && Error.captureStackTrace(this, Qr), this.instance = e.instance, this.schema = e.schema, this.options = e.options, this.errors = e.errors;
}
Qr.prototype = new Error();
Qr.prototype.constructor = Qr;
Qr.prototype.name = "Validation Error";
var tE = et.SchemaError = function e(t, i) {
  this.message = t, this.schema = i, Error.call(this, t), Error.captureStackTrace(this, e);
};
tE.prototype = Object.create(
  Error.prototype,
  {
    constructor: { value: tE, enumerable: !1 },
    name: { value: "SchemaError", enumerable: !1 }
  }
);
var Vv = et.SchemaContext = function(t, i, n, a, o) {
  this.schema = t, this.options = i, Array.isArray(n) ? (this.path = n, this.propertyPath = n.reduce(function(r, s) {
    return r + f3(s);
  }, "instance")) : this.propertyPath = n, this.base = a, this.schemas = o;
};
Vv.prototype.resolve = function(t) {
  return d3.resolve(this.base, t);
};
Vv.prototype.makeChild = function(t, i) {
  var n = i === void 0 ? this.path : this.path.concat([i]), a = t.$id || t.id, o = d3.resolve(this.base, a || ""), r = new Vv(t, this.options, n, o, Object.create(this.schemas));
  return a && !r.schemas[o] && (r.schemas[o] = t), r;
};
var an = et.FORMAT_REGEXPS = {
  // 7.3.1. Dates, Times, and Duration
  "date-time": /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])[tT ](2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])(\.\d+)?([zZ]|[+-]([0-5][0-9]):(60|[0-5][0-9]))$/,
  date: /^\d{4}-(?:0[0-9]{1}|1[0-2]{1})-(3[01]|0[1-9]|[12][0-9])$/,
  time: /^(2[0-4]|[01][0-9]):([0-5][0-9]):(60|[0-5][0-9])$/,
  duration: /P(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S)|\d+(D|M(\d+D)?|Y(\d+M(\d+D)?)?)(T\d+(H(\d+M(\d+S)?)?|M(\d+S)?|S))?|\d+W)/i,
  // 7.3.2. Email Addresses
  // TODO: fix the email production
  email: /^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!\.)){0,61}[a-zA-Z0-9]?\.)+[a-zA-Z0-9](?:[a-zA-Z0-9\-](?!$)){0,61}[a-zA-Z0-9]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/,
  "idn-email": /^("(?:[!#-\[\]-\u{10FFFF}]|\\[\t -\u{10FFFF}])*"|[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*)@([!#-'*+\-/-9=?A-Z\^-\u{10FFFF}](?:\.?[!#-'*+\-/-9=?A-Z\^-\u{10FFFF}])*|\[[!-Z\^-\u{10FFFF}]*\])$/u,
  // 7.3.3. Hostnames
  // 7.3.4. IP Addresses
  "ip-address": /^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/,
  // FIXME whitespace is invalid
  ipv6: /^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/,
  // 7.3.5. Resource Identifiers
  // TODO: A more accurate regular expression for "uri" goes:
  // [A-Za-z][+\-.0-9A-Za-z]*:((/(/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?)?#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(/(/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])|/?%[0-9A-Fa-f]{2}|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*(#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|/(/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?)?
  uri: /^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,
  "uri-reference": /^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/,
  iri: /^[a-zA-Z][a-zA-Z0-9+.-]*:[^\s]*$/,
  "iri-reference": /^(((([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:?)?)|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?)?))#(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|(([A-Za-z][+\-.0-9A-Za-z]*)?%[0-9A-Fa-f]{2}|[!$&-.0-9;=@_~-\u{10FFFF}]|[A-Za-z][+\-.0-9A-Za-z]*[!$&-*,;=@_~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-.0-9;=@-Z_a-z~-\u{10FFFF}])*((([/?](%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?#|[/?])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*)?|([A-Za-z][+\-.0-9A-Za-z]*(:%[0-9A-Fa-f]{2}|:[!$&-.0-;=?-Z_a-z~-\u{10FFFF}]|[/?])|\?)(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|([A-Za-z][+\-.0-9A-Za-z]*:)?\/((%[0-9A-Fa-f]{2}|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)(:\d*)?[/?]|[!$&-.0-;=?-Z_a-z~-\u{10FFFF}])(%[0-9A-Fa-f]{2}|[!$&-;=?-Z_a-z~-\u{10FFFF}])*|\/((%[0-9A-Fa-f]{2}|[!$&-.0-9;=A-Z_a-z~-\u{10FFFF}])+(:\d*)?|(\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?:\d*|\[(([Vv][0-9A-Fa-f]+\.[!$&-.0-;=A-Z_a-z~-\u{10FFFF}]+)?|[.0-:A-Fa-f]+)\])?)?|[A-Za-z][+\-.0-9A-Za-z]*:?)?$/u,
  uuid: /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
  // 7.3.6. uri-template
  "uri-template": /(%[0-9a-f]{2}|[!#$&(-;=?@\[\]_a-z~]|\{[!#&+,./;=?@|]?(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?(,(%[0-9a-f]{2}|[0-9_a-z])(\.?(%[0-9a-f]{2}|[0-9_a-z]))*(:[1-9]\d{0,3}|\*)?)*\})*/iu,
  // 7.3.7. JSON Pointers
  "json-pointer": /^(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*$/iu,
  "relative-json-pointer": /^\d+(#|(\/([\x00-\x2e0-@\[-}\x7f]|~[01])*)*)$/iu,
  // hostname regex from: http://stackoverflow.com/a/1420225/5628
  hostname: /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,
  "host-name": /^(?=.{1,255}$)[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?(?:\.[0-9A-Za-z](?:(?:[0-9A-Za-z]|-){0,61}[0-9A-Za-z])?)*\.?$/,
  "utc-millisec": function(e) {
    return typeof e == "string" && parseFloat(e) === parseInt(e, 10) && !isNaN(e);
  },
  // 7.3.8. regex
  regex: function(e) {
    var t = !0;
    try {
      new RegExp(e);
    } catch {
      t = !1;
    }
    return t;
  },
  // Other definitions
  // "style" was removed from JSON Schema in draft-4 and is deprecated
  style: /[\r\n\t ]*[^\r\n\t ][^:]*:[\r\n\t ]*[^\r\n\t ;]*[\r\n\t ]*;?/,
  // "color" was removed from JSON Schema in draft-4 and is deprecated
  color: /^(#?([0-9A-Fa-f]{3}){1,2}\b|aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow|(rgb\(\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*,\s*\b([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\b\s*\))|(rgb\(\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*,\s*(\d?\d%|100%)+\s*\)))$/,
  phone: /^\+(?:[0-9] ?){6,14}[0-9]$/,
  alpha: /^[a-zA-Z]+$/,
  alphanumeric: /^[a-zA-Z0-9]+$/
};
an.regexp = an.regex;
an.pattern = an.regex;
an.ipv4 = an["ip-address"];
et.isFormat = function(t, i, n) {
  if (typeof t == "string" && an[i] !== void 0) {
    if (an[i] instanceof RegExp)
      return an[i].test(t);
    if (typeof an[i] == "function")
      return an[i](t);
  } else if (n && n.customFormats && typeof n.customFormats[i] == "function")
    return n.customFormats[i](t);
  return !0;
};
var f3 = et.makeSuffix = function(t) {
  return t = t.toString(), !t.match(/[.\s\[\]]/) && !t.match(/^[\d]/) ? "." + t : t.match(/^\d+$/) ? "[" + t + "]" : "[" + JSON.stringify(t) + "]";
};
et.deepCompareStrict = function e(t, i) {
  if (typeof t != typeof i)
    return !1;
  if (Array.isArray(t))
    return !Array.isArray(i) || t.length !== i.length ? !1 : t.every(function(o, r) {
      return e(t[r], i[r]);
    });
  if (typeof t == "object") {
    if (!t || !i)
      return t === i;
    var n = Object.keys(t), a = Object.keys(i);
    return n.length !== a.length ? !1 : n.every(function(o) {
      return e(t[o], i[o]);
    });
  }
  return t === i;
};
function ebe(e, t, i, n) {
  typeof i == "object" ? t[n] = Ww(e[n], i) : e.indexOf(i) === -1 && t.push(i);
}
function tbe(e, t, i) {
  t[i] = e[i];
}
function ibe(e, t, i, n) {
  typeof t[n] != "object" || !t[n] ? i[n] = t[n] : e[n] ? i[n] = Ww(e[n], t[n]) : i[n] = t[n];
}
function Ww(e, t) {
  var i = Array.isArray(t), n = i && [] || {};
  return i ? (e = e || [], n = n.concat(e), t.forEach(ebe.bind(null, e, n))) : (e && typeof e == "object" && Object.keys(e).forEach(tbe.bind(null, e, n)), Object.keys(t).forEach(ibe.bind(null, e, t, n))), n;
}
et.deepMerge = Ww;
et.objectGetPath = function(t, i) {
  for (var n = i.split("/").slice(1), a; typeof (a = n.shift()) == "string"; ) {
    var o = decodeURIComponent(a.replace(/~0/, "~").replace(/~1/g, "/"));
    if (!(o in t)) return;
    t = t[o];
  }
  return t;
};
function nbe(e) {
  return "/" + encodeURIComponent(e).replace(/~/g, "%7E");
}
et.encodePath = function(t) {
  return t.map(nbe).join("");
};
et.getDecimalPlaces = function(t) {
  var i = 0;
  if (isNaN(t)) return i;
  typeof t != "number" && (t = Number(t));
  var n = t.toString().split("e");
  if (n.length === 2) {
    if (n[1][0] !== "-")
      return i;
    i = Number(n[1].slice(1));
  }
  var a = n[0].split(".");
  return a.length === 2 && (i += a[1].length), i;
};
et.isSchema = function(t) {
  return typeof t == "object" && t || typeof t == "boolean";
};
var Di = et, ye = Di.ValidatorResult, Xo = Di.SchemaError, Gw = {};
Gw.ignoreProperties = {
  // informative properties
  id: !0,
  default: !0,
  description: !0,
  title: !0,
  // arguments to other properties
  additionalItems: !0,
  then: !0,
  else: !0,
  // special-handled properties
  $schema: !0,
  $ref: !0,
  extends: !0
};
var ve = Gw.validators = {};
ve.type = function(t, i, n, a) {
  if (t === void 0)
    return null;
  var o = new ye(t, i, n, a), r = Array.isArray(i.type) ? i.type : [i.type];
  if (!r.some(this.testType.bind(this, t, i, n, a))) {
    var s = r.map(function(l) {
      if (l) {
        var d = l.$id || l.id;
        return d ? "<" + d + ">" : l + "";
      }
    });
    o.addError({
      name: "type",
      argument: s,
      message: "is not of a type(s) " + s
    });
  }
  return o;
};
function Hw(e, t, i, n, a) {
  var o = t.throwError, r = t.throwAll;
  t.throwError = !1, t.throwAll = !1;
  var s = this.validateSchema(e, a, t, i);
  return t.throwError = o, t.throwAll = r, !s.valid && n instanceof Function && n(s), s.valid;
}
ve.anyOf = function(t, i, n, a) {
  if (t === void 0)
    return null;
  var o = new ye(t, i, n, a), r = new ye(t, i, n, a);
  if (!Array.isArray(i.anyOf))
    throw new Xo("anyOf must be an array");
  if (!i.anyOf.some(
    Hw.bind(
      this,
      t,
      n,
      a,
      function(l) {
        r.importErrors(l);
      }
    )
  )) {
    var s = i.anyOf.map(function(l, d) {
      var f = l.$id || l.id;
      return f ? "<" + f + ">" : l.title && JSON.stringify(l.title) || l.$ref && "<" + l.$ref + ">" || "[subschema " + d + "]";
    });
    n.nestedErrors && o.importErrors(r), o.addError({
      name: "anyOf",
      argument: s,
      message: "is not any of " + s.join(",")
    });
  }
  return o;
};
ve.allOf = function(t, i, n, a) {
  if (t === void 0)
    return null;
  if (!Array.isArray(i.allOf))
    throw new Xo("allOf must be an array");
  var o = new ye(t, i, n, a), r = this;
  return i.allOf.forEach(function(s, l) {
    var d = r.validateSchema(t, s, n, a);
    if (!d.valid) {
      var f = s.$id || s.id, u = f || s.title && JSON.stringify(s.title) || s.$ref && "<" + s.$ref + ">" || "[subschema " + l + "]";
      o.addError({
        name: "allOf",
        argument: { id: u, length: d.errors.length, valid: d },
        message: "does not match allOf schema " + u + " with " + d.errors.length + " error[s]:"
      }), o.importErrors(d);
    }
  }), o;
};
ve.oneOf = function(t, i, n, a) {
  if (t === void 0)
    return null;
  if (!Array.isArray(i.oneOf))
    throw new Xo("oneOf must be an array");
  var o = new ye(t, i, n, a), r = new ye(t, i, n, a), s = i.oneOf.filter(
    Hw.bind(
      this,
      t,
      n,
      a,
      function(d) {
        r.importErrors(d);
      }
    )
  ).length, l = i.oneOf.map(function(d, f) {
    var u = d.$id || d.id;
    return u || d.title && JSON.stringify(d.title) || d.$ref && "<" + d.$ref + ">" || "[subschema " + f + "]";
  });
  return s !== 1 && (n.nestedErrors && o.importErrors(r), o.addError({
    name: "oneOf",
    argument: l,
    message: "is not exactly one from " + l.join(",")
  })), o;
};
ve.if = function(t, i, n, a) {
  if (t === void 0) return null;
  if (!Di.isSchema(i.if)) throw new Error('Expected "if" keyword to be a schema');
  var o = Hw.call(this, t, n, a, null, i.if), r = new ye(t, i, n, a), s;
  if (o) {
    if (i.then === void 0) return;
    if (!Di.isSchema(i.then)) throw new Error('Expected "then" keyword to be a schema');
    s = this.validateSchema(t, i.then, n, a.makeChild(i.then)), r.importErrors(s);
  } else {
    if (i.else === void 0) return;
    if (!Di.isSchema(i.else)) throw new Error('Expected "else" keyword to be a schema');
    s = this.validateSchema(t, i.else, n, a.makeChild(i.else)), r.importErrors(s);
  }
  return r;
};
function Yw(e, t) {
  if (Object.hasOwnProperty.call(e, t)) return e[t];
  if (t in e) {
    for (; e = Object.getPrototypeOf(e); )
      if (Object.propertyIsEnumerable.call(e, t)) return e[t];
  }
}
ve.propertyNames = function(t, i, n, a) {
  if (this.types.object(t)) {
    var o = new ye(t, i, n, a), r = i.propertyNames !== void 0 ? i.propertyNames : {};
    if (!Di.isSchema(r)) throw new Xo('Expected "propertyNames" to be a schema (object or boolean)');
    for (var s in t)
      if (Yw(t, s) !== void 0) {
        var l = this.validateSchema(s, r, n, a.makeChild(r));
        o.importErrors(l);
      }
    return o;
  }
};
ve.properties = function(t, i, n, a) {
  if (this.types.object(t)) {
    var o = new ye(t, i, n, a), r = i.properties || {};
    for (var s in r) {
      var l = r[s];
      if (l !== void 0) {
        if (l === null)
          throw new Xo('Unexpected null, expected schema in "properties"');
        typeof n.preValidateProperty == "function" && n.preValidateProperty(t, s, l, n, a);
        var d = Yw(t, s), f = this.validateSchema(d, l, n, a.makeChild(l, s));
        f.instance !== o.instance[s] && (o.instance[s] = f.instance), o.importErrors(f);
      }
    }
    return o;
  }
};
function u3(e, t, i, n, a, o) {
  if (this.types.object(e) && !(t.properties && t.properties[a] !== void 0))
    if (t.additionalProperties === !1)
      o.addError({
        name: "additionalProperties",
        argument: a,
        message: "is not allowed to have the additional property " + JSON.stringify(a)
      });
    else {
      var r = t.additionalProperties || {};
      typeof i.preValidateProperty == "function" && i.preValidateProperty(e, a, r, i, n);
      var s = this.validateSchema(e[a], r, i, n.makeChild(r, a));
      s.instance !== o.instance[a] && (o.instance[a] = s.instance), o.importErrors(s);
    }
}
ve.patternProperties = function(t, i, n, a) {
  if (this.types.object(t)) {
    var o = new ye(t, i, n, a), r = i.patternProperties || {};
    for (var s in t) {
      var l = !0;
      for (var d in r) {
        var f = r[d];
        if (f !== void 0) {
          if (f === null)
            throw new Xo('Unexpected null, expected schema in "patternProperties"');
          try {
            var u = new RegExp(d, "u");
          } catch {
            u = new RegExp(d);
          }
          if (u.test(s)) {
            l = !1, typeof n.preValidateProperty == "function" && n.preValidateProperty(t, s, f, n, a);
            var c = this.validateSchema(t[s], f, n, a.makeChild(f, s));
            c.instance !== o.instance[s] && (o.instance[s] = c.instance), o.importErrors(c);
          }
        }
      }
      l && u3.call(this, t, i, n, a, s, o);
    }
    return o;
  }
};
ve.additionalProperties = function(t, i, n, a) {
  if (this.types.object(t)) {
    if (i.patternProperties)
      return null;
    var o = new ye(t, i, n, a);
    for (var r in t)
      u3.call(this, t, i, n, a, r, o);
    return o;
  }
};
ve.minProperties = function(t, i, n, a) {
  if (this.types.object(t)) {
    var o = new ye(t, i, n, a), r = Object.keys(t);
    return r.length >= i.minProperties || o.addError({
      name: "minProperties",
      argument: i.minProperties,
      message: "does not meet minimum property length of " + i.minProperties
    }), o;
  }
};
ve.maxProperties = function(t, i, n, a) {
  if (this.types.object(t)) {
    var o = new ye(t, i, n, a), r = Object.keys(t);
    return r.length <= i.maxProperties || o.addError({
      name: "maxProperties",
      argument: i.maxProperties,
      message: "does not meet maximum property length of " + i.maxProperties
    }), o;
  }
};
ve.items = function(t, i, n, a) {
  var o = this;
  if (this.types.array(t) && i.items !== void 0) {
    var r = new ye(t, i, n, a);
    return t.every(function(s, l) {
      if (Array.isArray(i.items))
        var d = i.items[l] === void 0 ? i.additionalItems : i.items[l];
      else
        var d = i.items;
      if (d === void 0)
        return !0;
      if (d === !1)
        return r.addError({
          name: "items",
          message: "additionalItems not permitted"
        }), !1;
      var f = o.validateSchema(s, d, n, a.makeChild(d, l));
      return f.instance !== r.instance[l] && (r.instance[l] = f.instance), r.importErrors(f), !0;
    }), r;
  }
};
ve.contains = function(t, i, n, a) {
  var o = this;
  if (this.types.array(t) && i.contains !== void 0) {
    if (!Di.isSchema(i.contains)) throw new Error('Expected "contains" keyword to be a schema');
    var r = new ye(t, i, n, a), s = t.some(function(l, d) {
      var f = o.validateSchema(l, i.contains, n, a.makeChild(i.contains, d));
      return f.errors.length === 0;
    });
    return s === !1 && r.addError({
      name: "contains",
      argument: i.contains,
      message: "must contain an item matching given schema"
    }), r;
  }
};
ve.minimum = function(t, i, n, a) {
  if (this.types.number(t)) {
    var o = new ye(t, i, n, a);
    return i.exclusiveMinimum && i.exclusiveMinimum === !0 ? t > i.minimum || o.addError({
      name: "minimum",
      argument: i.minimum,
      message: "must be greater than " + i.minimum
    }) : t >= i.minimum || o.addError({
      name: "minimum",
      argument: i.minimum,
      message: "must be greater than or equal to " + i.minimum
    }), o;
  }
};
ve.maximum = function(t, i, n, a) {
  if (this.types.number(t)) {
    var o = new ye(t, i, n, a);
    return i.exclusiveMaximum && i.exclusiveMaximum === !0 ? t < i.maximum || o.addError({
      name: "maximum",
      argument: i.maximum,
      message: "must be less than " + i.maximum
    }) : t <= i.maximum || o.addError({
      name: "maximum",
      argument: i.maximum,
      message: "must be less than or equal to " + i.maximum
    }), o;
  }
};
ve.exclusiveMinimum = function(t, i, n, a) {
  if (typeof i.exclusiveMinimum != "boolean" && this.types.number(t)) {
    var o = new ye(t, i, n, a), r = t > i.exclusiveMinimum;
    return r || o.addError({
      name: "exclusiveMinimum",
      argument: i.exclusiveMinimum,
      message: "must be strictly greater than " + i.exclusiveMinimum
    }), o;
  }
};
ve.exclusiveMaximum = function(t, i, n, a) {
  if (typeof i.exclusiveMaximum != "boolean" && this.types.number(t)) {
    var o = new ye(t, i, n, a), r = t < i.exclusiveMaximum;
    return r || o.addError({
      name: "exclusiveMaximum",
      argument: i.exclusiveMaximum,
      message: "must be strictly less than " + i.exclusiveMaximum
    }), o;
  }
};
var c3 = function(t, i, n, a, o, r) {
  if (this.types.number(t)) {
    var s = i[o];
    if (s == 0)
      throw new Xo(o + " cannot be zero");
    var l = new ye(t, i, n, a), d = Di.getDecimalPlaces(t), f = Di.getDecimalPlaces(s), u = Math.max(d, f), c = Math.pow(10, u);
    return Math.round(t * c) % Math.round(s * c) !== 0 && l.addError({
      name: o,
      argument: s,
      message: r + JSON.stringify(s)
    }), l;
  }
};
ve.multipleOf = function(t, i, n, a) {
  return c3.call(this, t, i, n, a, "multipleOf", "is not a multiple of (divisible by) ");
};
ve.divisibleBy = function(t, i, n, a) {
  return c3.call(this, t, i, n, a, "divisibleBy", "is not divisible by (multiple of) ");
};
ve.required = function(t, i, n, a) {
  var o = new ye(t, i, n, a);
  return t === void 0 && i.required === !0 ? o.addError({
    name: "required",
    message: "is required"
  }) : this.types.object(t) && Array.isArray(i.required) && i.required.forEach(function(r) {
    Yw(t, r) === void 0 && o.addError({
      name: "required",
      argument: r,
      message: "requires property " + JSON.stringify(r)
    });
  }), o;
};
ve.pattern = function(t, i, n, a) {
  if (this.types.string(t)) {
    var o = new ye(t, i, n, a), r = i.pattern;
    try {
      var s = new RegExp(r, "u");
    } catch {
      s = new RegExp(r);
    }
    return t.match(s) || o.addError({
      name: "pattern",
      argument: i.pattern,
      message: "does not match pattern " + JSON.stringify(i.pattern.toString())
    }), o;
  }
};
ve.format = function(t, i, n, a) {
  if (t !== void 0) {
    var o = new ye(t, i, n, a);
    return !o.disableFormat && !Di.isFormat(t, i.format, this) && o.addError({
      name: "format",
      argument: i.format,
      message: "does not conform to the " + JSON.stringify(i.format) + " format"
    }), o;
  }
};
ve.minLength = function(t, i, n, a) {
  if (this.types.string(t)) {
    var o = new ye(t, i, n, a), r = t.match(/[\uDC00-\uDFFF]/g), s = t.length - (r ? r.length : 0);
    return s >= i.minLength || o.addError({
      name: "minLength",
      argument: i.minLength,
      message: "does not meet minimum length of " + i.minLength
    }), o;
  }
};
ve.maxLength = function(t, i, n, a) {
  if (this.types.string(t)) {
    var o = new ye(t, i, n, a), r = t.match(/[\uDC00-\uDFFF]/g), s = t.length - (r ? r.length : 0);
    return s <= i.maxLength || o.addError({
      name: "maxLength",
      argument: i.maxLength,
      message: "does not meet maximum length of " + i.maxLength
    }), o;
  }
};
ve.minItems = function(t, i, n, a) {
  if (this.types.array(t)) {
    var o = new ye(t, i, n, a);
    return t.length >= i.minItems || o.addError({
      name: "minItems",
      argument: i.minItems,
      message: "does not meet minimum length of " + i.minItems
    }), o;
  }
};
ve.maxItems = function(t, i, n, a) {
  if (this.types.array(t)) {
    var o = new ye(t, i, n, a);
    return t.length <= i.maxItems || o.addError({
      name: "maxItems",
      argument: i.maxItems,
      message: "does not meet maximum length of " + i.maxItems
    }), o;
  }
};
function abe(e, t, i) {
  var n, a = i.length;
  for (n = t + 1, a; n < a; n++)
    if (Di.deepCompareStrict(e, i[n]))
      return !1;
  return !0;
}
ve.uniqueItems = function(t, i, n, a) {
  if (i.uniqueItems === !0 && this.types.array(t)) {
    var o = new ye(t, i, n, a);
    return t.every(abe) || o.addError({
      name: "uniqueItems",
      message: "contains duplicate item"
    }), o;
  }
};
ve.dependencies = function(t, i, n, a) {
  if (this.types.object(t)) {
    var o = new ye(t, i, n, a);
    for (var r in i.dependencies)
      if (t[r] !== void 0) {
        var s = i.dependencies[r], l = a.makeChild(s, r);
        if (typeof s == "string" && (s = [s]), Array.isArray(s))
          s.forEach(function(f) {
            t[f] === void 0 && o.addError({
              // FIXME there's two different "dependencies" errors here with slightly different outputs
              // Can we make these the same? Or should we create different error types?
              name: "dependencies",
              argument: l.propertyPath,
              message: "property " + f + " not found, required by " + l.propertyPath
            });
          });
        else {
          var d = this.validateSchema(t, s, n, l);
          o.instance !== d.instance && (o.instance = d.instance), d && d.errors.length && (o.addError({
            name: "dependencies",
            argument: l.propertyPath,
            message: "does not meet dependency required by " + l.propertyPath
          }), o.importErrors(d));
        }
      }
    return o;
  }
};
ve.enum = function(t, i, n, a) {
  if (t === void 0)
    return null;
  if (!Array.isArray(i.enum))
    throw new Xo("enum expects an array", i);
  var o = new ye(t, i, n, a);
  return i.enum.some(Di.deepCompareStrict.bind(null, t)) || o.addError({
    name: "enum",
    argument: i.enum,
    message: "is not one of enum values: " + i.enum.map(String).join(",")
  }), o;
};
ve.const = function(t, i, n, a) {
  if (t === void 0)
    return null;
  var o = new ye(t, i, n, a);
  return Di.deepCompareStrict(i.const, t) || o.addError({
    name: "const",
    argument: i.const,
    message: "does not exactly match expected constant: " + i.const
  }), o;
};
ve.not = ve.disallow = function(t, i, n, a) {
  var o = this;
  if (t === void 0) return null;
  var r = new ye(t, i, n, a), s = i.not || i.disallow;
  return s ? (Array.isArray(s) || (s = [s]), s.forEach(function(l) {
    if (o.testType(t, i, n, a, l)) {
      var d = l && (l.$id || l.id), f = d || l;
      r.addError({
        name: "not",
        argument: f,
        message: "is of prohibited type " + f
      });
    }
  }), r) : null;
};
var obe = Gw, Xw = {}, iE = Vw, rbe = et;
Xw.SchemaScanResult = h3;
function h3(e, t) {
  this.id = e, this.ref = t;
}
Xw.scan = function(t, i) {
  function n(l, d) {
    if (!(!d || typeof d != "object")) {
      if (d.$ref) {
        var f = iE.resolve(l, d.$ref);
        s[f] = s[f] ? s[f] + 1 : 0;
        return;
      }
      var u = d.$id || d.id, c = u ? iE.resolve(l, u) : l;
      if (c) {
        if (c.indexOf("#") < 0 && (c += "#"), r[c]) {
          if (!rbe.deepCompareStrict(r[c], d))
            throw new Error("Schema <" + c + "> already exists with different definition");
          return r[c];
        }
        r[c] = d, c[c.length - 1] == "#" && (r[c.substring(0, c.length - 1)] = d);
      }
      a(c + "/items", Array.isArray(d.items) ? d.items : [d.items]), a(c + "/extends", Array.isArray(d.extends) ? d.extends : [d.extends]), n(c + "/additionalItems", d.additionalItems), o(c + "/properties", d.properties), n(c + "/additionalProperties", d.additionalProperties), o(c + "/definitions", d.definitions), o(c + "/patternProperties", d.patternProperties), o(c + "/dependencies", d.dependencies), a(c + "/disallow", d.disallow), a(c + "/allOf", d.allOf), a(c + "/anyOf", d.anyOf), a(c + "/oneOf", d.oneOf), n(c + "/not", d.not);
    }
  }
  function a(l, d) {
    if (Array.isArray(d))
      for (var f = 0; f < d.length; f++)
        n(l + "/" + f, d[f]);
  }
  function o(l, d) {
    if (!(!d || typeof d != "object"))
      for (var f in d)
        n(l + "/" + f, d[f]);
  }
  var r = {}, s = {};
  return n(t, i), new h3(r, s);
};
var p3 = Vw, g3 = obe, ys = et, m3 = Xw.scan, b3 = ys.ValidatorResult, sbe = ys.ValidatorResultError, Gf = ys.SchemaError, y3 = ys.SchemaContext, v3 = "/", bt = function e() {
  this.customFormats = Object.create(e.prototype.customFormats), this.schemas = {}, this.unresolvedRefs = [], this.types = Object.create(da), this.attributes = Object.create(g3.validators);
};
bt.prototype.customFormats = {};
bt.prototype.schemas = null;
bt.prototype.types = null;
bt.prototype.attributes = null;
bt.prototype.unresolvedRefs = null;
bt.prototype.addSchema = function(t, i) {
  var n = this;
  if (!t)
    return null;
  var a = m3(i || v3, t), o = i || t.$id || t.id;
  for (var r in a.id)
    this.schemas[r] = a.id[r];
  for (var r in a.ref)
    this.unresolvedRefs.push(r);
  return this.unresolvedRefs = this.unresolvedRefs.filter(function(s) {
    return typeof n.schemas[s] > "u";
  }), this.schemas[o];
};
bt.prototype.addSubSchemaArray = function(t, i) {
  if (Array.isArray(i))
    for (var n = 0; n < i.length; n++)
      this.addSubSchema(t, i[n]);
};
bt.prototype.addSubSchemaObject = function(t, i) {
  if (!(!i || typeof i != "object"))
    for (var n in i)
      this.addSubSchema(t, i[n]);
};
bt.prototype.setSchemas = function(t) {
  this.schemas = t;
};
bt.prototype.getSchema = function(t) {
  return this.schemas[t];
};
bt.prototype.validate = function(t, i, n, a) {
  if (typeof i != "boolean" && typeof i != "object" || i === null)
    throw new Gf("Expected `schema` to be an object or boolean");
  n || (n = {});
  var o = i.$id || i.id, r = p3.resolve(n.base || v3, o || "");
  if (!a) {
    a = new y3(i, n, [], r, Object.create(this.schemas)), a.schemas[r] || (a.schemas[r] = i);
    var s = m3(r, i);
    for (var l in s.id) {
      var d = s.id[l];
      a.schemas[l] = d;
    }
  }
  if (n.required && t === void 0) {
    var f = new b3(t, i, n, a);
    return f.addError("is required, but is undefined"), f;
  }
  var f = this.validateSchema(t, i, n, a);
  if (f) {
    if (n.throwAll && f.errors.length)
      throw new sbe(f);
  } else throw new Error("Result undefined");
  return f;
};
function _3(e) {
  var t = typeof e == "string" ? e : e.$ref;
  return typeof t == "string" ? t : !1;
}
bt.prototype.validateSchema = function(t, i, n, a) {
  var o = new b3(t, i, n, a);
  if (typeof i == "boolean")
    i === !0 ? i = {} : i === !1 && (i = { type: [] });
  else if (!i)
    throw new Error("schema is undefined");
  if (i.extends)
    if (Array.isArray(i.extends)) {
      var r = { schema: i, ctx: a };
      i.extends.forEach(this.schemaTraverser.bind(this, r)), i = r.schema, r.schema = null, r.ctx = null, r = null;
    } else
      i = ys.deepMerge(i, this.superResolve(i.extends, a));
  var s = _3(i);
  if (s) {
    var l = this.resolve(i, s, a), d = new y3(l.subschema, n, a.path, l.switchSchema, a.schemas);
    return this.validateSchema(t, l.subschema, n, d);
  }
  var f = n && n.skipAttributes || [];
  for (var u in i)
    if (!g3.ignoreProperties[u] && f.indexOf(u) < 0) {
      var c = null, h = this.attributes[u];
      if (h)
        c = h.call(this, t, i, n, a);
      else if (n.allowUnknownAttributes === !1)
        throw new Gf("Unsupported attribute: " + u, i);
      c && o.importErrors(c);
    }
  if (typeof n.rewrite == "function") {
    var p = n.rewrite.call(this, t, i, n, a);
    o.instance = p;
  }
  return o;
};
bt.prototype.schemaTraverser = function(t, i) {
  t.schema = ys.deepMerge(t.schema, this.superResolve(i, t.ctx));
};
bt.prototype.superResolve = function(t, i) {
  var n = _3(t);
  return n ? this.resolve(t, n, i).subschema : t;
};
bt.prototype.resolve = function(t, i, n) {
  if (i = n.resolve(i), n.schemas[i])
    return { subschema: n.schemas[i], switchSchema: i };
  var a = p3.parse(i), o = a && a.hash, r = o && o.length && i.substr(0, i.length - o.length);
  if (!r || !n.schemas[r])
    throw new Gf("no such schema <" + i + ">", t);
  var s = ys.objectGetPath(n.schemas[r], o.substr(1));
  if (s === void 0)
    throw new Gf("no such schema " + o + " located in <" + r + ">", t);
  return { subschema: s, switchSchema: i };
};
bt.prototype.testType = function(t, i, n, a, o) {
  if (o !== void 0) {
    if (o === null)
      throw new Gf('Unexpected null in "type" keyword');
    if (typeof this.types[o] == "function")
      return this.types[o].call(this, t);
    if (o && typeof o == "object") {
      var r = this.validateSchema(t, o, n, a);
      return r === void 0 || !(r && r.errors.length);
    }
    return !0;
  }
};
var da = bt.prototype.types = {};
da.string = function(t) {
  return typeof t == "string";
};
da.number = function(t) {
  return typeof t == "number" && isFinite(t);
};
da.integer = function(t) {
  return typeof t == "number" && t % 1 === 0;
};
da.boolean = function(t) {
  return typeof t == "boolean";
};
da.array = function(t) {
  return Array.isArray(t);
};
da.null = function(t) {
  return t === null;
};
da.date = function(t) {
  return t instanceof Date;
};
da.any = function(t) {
  return !0;
};
da.object = function(t) {
  return t && typeof t == "object" && !Array.isArray(t) && !(t instanceof Date);
};
var lbe = bt, dbe = lbe;
et.ValidatorResult;
et.ValidatorResultError;
et.ValidationError;
et.SchemaError;
var fbe = function(e, t, i) {
  var n = new dbe();
  return n.validate(e, t, i);
};
const ube = {
  data() {
    return {
      id: "vega-lite",
      specValidation: {}
    };
  },
  props: {
    spec: {
      type: Object,
      default: () => null
    },
    dataname: {
      type: String,
      default: () => null
    },
    data: {
      type: Array,
      default: () => null
    }
  },
  created() {
    this.onSpecChange = dN(this.processSpec, 300), this.onSpecChange();
  },
  methods: {
    async plotSpec() {
      if (!document.body.contains(this.$el))
        return;
      const e = await Yme(`#${this.id}`, this.spec, {});
      if (this.data) {
        const t = this.dataname || ((this.spec || {}).data || {}).name || "source";
        e.view.insert(t, this.data).resize().run();
      }
      this.$emit("new-vega-view", e.view);
    },
    validateSpec() {
      const e = fbe(this.spec, RN);
      e.valid ? console.debug("spec checks out", e) : console.warn("Invalid spec", e), this.specValidation = e;
    },
    processSpec() {
      this.validateSpec(), this.specValidation.valid && this.plotSpec();
    }
  },
  watch: {
    spec() {
      this.onSpecChange();
    }
  }
};
var cbe = function() {
  var t = this, i = t._self._c;
  return i("div", [t.specValidation.valid ? i("div", { attrs: { id: t.id } }) : t.specValidation.valid === !1 ? i("p", [t._v("Invalid Vega-Lite specification.")]) : t._e()]);
}, hbe = [], pbe = /* @__PURE__ */ w3(
  ube,
  cbe,
  hbe,
  !1,
  null,
  null
);
const xbe = pbe.exports;
export {
  xbe as default,
  RN as vegaLiteSchema
};
