@bicharts/chart-host 0.6.79 → 0.6.80

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.
package/dist/card.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  /*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
2
  import {
3
3
  computeSelectionCard
4
- } from "./chunk-M7VM6F73.mjs";
5
- import "./chunk-L554L6HF.mjs";
4
+ } from "./chunk-Y3CCDWVO.mjs";
5
+ import "./chunk-P3HUTWQB.mjs";
6
6
  import "./chunk-GHODWOAL.mjs";
7
7
 
8
8
  // src/selectionCardChrome.ts
@@ -206,8 +206,8 @@ var require_papaparse_min = __commonJS({
206
206
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
207
207
  }
208
208
  function E4(C2) {
209
- var S2 = (C2 = C2 || {}).delimiter, O4 = C2.newline, x3 = C2.comments, I2 = C2.step, A2 = C2.preview, T = C2.fastMode, D2 = null, L4 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j4 = F4;
210
- if (void 0 !== C2.escapeChar && (j4 = C2.escapeChar), ("string" != typeof S2 || -1 < v.BAD_DELIMITERS.indexOf(S2)) && (S2 = ","), x3 === S2) throw new Error("Comment character same as delimiter");
209
+ var S2 = (C2 = C2 || {}).delimiter, O4 = C2.newline, x3 = C2.comments, I2 = C2.step, A2 = C2.preview, T = C2.fastMode, D2 = null, L4 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j5 = F4;
210
+ if (void 0 !== C2.escapeChar && (j5 = C2.escapeChar), ("string" != typeof S2 || -1 < v.BAD_DELIMITERS.indexOf(S2)) && (S2 = ","), x3 === S2) throw new Error("Comment character same as delimiter");
211
211
  true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O4 && "\r" !== O4 && "\r\n" !== O4 && (O4 = "\n");
212
212
  var z2 = 0, M2 = false;
213
213
  this.parse = function(i2, t, r4) {
@@ -227,11 +227,11 @@ var require_papaparse_min = __commonJS({
227
227
  }
228
228
  return w3();
229
229
  }
230
- for (var p5 = i2.indexOf(S2, z2), g6 = i2.indexOf(O4, z2), _5 = new RegExp(U2(j4) + U2(F4), "g"), m5 = i2.indexOf(F4, z2); ; ) if (i2[z2] === F4) for (m5 = z2, z2++; ; ) {
230
+ for (var p5 = i2.indexOf(S2, z2), g6 = i2.indexOf(O4, z2), _5 = new RegExp(U2(j5) + U2(F4), "g"), m5 = i2.indexOf(F4, z2); ; ) if (i2[z2] === F4) for (m5 = z2, z2++; ; ) {
231
231
  if (-1 === (m5 = i2.indexOf(F4, m5 + 1))) return r4 || u5.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h5.length, index: z2 }), E5();
232
232
  if (m5 === n2 - 1) return E5(i2.substring(z2, m5).replace(_5, F4));
233
- if (F4 === j4 && i2[m5 + 1] === j4) m5++;
234
- else if (F4 === j4 || 0 === m5 || i2[m5 - 1] !== j4) {
233
+ if (F4 === j5 && i2[m5 + 1] === j5) m5++;
234
+ else if (F4 === j5 || 0 === m5 || i2[m5 - 1] !== j5) {
235
235
  -1 !== p5 && p5 < m5 + 1 && (p5 = i2.indexOf(S2, m5 + 1));
236
236
  var y4 = v2(-1 === (g6 = -1 !== g6 && g6 < m5 + 1 ? i2.indexOf(O4, m5 + 1) : g6) ? p5 : Math.min(p5, g6));
237
237
  if (i2.substr(m5 + 1 + y4, e) === S2) {
@@ -1000,88 +1000,115 @@ function Fn(n, s2) {
1000
1000
  return { iso: o4, unmatched: I2, matchedRows: N2, totalRows: n.length };
1001
1001
  }
1002
1002
 
1003
- // ../shape-core/dist/chunk-HRIMAMPX.mjs
1003
+ // ../shape-core/dist/chunk-PSGBF6DU.mjs
1004
1004
  var import_papaparse = __toESM(require_papaparse_min(), 1);
1005
1005
  /*! @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. */
1006
- 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" };
1006
+ var Ve = { "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" };
1007
1007
  var J4 = (() => {
1008
1008
  let t = /* @__PURE__ */ new Map();
1009
- for (let e of Object.keys(ze)) for (let n of ze[e].split(/\s+/)) n && t.set(n, e);
1009
+ for (let e of Object.keys(Ve)) for (let n of Ve[e].split(/\s+/)) n && t.set(n, e);
1010
1010
  return t;
1011
1011
  })();
1012
- function yt(t) {
1012
+ function Mt(t) {
1013
1013
  for (let [e, n] of t) {
1014
- let i = J4.get(e);
1015
- i && !J4.has(n) && J4.set(n, i);
1014
+ let r2 = J4.get(e);
1015
+ r2 && !J4.has(n) && J4.set(n, r2);
1016
1016
  }
1017
1017
  }
1018
- yt(L);
1019
- var St = ["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", "capita", "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"];
1020
- 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"];
1021
- var At = ["latitude", "longitude"];
1022
- var Ct = ["latitude", "longitude"];
1023
- function Z2(t) {
1018
+ Mt(L);
1019
+ var Rt = ["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", "capita", "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", "ocupacion", "ocupacao", "occupazione", "auslastung", "bezetting", "belaggning", "belaegning", "belegg", "kayttoaste", "oblozenie", "obsazenost", "obsadenost", "kihasznaltsag", "doluluk", "ocupare", "popunjenost", "efficacite", "eficiencia", "efficienza", "effizienz", "effectiviteit", "verimlilik"];
1020
+ var Tt = ["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"];
1021
+ var Nt = ["latitude", "longitude"];
1022
+ var Et = ["latitude", "longitude"];
1023
+ function j4(t) {
1024
1024
  return p2(t);
1025
1025
  }
1026
- 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"];
1027
- function Mt(t) {
1026
+ var Ye = ["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", "sum pa", "\u0441\u0443\u043C\u043C\u0430", "\u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E", "\u0441\u0443\u043C\u0430", "\u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C", "\u03B1\u03B8\u03C1\u03BF\u03B9\u03C3\u03BC\u03B1", "\u03C0\u03BB\u03B7\u03B8\u03BF\u03C2"];
1027
+ var vt = ["osszege", "sucet", "\u7684\u603B\u548C", "\u7684\u8BA1\u6570", "\u306E\u5408\u8A08", "\uC758 \uD569\uACC4"];
1028
+ var wt = ["atlaga", "priemer", "\u7684\u5E73\u5747\u503C", "\u306E\u5E73\u5747", "\uC758 \uD3C9\uADE0"];
1029
+ var me = Object.freeze({ "nombre de": "count", "recuento de": "count", "contagem de": "count", "anzahl von": "count", "aantal van": "count", "conteggio di": "count", "antal av": "count", lukumaara: "count", "pocet z": "count", \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E: "count", \u043A\u0456\u043B\u044C\u043A\u0456\u0441\u0442\u044C: "count", \u03C0\u03BB\u03B7\u03B8\u03BF\u03C2: "count", \u7684\u8BA1\u6570: "count", "minimum de": "min", "minimo de": "min", "minimo di": "min", "minimum von": "min", "maximum de": "max", "maximo de": "max", "massimo di": "max", "maximum von": "max" });
1030
+ function Se(t) {
1028
1031
  return [...t].sort((e, n) => n.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
1029
1032
  }
1030
- var $e = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + Mt(be) + ")\\s+)", "i");
1031
- var xt = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1032
- var Rt = new RegExp("\\b(" + St.join("|") + ")\\b|(" + _t.join("|") + ")$", "i");
1033
- var Tt = new RegExp("\\b(" + At.join("|") + ")\\b|(" + Ct.join("|") + ")$", "i");
1034
- function me(t) {
1035
- if (!t) return "";
1036
- let e = String(t), n = $e.exec(Z2(e));
1037
- return (n ? e.slice(n[0].length) : e).trim();
1038
- }
1039
- function Nt(t) {
1040
- return !!t && $e.test(Z2(String(t)));
1041
- }
1042
- 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"];
1043
- 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");
1044
- 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 "] };
1045
- var It = new RegExp("^(" + Object.keys(He).join("|") + ")\\((.+)\\)$");
1046
- function vt(t) {
1047
- let e = me(t);
1048
- return e.length === 0 ? "" : e.replace(xt, " ");
1033
+ var je = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + Se(Ye) + ")\\s+)", "i");
1034
+ function He(t) {
1035
+ for (let e of t) {
1036
+ let n = e.codePointAt(0) ?? 0;
1037
+ if (n >= 11904 && n <= 40959 || n >= 44032 && n <= 55215) return true;
1038
+ }
1039
+ return false;
1049
1040
  }
1050
- function je(t, e) {
1041
+ var Lt = "[\u2013\u2014-]";
1042
+ function Xe(t) {
1043
+ let e = t.filter((i) => !He(i)), n = t.filter(He), r2 = [];
1044
+ return e.length && r2.push("(?:\\s+|\\s*" + Lt + "\\s*)(" + Se(e) + ")"), n.length && r2.push("\\s*(" + Se(n) + ")"), new RegExp("(?:" + r2.join("|") + ")\\s*$", "i");
1045
+ }
1046
+ var _e = Xe(vt);
1047
+ var Dt = Xe(wt);
1048
+ function de(t, e) {
1049
+ let n = e.exec(t);
1050
+ if (!n) return null;
1051
+ let r2 = t.slice(0, n.index);
1052
+ return r2.trim() === "" ? null : { base: r2, label: (n[1] ?? n[2] ?? "").toLowerCase() };
1053
+ }
1054
+ var Ot = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
1055
+ var Pt = new RegExp("\\b(" + Rt.join("|") + ")\\b|(" + Tt.join("|") + ")$", "i");
1056
+ var kt = new RegExp("\\b(" + Nt.join("|") + ")\\b|(" + Et.join("|") + ")$", "i");
1057
+ function fe(t) {
1058
+ if (!t) return "";
1059
+ let e = String(t), n = j4(e), r2 = je.exec(n);
1060
+ if (r2) return e.slice(r2[0].length).trim();
1061
+ let i = de(n, _e);
1062
+ return (i ? e.slice(0, i.base.length) : e).trim();
1063
+ }
1064
+ function Ft(t) {
1065
+ if (!t) return false;
1066
+ let e = j4(String(t));
1067
+ return je.test(e) || de(e, _e) !== null;
1068
+ }
1069
+ var Gt = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
1070
+ var Ke = new RegExp("^\\s*(" + [...Gt].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
1071
+ var Qe = { 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 "] };
1072
+ var Wt = new RegExp("^(" + Object.keys(Qe).join("|") + ")\\((.+)\\)$");
1073
+ function zt(t) {
1074
+ let e = fe(t);
1075
+ return e.length === 0 ? "" : e.replace(Ot, " ");
1076
+ }
1077
+ function et(t, e) {
1051
1078
  if (!e) return false;
1052
- let n = me(e);
1053
- return t.test(Z2(vt(e))) || t.test(Z2(n)) || t.test(Z2(d(n).join(" ")));
1079
+ let n = fe(e);
1080
+ return t.test(j4(zt(e))) || t.test(j4(n)) || t.test(j4(d(n).join(" ")));
1054
1081
  }
1055
- function Xe(t) {
1056
- return je(Tt, t);
1082
+ function tt(t) {
1083
+ return et(kt, t);
1057
1084
  }
1058
- function wt(t) {
1059
- return je(Rt, t) || Xe(t);
1085
+ function Bt(t) {
1086
+ return et(Pt, t) || tt(t);
1060
1087
  }
1061
- var Ze = /int|double|decimal|single|float|number|currency|money/i;
1062
- function Lt(t) {
1088
+ var nt = /int|double|decimal|single|float|number|currency|money/i;
1089
+ function Ut(t) {
1063
1090
  let e = String(t?.valueNature ?? "").trim().toLowerCase();
1064
- return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || Ze.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
1091
+ return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || nt.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
1065
1092
  }
1066
- function Dt(t) {
1067
- return t?.isMeasure === true || Ze.test(String(t?.dataType ?? ""));
1093
+ function Vt(t) {
1094
+ return t?.isMeasure === true || nt.test(String(t?.dataType ?? ""));
1068
1095
  }
1069
- function qe(t) {
1070
- let e = t ?? {}, n = Lt(e);
1096
+ function it(t) {
1097
+ let e = t ?? {}, n = Ut(e);
1071
1098
  if (n !== "Continuous") return { nature: n, additivity: "unknown", basis: "role", suppressed: false };
1072
- if (Xe(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
1073
- let i = String(e.additivity ?? "").trim().toLowerCase();
1074
- if (!(i === "additive" && Nt(e.name))) {
1075
- if (i === "additive") return { nature: n, additivity: "additive", basis: "measured", suppressed: false };
1076
- if (i === "part_of_whole") return { nature: n, additivity: "part_of_whole", basis: "measured", suppressed: false };
1077
- if (i === "intensive_rate") return { nature: n, additivity: "intensive_rate", basis: "measured", suppressed: false };
1099
+ if (tt(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
1100
+ let r2 = String(e.additivity ?? "").trim().toLowerCase();
1101
+ if (!(r2 === "additive" && Ft(e.name))) {
1102
+ if (r2 === "additive") return { nature: n, additivity: "additive", basis: "measured", suppressed: false };
1103
+ if (r2 === "part_of_whole") return { nature: n, additivity: "part_of_whole", basis: "measured", suppressed: false };
1104
+ if (r2 === "intensive_rate") return { nature: n, additivity: "intensive_rate", basis: "measured", suppressed: false };
1078
1105
  }
1079
- 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 };
1106
+ return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : Bt(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
1080
1107
  }
1081
- function Qe(t) {
1082
- let e = qe(t), n = t ?? {};
1108
+ function rt(t) {
1109
+ let e = it(t), n = t ?? {};
1083
1110
  if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
1084
- if (e.nature === "Ordinal") return Dt(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1111
+ if (e.nature === "Ordinal") return Vt(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
1085
1112
  switch (e.additivity) {
1086
1113
  case "positional":
1087
1114
  return ["min", "max", "count", "distinctcount", "first"];
@@ -1091,20 +1118,20 @@ function Qe(t) {
1091
1118
  return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
1092
1119
  }
1093
1120
  }
1094
- function Zn(t) {
1095
- return Qe(t)[0];
1121
+ function oi(t) {
1122
+ return rt(t)[0];
1096
1123
  }
1097
- function Qn(t, e) {
1124
+ function ui(t, e) {
1098
1125
  if (e !== "sum" && e !== "count") return false;
1099
1126
  if (e === "count") return true;
1100
- let n = qe(t);
1127
+ let n = it(t);
1101
1128
  return n.additivity === "additive" || n.additivity === "part_of_whole" || n.additivity === "unknown";
1102
1129
  }
1103
- 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("|"));
1130
+ var rn = 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("|"));
1104
1131
 
1105
1132
  // ../shape-core/dist/index.mjs
1106
1133
  /*! @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. */
1107
- var Z3 = 2;
1134
+ var Z2 = 2;
1108
1135
  var me2 = 400;
1109
1136
  function te(e) {
1110
1137
  return !!k(e);
@@ -1159,7 +1186,7 @@ function re2(e) {
1159
1186
  for (let o4 of t) r3(o4).length > 0 && n++;
1160
1187
  return Math.round(n / t.length * 1e3) / 10;
1161
1188
  }
1162
- function de(e, t) {
1189
+ function de2(e, t) {
1163
1190
  return y(t, fn) ? true : oe2(e).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
1164
1191
  }
1165
1192
  function Yn2(e, t) {
@@ -1193,7 +1220,7 @@ function Xn(e, t, n, o4, l2) {
1193
1220
  let f2 = n?.zip;
1194
1221
  if (f2 && C2.has(f2)) {
1195
1222
  let s2 = y2(f2), d2 = re2(s2);
1196
- d2 < 95 ? a3.push(`zip=${f2} (only ${d2}% of values read as ZIPs)`) : de(s2, f2) ? i.zip = f2 : a3.push(`zip=${f2} (all values are 3-4 digits with nothing to say they are postal)`);
1223
+ d2 < 95 ? a3.push(`zip=${f2} (only ${d2}% of values read as ZIPs)`) : de2(s2, f2) ? i.zip = f2 : a3.push(`zip=${f2} (all values are 3-4 digits with nothing to say they are postal)`);
1197
1224
  }
1198
1225
  let c2 = n?.state;
1199
1226
  if (c2 && C2.has(c2)) {
@@ -1209,14 +1236,14 @@ function Xn(e, t, n, o4, l2) {
1209
1236
  let O4 = $4(S2);
1210
1237
  if (O4 < 95) continue;
1211
1238
  let K3 = ee3(S2, (G4) => !!t3(G4)), Ne = ee3(S2, (G4) => !!t3(G4) && !ce3(G4, o4));
1212
- K3 < Z3 && Ne < 1 || (!s2 || O4 > s2.pct) && (s2 = { name: d2, pct: O4 });
1239
+ K3 < Z2 && Ne < 1 || (!s2 || O4 > s2.pct) && (s2 = { name: d2, pct: O4 });
1213
1240
  }
1214
1241
  s2 && (i.state = s2.name, p4.add(s2.name), u4.push(`state=${s2.name} (${s2.pct}% states/provinces)`));
1215
1242
  }
1216
1243
  if (!i.zip) for (let s2 of b4) {
1217
1244
  if (p4.has(s2)) continue;
1218
1245
  let d2 = y2(s2), S2 = re2(d2);
1219
- if (!(S2 < 95) && de(d2, s2) && !(Qn2(d2, (O4) => r3(O4).length > 0) < Z3)) {
1246
+ if (!(S2 < 95) && de2(d2, s2) && !(Qn2(d2, (O4) => r3(O4).length > 0) < Z2)) {
1220
1247
  i.zip = s2, p4.add(s2), u4.push(`zip=${s2} (${S2}% ZIP codes)`);
1221
1248
  break;
1222
1249
  }
@@ -1236,7 +1263,7 @@ function Xn(e, t, n, o4, l2) {
1236
1263
  for (let d2 of b4) {
1237
1264
  if (p4.has(d2)) continue;
1238
1265
  let S2 = y2(d2), O4 = Yn2(S2, o4);
1239
- O4 < D3 || ee3(S2, (K3) => j3(K3, o4)) < Z3 || (!s2 || O4 > s2.pct) && (s2 = { name: d2, pct: O4 });
1266
+ O4 < D3 || ee3(S2, (K3) => j3(K3, o4)) < Z2 || (!s2 || O4 > s2.pct) && (s2 = { name: d2, pct: O4 });
1240
1267
  }
1241
1268
  s2 && (i.city = s2.name, u4.push(`city=${s2.name} (${s2.pct}% known cities)`));
1242
1269
  }
@@ -1249,11 +1276,11 @@ function Xn(e, t, n, o4, l2) {
1249
1276
  var r = (e, ...t) => ({ part: e, langs: Object.freeze(t) });
1250
1277
  var ie2 = 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") });
1251
1278
  var Jn = Object.freeze(Array.from(new Set(Object.values(ie2).flatMap((e) => e.langs))));
1252
- var fe = Object.freeze(["fa", "ar", "he", "th"]);
1279
+ var fe2 = Object.freeze(["fa", "ar", "he", "th"]);
1253
1280
  var Pr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
1254
1281
  var kr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict", REDRAW: "redraw", INTERACT: "interact" });
1255
1282
  var Gr = Object.freeze(["open", "generate", "version", "rebind", "data", "sample", "fix", "resize", "other"]);
1256
- var Ae = 2 ** 31 - 1;
1283
+ var Ae2 = 2 ** 31 - 1;
1257
1284
 
1258
1285
  export {
1259
1286
  le,
@@ -1265,9 +1292,9 @@ export {
1265
1292
  J3,
1266
1293
  Yn,
1267
1294
  Fn,
1268
- qe,
1269
- Qe,
1270
- Zn,
1271
- Qn,
1295
+ it,
1296
+ rt,
1297
+ oi,
1298
+ ui,
1272
1299
  Xn
1273
1300
  };
@@ -1,12 +1,12 @@
1
1
  /*! @bicharts/chart-host — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; Natural Earth and US Census/TIGER (public domain). Full text: NOTICE in this package. */
2
2
  import {
3
3
  L,
4
- Qe,
5
- Qn,
6
- Zn,
4
+ it,
7
5
  le,
8
- qe
9
- } from "./chunk-L554L6HF.mjs";
6
+ oi,
7
+ rt,
8
+ ui
9
+ } from "./chunk-P3HUTWQB.mjs";
10
10
 
11
11
  // src/sourceDateFormat.ts
12
12
  function formatSourceDate(raw, opts = {}) {
@@ -435,15 +435,15 @@ function displayText(col, raw, opts) {
435
435
  return String(raw);
436
436
  }
437
437
  function isSuppressed(col) {
438
- return qe(col).suppressed;
438
+ return it(col).suppressed;
439
439
  }
440
440
  function resolveAgg(col, requested, auto) {
441
441
  const fallback = () => {
442
- const d = Zn(col);
442
+ const d = oi(col);
443
443
  return d === "first" ? "count" : d;
444
444
  };
445
445
  if (auto) return fallback();
446
- return Qe(col).indexOf(requested) >= 0 ? requested : fallback();
446
+ return rt(col).indexOf(requested) >= 0 ? requested : fallback();
447
447
  }
448
448
  function toNumber(v) {
449
449
  if (v == null || v === "") return null;
@@ -546,7 +546,7 @@ function computeSelectionCard(payload, selectedRowIdxs, opts = {}) {
546
546
  }
547
547
  const value = reduce(selVals, colAgg, selRaw);
548
548
  let sharePct = null;
549
- if (Qn(col, colAgg) && value != null) {
549
+ if (ui(col, colAgg) && value != null) {
550
550
  const allVals = [];
551
551
  const allRaw = [];
552
552
  for (let r = 0; r < rows.length; r++) {
@@ -5,7 +5,7 @@ import {
5
5
  Xn,
6
6
  Yn,
7
7
  ge
8
- } from "./chunk-L554L6HF.mjs";
8
+ } from "./chunk-P3HUTWQB.mjs";
9
9
  import {
10
10
  censusHitBands,
11
11
  createMarkResolver,
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  formatSourceDateFor,
6
6
  isExcelDateFormat,
7
7
  normaliseAggregation
8
- } from "./chunk-M7VM6F73.mjs";
8
+ } from "./chunk-Y3CCDWVO.mjs";
9
9
  import {
10
10
  ANNOTATION_CLASS,
11
11
  ANNOTATION_LAYER_CLASS,
@@ -111,12 +111,12 @@ import {
111
111
  toSourceRows,
112
112
  unpinScrolledAxis,
113
113
  valuePlacementFlag
114
- } from "./chunk-BFN4NY22.mjs";
114
+ } from "./chunk-YYJCE5TO.mjs";
115
115
  import {
116
116
  _3,
117
117
  l,
118
118
  o
119
- } from "./chunk-L554L6HF.mjs";
119
+ } from "./chunk-P3HUTWQB.mjs";
120
120
  import {
121
121
  MIN_HIT_BAND_PX,
122
122
  SELECTION_GLYPH_CLASS,
package/dist/react.mjs CHANGED
@@ -22,8 +22,8 @@ import {
22
22
  loadGeo,
23
23
  syncMemberSelection,
24
24
  toSourceRows
25
- } from "./chunk-BFN4NY22.mjs";
26
- import "./chunk-L554L6HF.mjs";
25
+ } from "./chunk-YYJCE5TO.mjs";
26
+ import "./chunk-P3HUTWQB.mjs";
27
27
  import "./chunk-MGAO2DR7.mjs";
28
28
  import "./chunk-A2GMXZP7.mjs";
29
29
  import "./chunk-7JWL6LYE.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-host",
3
- "version": "0.6.79",
3
+ "version": "0.6.80",
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",