@bicharts/chart-host 0.6.43 → 0.6.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -211,13 +211,13 @@ var require_papaparse_min = __commonJS({
211
211
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
212
212
  }
213
213
  function E4(C2) {
214
- var S2 = (C2 = C2 || {}).delimiter, O3 = C2.newline, x3 = C2.comments, I5 = C2.step, A2 = C2.preview, T2 = C2.fastMode, D2 = null, L4 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j4 = F4;
215
- if (void 0 !== C2.escapeChar && (j4 = C2.escapeChar), ("string" != typeof S2 || -1 < v2.BAD_DELIMITERS.indexOf(S2)) && (S2 = ","), x3 === S2) throw new Error("Comment character same as delimiter");
214
+ var S2 = (C2 = C2 || {}).delimiter, O3 = C2.newline, x3 = C2.comments, I4 = C2.step, A2 = C2.preview, T2 = C2.fastMode, D2 = null, L4 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F4;
215
+ if (void 0 !== C2.escapeChar && (j3 = C2.escapeChar), ("string" != typeof S2 || -1 < v2.BAD_DELIMITERS.indexOf(S2)) && (S2 = ","), x3 === S2) throw new Error("Comment character same as delimiter");
216
216
  true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O3 && "\r" !== O3 && "\r\n" !== O3 && (O3 = "\n");
217
217
  var z4 = 0, M2 = false;
218
218
  this.parse = function(i2, t, r4) {
219
219
  if ("string" != typeof i2) throw new Error("Input must be a string");
220
- var n2 = i2.length, e = S2.length, s2 = O3.length, a4 = x3.length, o4 = q2(I5), h4 = [], u4 = [], d3 = [], f5 = z4 = 0;
220
+ var n2 = i2.length, e = S2.length, s2 = O3.length, a4 = x3.length, o4 = q2(I4), h4 = [], u4 = [], d3 = [], f5 = z4 = 0;
221
221
  if (!i2) return w2();
222
222
  if (T2 || false !== T2 && -1 === i2.indexOf(F4)) {
223
223
  for (var l2 = i2.split(O3), c4 = 0; c4 < l2.length; c4++) {
@@ -232,11 +232,11 @@ var require_papaparse_min = __commonJS({
232
232
  }
233
233
  return w2();
234
234
  }
235
- for (var p4 = i2.indexOf(S2, z4), g4 = i2.indexOf(O3, z4), _4 = new RegExp(U2(j4) + U2(F4), "g"), m4 = i2.indexOf(F4, z4); ; ) if (i2[z4] === F4) for (m4 = z4, z4++; ; ) {
235
+ for (var p4 = i2.indexOf(S2, z4), g4 = i2.indexOf(O3, z4), _4 = new RegExp(U2(j3) + U2(F4), "g"), m4 = i2.indexOf(F4, z4); ; ) if (i2[z4] === F4) for (m4 = z4, z4++; ; ) {
236
236
  if (-1 === (m4 = i2.indexOf(F4, m4 + 1))) return r4 || u4.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h4.length, index: z4 }), E5();
237
237
  if (m4 === n2 - 1) return E5(i2.substring(z4, m4).replace(_4, F4));
238
- if (F4 === j4 && i2[m4 + 1] === j4) m4++;
239
- else if (F4 === j4 || 0 === m4 || i2[m4 - 1] !== j4) {
238
+ if (F4 === j3 && i2[m4 + 1] === j3) m4++;
239
+ else if (F4 === j3 || 0 === m4 || i2[m4 - 1] !== j3) {
240
240
  -1 !== p4 && p4 < m4 + 1 && (p4 = i2.indexOf(S2, m4 + 1));
241
241
  var y5 = v3(-1 === (g4 = -1 !== g4 && g4 < m4 + 1 ? i2.indexOf(O3, m4 + 1) : g4) ? p4 : Math.min(p4, g4));
242
242
  if (i2.substr(m4 + 1 + y5, e) === S2) {
@@ -293,7 +293,7 @@ var require_papaparse_min = __commonJS({
293
293
  return { data: h4, errors: u4, meta: { delimiter: S2, linebreak: O3, aborted: M2, truncated: !!e2, cursor: f5 + (t || 0), renamedHeaders: D2 } };
294
294
  }
295
295
  function R2() {
296
- I5(w2()), h4 = [], u4 = [];
296
+ I4(w2()), h4 = [], u4 = [];
297
297
  }
298
298
  }, this.abort = function() {
299
299
  M2 = true;
@@ -511,8 +511,8 @@ function rgbToLab(r2, g3, b4) {
511
511
  const R2 = linearise(r2), G3 = linearise(g3), B3 = linearise(b4);
512
512
  const X4 = 0.4124564 * R2 + 0.3575761 * G3 + 0.1804375 * B3;
513
513
  const Y3 = 0.2126729 * R2 + 0.7151522 * G3 + 0.072175 * B3;
514
- const Z4 = 0.0193339 * R2 + 0.119192 * G3 + 0.9503041 * B3;
515
- const fx = f(X4 / Xn), fy = f(Y3 / Yn), fz = f(Z4 / Zn);
514
+ const Z5 = 0.0193339 * R2 + 0.119192 * G3 + 0.9503041 * B3;
515
+ const fx = f(X4 / Xn), fy = f(Y3 / Yn), fz = f(Z5 / Zn);
516
516
  return { L: 116 * fy - 16, a: 500 * (fx - fy), b: 200 * (fy - fz) };
517
517
  }
518
518
  function hexToLab(hex2) {
@@ -569,11 +569,11 @@ function labToHex(lab) {
569
569
  const fy = (lab.L + 16) / 116, fx = fy + lab.a / 500, fz = fy - lab.b / 200;
570
570
  const X4 = Xn * finv(fx);
571
571
  const Y3 = Yn * (lab.L > KAPPA * EPS ? fy * fy * fy : lab.L / KAPPA);
572
- const Z4 = Zn * finv(fz);
572
+ const Z5 = Zn * finv(fz);
573
573
  const lin = [
574
- 3.2404542 * X4 - 1.5371385 * Y3 - 0.4985314 * Z4,
575
- -0.969266 * X4 + 1.8760108 * Y3 + 0.041556 * Z4,
576
- 0.0556434 * X4 - 0.2040259 * Y3 + 1.0572252 * Z4
574
+ 3.2404542 * X4 - 1.5371385 * Y3 - 0.4985314 * Z5,
575
+ -0.969266 * X4 + 1.8760108 * Y3 + 0.041556 * Z5,
576
+ 0.0556434 * X4 - 0.2040259 * Y3 + 1.0572252 * Z5
577
577
  ];
578
578
  return "#" + lin.map((v2) => {
579
579
  const c2 = Math.max(0, Math.min(1, v2));
@@ -678,14 +678,14 @@ function censusColourSpread(container, doc) {
678
678
  const d2 = cs.map(() => new Array(cs.length).fill(0));
679
679
  let span = 0, lo = 0, hi = 1;
680
680
  for (let i = 0; i < cs.length; i++) {
681
- for (let j4 = i + 1; j4 < cs.length; j4++) {
682
- const v2 = deltaE2000(cs[i], cs[j4]);
683
- d2[i][j4] = v2;
684
- d2[j4][i] = v2;
681
+ for (let j3 = i + 1; j3 < cs.length; j3++) {
682
+ const v2 = deltaE2000(cs[i], cs[j3]);
683
+ d2[i][j3] = v2;
684
+ d2[j3][i] = v2;
685
685
  if (v2 > span) {
686
686
  span = v2;
687
687
  lo = i;
688
- hi = j4;
688
+ hi = j3;
689
689
  }
690
690
  }
691
691
  }
@@ -700,8 +700,8 @@ function censusColourSpread(container, doc) {
700
700
  let crowd = 0;
701
701
  for (let i = 0; i < cs.length; i++) {
702
702
  let n = 0;
703
- for (let j4 = 0; j4 < cs.length; j4++) {
704
- if (i === j4 || d2[i][j4] <= SAME_SHADE_DELTA_E) n += top[j4].n;
703
+ for (let j3 = 0; j3 < cs.length; j3++) {
704
+ if (i === j3 || d2[i][j3] <= SAME_SHADE_DELTA_E) n += top[j3].n;
705
705
  }
706
706
  if (n > crowd) crowd = n;
707
707
  }
@@ -1464,11 +1464,11 @@ function It(n, s) {
1464
1464
  }
1465
1465
  function Wt(n, s) {
1466
1466
  let i = new Array(n.length), r2 = /* @__PURE__ */ new Set(), M2 = [], h3 = 0;
1467
- for (let N2 = 0; N2 < n.length; ++N2) {
1468
- let I5 = Mt(n[N2], s), O3 = I5 !== null && It(I5, s) ? I5 : null;
1469
- if (i[N2] = O3, O3 !== null) h3++;
1467
+ for (let N3 = 0; N3 < n.length; ++N3) {
1468
+ let I4 = Mt(n[N3], s), O3 = I4 !== null && It(I4, s) ? I4 : null;
1469
+ if (i[N3] = O3, O3 !== null) h3++;
1470
1470
  else {
1471
- let d2 = n[N2];
1471
+ let d2 = n[N3];
1472
1472
  if (d2 != null) {
1473
1473
  let p2 = String(d2).trim();
1474
1474
  if (p2.length > 0) {
@@ -1481,88 +1481,88 @@ function Wt(n, s) {
1481
1481
  return { iso: i, unmatched: M2, matchedRows: h3, totalRows: n.length };
1482
1482
  }
1483
1483
 
1484
- // ../shape-core/dist/chunk-QKBGASBP.mjs
1484
+ // ../shape-core/dist/chunk-FUHYYIXD.mjs
1485
1485
  var import_papaparse = __toESM(require_papaparse_min(), 1);
1486
1486
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1487
- var Le = { "north-america": "AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI", "south-america": "AR BO BR CL CO EC FK GF GY PE PY SR UY VE", europe: "AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA", africa: "AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW", asia: "AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE", oceania: "AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS", antarctica: "AQ BV GS HM TF" };
1487
+ var ze = { "north-america": "AG AI AW BB BL BM BQ BS BZ CA CR CU CW DM DO GD GL GP GT HN HT JM KN KY LC MF MQ MS MX NI PA PM PR SV SX TC TT US VC VG VI", "south-america": "AR BO BR CL CO EC FK GF GY PE PY SR UY VE", europe: "AD AL AT AX BA BE BG BY CH CY CZ DE DK EE ES FI FO FR GB GG GI GR HR HU IE IM IS IT JE LI LT LU LV MC MD ME MK MT NL NO PL PT RO RS RU SE SI SJ SK SM UA VA", africa: "AO BF BI BJ BW CD CF CG CI CM CV DJ DZ EG EH ER ET GA GH GM GN GQ GW KE KM LR LS LY MA MG ML MR MU MW MZ NA NE NG RE RW SC SD SH SL SN SO SS ST SZ TD TG TN TZ UG YT ZA ZM ZW", asia: "AE AF AM AZ BD BH BN BT CC CN CX GE HK ID IL IN IO IQ IR JO JP KG KH KP KR KW KZ LA LB LK MM MN MO MV MY NP OM PH PK PS QA SA SG SY TH TJ TL TM TR TW UZ VN YE", oceania: "AS AU CK FJ FM GU KI MH MP NC NF NR NU NZ PF PG PN PW SB TK TO TV UM VU WF WS", antarctica: "AQ BV GS HM TF" };
1488
1488
  var J3 = (() => {
1489
1489
  let t = /* @__PURE__ */ new Map();
1490
- for (let e of Object.keys(Le)) for (let n of Le[e].split(/\s+/)) n && t.set(n, e);
1490
+ for (let e of Object.keys(ze)) for (let n of ze[e].split(/\s+/)) n && t.set(n, e);
1491
1491
  return t;
1492
1492
  })();
1493
- function ct2(t) {
1493
+ function yt2(t) {
1494
1494
  for (let [e, n] of t) {
1495
1495
  let i = J3.get(e);
1496
1496
  i && !J3.has(n) && J3.set(n, i);
1497
1497
  }
1498
1498
  }
1499
- ct2(N);
1500
- var bt = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
1501
- var yt2 = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1502
- var St2 = ["latitude", "longitude"];
1503
- var _t = ["latitude", "longitude"];
1504
- function j3(t) {
1499
+ yt2(N);
1500
+ var St2 = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "z[_-]?score", "average", "avg", "mean", "median", "stddev", "variance", "gpa", "percentile", "quantile", "efficiency", "accuracy", "probability", "multiplier", "coefficient", "correlation", "occupancy", "age", "bmi", "temperature", "density", "pressure", "humidity", "ph", "velocity", "speed", "elevation", "altitude", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps", "temperatuur", "temperatur", "temperatura", "teplota", "lampotila", "homerseklet", "sicaklik", "pression", "presion", "pressao", "pressione", "druck", "tryck", "tlak", "paine", "nyomas", "presiune", "humidite", "humedad", "umidade", "umidita", "feuchtigkeit", "vochtigheid", "kosteus", "vlhkost", "vitesse", "velocidad", "velocidade", "velocita", "geschwindigkeit", "snelheid", "hastighet", "hastighed", "rychlost", "nopeus", "sebesseg", "brzina", "predkosc", "densite", "densidad", "densidade", "densita", "dichte", "dichtheid", "hustota", "tiheys", "gustoca", "moyenne", "mediane", "promedio", "mediana", "gemiddelde", "durchschnitt", "mittelwert", "genomsnitt", "gennemsnit", "gjennomsnitt", "keskiarvo", "atlag", "ortalama", "prosjek", "srednia", "prumer", "priemer", "medie", "taux", "tasa", "taxa", "tasso", "verhaltnis", "verhouding", "aandeel", "anteil", "andel", "osuus", "podil", "udzial", "udio", "pourcentage", "porcentaje", "percentual", "prozent", "procent", "prosentti", "szazalek", "yuzde", "participacion", "participacao", "pondere", "omjer", "arany", "oran", "rata", "leeftijd", "edad", "idade", "wiek", "eletkor", "varsta", "puntuacion", "pontuacao", "punteggio", "betyg", "ocena", "indice", "indeks", "wskaznik", "puan"];
1501
+ var _t = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "utilisation", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops", "ppm", "ppb", "dpmo", "bps"];
1502
+ var At = ["latitude", "longitude"];
1503
+ var Ct = ["latitude", "longitude"];
1504
+ function Z3(t) {
1505
1505
  return p(t);
1506
1506
  }
1507
- var ge2 = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
1508
- function At(t) {
1507
+ var be = ["somme de", "suma de", "soma de", "summe von", "som van", "somma di", "summa av", "sum av", "sum af", "soucet z", "suma z", "totaal van", "total de", "toplam", "osszeg", "nombre de", "recuento de", "contagem de", "anzahl von", "aantal van", "conteggio di", "antal av", "lukumaara", "pocet z"];
1508
+ function Mt2(t) {
1509
1509
  return [...t].sort((e, n) => n.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
1510
1510
  }
1511
- var We = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + At(ge2) + ")\\s+)", "i");
1512
- var Ct = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1513
- var Mt2 = new RegExp("\\b(" + bt.join("|") + ")\\b|(" + yt2.join("|") + ")$", "i");
1514
- var xt = new RegExp("\\b(" + St2.join("|") + ")\\b|(" + _t.join("|") + ")$", "i");
1515
- function Be(t) {
1511
+ var $e = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + Mt2(be) + ")\\s+)", "i");
1512
+ var xt = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1513
+ var Rt = new RegExp("\\b(" + St2.join("|") + ")\\b|(" + _t.join("|") + ")$", "i");
1514
+ var Tt = new RegExp("\\b(" + At.join("|") + ")\\b|(" + Ct.join("|") + ")$", "i");
1515
+ function me(t) {
1516
1516
  if (!t) return "";
1517
- let e = String(t), n = We.exec(j3(e));
1517
+ let e = String(t), n = $e.exec(Z3(e));
1518
1518
  return (n ? e.slice(n[0].length) : e).trim();
1519
1519
  }
1520
- function Rt(t) {
1521
- return !!t && We.test(j3(String(t)));
1520
+ function Nt(t) {
1521
+ return !!t && $e.test(Z3(String(t)));
1522
1522
  }
1523
- var Tt = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1524
- var Fe = new RegExp("^\\s*(" + [...Tt].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1525
- var $e = { Sum: ["Sum of "], Avg: ["Average of "], Average: ["Average of "], Count: ["Count of "], CountNonNull: ["Count of "], Min: ["Min of ", "First ", "Earliest "], Max: ["Max of ", "Last ", "Latest "], Median: ["Median of "], StandardDeviation: ["Standard deviation of "], Variance: ["Variance of "] };
1526
- var Nt = new RegExp("^(" + Object.keys($e).join("|") + ")\\((.+)\\)$");
1527
- function Et(t) {
1528
- let e = Be(t);
1529
- return e.length === 0 ? "" : e.replace(Ct, " ");
1523
+ var Et = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1524
+ var Ve = new RegExp("^\\s*(" + [...Et].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1525
+ var He = { Sum: ["Sum of "], Avg: ["Average of "], Average: ["Average of "], Count: ["Count of "], CountNonNull: ["Count of "], Min: ["Min of ", "First ", "Earliest "], Max: ["Max of ", "Last ", "Latest "], Median: ["Median of "], StandardDeviation: ["Standard deviation of "], Variance: ["Variance of "] };
1526
+ var It2 = new RegExp("^(" + Object.keys(He).join("|") + ")\\((.+)\\)$");
1527
+ function vt(t) {
1528
+ let e = me(t);
1529
+ return e.length === 0 ? "" : e.replace(xt, " ");
1530
1530
  }
1531
- function Ve(t, e) {
1531
+ function je(t, e) {
1532
1532
  if (!e) return false;
1533
- let n = Be(e);
1534
- return t.test(j3(Et(e))) || t.test(j3(n)) || t.test(j3(d(n).join(" ")));
1533
+ let n = me(e);
1534
+ return t.test(Z3(vt(e))) || t.test(Z3(n)) || t.test(Z3(d(n).join(" ")));
1535
1535
  }
1536
- function Ke(t) {
1537
- return Ve(xt, t);
1536
+ function Xe(t) {
1537
+ return je(Tt, t);
1538
1538
  }
1539
- function vt(t) {
1540
- return Ve(Mt2, t) || Ke(t);
1539
+ function wt(t) {
1540
+ return je(Rt, t) || Xe(t);
1541
1541
  }
1542
- var Ye = /int|double|decimal|single|float|number|currency|money/i;
1543
- function It2(t) {
1542
+ var Ze = /int|double|decimal|single|float|number|currency|money/i;
1543
+ function Lt(t) {
1544
1544
  let e = String(t?.valueNature ?? "").trim().toLowerCase();
1545
- return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || Ye.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
1545
+ return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || Ze.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
1546
1546
  }
1547
- function wt(t) {
1548
- return t?.isMeasure === true || Ye.test(String(t?.dataType ?? ""));
1547
+ function Dt(t) {
1548
+ return t?.isMeasure === true || Ze.test(String(t?.dataType ?? ""));
1549
1549
  }
1550
- function He(t) {
1551
- let e = t ?? {}, n = It2(e);
1550
+ function qe(t) {
1551
+ let e = t ?? {}, n = Lt(e);
1552
1552
  if (n !== "Continuous") return { nature: n, additivity: "unknown", basis: "role", suppressed: false };
1553
- if (Ke(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
1553
+ if (Xe(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
1554
1554
  let i = String(e.additivity ?? "").trim().toLowerCase();
1555
- if (!(i === "additive" && Rt(e.name))) {
1555
+ if (!(i === "additive" && Nt(e.name))) {
1556
1556
  if (i === "additive") return { nature: n, additivity: "additive", basis: "measured", suppressed: false };
1557
1557
  if (i === "part_of_whole") return { nature: n, additivity: "part_of_whole", basis: "measured", suppressed: false };
1558
1558
  if (i === "intensive_rate") return { nature: n, additivity: "intensive_rate", basis: "measured", suppressed: false };
1559
1559
  }
1560
- return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : vt(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
1560
+ return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : wt(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
1561
1561
  }
1562
- function Xe(t) {
1563
- let e = He(t), n = t ?? {};
1562
+ function Qe(t) {
1563
+ let e = qe(t), n = t ?? {};
1564
1564
  if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
1565
- if (e.nature === "Ordinal") return wt(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1565
+ if (e.nature === "Ordinal") return Dt(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1566
1566
  switch (e.additivity) {
1567
1567
  case "positional":
1568
1568
  return ["min", "max", "count", "distinctcount", "first"];
@@ -1572,22 +1572,22 @@ function Xe(t) {
1572
1572
  return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
1573
1573
  }
1574
1574
  }
1575
- function Gn(t) {
1576
- return Xe(t)[0];
1575
+ function Zn2(t) {
1576
+ return Qe(t)[0];
1577
1577
  }
1578
- function Bn(t, e) {
1578
+ function Qn(t, e) {
1579
1579
  if (e !== "sum" && e !== "count") return false;
1580
1580
  if (e === "count") return true;
1581
- let n = He(t);
1581
+ let n = qe(t);
1582
1582
  return n.additivity === "additive" || n.additivity === "part_of_whole" || n.additivity === "unknown";
1583
1583
  }
1584
- var Ot = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
1584
+ var Yt = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String.raw`\bcolumns\s*\[\s*-?\d`, String.raw`\.iloc\s*\[[^\]]*,`, String.raw`\.iat\s*\[`, String.raw`\bselect_dtypes\b`, String.raw`\b_get_numeric_data\b`, String.raw`\bis_numeric_dtype\b`, String.raw`\bfor\s+\w+\s+in\s+(?:list\s*\(\s*)?df\.columns\b`, String.raw`\bdf\.columns\s*\.\s*(?:tolist|to_list|difference|drop)\b`, String.raw`\bdf\.dtypes\b`, String.raw`\bObject\s*\.\s*(?:keys|values|entries)\s*\(\s*(?:rows|data|df)?\s*\[\s*0\s*\]`, String.raw`\b(?:row|rw|r)\s*\[\s*\d+\s*\]`].join("|"));
1585
1585
 
1586
1586
  // ../shape-core/dist/index.mjs
1587
1587
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1588
1588
  var X3 = 2;
1589
1589
  var de = 400;
1590
- function Z3(t) {
1590
+ function Z4(t) {
1591
1591
  return !!E(t);
1592
1592
  }
1593
1593
  function F3(t) {
@@ -1599,10 +1599,10 @@ function F3(t) {
1599
1599
  }
1600
1600
  return Array.from(e);
1601
1601
  }
1602
- function I4(t) {
1602
+ function N2(t) {
1603
1603
  let e = F3(t);
1604
1604
  if (e.length === 0 || ee3(t) < 95) return false;
1605
- let n = e.filter((u2) => Z3(u2) && !Y(u2)).length, o2 = e.filter((u2) => !Z3(u2) && !!Y(u2)).length;
1605
+ let n = e.filter((u2) => Z4(u2) && !Y(u2)).length, o2 = e.filter((u2) => !Z4(u2) && !!Y(u2)).length;
1606
1606
  return n >= 1 && n >= o2;
1607
1607
  }
1608
1608
  function ue2(t, e) {
@@ -1614,7 +1614,7 @@ function ee3(t) {
1614
1614
  let e = F3(t);
1615
1615
  if (e.length === 0) return 0;
1616
1616
  let n = 0;
1617
- for (let o2 of e) Z3(o2) && n++;
1617
+ for (let o2 of e) Z4(o2) && n++;
1618
1618
  return Math.round(n / e.length * 1e3) / 10;
1619
1619
  }
1620
1620
  function z3(t) {
@@ -1640,10 +1640,10 @@ function te(t) {
1640
1640
  for (let o2 of e) Z(o2).length > 0 && n++;
1641
1641
  return Math.round(n / e.length * 1e3) / 10;
1642
1642
  }
1643
- function ce2(t, e) {
1643
+ function ce3(t, e) {
1644
1644
  return y2(e, rt) ? true : ne2(t).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
1645
1645
  }
1646
- function In(t, e) {
1646
+ function Dn(t, e) {
1647
1647
  let n = F3(t);
1648
1648
  if (n.length === 0) return 0;
1649
1649
  let o2 = 0;
@@ -1655,12 +1655,12 @@ function J4(t, e) {
1655
1655
  for (let o2 of F3(t)) e(o2) && n++;
1656
1656
  return n;
1657
1657
  }
1658
- function Fn(t, e) {
1658
+ function Vn2(t, e) {
1659
1659
  let n = 0;
1660
1660
  for (let o2 of ne2(t)) e(o2) && n++;
1661
1661
  return n;
1662
1662
  }
1663
- function kn(t, e, n, o2, u2) {
1663
+ function Un(t, e, n, o2, u2) {
1664
1664
  let l = [], a2 = [], s = {}, b4 = {}, T2 = new Set(t), C2 = (i) => e.map((c2) => c2[i]);
1665
1665
  for (let i of ["city", "country"]) {
1666
1666
  let c2 = n?.[i];
@@ -1674,39 +1674,39 @@ function kn(t, e, n, o2, u2) {
1674
1674
  let f4 = n?.zip;
1675
1675
  if (f4 && T2.has(f4)) {
1676
1676
  let i = C2(f4), c2 = te(i);
1677
- c2 < 95 ? a2.push(`zip=${f4} (only ${c2}% of values read as ZIPs)`) : ce2(i, f4) ? s.zip = f4 : a2.push(`zip=${f4} (all values are 3-4 digits with nothing to say they are postal)`);
1677
+ c2 < 95 ? a2.push(`zip=${f4} (only ${c2}% of values read as ZIPs)`) : ce3(i, f4) ? s.zip = f4 : a2.push(`zip=${f4} (all values are 3-4 digits with nothing to say they are postal)`);
1678
1678
  }
1679
1679
  let d2 = n?.state;
1680
1680
  if (d2 && T2.has(d2)) {
1681
1681
  let i = C2(d2), c2 = F3(i);
1682
- c2.length > 0 && c2.every((S2) => ue2(S2, o2)) ? a2.push(`state=${d2} (every value is "CA", which is both Canada and California)`) : I4(i) ? (a2.push(`state=${d2} (every value is a country, not a state)`), s.country || (s.country = d2)) : z3(i) < 95 ? a2.push(`state=${d2} (only ${z3(i)}% of values are states/provinces)`) : s.state = d2;
1682
+ c2.length > 0 && c2.every((S2) => ue2(S2, o2)) ? a2.push(`state=${d2} (every value is "CA", which is both Canada and California)`) : N2(i) ? (a2.push(`state=${d2} (every value is a country, not a state)`), s.country || (s.country = d2)) : z3(i) < 95 ? a2.push(`state=${d2} (only ${z3(i)}% of values are states/provinces)`) : s.state = d2;
1683
1683
  }
1684
1684
  let p2 = new Set(Object.values(s).filter(Boolean)), g3 = t.filter((i) => !p2.has(i) && !i.startsWith("__"));
1685
1685
  if (!s.state) {
1686
1686
  let i = null;
1687
1687
  for (let c2 of g3) {
1688
1688
  let S2 = C2(c2);
1689
- if (I4(S2)) continue;
1689
+ if (N2(S2)) continue;
1690
1690
  let v2 = z3(S2);
1691
1691
  if (v2 < 95) continue;
1692
- let $3 = J4(S2, (D2) => !!Y(D2)), Me = J4(S2, (D2) => !!Y(D2) && !ue2(D2, o2));
1693
- $3 < X3 && Me < 1 || (!i || v2 > i.pct) && (i = { name: c2, pct: v2 });
1692
+ let $3 = J4(S2, (D2) => !!Y(D2)), Le = J4(S2, (D2) => !!Y(D2) && !ue2(D2, o2));
1693
+ $3 < X3 && Le < 1 || (!i || v2 > i.pct) && (i = { name: c2, pct: v2 });
1694
1694
  }
1695
1695
  i && (s.state = i.name, p2.add(i.name), l.push(`state=${i.name} (${i.pct}% states/provinces)`));
1696
1696
  }
1697
1697
  if (!s.zip) for (let i of g3) {
1698
1698
  if (p2.has(i)) continue;
1699
1699
  let c2 = C2(i), S2 = te(c2);
1700
- if (!(S2 < 95) && ce2(c2, i) && !(Fn(c2, (v2) => Z(v2).length > 0) < X3)) {
1700
+ if (!(S2 < 95) && ce3(c2, i) && !(Vn2(c2, (v2) => Z(v2).length > 0) < X3)) {
1701
1701
  s.zip = i, p2.add(i), l.push(`zip=${i} (${S2}% ZIP codes)`);
1702
1702
  break;
1703
1703
  }
1704
1704
  }
1705
1705
  let E4 = s.country;
1706
- if (!E4 || !I4(C2(E4))) {
1706
+ if (!E4 || !N2(C2(E4))) {
1707
1707
  let i = null;
1708
1708
  for (let c2 of g3) {
1709
- if (p2.has(c2) || !I4(C2(c2))) continue;
1709
+ if (p2.has(c2) || !N2(C2(c2))) continue;
1710
1710
  let S2 = ee3(C2(c2));
1711
1711
  (!i || S2 > i.pct) && (i = { name: c2, pct: S2 });
1712
1712
  }
@@ -1716,12 +1716,12 @@ function kn(t, e, n, o2, u2) {
1716
1716
  let i = null;
1717
1717
  for (let c2 of g3) {
1718
1718
  if (p2.has(c2)) continue;
1719
- let S2 = C2(c2), v2 = In(S2, o2);
1719
+ let S2 = C2(c2), v2 = Dn(S2, o2);
1720
1720
  v2 < m3 || J4(S2, ($3) => p3($3, o2)) < X3 || (!i || v2 > i.pct) && (i = { name: c2, pct: v2 });
1721
1721
  }
1722
1722
  i && (s.city = i.name, l.push(`city=${i.name} (${i.pct}% known cities)`));
1723
1723
  }
1724
- let L4 = s.country ? C2(s.country) : [], R2 = !!s.country && I4(L4), _3 = R2 ? new Set(L4.map((i) => E(i == null ? null : String(i))).filter(Boolean)).size : 0, x3 = R2 && _3 >= 2, w2 = !!(s.lat && s.lon) && e.some((i) => {
1724
+ let M2 = s.country ? C2(s.country) : [], R2 = !!s.country && N2(M2), _3 = R2 ? new Set(M2.map((i) => E(i == null ? null : String(i))).filter(Boolean)).size : 0, x3 = R2 && _3 >= 2, w2 = !!(s.lat && s.lon) && e.some((i) => {
1725
1725
  let c2 = +String(i[s.lat] ?? "").trim(), S2 = +String(i[s.lon] ?? "").trim();
1726
1726
  return isFinite(c2) && isFinite(S2) && c2 >= -90 && c2 <= 90 && S2 >= -180 && S2 <= 180 && String(i[s.lat] ?? "").trim() !== "" && String(i[s.lon] ?? "").trim() !== "";
1727
1727
  });
@@ -1729,10 +1729,10 @@ function kn(t, e, n, o2, u2) {
1729
1729
  }
1730
1730
  var r = (t, ...e) => ({ part: t, langs: Object.freeze(e) });
1731
1731
  var re2 = Object.freeze({ jaar: r("year", "nl"), kwartaal: r("quarter", "nl"), maand: r("month", "nl"), dag: r("day", "nl", "sv", "da", "nb"), jahr: r("year", "de"), quartal: r("quarter", "de"), monat: r("month", "de"), tag: r("day", "de"), ann\u00E9e: r("year", "fr"), mois: r("month", "fr"), jour: r("day", "fr"), trimestre: r("quarter", "fr", "es", "pt", "it"), a\u00F1o: r("year", "es"), mes: r("month", "es"), d\u00EDa: r("day", "es"), ano: r("year", "pt"), m\u00EAs: r("month", "pt"), dia: r("day", "pt"), anno: r("year", "it"), mese: r("month", "it"), giorno: r("day", "it"), \u0433\u043E\u0434: r("year", "ru"), \u043C\u0435\u0441\u044F\u0446: r("month", "ru"), \u0440\u0456\u043A: r("year", "uk"), \u043C\u0456\u0441\u044F\u0446\u044C: r("month", "uk"), \u043A\u0432\u0430\u0440\u0442\u0430\u043B: r("quarter", "ru", "uk"), \u0434\u0435\u043D\u044C: r("day", "ru", "uk"), rok: r("year", "pl", "cs", "sk"), kwarta\u0142: r("quarter", "pl"), miesi\u0105c: r("month", "pl"), dzie\u0144: r("day", "pl"), \u010Dtvrtlet\u00ED: r("quarter", "cs"), m\u011Bs\u00EDc: r("month", "cs"), den: r("day", "cs"), \u0161tvr\u0165rok: r("quarter", "sk"), mesiac: r("month", "sk"), de\u0148: r("day", "sk"), \u00E5r: r("year", "sv", "da", "nb"), kvartal: r("quarter", "sv", "da", "nb"), m\u00E5nad: r("month", "sv"), m\u00E5ned: r("month", "da", "nb"), vuosi: r("year", "fi"), vuosinelj\u00E4nnes: r("quarter", "fi"), kuukausi: r("month", "fi"), p\u00E4iv\u00E4: r("day", "fi"), \u00E9v: r("year", "hu"), negyed\u00E9v: r("quarter", "hu"), h\u00F3nap: r("month", "hu"), nap: r("day", "hu"), y\u0131l: r("year", "tr"), \u00E7eyrek: r("quarter", "tr"), ay: r("month", "tr"), g\u00FCn: r("day", "tr"), \u03AD\u03C4\u03BF\u03C2: r("year", "el"), \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF: r("quarter", "el"), \u03BC\u03AE\u03BD\u03B1\u03C2: r("month", "el"), \u03B7\u03BC\u03AD\u03C1\u03B1: r("day", "el"), an: r("year", "ro"), trimestru: r("quarter", "ro"), lun\u0103: r("month", "ro"), zi: r("day", "ro"), godina: r("year", "hr"), tromjese\u010Dje: r("quarter", "hr"), mjesec: r("month", "hr"), dan: r("day", "hr"), \u5E74: r("year", "ja", "zh"), \u56DB\u534A\u671F: r("quarter", "ja"), \u5B63\u5EA6: r("quarter", "zh"), \u6708: r("month", "ja", "zh"), \u65E5: r("day", "ja", "zh"), \uC5F0\uB3C4: r("year", "ko"), \uBD84\uAE30: r("quarter", "ko"), \uC6D4: r("month", "ko"), \uC77C: r("day", "ko"), tahun: r("year", "id"), kuartal: r("quarter", "id"), triwulan: r("quarter", "id"), bulan: r("month", "id"), hari: r("day", "id"), n\u0103m: r("year", "vi"), qu\u00FD: r("quarter", "vi"), th\u00E1ng: r("month", "vi"), ng\u00E0y: r("day", "vi"), \u0E1B\u0E35: r("year", "th"), \u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A: r("quarter", "th"), \u0E40\u0E14\u0E37\u0E2D\u0E19: r("month", "th"), \u0E27\u0E31\u0E19: r("day", "th"), \u0627\u0644\u0633\u0646\u0629: r("year", "ar"), \u0633\u0646\u0629: r("year", "ar"), \u0627\u0644\u0639\u0627\u0645: r("year", "ar"), \u0639\u0627\u0645: r("year", "ar"), \u0627\u0644\u0631\u0628\u0639: r("quarter", "ar"), \u0631\u0628\u0639: r("quarter", "ar"), "\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629": r("quarter", "ar"), \u0627\u0644\u0634\u0647\u0631: r("month", "ar"), \u0634\u0647\u0631: r("month", "ar"), \u0627\u0644\u064A\u0648\u0645: r("day", "ar"), \u064A\u0648\u0645: r("day", "ar"), \u05E9\u05E0\u05D4: r("year", "he"), \u05E8\u05D1\u05E2\u05D5\u05DF: r("quarter", "he"), \u05D7\u05D5\u05D3\u05E9: r("month", "he"), \u05D9\u05D5\u05DD: r("day", "he"), \u0935\u0930\u094D\u0937: r("year", "hi"), \u0938\u093E\u0932: r("year", "hi"), \u0924\u093F\u092E\u093E\u0939\u0940: r("quarter", "hi"), \u092E\u0939\u0940\u0928\u093E: r("month", "hi"), \u092E\u093E\u0939: r("month", "hi"), \u0926\u093F\u0928: r("day", "hi"), \u0633\u0627\u0644: r("year", "fa"), \u0645\u0627\u0647: r("month", "fa"), \u0631\u0648\u0632: r("day", "fa") });
1732
- var Gn2 = Object.freeze(Array.from(new Set(Object.values(re2).flatMap((t) => t.langs))));
1733
- var me = Object.freeze(["fa", "ar", "he", "th"]);
1734
- var sr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
1735
- var pr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
1732
+ var Wn = Object.freeze(Array.from(new Set(Object.values(re2).flatMap((t) => t.langs))));
1733
+ var me2 = Object.freeze(["fa", "ar", "he", "th"]);
1734
+ var cr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
1735
+ var Cr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
1736
1736
  var we = 2 ** 31 - 1;
1737
1737
 
1738
1738
  // src/payload.ts
@@ -1748,7 +1748,7 @@ function resolvePointChannel(cols, rowObjs, point) {
1748
1748
  let labelCol;
1749
1749
  if (bind) {
1750
1750
  const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
1751
- const res = kn(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1751
+ const res = Un(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1752
1752
  bind = res.bind;
1753
1753
  rolesBackfilled = res.backfilled;
1754
1754
  rolesRefused = res.refused;
@@ -1942,10 +1942,10 @@ function stripJsComments(code) {
1942
1942
  continue;
1943
1943
  }
1944
1944
  if (ch === "/" && next === "/") {
1945
- let j4 = i + 2;
1946
- while (j4 < n && src[j4] !== "\n" && src[j4] !== "\r") j4++;
1945
+ let j3 = i + 2;
1946
+ while (j3 < n && src[j3] !== "\n" && src[j3] !== "\r") j3++;
1947
1947
  out += " ";
1948
- i = j4;
1948
+ i = j3;
1949
1949
  wordOpen = false;
1950
1950
  continue;
1951
1951
  }
@@ -1959,10 +1959,10 @@ function stripJsComments(code) {
1959
1959
  continue;
1960
1960
  }
1961
1961
  if (ch === "'" || ch === '"') {
1962
- let j4 = i + 1;
1963
- while (j4 < n && src[j4] !== ch && src[j4] !== "\n") j4 += src[j4] === "\\" ? 2 : 1;
1964
- out += src.slice(i, Math.min(j4 + 1, n));
1965
- i = j4 + 1;
1962
+ let j3 = i + 1;
1963
+ while (j3 < n && src[j3] !== ch && src[j3] !== "\n") j3 += src[j3] === "\\" ? 2 : 1;
1964
+ out += src.slice(i, Math.min(j3 + 1, n));
1965
+ i = j3 + 1;
1966
1966
  prevSig = ch;
1967
1967
  prevWord = "";
1968
1968
  wordOpen = false;
@@ -1976,23 +1976,23 @@ function stripJsComments(code) {
1976
1976
  continue;
1977
1977
  }
1978
1978
  if (ch === "/" && regexMayFollow()) {
1979
- let j4 = i + 1, inClass = false;
1980
- while (j4 < n && src[j4] !== "\n") {
1981
- const c2 = src[j4];
1979
+ let j3 = i + 1, inClass = false;
1980
+ while (j3 < n && src[j3] !== "\n") {
1981
+ const c2 = src[j3];
1982
1982
  if (c2 === "\\") {
1983
- j4 += 2;
1983
+ j3 += 2;
1984
1984
  continue;
1985
1985
  }
1986
1986
  if (c2 === "[") inClass = true;
1987
1987
  else if (c2 === "]") inClass = false;
1988
1988
  else if (c2 === "/" && !inClass) break;
1989
- j4++;
1989
+ j3++;
1990
1990
  }
1991
- if (j4 < n && src[j4] === "/") {
1992
- j4++;
1993
- while (j4 < n && /[A-Za-z]/.test(src[j4])) j4++;
1994
- out += src.slice(i, j4);
1995
- i = j4;
1991
+ if (j3 < n && src[j3] === "/") {
1992
+ j3++;
1993
+ while (j3 < n && /[A-Za-z]/.test(src[j3])) j3++;
1994
+ out += src.slice(i, j3);
1995
+ i = j3;
1996
1996
  prevSig = "/";
1997
1997
  prevWord = "";
1998
1998
  wordOpen = false;
@@ -2092,11 +2092,11 @@ function createMarkResolver(env) {
2092
2092
  const m2 = el.getScreenCTM();
2093
2093
  if (!m2) return Number.MAX_VALUE;
2094
2094
  let best = Number.MAX_VALUE;
2095
- const N2 = 64;
2096
- for (let i = 0; i <= N2; i++) {
2097
- const pt = el.getPointAtLength(L4 * i / N2);
2098
- const dx = m2.a * pt.x + m2.c * pt.y + m2.e - x3;
2099
- const dy = m2.b * pt.x + m2.d * pt.y + m2.f - y4;
2095
+ const N3 = 64;
2096
+ for (let i = 0; i <= N3; i++) {
2097
+ const pt2 = el.getPointAtLength(L4 * i / N3);
2098
+ const dx = m2.a * pt2.x + m2.c * pt2.y + m2.e - x3;
2099
+ const dy = m2.b * pt2.x + m2.d * pt2.y + m2.f - y4;
2100
2100
  const d2 = dx * dx + dy * dy;
2101
2101
  if (d2 < best) best = d2;
2102
2102
  }
@@ -2182,8 +2182,8 @@ function createMarkResolver(env) {
2182
2182
  for (const n of all) {
2183
2183
  const tag = (n.tagName || "").toLowerCase();
2184
2184
  if (!SHAPE.test(tag)) continue;
2185
- const pe2 = viewStyle(n);
2186
- if (pe2 && pe2 !== "none") return true;
2185
+ const pe = viewStyle(n);
2186
+ if (pe && pe !== "none") return true;
2187
2187
  }
2188
2188
  return false;
2189
2189
  };
@@ -2250,14 +2250,14 @@ function collectD3GlyphCenters(container, baseRect, out) {
2250
2250
  const isArcSector = /[Aa]/.test(dAttr) && !/[CcSsQqTt]/.test(dAttr);
2251
2251
  let local;
2252
2252
  if (isArcSector) {
2253
- const N2 = 24;
2253
+ const N3 = 24;
2254
2254
  let ax = 0, ay = 0;
2255
- for (let k3 = 0; k3 < N2; k3++) {
2256
- const sp = el.getPointAtLength(len * k3 / N2);
2255
+ for (let k3 = 0; k3 < N3; k3++) {
2256
+ const sp = el.getPointAtLength(len * k3 / N3);
2257
2257
  ax += sp.x;
2258
2258
  ay += sp.y;
2259
2259
  }
2260
- const cand = new Point(ax / N2, ay / N2);
2260
+ const cand = new Point(ax / N3, ay / N3);
2261
2261
  let inside = true;
2262
2262
  try {
2263
2263
  if (typeof el.isPointInFill === "function") {
@@ -2628,8 +2628,8 @@ function censusValuePlacement(container, data) {
2628
2628
  const fit = 1 - ssRes / ssTot;
2629
2629
  if (fit >= VALUE_AXIS_MIN_FIT && (!best || fit > best.fit)) {
2630
2630
  const full = new Array(dots.length).fill(NaN);
2631
- keep.forEach((k3, j4) => {
2632
- full[k3] = res[j4];
2631
+ keep.forEach((k3, j3) => {
2632
+ full[k3] = res[j3];
2633
2633
  });
2634
2634
  best = { col: c2, axis, fit, res: full, log };
2635
2635
  }
@@ -2859,14 +2859,14 @@ var SVG_NS2 = "http://www.w3.org/2000/svg";
2859
2859
  var AXIS_PIN_MAX_CARRIED = 12;
2860
2860
  function unpinScrolledAxis(container) {
2861
2861
  if (!container) return;
2862
- const st2 = container[CONTAINER_SLOT_AXIS_PIN];
2863
- if (!st2) return;
2862
+ const st = container[CONTAINER_SLOT_AXIS_PIN];
2863
+ if (!st) return;
2864
2864
  try {
2865
- container.removeEventListener("scroll", st2.onScroll);
2865
+ container.removeEventListener("scroll", st.onScroll);
2866
2866
  } catch {
2867
2867
  }
2868
2868
  try {
2869
- if (st2.overlay.parentNode) st2.overlay.parentNode.removeChild(st2.overlay);
2869
+ if (st.overlay.parentNode) st.overlay.parentNode.removeChild(st.overlay);
2870
2870
  } catch {
2871
2871
  }
2872
2872
  try {
@@ -3044,15 +3044,15 @@ function pinScrolledAxis(container, svg) {
3044
3044
  const svgTop = svgBox.top - cRect.top - container.clientTop + container.scrollTop;
3045
3045
  const contentBand = { top: svgTop + band.top, bottom: svgTop + band.bottom };
3046
3046
  const place = () => {
3047
- const st2 = container.scrollTop, vh = container.clientHeight;
3048
- const edge2 = axisPinPlacement(contentBand, st2, vh);
3047
+ const st = container.scrollTop, vh = container.clientHeight;
3048
+ const edge2 = axisPinPlacement(contentBand, st, vh);
3049
3049
  if (!edge2) {
3050
3050
  o2.display = "none";
3051
3051
  return null;
3052
3052
  }
3053
3053
  o2.display = "block";
3054
3054
  o2.left = `${svgLeft}px`;
3055
- o2.top = `${edge2 === "top" ? st2 : st2 + vh - bandPx}px`;
3055
+ o2.top = `${edge2 === "top" ? st : st + vh - bandPx}px`;
3056
3056
  return edge2;
3057
3057
  };
3058
3058
  const onScroll = () => {
@@ -3268,10 +3268,10 @@ function glyphSampleGrid(box, n = GLYPH_SAMPLE_N) {
3268
3268
  if (!box || !(box.width > 0) || !(box.height > 0) || !(n >= 1)) return out;
3269
3269
  const k3 = Math.floor(n);
3270
3270
  for (let i = 0; i < k3; i++) {
3271
- for (let j4 = 0; j4 < k3; j4++) {
3271
+ for (let j3 = 0; j3 < k3; j3++) {
3272
3272
  out.push({
3273
3273
  x: box.left + box.width * (i + 0.5) / k3,
3274
- y: box.top + box.height * (j4 + 0.5) / k3
3274
+ y: box.top + box.height * (j3 + 0.5) / k3
3275
3275
  });
3276
3276
  }
3277
3277
  }
@@ -3292,10 +3292,10 @@ var LABEL_CONTRAST_CAP = 2e3;
3292
3292
  var EMPTY5 = { rects: 0, scanned: 0, fixed: 0, pillsBoosted: 0, offFill: 0, pageMajority: 0, paintedOver: 0 };
3293
3293
  function backedSamples(el, pts) {
3294
3294
  try {
3295
- const ge3 = el;
3296
- if (typeof ge3.isPointInFill !== "function" || typeof ge3.getScreenCTM !== "function") return null;
3297
- const m2 = ge3.getScreenCTM();
3298
- const svg = ge3.ownerSVGElement;
3295
+ const ge2 = el;
3296
+ if (typeof ge2.isPointInFill !== "function" || typeof ge2.getScreenCTM !== "function") return null;
3297
+ const m2 = ge2.getScreenCTM();
3298
+ const svg = ge2.ownerSVGElement;
3299
3299
  if (!m2 || !svg || typeof svg.createSVGPoint !== "function") return null;
3300
3300
  if (pts.length === 0) return null;
3301
3301
  const inv = m2.inverse();
@@ -3304,7 +3304,7 @@ function backedSamples(el, pts) {
3304
3304
  const p2 = svg.createSVGPoint();
3305
3305
  p2.x = pts[i].x;
3306
3306
  p2.y = pts[i].y;
3307
- hit.push(ge3.isPointInFill(p2.matrixTransform(inv)));
3307
+ hit.push(ge2.isPointInFill(p2.matrixTransform(inv)));
3308
3308
  }
3309
3309
  return hit;
3310
3310
  } catch {
@@ -3438,10 +3438,10 @@ function applyLabelContrast(container, opts = {}) {
3438
3438
  const cellRGBA = toRGBA(cell.fill);
3439
3439
  let bgRGB = cellRGBA ? compositeOver([cellRGBA[0], cellRGBA[1], cellRGBA[2], cellRGBA[3] * cell.op], pageRGB) : pageRGB;
3440
3440
  if (pill) {
3441
- const pr2 = toRGBA(pill.fill);
3442
- if (pr2) {
3443
- bgRGB = compositeOver([pr2[0], pr2[1], pr2[2], 0.9], bgRGB);
3444
- pill.el.setAttribute("fill", `rgb(${pr2[0]}, ${pr2[1]}, ${pr2[2]})`);
3441
+ const pr = toRGBA(pill.fill);
3442
+ if (pr) {
3443
+ bgRGB = compositeOver([pr[0], pr[1], pr[2], 0.9], bgRGB);
3444
+ pill.el.setAttribute("fill", `rgb(${pr[0]}, ${pr[1]}, ${pr[2]})`);
3445
3445
  pill.el.setAttribute("fill-opacity", "0.9");
3446
3446
  report.pillsBoosted++;
3447
3447
  }
@@ -3584,9 +3584,9 @@ function compileRenderFn(code, win, doc, d3) {
3584
3584
  "[@bicharts/chart-host] the generated code could not be COMPILED, so nothing was drawn. This path evaluates the chart as a code string, which cannot contain ES-module syntax" + (modular ? " \u2014 and this code still has `import`/`export` in it after the export clause was stripped. Either request the plain form from the generator, or `import` the module yourself and pass the render function directly." : ".") + " Original error: " + msg
3585
3585
  );
3586
3586
  }
3587
- const fn = factory.call(null, null, null, null, win, doc, writableD3(d3));
3588
- if (typeof fn !== "function") throw new Error("generated code did not define render(container, data, options)");
3589
- return fn;
3587
+ const fn2 = factory.call(null, null, null, null, win, doc, writableD3(d3));
3588
+ if (typeof fn2 !== "function") throw new Error("generated code did not define render(container, data, options)");
3589
+ return fn2;
3590
3590
  }
3591
3591
  var ASYNC_RENDER_TIMEOUT_MS = 15e3;
3592
3592
  var isThenable = (v2) => !!v2 && (typeof v2 === "object" || typeof v2 === "function") && typeof v2.then === "function";
@@ -3651,9 +3651,9 @@ function createChartHost(container, config) {
3651
3651
  const ensureAffordanceStyles = () => {
3652
3652
  try {
3653
3653
  if (!doc || doc.getElementById("bic-chart-host-affordances")) return;
3654
- const st2 = doc.createElement("style");
3655
- st2.id = "bic-chart-host-affordances";
3656
- st2.textContent = `
3654
+ const st = doc.createElement("style");
3655
+ st.id = "bic-chart-host-affordances";
3656
+ st.textContent = `
3657
3657
  /* TYPOGRAPHY FIREWALL. Generated charts set font-size but almost never line-height or
3658
3658
  letter-spacing, so they INHERIT whatever the host page cascades in. A page with
3659
3659
  \`:root { font: 18px/145% }\` (the stock Vite template does exactly this) hands every
@@ -3702,7 +3702,7 @@ function createChartHost(container, config) {
3702
3702
  font-weight: 700 !important;
3703
3703
  text-decoration: underline !important;
3704
3704
  }`;
3705
- (doc.head || doc.documentElement)?.appendChild(st2);
3705
+ (doc.head || doc.documentElement)?.appendChild(st);
3706
3706
  } catch {
3707
3707
  }
3708
3708
  };
@@ -3720,8 +3720,8 @@ function createChartHost(container, config) {
3720
3720
  const marks = container.querySelectorAll(`.${MARK_CLASS}[${ROW_IDX_ATTR}], .${LEGEND_MARK_CLASS}[${ROW_IDX_ATTR}]`);
3721
3721
  for (const m2 of Array.from(marks)) {
3722
3722
  const rows = parseRowIdxs(m2.getAttribute(ROW_IDX_ATTR));
3723
- const on2 = active && rows.some((r2) => wanted.has(r2));
3724
- m2.classList?.[on2 ? "add" : "remove"](MARK_SELECTED_CLASS);
3723
+ const on = active && rows.some((r2) => wanted.has(r2));
3724
+ m2.classList?.[on ? "add" : "remove"](MARK_SELECTED_CLASS);
3725
3725
  }
3726
3726
  } catch {
3727
3727
  }
@@ -3918,9 +3918,9 @@ function createChartHost(container, config) {
3918
3918
  `[@bicharts/chart-host] the chart did not finish drawing within ${Math.round(ASYNC_RENDER_TIMEOUT_MS / 1e3)}s, so the host stopped waiting for it. Nothing past that point ran: no label-contrast pass, no hit-target heal, no census, no fit. A render() that returns a promise has to settle it.`
3919
3919
  ));
3920
3920
  }, ASYNC_RENDER_TIMEOUT_MS);
3921
- const done = (fn) => {
3921
+ const done = (fn2) => {
3922
3922
  clearTimeout(timer);
3923
- fn();
3923
+ fn2();
3924
3924
  };
3925
3925
  Promise.resolve(outcome).then(
3926
3926
  () => done(() => {
@@ -4007,11 +4007,11 @@ function toSourceRows(rowMap, payloadRowIdxs) {
4007
4007
  return payloadRowIdxs.map((i) => rowMap[i]).filter((i) => i !== void 0);
4008
4008
  }
4009
4009
  function toPayloadRows(rowMap, sourceRowIdxs) {
4010
- const at3 = /* @__PURE__ */ new Map();
4010
+ const at2 = /* @__PURE__ */ new Map();
4011
4011
  rowMap.forEach((src, k3) => {
4012
- if (!at3.has(src)) at3.set(src, k3);
4012
+ if (!at2.has(src)) at2.set(src, k3);
4013
4013
  });
4014
- return sourceRowIdxs.map((s) => at3.get(s)).filter((k3) => k3 !== void 0);
4014
+ return sourceRowIdxs.map((s) => at2.get(s)).filter((k3) => k3 !== void 0);
4015
4015
  }
4016
4016
  var sameRows = (a2, b4) => {
4017
4017
  if (a2.length !== b4.length) return false;
@@ -4196,10 +4196,10 @@ export {
4196
4196
  le,
4197
4197
  L2 as L,
4198
4198
  L3,
4199
- He,
4200
- Xe,
4201
- Gn,
4202
- Bn,
4199
+ qe,
4200
+ Qe,
4201
+ Zn2 as Zn,
4202
+ Qn,
4203
4203
  buildRenderPayload,
4204
4204
  stripJsComments,
4205
4205
  rowIdxsFromMark,
package/dist/index.mjs CHANGED
@@ -20,7 +20,6 @@ import {
20
20
  AXIS_PIN_MIN_LABELS,
21
21
  AXIS_PIN_TRACK_REACH_PX,
22
22
  BACKING_MAJORITY,
23
- Bn,
24
23
  COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT,
25
24
  COLOR_SCALE_SELF_CLAMP_PCT_MAX,
26
25
  COLOR_SCALE_SELF_CLAMP_PCT_MIN,
@@ -37,10 +36,8 @@ import {
37
36
  FLIP_MODE_DEFAULT,
38
37
  GEO_POINT_PRECISIONS,
39
38
  GLYPH_SAMPLE_N,
40
- Gn,
41
39
  HOST_CONTAINER_CLASS,
42
40
  HOST_CONTRACT_VERSION,
43
- He,
44
41
  L,
45
42
  L3,
46
43
  LABEL_CONTRAST_CAP,
@@ -60,6 +57,8 @@ import {
60
57
  PILL_MIN_ALPHA,
61
58
  PILL_MIN_COVERAGE,
62
59
  PILL_OPAQUE_ALPHA,
60
+ Qe,
61
+ Qn,
63
62
  ROW_IDX_ATTR,
64
63
  SAME_SHADE_DELTA_E,
65
64
  SCROLL_SLACK_PX,
@@ -71,7 +70,7 @@ import {
71
70
  VIEW_ONLY_UI_STATE_KEYS,
72
71
  WHITE_TEXT_BG_LUM,
73
72
  XFILTER_REFRESH_EVENT,
74
- Xe,
73
+ Zn,
75
74
  applyLabelContrast,
76
75
  assembleD3,
77
76
  autoRampCanvas,
@@ -128,6 +127,7 @@ import {
128
127
  pinScrolledAxis,
129
128
  planAxisPin,
130
129
  planFrameGrow,
130
+ qe,
131
131
  registerGeo,
132
132
  registerGeoAsset,
133
133
  relativeLuminance,
@@ -146,7 +146,7 @@ import {
146
146
  unpinScrolledAxis,
147
147
  valuePlacementFlag,
148
148
  withoutViewOnlyKeys
149
- } from "./chunk-MVM2R7K7.mjs";
149
+ } from "./chunk-YPXH42CQ.mjs";
150
150
  import "./chunk-A2GMXZP7.mjs";
151
151
  import "./chunk-GHODWOAL.mjs";
152
152
 
@@ -1493,15 +1493,15 @@ function displayText(col, raw, opts) {
1493
1493
  return String(raw);
1494
1494
  }
1495
1495
  function isSuppressed(col) {
1496
- return He(col).suppressed;
1496
+ return qe(col).suppressed;
1497
1497
  }
1498
1498
  function resolveAgg(col, requested, auto) {
1499
1499
  const fallback = () => {
1500
- const d2 = Gn(col);
1500
+ const d2 = Zn(col);
1501
1501
  return d2 === "first" ? "count" : d2;
1502
1502
  };
1503
1503
  if (auto) return fallback();
1504
- return Xe(col).indexOf(requested) >= 0 ? requested : fallback();
1504
+ return Qe(col).indexOf(requested) >= 0 ? requested : fallback();
1505
1505
  }
1506
1506
  function toNumber(v2) {
1507
1507
  if (v2 == null || v2 === "") return null;
@@ -1604,7 +1604,7 @@ function computeSelectionCard(payload, selectedRowIdxs, opts = {}) {
1604
1604
  }
1605
1605
  const value = reduce(selVals, colAgg, selRaw);
1606
1606
  let sharePct = null;
1607
- if (Bn(col, colAgg) && value != null) {
1607
+ if (Qn(col, colAgg) && value != null) {
1608
1608
  const allVals = [];
1609
1609
  const allRaw = [];
1610
1610
  for (let r2 = 0; r2 < rows.length; r2++) {
package/dist/react.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  loadGeo,
8
8
  syncMemberSelection,
9
9
  toSourceRows
10
- } from "./chunk-MVM2R7K7.mjs";
10
+ } from "./chunk-YPXH42CQ.mjs";
11
11
  import "./chunk-A2GMXZP7.mjs";
12
12
  import "./chunk-GHODWOAL.mjs";
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-host",
3
- "version": "0.6.43",
3
+ "version": "0.6.44",
4
4
  "description": "Run a BIC-generated D3 chart in any web host: compiles the generated render() function, applies the shared option defaults, resolves mark clicks (through tooltip overlays), owns the selection affordance, and translates row indices between cross-filtered charts. The same contract the BIC Power BI visual implements, minus Power BI. React bindings at @bicharts/chart-host/react.",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",