@bicharts/chart-host 0.6.82 → 0.6.84
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/adapters.mjs +10 -4
- package/dist/card.mjs +2 -2
- package/dist/{chunk-MP5S6MVW.mjs → chunk-2HKO6GEK.mjs} +70 -17
- package/dist/{chunk-ZRSEKV4I.mjs → chunk-2ZUUIZWL.mjs} +112 -112
- package/dist/chunk-7HKVV5T5.mjs +198 -0
- package/dist/{chunk-XIAL6EEC.mjs → chunk-DTOGTKAJ.mjs} +10 -2
- package/dist/{chunk-7HPVGRQ2.mjs → chunk-GG4U66E4.mjs} +9 -9
- package/dist/{chunk-MGAO2DR7.mjs → chunk-IURROJT7.mjs} +95 -193
- package/dist/{chunk-7JWL6LYE.mjs → chunk-MR6TL7QZ.mjs} +1 -1
- package/dist/chunk-QIRLWJBI.mjs +665 -0
- package/dist/index.mjs +123 -13
- package/dist/page.mjs +4 -1
- package/dist/react.mjs +7 -5
- package/dist/testing.mjs +1 -1
- package/dist/types/contract.d.ts +35 -1
- package/dist/types/index.d.ts +5 -4
- package/dist/types/lasso.d.ts +143 -0
- package/dist/types/pendingGenerate.d.ts +18 -2
- package/dist/types/qualifyGroups.d.ts +61 -3
- package/dist/types/selection.d.ts +51 -0
- package/package.json +1 -1
|
@@ -206,8 +206,8 @@ var require_papaparse_min = __commonJS({
|
|
|
206
206
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
207
207
|
}
|
|
208
208
|
function E4(C) {
|
|
209
|
-
var S2 = (C = C || {}).delimiter, O4 = C.newline, x3 = C.comments, I2 = C.step, A = C.preview, T2 = C.fastMode, D4 = null, L4 = false, F4 = null == C.quoteChar ? '"' : C.quoteChar,
|
|
210
|
-
if (void 0 !== C.escapeChar && (
|
|
209
|
+
var S2 = (C = C || {}).delimiter, O4 = C.newline, x3 = C.comments, I2 = C.step, A = C.preview, T2 = C.fastMode, D4 = null, L4 = false, F4 = null == C.quoteChar ? '"' : C.quoteChar, j2 = F4;
|
|
210
|
+
if (void 0 !== C.escapeChar && (j2 = C.escapeChar), ("string" != typeof S2 || -1 < v2.BAD_DELIMITERS.indexOf(S2)) && (S2 = ","), x3 === S2) throw new Error("Comment character same as delimiter");
|
|
211
211
|
true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.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 w4();
|
|
229
229
|
}
|
|
230
|
-
for (var p5 = i2.indexOf(S2, z2), g6 = i2.indexOf(O4, z2), _5 = new RegExp(U3(
|
|
230
|
+
for (var p5 = i2.indexOf(S2, z2), g6 = i2.indexOf(O4, z2), _5 = new RegExp(U3(j2) + U3(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 ===
|
|
234
|
-
else if (F4 ===
|
|
233
|
+
if (F4 === j2 && i2[m5 + 1] === j2) m5++;
|
|
234
|
+
else if (F4 === j2 || 0 === m5 || i2[m5 - 1] !== j2) {
|
|
235
235
|
-1 !== p5 && p5 < m5 + 1 && (p5 = i2.indexOf(S2, m5 + 1));
|
|
236
236
|
var y4 = v4(-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) {
|
|
@@ -992,115 +992,115 @@ function Fn(n, s2) {
|
|
|
992
992
|
return { iso: o2, unmatched: I2, matchedRows: N4, totalRows: n.length };
|
|
993
993
|
}
|
|
994
994
|
|
|
995
|
-
// ../shape-core/dist/chunk-
|
|
995
|
+
// ../shape-core/dist/chunk-AQ2WZ4TT.mjs
|
|
996
996
|
var import_papaparse = __toESM(require_papaparse_min(), 1);
|
|
997
997
|
/*! @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. */
|
|
998
|
-
var
|
|
999
|
-
var
|
|
998
|
+
var st = { "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" };
|
|
999
|
+
var se = (() => {
|
|
1000
1000
|
let t = /* @__PURE__ */ new Map();
|
|
1001
|
-
for (let e of Object.keys(
|
|
1001
|
+
for (let e of Object.keys(st)) for (let n of st[e].split(/\s+/)) n && t.set(n, e);
|
|
1002
1002
|
return t;
|
|
1003
1003
|
})();
|
|
1004
|
-
function
|
|
1004
|
+
function Vt(t) {
|
|
1005
1005
|
for (let [e, n] of t) {
|
|
1006
|
-
let
|
|
1007
|
-
|
|
1006
|
+
let s2 = se.get(e);
|
|
1007
|
+
s2 && !se.has(n) && se.set(n, s2);
|
|
1008
1008
|
}
|
|
1009
1009
|
}
|
|
1010
|
-
|
|
1011
|
-
var
|
|
1012
|
-
var
|
|
1013
|
-
var
|
|
1014
|
-
var
|
|
1015
|
-
function
|
|
1010
|
+
Vt(L);
|
|
1011
|
+
var nn = ["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"];
|
|
1012
|
+
var rn = ["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"];
|
|
1013
|
+
var sn = ["latitude", "longitude"];
|
|
1014
|
+
var on = ["latitude", "longitude"];
|
|
1015
|
+
function Z2(t) {
|
|
1016
1016
|
return c(t);
|
|
1017
1017
|
}
|
|
1018
|
-
var
|
|
1019
|
-
var
|
|
1020
|
-
var
|
|
1021
|
-
var
|
|
1022
|
-
function
|
|
1018
|
+
var dt = ["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"];
|
|
1019
|
+
var ln = ["osszege", "sucet", "\u7684\u603B\u548C", "\u7684\u8BA1\u6570", "\u306E\u5408\u8A08", "\uC758 \uD569\uACC4"];
|
|
1020
|
+
var un = ["atlaga", "priemer", "\u7684\u5E73\u5747\u503C", "\u306E\u5E73\u5747", "\uC758 \uD3C9\uADE0"];
|
|
1021
|
+
var ye = 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" });
|
|
1022
|
+
function Ne(t) {
|
|
1023
1023
|
return [...t].sort((e, n) => n.length - e.length).map((e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|");
|
|
1024
1024
|
}
|
|
1025
|
-
var
|
|
1026
|
-
function
|
|
1025
|
+
var ft = new RegExp("^\\s*(?:(?:sum|count|count\\s+distinct|distinct\\s+count)\\s+of\\s+|(?:" + Ne(dt) + ")\\s+)", "i");
|
|
1026
|
+
function ct(t) {
|
|
1027
1027
|
for (let e of t) {
|
|
1028
1028
|
let n = e.codePointAt(0) ?? 0;
|
|
1029
1029
|
if (n >= 11904 && n <= 40959 || n >= 44032 && n <= 55215) return true;
|
|
1030
1030
|
}
|
|
1031
1031
|
return false;
|
|
1032
1032
|
}
|
|
1033
|
-
var
|
|
1034
|
-
function
|
|
1035
|
-
let e = t.filter((
|
|
1036
|
-
return e.length &&
|
|
1033
|
+
var cn = "[\u2013\u2014-]";
|
|
1034
|
+
function gt(t) {
|
|
1035
|
+
let e = t.filter((r2) => !ct(r2)), n = t.filter(ct), s2 = [];
|
|
1036
|
+
return e.length && s2.push("(?:\\s+|\\s*" + cn + "\\s*)(" + Ne(e) + ")"), n.length && s2.push("\\s*(" + Ne(n) + ")"), new RegExp("(?:" + s2.join("|") + ")\\s*$", "i");
|
|
1037
1037
|
}
|
|
1038
|
-
var
|
|
1039
|
-
var
|
|
1040
|
-
function
|
|
1038
|
+
var Ee = gt(ln);
|
|
1039
|
+
var mn2 = gt(un);
|
|
1040
|
+
function be(t, e) {
|
|
1041
1041
|
let n = e.exec(t);
|
|
1042
1042
|
if (!n) return null;
|
|
1043
|
-
let
|
|
1044
|
-
return
|
|
1043
|
+
let s2 = t.slice(0, n.index);
|
|
1044
|
+
return s2.trim() === "" ? null : { base: s2, label: (n[1] ?? n[2] ?? "").toLowerCase() };
|
|
1045
1045
|
}
|
|
1046
|
-
var
|
|
1047
|
-
var
|
|
1048
|
-
var
|
|
1049
|
-
function
|
|
1046
|
+
var dn2 = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
|
|
1047
|
+
var fn2 = new RegExp("\\b(" + nn.join("|") + ")\\b|(" + rn.join("|") + ")$", "i");
|
|
1048
|
+
var gn = new RegExp("\\b(" + sn.join("|") + ")\\b|(" + on.join("|") + ")$", "i");
|
|
1049
|
+
function Se(t) {
|
|
1050
1050
|
if (!t) return "";
|
|
1051
|
-
let e = String(t), n =
|
|
1052
|
-
if (
|
|
1053
|
-
let
|
|
1054
|
-
return (
|
|
1051
|
+
let e = String(t), n = Z2(e), s2 = ft.exec(n);
|
|
1052
|
+
if (s2) return e.slice(s2[0].length).trim();
|
|
1053
|
+
let r2 = be(n, Ee);
|
|
1054
|
+
return (r2 ? e.slice(0, r2.base.length) : e).trim();
|
|
1055
1055
|
}
|
|
1056
|
-
function
|
|
1056
|
+
function pn2(t) {
|
|
1057
1057
|
if (!t) return false;
|
|
1058
|
-
let e =
|
|
1059
|
-
return
|
|
1060
|
-
}
|
|
1061
|
-
var
|
|
1062
|
-
var
|
|
1063
|
-
var
|
|
1064
|
-
var
|
|
1065
|
-
function
|
|
1066
|
-
let e =
|
|
1067
|
-
return e.length === 0 ? "" : e.replace(
|
|
1068
|
-
}
|
|
1069
|
-
function
|
|
1058
|
+
let e = Z2(String(t));
|
|
1059
|
+
return ft.test(e) || be(e, Ee) !== null;
|
|
1060
|
+
}
|
|
1061
|
+
var hn = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
|
|
1062
|
+
var mt = new RegExp("^\\s*(" + [...hn].sort((t, e) => e.length - t.length).map((t) => t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
|
|
1063
|
+
var yt = { 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 "] };
|
|
1064
|
+
var yn2 = new RegExp("^(" + Object.keys(yt).join("|") + ")\\((.+)\\)$");
|
|
1065
|
+
function bn(t) {
|
|
1066
|
+
let e = Se(t);
|
|
1067
|
+
return e.length === 0 ? "" : e.replace(dn2, " ");
|
|
1068
|
+
}
|
|
1069
|
+
function St(t, e) {
|
|
1070
1070
|
if (!e) return false;
|
|
1071
|
-
let n =
|
|
1072
|
-
return t.test(
|
|
1071
|
+
let n = Se(e);
|
|
1072
|
+
return t.test(Z2(bn(e))) || t.test(Z2(n)) || t.test(Z2(f(n).join(" ")));
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1075
|
-
return
|
|
1074
|
+
function At(t) {
|
|
1075
|
+
return St(gn, t);
|
|
1076
1076
|
}
|
|
1077
|
-
function
|
|
1078
|
-
return
|
|
1077
|
+
function Sn2(t) {
|
|
1078
|
+
return St(fn2, t) || At(t);
|
|
1079
1079
|
}
|
|
1080
|
-
var
|
|
1081
|
-
function
|
|
1080
|
+
var _t = /int|double|decimal|single|float|number|currency|money/i;
|
|
1081
|
+
function An2(t) {
|
|
1082
1082
|
let e = String(t?.valueNature ?? "").trim().toLowerCase();
|
|
1083
|
-
return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true ||
|
|
1083
|
+
return e === "categorical" ? "Categorical" : e === "ordinal" ? "Ordinal" : e === "continuous" || t?.isMeasure === true || _t.test(String(t?.dataType ?? "")) ? "Continuous" : "Categorical";
|
|
1084
1084
|
}
|
|
1085
|
-
function
|
|
1086
|
-
return t?.isMeasure === true ||
|
|
1085
|
+
function _n(t) {
|
|
1086
|
+
return t?.isMeasure === true || _t.test(String(t?.dataType ?? ""));
|
|
1087
1087
|
}
|
|
1088
|
-
function
|
|
1089
|
-
let e = t ?? {}, n =
|
|
1088
|
+
function xt(t) {
|
|
1089
|
+
let e = t ?? {}, n = An2(e);
|
|
1090
1090
|
if (n !== "Continuous") return { nature: n, additivity: "unknown", basis: "role", suppressed: false };
|
|
1091
|
-
if (
|
|
1092
|
-
let
|
|
1093
|
-
if (!(
|
|
1094
|
-
if (
|
|
1095
|
-
if (
|
|
1096
|
-
if (
|
|
1091
|
+
if (At(e.name)) return { nature: n, additivity: "positional", basis: "name", suppressed: true };
|
|
1092
|
+
let s2 = String(e.additivity ?? "").trim().toLowerCase();
|
|
1093
|
+
if (!(s2 === "additive" && pn2(e.name))) {
|
|
1094
|
+
if (s2 === "additive") return { nature: n, additivity: "additive", basis: "measured", suppressed: false };
|
|
1095
|
+
if (s2 === "part_of_whole") return { nature: n, additivity: "part_of_whole", basis: "measured", suppressed: false };
|
|
1096
|
+
if (s2 === "intensive_rate") return { nature: n, additivity: "intensive_rate", basis: "measured", suppressed: false };
|
|
1097
1097
|
}
|
|
1098
|
-
return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } :
|
|
1098
|
+
return e.discourageAggregationAcrossGroups === true ? { nature: n, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : Sn2(e.name) ? { nature: n, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: n, additivity: "additive", basis: "default", suppressed: false };
|
|
1099
1099
|
}
|
|
1100
|
-
function
|
|
1101
|
-
let e =
|
|
1100
|
+
function Ct(t) {
|
|
1101
|
+
let e = xt(t), n = t ?? {};
|
|
1102
1102
|
if (e.nature === "Categorical") return ["first", "distinctcount", "count"];
|
|
1103
|
-
if (e.nature === "Ordinal") return
|
|
1103
|
+
if (e.nature === "Ordinal") return _n(n) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
|
|
1104
1104
|
switch (e.additivity) {
|
|
1105
1105
|
case "positional":
|
|
1106
1106
|
return ["min", "max", "count", "distinctcount", "first"];
|
|
@@ -1110,20 +1110,20 @@ function ht(t) {
|
|
|
1110
1110
|
return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
|
|
1111
1111
|
}
|
|
1112
1112
|
}
|
|
1113
|
-
function
|
|
1114
|
-
return
|
|
1113
|
+
function ni(t) {
|
|
1114
|
+
return Ct(t)[0];
|
|
1115
1115
|
}
|
|
1116
|
-
function
|
|
1116
|
+
function ii(t, e) {
|
|
1117
1117
|
if (e !== "sum" && e !== "count") return false;
|
|
1118
1118
|
if (e === "count") return true;
|
|
1119
|
-
let n =
|
|
1119
|
+
let n = xt(t);
|
|
1120
1120
|
return n.additivity === "additive" || n.additivity === "part_of_whole" || n.additivity === "unknown";
|
|
1121
1121
|
}
|
|
1122
|
-
var
|
|
1122
|
+
var Ln = 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("|"));
|
|
1123
1123
|
|
|
1124
1124
|
// ../shape-core/dist/index.mjs
|
|
1125
1125
|
/*! @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. */
|
|
1126
|
-
var
|
|
1126
|
+
var Z3 = 2;
|
|
1127
1127
|
var me = 400;
|
|
1128
1128
|
function te(e) {
|
|
1129
1129
|
return !!k(e);
|
|
@@ -1139,8 +1139,8 @@ function F3(e) {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
function N2(e) {
|
|
1141
1141
|
let t = F3(e);
|
|
1142
|
-
if (t.length === 0 ||
|
|
1143
|
-
let n = t.filter((
|
|
1142
|
+
if (t.length === 0 || ne(e) < 95) return false;
|
|
1143
|
+
let n = t.filter((a3) => te(a3) && !t3(a3)).length, o2 = t.filter((a3) => !te(a3) && !!t3(a3)).length;
|
|
1144
1144
|
return n >= 1 && n >= o2;
|
|
1145
1145
|
}
|
|
1146
1146
|
function ce(e, t) {
|
|
@@ -1148,7 +1148,7 @@ function ce(e, t) {
|
|
|
1148
1148
|
let n = k(e);
|
|
1149
1149
|
return n ? t === "world" ? true : G3.has(n) : false;
|
|
1150
1150
|
}
|
|
1151
|
-
function
|
|
1151
|
+
function ne(e) {
|
|
1152
1152
|
let t = F3(e);
|
|
1153
1153
|
if (t.length === 0) return 0;
|
|
1154
1154
|
let n = 0;
|
|
@@ -1162,7 +1162,7 @@ function $2(e) {
|
|
|
1162
1162
|
for (let o2 of t) t3(o2) && n++;
|
|
1163
1163
|
return Math.round(n / t.length * 1e3) / 10;
|
|
1164
1164
|
}
|
|
1165
|
-
function
|
|
1165
|
+
function oe2(e) {
|
|
1166
1166
|
let t = /* @__PURE__ */ new Set();
|
|
1167
1167
|
for (let n of e) {
|
|
1168
1168
|
if (n == null) continue;
|
|
@@ -1172,20 +1172,20 @@ function oe(e) {
|
|
|
1172
1172
|
return Array.from(t);
|
|
1173
1173
|
}
|
|
1174
1174
|
function re2(e) {
|
|
1175
|
-
let t =
|
|
1175
|
+
let t = oe2(e);
|
|
1176
1176
|
if (t.length === 0) return 0;
|
|
1177
1177
|
let n = 0;
|
|
1178
1178
|
for (let o2 of t) r3(o2).length > 0 && n++;
|
|
1179
1179
|
return Math.round(n / t.length * 1e3) / 10;
|
|
1180
1180
|
}
|
|
1181
1181
|
function de(e, t) {
|
|
1182
|
-
return y(t, fn) ? true :
|
|
1182
|
+
return y(t, fn) ? true : oe2(e).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
|
|
1183
1183
|
}
|
|
1184
1184
|
function Yn2(e, t) {
|
|
1185
1185
|
let n = F3(e);
|
|
1186
1186
|
if (n.length === 0) return 0;
|
|
1187
1187
|
let o2 = 0;
|
|
1188
|
-
for (let
|
|
1188
|
+
for (let a3 of n) j3(a3, t) && o2++;
|
|
1189
1189
|
return Math.round(o2 / n.length * 1e3) / 10;
|
|
1190
1190
|
}
|
|
1191
1191
|
function ee(e, t) {
|
|
@@ -1195,16 +1195,16 @@ function ee(e, t) {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
function Qn(e, t) {
|
|
1197
1197
|
let n = 0;
|
|
1198
|
-
for (let o2 of
|
|
1198
|
+
for (let o2 of oe2(e)) t(o2) && n++;
|
|
1199
1199
|
return n;
|
|
1200
1200
|
}
|
|
1201
|
-
function Xn(e, t, n, o2,
|
|
1202
|
-
let u4 = [],
|
|
1201
|
+
function Xn(e, t, n, o2, a3) {
|
|
1202
|
+
let u4 = [], l2 = [], i = {}, h4 = {}, C = new Set(e), y2 = (s2) => t.map((d2) => d2[s2]);
|
|
1203
1203
|
for (let s2 of ["city", "country"]) {
|
|
1204
1204
|
let d2 = n?.[s2];
|
|
1205
1205
|
d2 && C.has(d2) && (i[s2] = d2);
|
|
1206
1206
|
}
|
|
1207
|
-
let g5 = new Set(
|
|
1207
|
+
let g5 = new Set(a3 ?? e);
|
|
1208
1208
|
for (let s2 of ["lat", "lon"]) {
|
|
1209
1209
|
let d2 = n?.[s2];
|
|
1210
1210
|
d2 && g5.has(d2) && (i[s2] = d2);
|
|
@@ -1212,12 +1212,12 @@ function Xn(e, t, n, o2, l2) {
|
|
|
1212
1212
|
let f2 = n?.zip;
|
|
1213
1213
|
if (f2 && C.has(f2)) {
|
|
1214
1214
|
let s2 = y2(f2), d2 = re2(s2);
|
|
1215
|
-
d2 < 95 ?
|
|
1215
|
+
d2 < 95 ? l2.push(`zip=${f2} (only ${d2}% of values read as ZIPs)`) : de(s2, f2) ? i.zip = f2 : l2.push(`zip=${f2} (all values are 3-4 digits with nothing to say they are postal)`);
|
|
1216
1216
|
}
|
|
1217
1217
|
let c2 = n?.state;
|
|
1218
1218
|
if (c2 && C.has(c2)) {
|
|
1219
1219
|
let s2 = y2(c2), d2 = F3(s2);
|
|
1220
|
-
d2.length > 0 && d2.every((S2) => ce(S2, o2)) ?
|
|
1220
|
+
d2.length > 0 && d2.every((S2) => ce(S2, o2)) ? l2.push(`state=${c2} (every value is "CA", which is both Canada and California)`) : N2(s2) ? (l2.push(`state=${c2} (every value is a country, not a state)`), i.country || (i.country = c2)) : $2(s2) < 95 ? l2.push(`state=${c2} (only ${$2(s2)}% of values are states/provinces)`) : i.state = c2;
|
|
1221
1221
|
}
|
|
1222
1222
|
let p4 = new Set(Object.values(i).filter(Boolean)), b4 = e.filter((s2) => !p4.has(s2) && !s2.startsWith("__"));
|
|
1223
1223
|
if (!i.state) {
|
|
@@ -1228,14 +1228,14 @@ function Xn(e, t, n, o2, l2) {
|
|
|
1228
1228
|
let O4 = $2(S2);
|
|
1229
1229
|
if (O4 < 95) continue;
|
|
1230
1230
|
let K3 = ee(S2, (G4) => !!t3(G4)), Ne2 = ee(S2, (G4) => !!t3(G4) && !ce(G4, o2));
|
|
1231
|
-
K3 <
|
|
1231
|
+
K3 < Z3 && Ne2 < 1 || (!s2 || O4 > s2.pct) && (s2 = { name: d2, pct: O4 });
|
|
1232
1232
|
}
|
|
1233
1233
|
s2 && (i.state = s2.name, p4.add(s2.name), u4.push(`state=${s2.name} (${s2.pct}% states/provinces)`));
|
|
1234
1234
|
}
|
|
1235
1235
|
if (!i.zip) for (let s2 of b4) {
|
|
1236
1236
|
if (p4.has(s2)) continue;
|
|
1237
1237
|
let d2 = y2(s2), S2 = re2(d2);
|
|
1238
|
-
if (!(S2 < 95) && de(d2, s2) && !(Qn(d2, (O4) => r3(O4).length > 0) <
|
|
1238
|
+
if (!(S2 < 95) && de(d2, s2) && !(Qn(d2, (O4) => r3(O4).length > 0) < Z3)) {
|
|
1239
1239
|
i.zip = s2, p4.add(s2), u4.push(`zip=${s2} (${S2}% ZIP codes)`);
|
|
1240
1240
|
break;
|
|
1241
1241
|
}
|
|
@@ -1245,17 +1245,17 @@ function Xn(e, t, n, o2, l2) {
|
|
|
1245
1245
|
let s2 = null;
|
|
1246
1246
|
for (let d2 of b4) {
|
|
1247
1247
|
if (p4.has(d2) || !N2(y2(d2))) continue;
|
|
1248
|
-
let S2 =
|
|
1248
|
+
let S2 = ne(y2(d2));
|
|
1249
1249
|
(!s2 || S2 > s2.pct) && (s2 = { name: d2, pct: S2 });
|
|
1250
1250
|
}
|
|
1251
|
-
s2 && (T2 && (
|
|
1251
|
+
s2 && (T2 && (l2.push(`country=${T2} (only ${ne(y2(T2))}% of values are country identifiers; using ${s2.name} instead)`), h4.country = T2), i.country = s2.name, p4.add(s2.name), u4.push(`country=${s2.name}`));
|
|
1252
1252
|
}
|
|
1253
1253
|
if (!i.city) {
|
|
1254
1254
|
let s2 = null;
|
|
1255
1255
|
for (let d2 of b4) {
|
|
1256
1256
|
if (p4.has(d2)) continue;
|
|
1257
1257
|
let S2 = y2(d2), O4 = Yn2(S2, o2);
|
|
1258
|
-
O4 < D3 || ee(S2, (K3) => j3(K3, o2)) <
|
|
1258
|
+
O4 < D3 || ee(S2, (K3) => j3(K3, o2)) < Z3 || (!s2 || O4 > s2.pct) && (s2 = { name: d2, pct: O4 });
|
|
1259
1259
|
}
|
|
1260
1260
|
s2 && (i.city = s2.name, u4.push(`city=${s2.name} (${s2.pct}% known cities)`));
|
|
1261
1261
|
}
|
|
@@ -1263,15 +1263,15 @@ function Xn(e, t, n, o2, l2) {
|
|
|
1263
1263
|
let d2 = +String(s2[i.lat] ?? "").trim(), S2 = +String(s2[i.lon] ?? "").trim();
|
|
1264
1264
|
return isFinite(d2) && isFinite(S2) && d2 >= -90 && d2 <= 90 && S2 >= -180 && S2 <= 180 && String(s2[i.lat] ?? "").trim() !== "" && String(s2[i.lon] ?? "").trim() !== "";
|
|
1265
1265
|
});
|
|
1266
|
-
return i.lat && i.lon && !w4 &&
|
|
1266
|
+
return i.lat && i.lon && !w4 && l2.push(`lat/lon=${i.lat}/${i.lon} (no row holds a usable coordinate pair)`), i.country && !x3 && !(i.city || i.state || i.zip || w4) && l2.push(R4 ? `country=${i.country} (every row resolves to the same country - nothing to place apart)` : `country=${i.country} (values are not country identifiers)`), { bind: !!(i.city || i.state || i.zip || x3 || w4) ? i : null, backfilled: u4, refused: l2, ...Object.keys(h4).length ? { labelFallback: h4 } : {} };
|
|
1267
1267
|
}
|
|
1268
1268
|
var r = (e, ...t) => ({ part: e, langs: Object.freeze(t) });
|
|
1269
1269
|
var ie = 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") });
|
|
1270
|
-
var
|
|
1271
|
-
var
|
|
1272
|
-
var
|
|
1273
|
-
var
|
|
1274
|
-
var
|
|
1270
|
+
var Jn2 = Object.freeze(Array.from(new Set(Object.values(ie).flatMap((e) => e.langs))));
|
|
1271
|
+
var fe = Object.freeze(["fa", "ar", "he", "th"]);
|
|
1272
|
+
var Lr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
|
|
1273
|
+
var Gr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict", REDRAW: "redraw", INTERACT: "interact" });
|
|
1274
|
+
var Vr2 = Object.freeze(["open", "generate", "version", "rebind", "data", "sample", "fix", "resize", "other"]);
|
|
1275
1275
|
var Ae = 2 ** 31 - 1;
|
|
1276
1276
|
|
|
1277
1277
|
export {
|
|
@@ -1284,9 +1284,9 @@ export {
|
|
|
1284
1284
|
J3,
|
|
1285
1285
|
Yn,
|
|
1286
1286
|
Fn,
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1287
|
+
xt,
|
|
1288
|
+
Ct,
|
|
1289
|
+
ni,
|
|
1290
|
+
ii,
|
|
1291
1291
|
Xn
|
|
1292
1292
|
};
|