@bicharts/chart-host 0.5.71 → 0.5.73
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/{chunk-QCB6PBO5.mjs → chunk-D3DERYG3.mjs} +185 -182
- package/dist/index.mjs +10 -9
- package/dist/react.mjs +1 -1
- package/dist/types/qualifyFilter.d.ts +16 -5
- package/package.json +1 -1
|
@@ -22,7 +22,7 @@ var require_papaparse_min = __commonJS({
|
|
|
22
22
|
"function" == typeof define && define.amd ? define([], t) : "object" == typeof module && "undefined" != typeof exports ? module.exports = t() : e.Papa = t();
|
|
23
23
|
})(exports, function r() {
|
|
24
24
|
var n = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n ? n : {};
|
|
25
|
-
var d, s = !n.document && !!n.postMessage, a2 = n.IS_PAPA_WORKER || false,
|
|
25
|
+
var d, s = !n.document && !!n.postMessage, a2 = n.IS_PAPA_WORKER || false, o2 = {}, h2 = 0, v2 = {};
|
|
26
26
|
function P2(e) {
|
|
27
27
|
return 65279 === e.charCodeAt(0) ? e.slice(1) : e;
|
|
28
28
|
}
|
|
@@ -137,7 +137,7 @@ var require_papaparse_min = __commonJS({
|
|
|
137
137
|
}, this);
|
|
138
138
|
}
|
|
139
139
|
function i(m4) {
|
|
140
|
-
var n2, s2, a4, t,
|
|
140
|
+
var n2, s2, a4, t, o4 = Math.pow(2, 53), h3 = -o4, u4 = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, d2 = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, i2 = this, r2 = 0, f2 = 0, l2 = false, e = false, c2 = [], p4 = { data: [], errors: [], meta: {} };
|
|
141
141
|
function y4(e2) {
|
|
142
142
|
return "greedy" === m4.skipEmptyLines ? "" === e2.join("").trim() : 1 === e2.length && 0 === e2[0].length;
|
|
143
143
|
}
|
|
@@ -159,7 +159,7 @@ var require_papaparse_min = __commonJS({
|
|
|
159
159
|
var n4 = r5, s4 = e4[r5], s4 = ((e5, t5) => ((e6) => (m4.dynamicTypingFunction && void 0 === m4.dynamicTyping[e6] && (m4.dynamicTyping[e6] = m4.dynamicTypingFunction(e6)), true === (m4.dynamicTyping[e6] || m4.dynamicTyping)))(e5) ? "true" === t5 || "TRUE" === t5 || "false" !== t5 && "FALSE" !== t5 && (((e6) => {
|
|
160
160
|
if (u4.test(e6)) {
|
|
161
161
|
e6 = parseFloat(e6);
|
|
162
|
-
if (h3 < e6 && e6 <
|
|
162
|
+
if (h3 < e6 && e6 < o4) return 1;
|
|
163
163
|
}
|
|
164
164
|
})(t5) ? parseFloat(t5) : d2.test(t5) ? new Date(t5) : "" === t5 ? null : t5) : t5)(n4 = m4.header ? r5 >= c2.length ? "__parsed_extra" : c2[r5] : n4, s4 = m4.transform ? m4.transform(s4, n4) : s4);
|
|
165
165
|
"__parsed_extra" === n4 ? (i5[n4] = i5[n4] || [], i5[n4].push(s4)) : i5[n4] = s4;
|
|
@@ -180,10 +180,10 @@ var require_papaparse_min = __commonJS({
|
|
|
180
180
|
p4 = e2, _3() ? g2() : (g2(), 0 !== p4.data.length && (r2 += e2.data.length, m4.preview && r2 > m4.preview ? s2.abort() : (p4.data = p4.data[0], t(p4, i2))));
|
|
181
181
|
}), this.parse = function(e2, t2, i4) {
|
|
182
182
|
var r4 = m4.quoteChar || '"', r4 = (m4.newline || (m4.newline = this.guessLineEndings(e2, r4)), a4 = false, m4.delimiter ? q3(m4.delimiter) && (m4.delimiter = m4.delimiter(e2), p4.meta.delimiter = m4.delimiter) : ((r4 = ((e4, t4, i5, r5, n4) => {
|
|
183
|
-
var s4, a5,
|
|
183
|
+
var s4, a5, o5, h4;
|
|
184
184
|
n4 = n4 || [",", " ", "|", ";", v2.RECORD_SEP, v2.UNIT_SEP];
|
|
185
185
|
for (var u5 = 0; u5 < n4.length; u5++) {
|
|
186
|
-
for (var d3, f4 = n4[u5], l3 = 0, c4 = 0, p5 = 0, g3 = (
|
|
186
|
+
for (var d3, f4 = n4[u5], l3 = 0, c4 = 0, p5 = 0, g3 = (o5 = void 0, new E4({ comments: r5, delimiter: f4, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g3.data.length; _4++) i5 && y4(g3.data[_4]) ? p5++ : (d3 = g3.data[_4].length, c4 += d3, void 0 === o5 ? o5 = d3 : 0 < d3 && (l3 += Math.abs(d3 - o5), o5 = d3));
|
|
187
187
|
0 < g3.data.length && (c4 /= g3.data.length - p5), (void 0 === a5 || l3 <= a5) && (void 0 === h4 || h4 < c4) && 1.99 < c4 && (a5 = l3, s4 = f4, h4 = c4);
|
|
188
188
|
}
|
|
189
189
|
return { successful: !!(m4.delimiter = s4), bestDelimiter: s4 };
|
|
@@ -217,14 +217,14 @@ var require_papaparse_min = __commonJS({
|
|
|
217
217
|
var z3 = 0, M2 = false;
|
|
218
218
|
this.parse = function(i2, t, r2) {
|
|
219
219
|
if ("string" != typeof i2) throw new Error("Input must be a string");
|
|
220
|
-
var n2 = i2.length, e = S.length, s2 = O2.length, a4 = x2.length,
|
|
220
|
+
var n2 = i2.length, e = S.length, s2 = O2.length, a4 = x2.length, o4 = q3(I2), h3 = [], u4 = [], d2 = [], f2 = z3 = 0;
|
|
221
221
|
if (!i2) return w();
|
|
222
222
|
if (T2 || false !== T2 && -1 === i2.indexOf(F3)) {
|
|
223
223
|
for (var l2 = i2.split(O2), c2 = 0; c2 < l2.length; c2++) {
|
|
224
224
|
if (d2 = l2[c2], z3 += d2.length, c2 !== l2.length - 1) z3 += O2.length;
|
|
225
225
|
else if (r2) return w();
|
|
226
226
|
if (!x2 || d2.substring(0, a4) !== x2) {
|
|
227
|
-
if (
|
|
227
|
+
if (o4) {
|
|
228
228
|
if (h3 = [], k2(d2.split(S)), R(), M2) return w();
|
|
229
229
|
} else k2(d2.split(S));
|
|
230
230
|
if (A2 && A2 <= c2) return h3 = h3.slice(0, A2), w(true);
|
|
@@ -245,7 +245,7 @@ var require_papaparse_min = __commonJS({
|
|
|
245
245
|
}
|
|
246
246
|
y4 = v3(g2);
|
|
247
247
|
if (i2.substring(m4 + 1 + y4, m4 + 1 + y4 + s2) === O2) {
|
|
248
|
-
if (d2.push(i2.substring(z3, m4).replace(_3, F3)), b4(m4 + 1 + y4 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F3, z3),
|
|
248
|
+
if (d2.push(i2.substring(z3, m4).replace(_3, F3)), b4(m4 + 1 + y4 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F3, z3), o4 && (R(), M2)) return w();
|
|
249
249
|
if (A2 && h3.length >= A2) return w(true);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
@@ -258,7 +258,7 @@ var require_papaparse_min = __commonJS({
|
|
|
258
258
|
} else if (-1 !== p4 && (p4 < g2 || -1 === g2)) d2.push(i2.substring(z3, p4)), z3 = p4 + e, p4 = i2.indexOf(S, z3);
|
|
259
259
|
else {
|
|
260
260
|
if (-1 === g2) break;
|
|
261
|
-
if (d2.push(i2.substring(z3, g2)), b4(g2 + s2),
|
|
261
|
+
if (d2.push(i2.substring(z3, g2)), b4(g2 + s2), o4 && (R(), M2)) return w();
|
|
262
262
|
if (A2 && h3.length >= A2) return w(true);
|
|
263
263
|
}
|
|
264
264
|
return E5();
|
|
@@ -270,23 +270,23 @@ var require_papaparse_min = __commonJS({
|
|
|
270
270
|
return t2 = -1 !== e2 && (e2 = i2.substring(m4 + 1, e2)) && "" === e2.trim() ? e2.length : t2;
|
|
271
271
|
}
|
|
272
272
|
function E5(e2) {
|
|
273
|
-
return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d2.push(e2), z3 = n2, k2(d2),
|
|
273
|
+
return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d2.push(e2), z3 = n2, k2(d2), o4 && R()), w();
|
|
274
274
|
}
|
|
275
275
|
function b4(e2) {
|
|
276
276
|
z3 = e2, k2(d2), d2 = [], g2 = i2.indexOf(O2, z3);
|
|
277
277
|
}
|
|
278
278
|
function w(e2) {
|
|
279
279
|
if (C2.header && !t && h3.length && !L2) {
|
|
280
|
-
var s4 = h3[0], a5 = /* @__PURE__ */ Object.create(null),
|
|
280
|
+
var s4 = h3[0], a5 = /* @__PURE__ */ Object.create(null), o5 = new Set(s4);
|
|
281
281
|
let n4 = false;
|
|
282
282
|
for (let r4 = 0; r4 < s4.length; r4++) {
|
|
283
283
|
let i4 = P2(s4[r4]);
|
|
284
284
|
if (a5[i4 = q3(C2.transformHeader) ? C2.transformHeader(i4, r4) : i4]) {
|
|
285
285
|
let e4, t2 = a5[i4];
|
|
286
|
-
for (; e4 = i4 + "_" + t2, t2++,
|
|
287
|
-
|
|
286
|
+
for (; e4 = i4 + "_" + t2, t2++, o5.has(e4); ) ;
|
|
287
|
+
o5.add(e4), s4[r4] = e4, a5[i4]++, n4 = true, (D3 = null === D3 ? {} : D3)[e4] = i4;
|
|
288
288
|
} else a5[i4] = 1, s4[r4] = i4;
|
|
289
|
-
|
|
289
|
+
o5.add(i4);
|
|
290
290
|
}
|
|
291
291
|
n4 && console.warn("Duplicate headers found and renamed."), L2 = true;
|
|
292
292
|
}
|
|
@@ -302,7 +302,7 @@ var require_papaparse_min = __commonJS({
|
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
304
|
function g(e) {
|
|
305
|
-
var t = e.data, i2 =
|
|
305
|
+
var t = e.data, i2 = o2[t.workerId], r2 = false;
|
|
306
306
|
if (t.error) i2.userError(t.error, t.file);
|
|
307
307
|
else if (t.results && t.results.data) {
|
|
308
308
|
var n2 = { abort: function() {
|
|
@@ -316,8 +316,8 @@ var require_papaparse_min = __commonJS({
|
|
|
316
316
|
t.finished && !r2 && _2(t.workerId, t.results);
|
|
317
317
|
}
|
|
318
318
|
function _2(e, t) {
|
|
319
|
-
var i2 =
|
|
320
|
-
q3(i2.userComplete) && i2.userComplete(t), i2.terminate(), delete
|
|
319
|
+
var i2 = o2[e];
|
|
320
|
+
q3(i2.userComplete) && i2.userComplete(t), i2.terminate(), delete o2[e];
|
|
321
321
|
}
|
|
322
322
|
function m2() {
|
|
323
323
|
throw new Error("Not implemented.");
|
|
@@ -345,18 +345,18 @@ var require_papaparse_min = __commonJS({
|
|
|
345
345
|
return !!v2.WORKERS_SUPPORTED && (e2 = (() => {
|
|
346
346
|
var e4 = n.URL || n.webkitURL || null, t2 = r.toString();
|
|
347
347
|
return v2.BLOB_URL || (v2.BLOB_URL = e4.createObjectURL(new Blob(["var global = (function() { if (typeof self !== 'undefined') { return self; } if (typeof window !== 'undefined') { return window; } if (typeof global !== 'undefined') { return global; } return {}; })(); global.IS_PAPA_WORKER=true; ", "(", t2, ")();"], { type: "text/javascript" })));
|
|
348
|
-
})(), (e2 = new n.Worker(e2)).onmessage = g, e2.id = h2++,
|
|
348
|
+
})(), (e2 = new n.Worker(e2)).onmessage = g, e2.id = h2++, o2[e2.id] = e2);
|
|
349
349
|
})()).userStep = t.step, i2.userChunk = t.chunk, i2.userComplete = t.complete, i2.userError = t.error, t.step = q3(t.step), t.chunk = q3(t.chunk), t.complete = q3(t.complete), t.error = q3(t.error), delete t.worker, i2.postMessage({ input: e, config: t, workerId: i2.id });
|
|
350
350
|
}, v2.unparse = function(e, t) {
|
|
351
|
-
var s2 = false, _3 = true, m4 = ",", y4 = "\r\n", a4 = '"',
|
|
351
|
+
var s2 = false, _3 = true, m4 = ",", y4 = "\r\n", a4 = '"', o4 = a4 + a4, i2 = false, r2 = null, h3 = false, u4 = ((() => {
|
|
352
352
|
if ("object" == typeof t) {
|
|
353
353
|
if ("string" != typeof t.delimiter || v2.BAD_DELIMITERS.filter(function(e2) {
|
|
354
354
|
return -1 !== t.delimiter.indexOf(e2);
|
|
355
|
-
}).length || (m4 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s2 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i2 = t.skipEmptyLines), "string" == typeof t.newline && (y4 = t.newline), "string" == typeof t.quoteChar && (a4 = t.quoteChar,
|
|
355
|
+
}).length || (m4 = t.delimiter), "boolean" != typeof t.quotes && "function" != typeof t.quotes && !Array.isArray(t.quotes) || (s2 = t.quotes), "boolean" != typeof t.skipEmptyLines && "string" != typeof t.skipEmptyLines || (i2 = t.skipEmptyLines), "string" == typeof t.newline && (y4 = t.newline), "string" == typeof t.quoteChar && (a4 = t.quoteChar, o4 = a4 + a4), "boolean" == typeof t.header && (_3 = t.header), Array.isArray(t.columns)) {
|
|
356
356
|
if (0 === t.columns.length) throw new Error("Option columns is empty");
|
|
357
357
|
r2 = t.columns;
|
|
358
358
|
}
|
|
359
|
-
void 0 !== t.escapeChar && (
|
|
359
|
+
void 0 !== t.escapeChar && (o4 = t.escapeChar + a4), t.escapeFormulae instanceof RegExp ? h3 = t.escapeFormulae : "boolean" == typeof t.escapeFormulae && t.escapeFormulae && (h3 = /^[=+\-@\t\r].*$/);
|
|
360
360
|
}
|
|
361
361
|
})(), new RegExp(U3(a4), "g"));
|
|
362
362
|
"string" == typeof e && (e = JSON.parse(e));
|
|
@@ -371,12 +371,12 @@ var require_papaparse_min = __commonJS({
|
|
|
371
371
|
for (var a5 = 0; a5 < e2.length; a5++) 0 < a5 && (r4 += m4), r4 += k2(e2[a5], a5);
|
|
372
372
|
0 < t2.length && (r4 += y4);
|
|
373
373
|
}
|
|
374
|
-
for (var
|
|
375
|
-
var h4 = (n4 ? e2 : t2[
|
|
376
|
-
if (i4 && !n4 && (u5 = "greedy" === i4 ? "" === t2[
|
|
374
|
+
for (var o5 = 0; o5 < t2.length; o5++) {
|
|
375
|
+
var h4 = (n4 ? e2 : t2[o5]).length, u5 = false, d2 = n4 ? 0 === Object.keys(t2[o5]).length : 0 === t2[o5].length;
|
|
376
|
+
if (i4 && !n4 && (u5 = "greedy" === i4 ? "" === t2[o5].join("").trim() : 1 === t2[o5].length && 0 === t2[o5][0].length), "greedy" === i4 && n4) {
|
|
377
377
|
for (var f2 = [], l2 = 0; l2 < h4; l2++) {
|
|
378
378
|
var c2 = s4 ? e2[l2] : l2;
|
|
379
|
-
f2.push(t2[
|
|
379
|
+
f2.push(t2[o5][c2]);
|
|
380
380
|
}
|
|
381
381
|
u5 = "" === f2.join("").trim();
|
|
382
382
|
}
|
|
@@ -384,34 +384,34 @@ var require_papaparse_min = __commonJS({
|
|
|
384
384
|
for (var p4 = 0; p4 < h4; p4++) {
|
|
385
385
|
0 < p4 && !d2 && (r4 += m4);
|
|
386
386
|
var g2 = n4 && s4 ? e2[p4] : p4;
|
|
387
|
-
r4 += k2(t2[
|
|
387
|
+
r4 += k2(t2[o5][g2], p4);
|
|
388
388
|
}
|
|
389
|
-
|
|
389
|
+
o5 < t2.length - 1 && (!i4 || 0 < h4 && !d2) && (r4 += y4);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
return r4;
|
|
393
393
|
}
|
|
394
394
|
function k2(e2, t2) {
|
|
395
395
|
var i4, r4, n4;
|
|
396
|
-
return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h3 && "string" == typeof e2 && h3.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i4 = e2.toString()).replace(u4,
|
|
396
|
+
return null == e2 ? "" : e2.constructor === Date ? JSON.stringify(e2).slice(1, 25) : (n4 = false, h3 && "string" == typeof e2 && h3.test(e2) && (e2 = "'" + e2, n4 = true), r4 = (i4 = e2.toString()).replace(u4, o4), (n4 = n4 || true === s2 || "function" == typeof s2 && s2(e2, t2) || Array.isArray(s2) && s2[t2] || ((e4, t4) => {
|
|
397
397
|
for (var i5 = 0; i5 < t4.length; i5++) if (-1 < e4.indexOf(t4[i5])) return true;
|
|
398
398
|
return false;
|
|
399
399
|
})(r4, v2.BAD_DELIMITERS) || -1 < r4.indexOf(m4) || -1 < i4.indexOf(a4) || " " === r4.charAt(0) || " " === r4.charAt(r4.length - 1)) ? a4 + r4 + a4 : r4);
|
|
400
400
|
}
|
|
401
|
-
}, v2.RECORD_SEP = String.fromCharCode(30), v2.UNIT_SEP = String.fromCharCode(31), v2.BYTE_ORDER_MARK = "\uFEFF", v2.BAD_DELIMITERS = ["\r", "\n", '"', v2.BYTE_ORDER_MARK], v2.WORKERS_SUPPORTED = !s && !!n.Worker, v2.NODE_STREAM_INPUT = 1, v2.LocalChunkSize = 10485760, v2.RemoteChunkSize = 5242880, v2.DefaultDelimiter = ",", v2.Parser = E4, v2.ParserHandle = i, v2.NetworkStreamer = f, v2.FileStreamer = l, v2.StringStreamer = c, v2.ReadableStreamStreamer = p2, n.jQuery && ((d = n.jQuery).fn.parse = function(
|
|
402
|
-
var i2 =
|
|
401
|
+
}, v2.RECORD_SEP = String.fromCharCode(30), v2.UNIT_SEP = String.fromCharCode(31), v2.BYTE_ORDER_MARK = "\uFEFF", v2.BAD_DELIMITERS = ["\r", "\n", '"', v2.BYTE_ORDER_MARK], v2.WORKERS_SUPPORTED = !s && !!n.Worker, v2.NODE_STREAM_INPUT = 1, v2.LocalChunkSize = 10485760, v2.RemoteChunkSize = 5242880, v2.DefaultDelimiter = ",", v2.Parser = E4, v2.ParserHandle = i, v2.NetworkStreamer = f, v2.FileStreamer = l, v2.StringStreamer = c, v2.ReadableStreamStreamer = p2, n.jQuery && ((d = n.jQuery).fn.parse = function(o4) {
|
|
402
|
+
var i2 = o4.config || {}, h3 = [];
|
|
403
403
|
return this.each(function(e2) {
|
|
404
404
|
if (!("INPUT" === d(this).prop("tagName").toUpperCase() && "file" === d(this).attr("type").toLowerCase() && n.FileReader) || !this.files || 0 === this.files.length) return true;
|
|
405
405
|
for (var t = 0; t < this.files.length; t++) h3.push({ file: this.files[t], inputElem: this, instanceConfig: d.extend({}, i2) });
|
|
406
406
|
}), e(), this;
|
|
407
407
|
function e() {
|
|
408
|
-
if (0 === h3.length) q3(
|
|
408
|
+
if (0 === h3.length) q3(o4.complete) && o4.complete();
|
|
409
409
|
else {
|
|
410
410
|
var e2, t, i4, r2, n2 = h3[0];
|
|
411
|
-
if (q3(
|
|
412
|
-
var s2 =
|
|
411
|
+
if (q3(o4.before)) {
|
|
412
|
+
var s2 = o4.before(n2.file, n2.inputElem);
|
|
413
413
|
if ("object" == typeof s2) {
|
|
414
|
-
if ("abort" === s2.action) return e2 = "AbortError", t = n2.file, i4 = n2.inputElem, r2 = s2.reason, void (q3(
|
|
414
|
+
if ("abort" === s2.action) return e2 = "AbortError", t = n2.file, i4 = n2.inputElem, r2 = s2.reason, void (q3(o4.error) && o4.error({ name: e2 }, t, i4, r2));
|
|
415
415
|
if ("skip" === s2.action) return void u4();
|
|
416
416
|
"object" == typeof s2.config && (n2.instanceConfig = d.extend(n2.instanceConfig, s2.config));
|
|
417
417
|
} else if ("skip" === s2) return void u4();
|
|
@@ -709,8 +709,8 @@ var _ = "AD AND,AE ARE,AF AFG,AG ATG,AI AIA,AL ALB,AM ARM,AO AGO,AQ ATA,AR ARG,A
|
|
|
709
709
|
var N = (() => {
|
|
710
710
|
let n = /* @__PURE__ */ new Map();
|
|
711
711
|
for (let e of _.split(",")) {
|
|
712
|
-
let [t,
|
|
713
|
-
t &&
|
|
712
|
+
let [t, o2] = e.split(" ");
|
|
713
|
+
t && o2 && n.set(t, o2);
|
|
714
714
|
}
|
|
715
715
|
return n;
|
|
716
716
|
})();
|
|
@@ -723,16 +723,16 @@ function j() {
|
|
|
723
723
|
if (b) return b;
|
|
724
724
|
let n = /* @__PURE__ */ new Map(), e = ["en", ...v.filter((t) => t !== "en")];
|
|
725
725
|
for (let t of e) {
|
|
726
|
-
let
|
|
726
|
+
let o2 = null;
|
|
727
727
|
try {
|
|
728
|
-
|
|
728
|
+
o2 = new Intl.DisplayNames([t], { type: "region" });
|
|
729
729
|
} catch {
|
|
730
730
|
continue;
|
|
731
731
|
}
|
|
732
732
|
for (let [i, r] of N) {
|
|
733
733
|
let a2;
|
|
734
734
|
try {
|
|
735
|
-
a2 =
|
|
735
|
+
a2 = o2.of(i);
|
|
736
736
|
} catch {
|
|
737
737
|
a2 = void 0;
|
|
738
738
|
}
|
|
@@ -741,9 +741,9 @@ function j() {
|
|
|
741
741
|
s && !n.has(s) && n.set(s, r);
|
|
742
742
|
}
|
|
743
743
|
}
|
|
744
|
-
for (let [t,
|
|
744
|
+
for (let [t, o2] of Object.entries(Q)) {
|
|
745
745
|
let i = u(t);
|
|
746
|
-
i && n.set(i,
|
|
746
|
+
i && n.set(i, o2);
|
|
747
747
|
}
|
|
748
748
|
return b = n, n;
|
|
749
749
|
}
|
|
@@ -764,7 +764,7 @@ function V(n) {
|
|
|
764
764
|
var m3 = 80;
|
|
765
765
|
var q = { "north-america": "N", world: "W" };
|
|
766
766
|
function F(n, e) {
|
|
767
|
-
let t = n.filter((
|
|
767
|
+
let t = n.filter((o2) => o2.row.kinds.includes(q[e || "north-america"]));
|
|
768
768
|
return t.length ? t : (e || "north-america") === "world" ? n : t;
|
|
769
769
|
}
|
|
770
770
|
var P = a;
|
|
@@ -778,20 +778,20 @@ var t3 = { US: "washington", CA: "ottawa", MX: "mexico city", GB: "london", FR:
|
|
|
778
778
|
var U = null;
|
|
779
779
|
function y() {
|
|
780
780
|
if (U) return U;
|
|
781
|
-
let n = /* @__PURE__ */ new Map(), e = P, t = (
|
|
782
|
-
if (!
|
|
783
|
-
let a2 = n.get(
|
|
784
|
-
a2 ? a2.some((s) => s.row === i) || a2.push({ row: i, primary: r }) : n.set(
|
|
781
|
+
let n = /* @__PURE__ */ new Map(), e = P, t = (o2, i, r) => {
|
|
782
|
+
if (!o2) return;
|
|
783
|
+
let a2 = n.get(o2);
|
|
784
|
+
a2 ? a2.some((s) => s.row === i) || a2.push({ row: i, primary: r }) : n.set(o2, [{ row: i, primary: r }]);
|
|
785
785
|
};
|
|
786
|
-
for (let
|
|
787
|
-
let i =
|
|
786
|
+
for (let o2 of e.split(",")) {
|
|
787
|
+
let i = o2.split("|");
|
|
788
788
|
if (i.length < 7) continue;
|
|
789
789
|
let r = { a1: i[1], cc: i[2], lon: +i[3], lat: +i[4], pop: +i[5], kinds: i[6] || "N" };
|
|
790
790
|
i.length > 8 && i[8] && (r.tags = i[8].split(";").filter(Boolean));
|
|
791
791
|
let a2 = t3[r.cc];
|
|
792
792
|
if (a2 && u(i[0]) === a2 && (r.tags || (r.tags = []), r.tags.includes("capital") || r.tags.push("capital")), t(u(i[0]), r, true), i.length > 7 && i[7]) for (let s of i[7].split(";")) t(u(s), r, false);
|
|
793
793
|
}
|
|
794
|
-
for (let
|
|
794
|
+
for (let o2 of n.values()) o2.sort((i, r) => r.row.pop - i.row.pop);
|
|
795
795
|
return U = n, n;
|
|
796
796
|
}
|
|
797
797
|
var e3 = 200;
|
|
@@ -801,8 +801,8 @@ function i3() {
|
|
|
801
801
|
let n = /* @__PURE__ */ new Map();
|
|
802
802
|
for (let [e, t] of y()) {
|
|
803
803
|
if (!e.endsWith(" city")) continue;
|
|
804
|
-
let
|
|
805
|
-
!
|
|
804
|
+
let o2 = e.slice(0, -5);
|
|
805
|
+
!o2 || y().get(o2)?.some((i) => i.primary) || t[0].row.pop < e3 || n.set(o2, t);
|
|
806
806
|
}
|
|
807
807
|
return L = n, n;
|
|
808
808
|
}
|
|
@@ -812,23 +812,23 @@ function O(n) {
|
|
|
812
812
|
if (e?.some((i) => i.primary)) return e;
|
|
813
813
|
let t = i3().get(n);
|
|
814
814
|
if (!t) return e;
|
|
815
|
-
let
|
|
816
|
-
return e ? [...
|
|
815
|
+
let o2 = t.map((i) => ({ row: i.row, primary: true }));
|
|
816
|
+
return e ? [...o2, ...e] : o2;
|
|
817
817
|
}
|
|
818
818
|
var I = null;
|
|
819
819
|
function o3() {
|
|
820
820
|
if (I) return I;
|
|
821
821
|
let n = /* @__PURE__ */ new Map();
|
|
822
822
|
for (let t of k.split(",")) {
|
|
823
|
-
let
|
|
824
|
-
|
|
823
|
+
let o2 = t.split("|");
|
|
824
|
+
o2.length < 3 || n.set(o2[0], { lon: +o2[1], lat: +o2[2] });
|
|
825
825
|
}
|
|
826
826
|
let e = /* @__PURE__ */ new Map();
|
|
827
|
-
for (let t of y().values()) for (let
|
|
828
|
-
let i = T(
|
|
827
|
+
for (let t of y().values()) for (let o2 of t) {
|
|
828
|
+
let i = T(o2.row.cc);
|
|
829
829
|
if (!i) continue;
|
|
830
830
|
let r = e.get(i);
|
|
831
|
-
(r === void 0 ||
|
|
831
|
+
(r === void 0 || o2.row.pop > r) && (e.set(i, o2.row.pop), n.set(i, { lon: o2.row.lon, lat: o2.row.lat }));
|
|
832
832
|
}
|
|
833
833
|
return I = n, n;
|
|
834
834
|
}
|
|
@@ -839,10 +839,10 @@ function D() {
|
|
|
839
839
|
for (let e of H.split(",")) {
|
|
840
840
|
let t = e.split("|");
|
|
841
841
|
if (t.length < 5) continue;
|
|
842
|
-
let
|
|
843
|
-
n.set(u(
|
|
844
|
-
let i = u(
|
|
845
|
-
i === "mexico" &&
|
|
842
|
+
let o2 = { key: t[0], cc: t[1], name: t[2], lon: +t[3], lat: +t[4] };
|
|
843
|
+
n.set(u(o2.key), o2);
|
|
844
|
+
let i = u(o2.name);
|
|
845
|
+
i === "mexico" && o2.cc === "MX" ? (n.set("estado de mexico", o2), n.set("edomex", o2)) : n.set(i, o2);
|
|
846
846
|
}
|
|
847
847
|
return B = n, n;
|
|
848
848
|
}
|
|
@@ -882,8 +882,8 @@ function Z(n) {
|
|
|
882
882
|
let e = String(n).trim().replace(/\.0+$/, "");
|
|
883
883
|
if (!e) return [];
|
|
884
884
|
if (/^\d{3}$/.test(e)) {
|
|
885
|
-
let
|
|
886
|
-
return
|
|
885
|
+
let o2 = e.padStart(5, "0").slice(0, 3);
|
|
886
|
+
return o2 === e ? [e] : [e, o2];
|
|
887
887
|
}
|
|
888
888
|
let t = M3(e);
|
|
889
889
|
return t ? [t.slice(0, 3)] : [];
|
|
@@ -892,9 +892,9 @@ function S3(n) {
|
|
|
892
892
|
return !!n && n.ambiguous === true && !("precision" in n);
|
|
893
893
|
}
|
|
894
894
|
function A3(n) {
|
|
895
|
-
let e = null, t = typeof n.lat == "string" ? n.lat.trim() : n.lat,
|
|
896
|
-
if (t != null && t !== "" &&
|
|
897
|
-
let a2 = +t, s = +
|
|
895
|
+
let e = null, t = typeof n.lat == "string" ? n.lat.trim() : n.lat, o2 = typeof n.lon == "string" ? n.lon.trim() : n.lon;
|
|
896
|
+
if (t != null && t !== "" && o2 !== void 0 && o2 !== null && o2 !== "") {
|
|
897
|
+
let a2 = +t, s = +o2;
|
|
898
898
|
if (isFinite(a2) && isFinite(s) && a2 >= -90 && a2 <= 90 && s >= -180 && s <= 180) if (a2 === 0 && s === 0) e = { lat: 0, lon: 0, precision: "latlon" };
|
|
899
899
|
else return { lat: a2, lon: s, precision: "latlon" };
|
|
900
900
|
}
|
|
@@ -938,26 +938,26 @@ function A3(n) {
|
|
|
938
938
|
var G = { latlon: 0, city: 1, zip3: 2, state: 3, country: 4 };
|
|
939
939
|
var x = 8;
|
|
940
940
|
function y3(n, e) {
|
|
941
|
-
let t = new Array(n.length),
|
|
941
|
+
let t = new Array(n.length), o2 = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a2 = [], s = /* @__PURE__ */ new Set(), f = [], d = /* @__PURE__ */ new Set(), R = [], g = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m2 = 0, p2 = null;
|
|
942
942
|
for (let l = 0; l < n.length; ++l) {
|
|
943
943
|
let A2 = n[l], C2 = A3({ ...A2, mapKind: e });
|
|
944
944
|
if (S3(C2)) {
|
|
945
|
-
t[l] = null,
|
|
945
|
+
t[l] = null, o2[l] = null, i[l] = null, m2++;
|
|
946
946
|
let M2 = K(A2);
|
|
947
947
|
M2 && !d.has(M2.toLowerCase()) && (d.add(M2.toLowerCase()), R.length < x && R.push(M2));
|
|
948
948
|
} else if (C2) {
|
|
949
|
-
if (t[l] = C2.lat,
|
|
949
|
+
if (t[l] = C2.lat, o2[l] = C2.lon, i[l] = C2.precision, S++, g[C2.precision]++, (p2 === null || G[C2.precision] > G[p2]) && (p2 = C2.precision), G[C2.precision] > G.city) {
|
|
950
950
|
let M2 = K(A2);
|
|
951
951
|
M2 && !s.has(M2.toLowerCase()) && (s.add(M2.toLowerCase()), f.length < x && f.push(M2));
|
|
952
952
|
}
|
|
953
953
|
} else {
|
|
954
|
-
t[l] = null,
|
|
954
|
+
t[l] = null, o2[l] = null, i[l] = null;
|
|
955
955
|
let M2 = K(A2);
|
|
956
956
|
M2 && !r.has(M2.toLowerCase()) && (r.add(M2.toLowerCase()), a2.push(M2));
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
let c = !n3() && n.some((l) => l.city !== null && l.city !== void 0 && String(l.city).trim() !== "");
|
|
960
|
-
return { lat: t, lon:
|
|
960
|
+
return { lat: t, lon: o2, precisions: i, precision: p2, precisionCounts: g, coarseExamples: f, unmatched: a2, ambiguousRows: m2, ambiguousExamples: R, matchedRows: S, totalRows: n.length, ...c ? { cityTableMissing: true } : {} };
|
|
961
961
|
}
|
|
962
962
|
function K(n) {
|
|
963
963
|
let e = [n.city, n.state, n.zip, n.country].filter((t) => t != null && String(t).trim() !== "").map((t) => String(t).trim()).join(", ");
|
|
@@ -969,60 +969,63 @@ function p3(n, e) {
|
|
|
969
969
|
return t ? F(t, e).length > 0 : false;
|
|
970
970
|
}
|
|
971
971
|
|
|
972
|
-
// ../shape-core/dist/chunk-
|
|
972
|
+
// ../shape-core/dist/chunk-U43WE7LN.mjs
|
|
973
973
|
/*! @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. */
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
974
|
+
function o(n) {
|
|
975
|
+
return n ? n.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-./]+/g, " ").toLowerCase().split(/\s+/).filter((F3) => F3.length > 0) : [];
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
// ../shape-core/dist/chunk-GFY6RNP7.mjs
|
|
979
|
+
/*! @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. */
|
|
980
|
+
var on = [["AL", "Alabama"], ["AK", "Alaska"], ["AZ", "Arizona"], ["AR", "Arkansas"], ["CA", "California"], ["CO", "Colorado"], ["CT", "Connecticut"], ["DE", "Delaware"], ["FL", "Florida"], ["GA", "Georgia"], ["HI", "Hawaii"], ["ID", "Idaho"], ["IL", "Illinois"], ["IN", "Indiana"], ["IA", "Iowa"], ["KS", "Kansas"], ["KY", "Kentucky"], ["LA", "Louisiana"], ["ME", "Maine"], ["MD", "Maryland"], ["MA", "Massachusetts"], ["MI", "Michigan"], ["MN", "Minnesota"], ["MS", "Mississippi"], ["MO", "Missouri"], ["MT", "Montana"], ["NE", "Nebraska"], ["NV", "Nevada"], ["NH", "New Hampshire"], ["NJ", "New Jersey"], ["NM", "New Mexico"], ["NY", "New York"], ["NC", "North Carolina"], ["ND", "North Dakota"], ["OH", "Ohio"], ["OK", "Oklahoma"], ["OR", "Oregon"], ["PA", "Pennsylvania"], ["RI", "Rhode Island"], ["SC", "South Carolina"], ["SD", "South Dakota"], ["TN", "Tennessee"], ["TX", "Texas"], ["UT", "Utah"], ["VT", "Vermont"], ["VA", "Virginia"], ["WA", "Washington"], ["WV", "West Virginia"], ["WI", "Wisconsin"], ["WY", "Wyoming"], ["DC", "District of Columbia"], ["PR", "Puerto Rico"], ["GU", "Guam"], ["VI", "U.S. Virgin Islands"], ["AS", "American Samoa"], ["MP", "Northern Mariana Islands"]];
|
|
981
|
+
var rn = new Set(on.map((n) => n[0]));
|
|
982
|
+
var pn = { "Ala.": "AL", "Alab.": "AL", "Ariz.": "AZ", "Ark.": "AR", "Calif.": "CA", "Cal.": "CA", "Colo.": "CO", "Col.": "CO", "Conn.": "CT", "Del.": "DE", "Fla.": "FL", "Flor.": "FL", "Ga.": "GA", "Ill.": "IL", "Ind.": "IN", "Kan.": "KS", "Kans.": "KS", "Ky.": "KY", "La.": "LA", "Md.": "MD", "Mass.": "MA", "Mich.": "MI", "Minn.": "MN", "Miss.": "MS", "Mo.": "MO", "Mont.": "MT", "Neb.": "NE", "Nebr.": "NE", "Nev.": "NV", "N.H.": "NH", "N.J.": "NJ", "N.M.": "NM", "N.Mex.": "NM", "N. Mex.": "NM", "N.Y.": "NY", "N.C.": "NC", "N.D.": "ND", "N.Dak.": "ND", "N. Dak.": "ND", "Okla.": "OK", "Ore.": "OR", "Oreg.": "OR", "Pa.": "PA", "Penn.": "PA", "Penna.": "PA", "R.I.": "RI", "S.C.": "SC", "S.D.": "SD", "S.Dak.": "SD", "S. Dak.": "SD", "Tenn.": "TN", "Tex.": "TX", "Vt.": "VT", "Va.": "VA", "Wash.": "WA", "W.Va.": "WV", "W. Va.": "WV", "Wis.": "WI", "Wisc.": "WI", "Wyo.": "WY", "D.C.": "DC", "Wash. D.C.": "DC", "Wash., D.C.": "DC", "P.R.": "PR", "V.I.": "VI" };
|
|
983
|
+
var an = (() => {
|
|
978
984
|
let n = /* @__PURE__ */ new Map();
|
|
979
|
-
for (let [
|
|
985
|
+
for (let [o2, i] of on) n.set(m(i), o2);
|
|
980
986
|
n.set(m("Washington DC"), "DC"), n.set(m("Washington D.C."), "DC"), n.set(m("US Virgin Islands"), "VI");
|
|
981
|
-
for (let [
|
|
982
|
-
let r = m(
|
|
987
|
+
for (let [o2, i] of Object.entries(pn)) {
|
|
988
|
+
let r = m(o2);
|
|
983
989
|
r && !n.has(r) && n.set(r, i);
|
|
984
990
|
}
|
|
985
991
|
return n;
|
|
986
992
|
})();
|
|
987
|
-
var
|
|
988
|
-
function
|
|
993
|
+
var cn = /* @__PURE__ */ new Set(["01", "02", "04", "05", "06", "08", "09", "10", "11", "12", "13", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31", "32", "33", "34", "35", "36", "37", "38", "39", "40", "41", "42", "44", "45", "46", "47", "48", "49", "50", "51", "53", "54", "55", "56", "60", "66", "69", "72", "78"]);
|
|
994
|
+
function un(n) {
|
|
989
995
|
return n.trim().toUpperCase();
|
|
990
996
|
}
|
|
991
997
|
function m(n) {
|
|
992
998
|
return u(n);
|
|
993
999
|
}
|
|
994
|
-
var
|
|
995
|
-
function
|
|
996
|
-
return n.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-./]+/g, " ").toLowerCase().split(/\s+/).filter((s) => s.length > 0);
|
|
997
|
-
}
|
|
998
|
-
function p(n, s) {
|
|
1000
|
+
var sn = /* @__PURE__ */ new Set(["zip", "zipcode", "postal", "postcode", "plz"]);
|
|
1001
|
+
function p(n, o2) {
|
|
999
1002
|
if (!n) return false;
|
|
1000
|
-
for (let i of
|
|
1003
|
+
for (let i of o(n)) if (o2.has(i)) return true;
|
|
1001
1004
|
return false;
|
|
1002
1005
|
}
|
|
1003
|
-
function hn(n,
|
|
1006
|
+
function hn(n, o2) {
|
|
1004
1007
|
if (n == null) return null;
|
|
1005
1008
|
let i = String(n).trim();
|
|
1006
1009
|
if (i.length === 0) return null;
|
|
1007
|
-
switch (
|
|
1010
|
+
switch (o2) {
|
|
1008
1011
|
case "country-iso3":
|
|
1009
1012
|
case "country-iso2":
|
|
1010
1013
|
case "country-name":
|
|
1011
1014
|
return E(i);
|
|
1012
1015
|
case "us-state-code":
|
|
1013
1016
|
case "us-state-name": {
|
|
1014
|
-
let r =
|
|
1015
|
-
return
|
|
1017
|
+
let r = un(i);
|
|
1018
|
+
return rn.has(r) ? r : an.get(m(i)) ?? null;
|
|
1016
1019
|
}
|
|
1017
1020
|
case "us-zip5":
|
|
1018
1021
|
return M3(i);
|
|
1019
1022
|
case "us-county-fips":
|
|
1020
|
-
return /^\d{5}$/.test(i) &&
|
|
1023
|
+
return /^\d{5}$/.test(i) && cn.has(i.slice(0, 2)) ? i : null;
|
|
1021
1024
|
default:
|
|
1022
1025
|
return null;
|
|
1023
1026
|
}
|
|
1024
1027
|
}
|
|
1025
|
-
function
|
|
1028
|
+
function Rn(n) {
|
|
1026
1029
|
switch (n) {
|
|
1027
1030
|
case "country-iso3":
|
|
1028
1031
|
case "country-iso2":
|
|
@@ -1036,18 +1039,18 @@ function wn(n) {
|
|
|
1036
1039
|
return false;
|
|
1037
1040
|
}
|
|
1038
1041
|
}
|
|
1039
|
-
function
|
|
1042
|
+
function wn(n, o2) {
|
|
1040
1043
|
let i = new Array(n.length), r = /* @__PURE__ */ new Set(), A2 = [], y2 = 0;
|
|
1041
1044
|
for (let S = 0; S < n.length; ++S) {
|
|
1042
|
-
let O2 = hn(n[S],
|
|
1045
|
+
let O2 = hn(n[S], o2);
|
|
1043
1046
|
if (i[S] = O2, O2 !== null) y2++;
|
|
1044
1047
|
else {
|
|
1045
1048
|
let C2 = n[S];
|
|
1046
1049
|
if (C2 != null) {
|
|
1047
1050
|
let d = String(C2).trim();
|
|
1048
1051
|
if (d.length > 0) {
|
|
1049
|
-
let
|
|
1050
|
-
r.has(
|
|
1052
|
+
let N2 = d.toLowerCase();
|
|
1053
|
+
r.has(N2) || (r.add(N2), A2.push(d));
|
|
1051
1054
|
}
|
|
1052
1055
|
}
|
|
1053
1056
|
}
|
|
@@ -1055,75 +1058,75 @@ function Kn(n, s) {
|
|
|
1055
1058
|
return { iso: i, unmatched: A2, matchedRows: y2, totalRows: n.length };
|
|
1056
1059
|
}
|
|
1057
1060
|
|
|
1058
|
-
// ../shape-core/dist/chunk-
|
|
1061
|
+
// ../shape-core/dist/chunk-7AU3Y5FJ.mjs
|
|
1059
1062
|
var import_papaparse = __toESM(require_papaparse_min(), 1);
|
|
1060
1063
|
/*! @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. */
|
|
1061
|
-
var
|
|
1064
|
+
var pt = { "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" };
|
|
1062
1065
|
var X2 = (() => {
|
|
1063
1066
|
let n = /* @__PURE__ */ new Map();
|
|
1064
|
-
for (let t of Object.keys(
|
|
1067
|
+
for (let t of Object.keys(pt)) for (let e of pt[t].split(/\s+/)) e && n.set(e, t);
|
|
1065
1068
|
return n;
|
|
1066
1069
|
})();
|
|
1067
|
-
function
|
|
1070
|
+
function Dt(n) {
|
|
1068
1071
|
for (let [t, e] of n) {
|
|
1069
1072
|
let s = X2.get(t);
|
|
1070
1073
|
s && !X2.has(e) && X2.set(e, s);
|
|
1071
1074
|
}
|
|
1072
1075
|
}
|
|
1073
|
-
|
|
1074
|
-
var
|
|
1075
|
-
var
|
|
1076
|
-
var Lt = ["latitude", "longitude"];
|
|
1076
|
+
Dt(N);
|
|
1077
|
+
var Ot = ["rate", "ratio", "pct", "percent", "percentage", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "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"];
|
|
1078
|
+
var Lt = ["pct", "percent", "percentage", "rate", "ratio", "rating", "share", "score", "index", "nps", "csat", "margin", "yield", "coverage", "utilization", "gpa", "percentile", "quantile", "bmi", "density", "pressure", "humidity", "velocity", "efficiency", "occupancy", "latency", "throughput", "bandwidth", "iops"];
|
|
1077
1079
|
var Pt = ["latitude", "longitude"];
|
|
1078
|
-
var
|
|
1079
|
-
var
|
|
1080
|
-
var
|
|
1081
|
-
var
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
var
|
|
1080
|
+
var Gt = ["latitude", "longitude"];
|
|
1081
|
+
var yt = /^\s*(sum|count|count\s+distinct|distinct\s+count)\s+of\s+/i;
|
|
1082
|
+
var Wt = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
|
|
1083
|
+
var Ft = new RegExp("\\b(" + Ot.join("|") + ")\\b|(" + Lt.join("|") + ")$", "i");
|
|
1084
|
+
var Vt = new RegExp("\\b(" + Pt.join("|") + ")\\b|(" + Gt.join("|") + ")$", "i");
|
|
1085
|
+
function _t(n) {
|
|
1086
|
+
return n ? String(n).replace(yt, "").trim() : "";
|
|
1087
|
+
}
|
|
1088
|
+
function kt(n) {
|
|
1089
|
+
return !!n && yt.test(String(n));
|
|
1090
|
+
}
|
|
1091
|
+
var Ut = ["count (distinct)", "count distinct", "distinct count", "standard deviation", "average", "variance", "median", "product", "stddev", "std dev", "count", "sum", "avg", "min", "minimum", "max", "maximum", "var"];
|
|
1092
|
+
var bt = new RegExp("^\\s*(" + [...Ut].sort((n, t) => t.length - n.length).map((n) => n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/\s+/g, "\\s+")).join("|") + ")\\s+of\\s+", "i");
|
|
1090
1093
|
function zt(n) {
|
|
1091
|
-
let t =
|
|
1092
|
-
return t.length === 0 ? "" : t.replace(
|
|
1094
|
+
let t = _t(n);
|
|
1095
|
+
return t.length === 0 ? "" : t.replace(Wt, " ");
|
|
1093
1096
|
}
|
|
1094
|
-
function
|
|
1095
|
-
return t ? n.test(zt(t)) || n.test(
|
|
1097
|
+
function Ct(n, t) {
|
|
1098
|
+
return t ? n.test(zt(t)) || n.test(_t(t)) : false;
|
|
1096
1099
|
}
|
|
1097
|
-
function
|
|
1098
|
-
return
|
|
1100
|
+
function Mt(n) {
|
|
1101
|
+
return Ct(Vt, n);
|
|
1099
1102
|
}
|
|
1100
|
-
function Ut(n) {
|
|
1101
|
-
return St(Ft, n) || Ct(n);
|
|
1102
|
-
}
|
|
1103
|
-
var Mt = /int|double|decimal|single|float|number|currency|money/i;
|
|
1104
1103
|
function Bt(n) {
|
|
1105
|
-
|
|
1106
|
-
return t === "categorical" ? "Categorical" : t === "ordinal" ? "Ordinal" : t === "continuous" || n?.isMeasure === true || Mt.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
|
|
1104
|
+
return Ct(Ft, n) || Mt(n);
|
|
1107
1105
|
}
|
|
1106
|
+
var At = /int|double|decimal|single|float|number|currency|money/i;
|
|
1108
1107
|
function Ht(n) {
|
|
1109
|
-
|
|
1108
|
+
let t = String(n?.valueNature ?? "").trim().toLowerCase();
|
|
1109
|
+
return t === "categorical" ? "Categorical" : t === "ordinal" ? "Ordinal" : t === "continuous" || n?.isMeasure === true || At.test(String(n?.dataType ?? "")) ? "Continuous" : "Categorical";
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1112
|
-
|
|
1111
|
+
function Kt(n) {
|
|
1112
|
+
return n?.isMeasure === true || At.test(String(n?.dataType ?? ""));
|
|
1113
|
+
}
|
|
1114
|
+
function Tt(n) {
|
|
1115
|
+
let t = n ?? {}, e = Ht(t);
|
|
1113
1116
|
if (e !== "Continuous") return { nature: e, additivity: "unknown", basis: "role", suppressed: false };
|
|
1114
|
-
if (
|
|
1117
|
+
if (Mt(t.name)) return { nature: e, additivity: "positional", basis: "name", suppressed: true };
|
|
1115
1118
|
let s = String(t.additivity ?? "").trim().toLowerCase();
|
|
1116
|
-
if (!(s === "additive" &&
|
|
1119
|
+
if (!(s === "additive" && kt(t.name))) {
|
|
1117
1120
|
if (s === "additive") return { nature: e, additivity: "additive", basis: "measured", suppressed: false };
|
|
1118
1121
|
if (s === "part_of_whole") return { nature: e, additivity: "part_of_whole", basis: "measured", suppressed: false };
|
|
1119
1122
|
if (s === "intensive_rate") return { nature: e, additivity: "intensive_rate", basis: "measured", suppressed: false };
|
|
1120
1123
|
}
|
|
1121
|
-
return t.discourageAggregationAcrossGroups === true ? { nature: e, additivity: "intensive_rate", basis: "host-flag", suppressed: false } :
|
|
1124
|
+
return t.discourageAggregationAcrossGroups === true ? { nature: e, additivity: "intensive_rate", basis: "host-flag", suppressed: false } : Bt(t.name) ? { nature: e, additivity: "intensive_rate", basis: "name", suppressed: false } : { nature: e, additivity: "additive", basis: "default", suppressed: false };
|
|
1122
1125
|
}
|
|
1123
|
-
function
|
|
1124
|
-
let t =
|
|
1126
|
+
function Rt(n) {
|
|
1127
|
+
let t = Tt(n), e = n ?? {};
|
|
1125
1128
|
if (t.nature === "Categorical") return ["first", "distinctcount", "count"];
|
|
1126
|
-
if (t.nature === "Ordinal") return
|
|
1129
|
+
if (t.nature === "Ordinal") return Kt(e) ? ["median", "average", "min", "max", "first", "distinctcount", "count"] : ["first", "distinctcount", "count"];
|
|
1127
1130
|
switch (t.additivity) {
|
|
1128
1131
|
case "positional":
|
|
1129
1132
|
return ["min", "max", "count", "distinctcount", "first"];
|
|
@@ -1133,20 +1136,20 @@ function Tt(n) {
|
|
|
1133
1136
|
return ["sum", "average", "median", "min", "max", "count", "distinctcount", "first"];
|
|
1134
1137
|
}
|
|
1135
1138
|
}
|
|
1136
|
-
function
|
|
1137
|
-
return
|
|
1139
|
+
function ye(n) {
|
|
1140
|
+
return Rt(n)[0];
|
|
1138
1141
|
}
|
|
1139
|
-
function
|
|
1142
|
+
function Se(n, t) {
|
|
1140
1143
|
if (t !== "sum" && t !== "count") return false;
|
|
1141
1144
|
if (t === "count") return true;
|
|
1142
|
-
let e =
|
|
1145
|
+
let e = Tt(n);
|
|
1143
1146
|
return e.additivity === "additive" || e.additivity === "part_of_whole" || e.additivity === "unknown";
|
|
1144
1147
|
}
|
|
1145
1148
|
|
|
1146
1149
|
// ../shape-core/dist/index.mjs
|
|
1147
1150
|
/*! @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. */
|
|
1148
1151
|
var z2 = 2;
|
|
1149
|
-
var
|
|
1152
|
+
var U2 = 400;
|
|
1150
1153
|
function E2(r) {
|
|
1151
1154
|
return !!E(r);
|
|
1152
1155
|
}
|
|
@@ -1155,7 +1158,7 @@ function A(r) {
|
|
|
1155
1158
|
for (let n of r) {
|
|
1156
1159
|
if (n == null) continue;
|
|
1157
1160
|
let s = u(String(n));
|
|
1158
|
-
if (!V(s) && !e.has(s) && (e.add(s), e.size >=
|
|
1161
|
+
if (!V(s) && !e.has(s) && (e.add(s), e.size >= U2)) break;
|
|
1159
1162
|
}
|
|
1160
1163
|
return Array.from(e);
|
|
1161
1164
|
}
|
|
@@ -1165,7 +1168,7 @@ function C(r) {
|
|
|
1165
1168
|
let n = e.filter((c) => E2(c) && !Y(c)).length, s = e.filter((c) => !E2(c) && !!Y(c)).length;
|
|
1166
1169
|
return n >= 1 && n >= s;
|
|
1167
1170
|
}
|
|
1168
|
-
function
|
|
1171
|
+
function W2(r, e) {
|
|
1169
1172
|
if (!Y(r)) return false;
|
|
1170
1173
|
let n = E(r);
|
|
1171
1174
|
return n ? e === "world" ? true : s3.has(n) : false;
|
|
@@ -1189,7 +1192,7 @@ function F2(r) {
|
|
|
1189
1192
|
for (let n of r) {
|
|
1190
1193
|
if (n == null) continue;
|
|
1191
1194
|
let s = String(n).trim();
|
|
1192
|
-
if (!V(u(s)) && !e.has(s) && (e.add(s), e.size >=
|
|
1195
|
+
if (!V(u(s)) && !e.has(s) && (e.add(s), e.size >= U2)) break;
|
|
1193
1196
|
}
|
|
1194
1197
|
return Array.from(e);
|
|
1195
1198
|
}
|
|
@@ -1200,10 +1203,10 @@ function D2(r) {
|
|
|
1200
1203
|
for (let s of e) Z(s).length > 0 && n++;
|
|
1201
1204
|
return Math.round(n / e.length * 1e3) / 10;
|
|
1202
1205
|
}
|
|
1203
|
-
function
|
|
1204
|
-
return p(e,
|
|
1206
|
+
function Z2(r, e) {
|
|
1207
|
+
return p(e, sn) ? true : F2(r).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
|
|
1205
1208
|
}
|
|
1206
|
-
function
|
|
1209
|
+
function Yt(r, e) {
|
|
1207
1210
|
let n = A(r);
|
|
1208
1211
|
if (n.length === 0) return 0;
|
|
1209
1212
|
let s = 0;
|
|
@@ -1215,54 +1218,54 @@ function G2(r, e) {
|
|
|
1215
1218
|
for (let s of A(r)) e(s) && n++;
|
|
1216
1219
|
return n;
|
|
1217
1220
|
}
|
|
1218
|
-
function
|
|
1221
|
+
function Jt(r, e) {
|
|
1219
1222
|
let n = 0;
|
|
1220
1223
|
for (let s of F2(r)) e(s) && n++;
|
|
1221
1224
|
return n;
|
|
1222
1225
|
}
|
|
1223
|
-
function
|
|
1224
|
-
let P2 = [], u2 = [],
|
|
1226
|
+
function Qt(r, e, n, s, c) {
|
|
1227
|
+
let P2 = [], u2 = [], o2 = {}, v2 = {}, k2 = new Set(r), l = (t) => e.map((i) => i[t]);
|
|
1225
1228
|
for (let t of ["city", "country"]) {
|
|
1226
1229
|
let i = n?.[t];
|
|
1227
|
-
i && k2.has(i) && (
|
|
1230
|
+
i && k2.has(i) && (o2[t] = i);
|
|
1228
1231
|
}
|
|
1229
1232
|
let X3 = new Set(c ?? r);
|
|
1230
1233
|
for (let t of ["lat", "lon"]) {
|
|
1231
1234
|
let i = n?.[t];
|
|
1232
|
-
i && X3.has(i) && (
|
|
1235
|
+
i && X3.has(i) && (o2[t] = i);
|
|
1233
1236
|
}
|
|
1234
1237
|
let p2 = n?.zip;
|
|
1235
1238
|
if (p2 && k2.has(p2)) {
|
|
1236
1239
|
let t = l(p2), i = D2(t);
|
|
1237
|
-
i < 95 ? u2.push(`zip=${p2} (only ${i}% of values read as ZIPs)`) :
|
|
1240
|
+
i < 95 ? u2.push(`zip=${p2} (only ${i}% of values read as ZIPs)`) : Z2(t, p2) ? o2.zip = p2 : u2.push(`zip=${p2} (all values are 3-4 digits with nothing to say they are postal)`);
|
|
1238
1241
|
}
|
|
1239
1242
|
let g = n?.state;
|
|
1240
1243
|
if (g && k2.has(g)) {
|
|
1241
1244
|
let t = l(g), i = A(t);
|
|
1242
|
-
i.length > 0 && i.every((a2) =>
|
|
1245
|
+
i.length > 0 && i.every((a2) => W2(a2, s)) ? u2.push(`state=${g} (every value is "CA", which is both Canada and California)`) : C(t) ? (u2.push(`state=${g} (every value is a country, not a state)`), o2.country || (o2.country = g)) : M(t) < 95 ? u2.push(`state=${g} (only ${M(t)}% of values are states/provinces)`) : o2.state = g;
|
|
1243
1246
|
}
|
|
1244
|
-
let d = new Set(Object.values(
|
|
1245
|
-
if (!
|
|
1247
|
+
let d = new Set(Object.values(o2).filter(Boolean)), x2 = r.filter((t) => !d.has(t) && !t.startsWith("__"));
|
|
1248
|
+
if (!o2.state) {
|
|
1246
1249
|
let t = null;
|
|
1247
1250
|
for (let i of x2) {
|
|
1248
1251
|
let a2 = l(i);
|
|
1249
1252
|
if (C(a2)) continue;
|
|
1250
1253
|
let f = M(a2);
|
|
1251
1254
|
if (f < 95) continue;
|
|
1252
|
-
let N2 = G2(a2, (S) => !!Y(S)), Y2 = G2(a2, (S) => !!Y(S) && !
|
|
1255
|
+
let N2 = G2(a2, (S) => !!Y(S)), Y2 = G2(a2, (S) => !!Y(S) && !W2(S, s));
|
|
1253
1256
|
N2 < z2 && Y2 < 1 || (!t || f > t.pct) && (t = { name: i, pct: f });
|
|
1254
1257
|
}
|
|
1255
|
-
t && (
|
|
1258
|
+
t && (o2.state = t.name, d.add(t.name), P2.push(`state=${t.name} (${t.pct}% states/provinces)`));
|
|
1256
1259
|
}
|
|
1257
|
-
if (!
|
|
1260
|
+
if (!o2.zip) for (let t of x2) {
|
|
1258
1261
|
if (d.has(t)) continue;
|
|
1259
1262
|
let i = l(t), a2 = D2(i);
|
|
1260
|
-
if (!(a2 < 95) &&
|
|
1261
|
-
|
|
1263
|
+
if (!(a2 < 95) && Z2(i, t) && !(Jt(i, (f) => Z(f).length > 0) < z2)) {
|
|
1264
|
+
o2.zip = t, d.add(t), P2.push(`zip=${t} (${a2}% ZIP codes)`);
|
|
1262
1265
|
break;
|
|
1263
1266
|
}
|
|
1264
1267
|
}
|
|
1265
|
-
let h2 =
|
|
1268
|
+
let h2 = o2.country;
|
|
1266
1269
|
if (!h2 || !C(l(h2))) {
|
|
1267
1270
|
let t = null;
|
|
1268
1271
|
for (let i of x2) {
|
|
@@ -1270,22 +1273,22 @@ function Jt(r, e, n, s, c) {
|
|
|
1270
1273
|
let a2 = $2(l(i));
|
|
1271
1274
|
(!t || a2 > t.pct) && (t = { name: i, pct: a2 });
|
|
1272
1275
|
}
|
|
1273
|
-
t && (h2 && (u2.push(`country=${h2} (only ${$2(l(h2))}% of values are country identifiers; using ${t.name} instead)`), v2.country = h2),
|
|
1276
|
+
t && (h2 && (u2.push(`country=${h2} (only ${$2(l(h2))}% of values are country identifiers; using ${t.name} instead)`), v2.country = h2), o2.country = t.name, d.add(t.name), P2.push(`country=${t.name}`));
|
|
1274
1277
|
}
|
|
1275
|
-
if (!
|
|
1278
|
+
if (!o2.city) {
|
|
1276
1279
|
let t = null;
|
|
1277
1280
|
for (let i of x2) {
|
|
1278
1281
|
if (d.has(i)) continue;
|
|
1279
|
-
let a2 = l(i), f =
|
|
1282
|
+
let a2 = l(i), f = Yt(a2, s);
|
|
1280
1283
|
f < m3 || G2(a2, (N2) => p3(N2, s)) < z2 || (!t || f > t.pct) && (t = { name: i, pct: f });
|
|
1281
1284
|
}
|
|
1282
|
-
t && (
|
|
1285
|
+
t && (o2.city = t.name, P2.push(`city=${t.name} (${t.pct}% known cities)`));
|
|
1283
1286
|
}
|
|
1284
|
-
let B2 =
|
|
1285
|
-
let i = +String(t[
|
|
1286
|
-
return isFinite(i) && isFinite(a2) && i >= -90 && i <= 90 && a2 >= -180 && a2 <= 180 && String(t[
|
|
1287
|
+
let B2 = o2.country ? l(o2.country) : [], _2 = !!o2.country && C(B2), j2 = _2 ? new Set(B2.map((t) => E(t == null ? null : String(t))).filter(Boolean)).size : 0, K2 = _2 && j2 >= 2, L2 = !!(o2.lat && o2.lon) && e.some((t) => {
|
|
1288
|
+
let i = +String(t[o2.lat] ?? "").trim(), a2 = +String(t[o2.lon] ?? "").trim();
|
|
1289
|
+
return isFinite(i) && isFinite(a2) && i >= -90 && i <= 90 && a2 >= -180 && a2 <= 180 && String(t[o2.lat] ?? "").trim() !== "" && String(t[o2.lon] ?? "").trim() !== "";
|
|
1287
1290
|
});
|
|
1288
|
-
return
|
|
1291
|
+
return o2.lat && o2.lon && !L2 && u2.push(`lat/lon=${o2.lat}/${o2.lon} (no row holds a usable coordinate pair)`), o2.country && !K2 && !(o2.city || o2.state || o2.zip || L2) && u2.push(_2 ? `country=${o2.country} (every row resolves to the same country - nothing to place apart)` : `country=${o2.country} (values are not country identifiers)`), { bind: !!(o2.city || o2.state || o2.zip || K2 || L2) ? o2 : null, backfilled: P2, refused: u2, ...Object.keys(v2).length ? { labelFallback: v2 } : {} };
|
|
1289
1292
|
}
|
|
1290
1293
|
|
|
1291
1294
|
// src/payload.ts
|
|
@@ -1300,7 +1303,7 @@ function resolvePointChannel(cols, rowObjs, point) {
|
|
|
1300
1303
|
let labelCol;
|
|
1301
1304
|
if (bind) {
|
|
1302
1305
|
const dims = cols.filter((c) => !c.isMeasure).map((c) => c.name);
|
|
1303
|
-
const res =
|
|
1306
|
+
const res = Qt(dims, rowObjs, bind, point?.mapKind, cols.map((c) => c.name));
|
|
1304
1307
|
bind = res.bind;
|
|
1305
1308
|
rolesBackfilled = res.backfilled;
|
|
1306
1309
|
rolesRefused = res.refused;
|
|
@@ -1346,18 +1349,18 @@ function resolvePointChannel(cols, rowObjs, point) {
|
|
|
1346
1349
|
}
|
|
1347
1350
|
function buildRenderPayload(cols, rowObjs, geo, point, destination) {
|
|
1348
1351
|
const colNames = cols.map((c) => c.name);
|
|
1349
|
-
const
|
|
1352
|
+
const o2 = resolvePointChannel(cols, rowObjs, point);
|
|
1350
1353
|
const d = resolvePointChannel(cols, rowObjs, destination);
|
|
1351
|
-
const pLat =
|
|
1354
|
+
const pLat = o2.lat, pLon = o2.lon, pPrec = o2.prec;
|
|
1352
1355
|
const dLat = d.lat, dLon = d.lon, dPrec = d.prec;
|
|
1353
|
-
const geoPoint =
|
|
1356
|
+
const geoPoint = o2.geoPoint;
|
|
1354
1357
|
const geoPointDest = d.geoPoint;
|
|
1355
|
-
const rolesRefused = [...
|
|
1358
|
+
const rolesRefused = [...o2.rolesRefused, ...d.rolesRefused.map((s) => `destination: ${s}`)];
|
|
1356
1359
|
let geoIso = null;
|
|
1357
1360
|
let geoUnmatched;
|
|
1358
1361
|
let geoUnmatchedDistinct;
|
|
1359
|
-
if (geo && geo.column && geo.kind &&
|
|
1360
|
-
const built =
|
|
1362
|
+
if (geo && geo.column && geo.kind && Rn(geo.kind)) {
|
|
1363
|
+
const built = wn(rowObjs.map((r) => r[geo.column]), geo.kind);
|
|
1361
1364
|
geoIso = built.iso;
|
|
1362
1365
|
geoUnmatched = { count: built.totalRows - built.matchedRows, examples: built.unmatched.slice(0, 8) };
|
|
1363
1366
|
geoUnmatchedDistinct = built.unmatched.length;
|
|
@@ -2402,10 +2405,10 @@ export {
|
|
|
2402
2405
|
registerGeoAsset,
|
|
2403
2406
|
clearGeoCache,
|
|
2404
2407
|
L3,
|
|
2405
|
-
At,
|
|
2406
2408
|
Tt,
|
|
2407
|
-
|
|
2409
|
+
Rt,
|
|
2408
2410
|
ye,
|
|
2411
|
+
Se,
|
|
2409
2412
|
buildRenderPayload,
|
|
2410
2413
|
createMarkResolver,
|
|
2411
2414
|
ensureCrossfilterHitTargets,
|
package/dist/index.mjs
CHANGED
|
@@ -11,7 +11,6 @@ import {
|
|
|
11
11
|
ANIM_PLAY_SPEED_MIN,
|
|
12
12
|
APPROXIMATE_POSITIONS_DEFAULT,
|
|
13
13
|
AXIS_FILTER_CLASS,
|
|
14
|
-
At,
|
|
15
14
|
COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT,
|
|
16
15
|
COLOR_SCALE_SELF_CLAMP_PCT_MAX,
|
|
17
16
|
COLOR_SCALE_SELF_CLAMP_PCT_MIN,
|
|
@@ -35,9 +34,11 @@ import {
|
|
|
35
34
|
MIN_HIT_BAND_PX,
|
|
36
35
|
PHANTOM_FRACTION,
|
|
37
36
|
ROW_IDX_ATTR,
|
|
37
|
+
Rt,
|
|
38
38
|
SCROLL_SLACK_PX,
|
|
39
39
|
SEASONAL_MARKERS_DEFAULT,
|
|
40
40
|
SELECTION_ACTIVE_CLASS,
|
|
41
|
+
Se,
|
|
41
42
|
Tt,
|
|
42
43
|
VALUE_AXIS_BASELINE_DEFAULT,
|
|
43
44
|
XFILTER_REFRESH_EVENT,
|
|
@@ -58,7 +59,6 @@ import {
|
|
|
58
59
|
fitRenderedChart,
|
|
59
60
|
geoAssetFor,
|
|
60
61
|
geoFromCache,
|
|
61
|
-
he,
|
|
62
62
|
hitBandFlag,
|
|
63
63
|
isBlankRender,
|
|
64
64
|
isPhantomBox,
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
stripEsmExports,
|
|
78
78
|
svgInkReach,
|
|
79
79
|
ye
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-D3DERYG3.mjs";
|
|
81
81
|
import "./chunk-A2GMXZP7.mjs";
|
|
82
82
|
import "./chunk-GHODWOAL.mjs";
|
|
83
83
|
|
|
@@ -750,10 +750,11 @@ function computeQualifyFilterView(groups, term) {
|
|
|
750
750
|
if (grp.heading !== null) (any ? showHeadings : hideHeadings).push(grp.heading);
|
|
751
751
|
}
|
|
752
752
|
const filtering = fit.tier !== "all";
|
|
753
|
-
const
|
|
753
|
+
const nameOnlyBelow = fit.tier === "desc" && (ref.tier === "name" || ref.tier === "namePart");
|
|
754
|
+
const openRefusals = filtering && ref.rows.length > 0 && (fit.rows.length === 0 || nameOnlyBelow);
|
|
754
755
|
let note = "none";
|
|
755
756
|
if (filtering) {
|
|
756
|
-
if (fit.tier === "desc") note = "descFallback";
|
|
757
|
+
if (fit.tier === "desc") note = nameOnlyBelow ? "descAndRefusalName" : "descFallback";
|
|
757
758
|
else if (fit.tier === "none") note = openRefusals ? "onlyRefusals" : "noMatch";
|
|
758
759
|
}
|
|
759
760
|
return {
|
|
@@ -822,15 +823,15 @@ function isRealColumn(col) {
|
|
|
822
823
|
return !!col && !isSynthetic(col.name);
|
|
823
824
|
}
|
|
824
825
|
function isSuppressed(col) {
|
|
825
|
-
return
|
|
826
|
+
return Tt(col).suppressed;
|
|
826
827
|
}
|
|
827
828
|
function resolveAgg(col, requested, auto) {
|
|
828
829
|
const fallback = () => {
|
|
829
|
-
const d =
|
|
830
|
+
const d = ye(col);
|
|
830
831
|
return d === "first" ? "count" : d;
|
|
831
832
|
};
|
|
832
833
|
if (auto) return fallback();
|
|
833
|
-
return
|
|
834
|
+
return Rt(col).indexOf(requested) >= 0 ? requested : fallback();
|
|
834
835
|
}
|
|
835
836
|
function toNumber(v) {
|
|
836
837
|
if (v == null || v === "") return null;
|
|
@@ -934,7 +935,7 @@ function computeSelectionCard(payload, selectedRowIdxs, opts = {}) {
|
|
|
934
935
|
}
|
|
935
936
|
const value = reduce(selVals, colAgg, selRaw);
|
|
936
937
|
let sharePct = null;
|
|
937
|
-
if (
|
|
938
|
+
if (Se(col, colAgg) && value != null) {
|
|
938
939
|
const allVals = [];
|
|
939
940
|
const allRaw = [];
|
|
940
941
|
for (let r = 0; r < rows.length; r++) {
|
package/dist/react.mjs
CHANGED
|
@@ -216,15 +216,20 @@ export interface QualifyFilterGroup<E> {
|
|
|
216
216
|
*
|
|
217
217
|
* "none" - a name tier answered, or nothing is being filtered. Say nothing: the reader's
|
|
218
218
|
* own word was found where they expected it and needs no explanation.
|
|
219
|
-
* "descFallback" - no name matched; these matched on description. MUST be said - a
|
|
220
|
-
* fall-through is indistinguishable from bad matching.
|
|
219
|
+
* "descFallback" - no name matched ANYWHERE; these matched on description. MUST be said - a
|
|
220
|
+
* silent fall-through is indistinguishable from bad matching.
|
|
221
221
|
* "onlyRefusals" - nothing that FITS matches, but something in the refusal block does. Say where
|
|
222
222
|
* it went; that block is now open.
|
|
223
|
+
* "descAndRefusalName" - both at once, and the state that made this a five-way rather than a
|
|
224
|
+
* four-way decision (2026-09-04). The fitting list answered on DESCRIPTION and
|
|
225
|
+
* the refusal block answered on a NAME, so "no name matches" is a lie told over
|
|
226
|
+
* the top of a visible name match, and the reader's own word needs BOTH halves
|
|
227
|
+
* said: why the rows above look unrelated, and where the row they typed went.
|
|
223
228
|
* "noMatch" - nothing anywhere. NEVER phrase this like "nothing fits your data": one is a
|
|
224
229
|
* statement about a typed string and is fixed with backspace, the other is a
|
|
225
230
|
* statement about the data and is not.
|
|
226
231
|
*/
|
|
227
|
-
export type QualifyFilterNoteKind = "none" | "descFallback" | "onlyRefusals" | "noMatch";
|
|
232
|
+
export type QualifyFilterNoteKind = "none" | "descFallback" | "onlyRefusals" | "descAndRefusalName" | "noMatch";
|
|
228
233
|
export interface QualifyFilterView<E> {
|
|
229
234
|
/** Rows to show, and rows to hide. Two lists rather than one predicate so a host can write
|
|
230
235
|
* them in one pass without asking a Set per element. */
|
|
@@ -243,11 +248,17 @@ export interface QualifyFilterView<E> {
|
|
|
243
248
|
/**
|
|
244
249
|
* Does the refusal block need to be OPEN for this term?
|
|
245
250
|
*
|
|
246
|
-
* True
|
|
247
|
-
*
|
|
251
|
+
* True when the block holds a match the fitting list cannot show the reader. "Why isn't my
|
|
252
|
+
* chart here" is the only question that section is open to ask, and the reader has just
|
|
248
253
|
* asked it by name - the server's own sentence about why it cannot be drawn is already
|
|
249
254
|
* rendered, one collapsed checkbox away.
|
|
250
255
|
*
|
|
256
|
+
* TWO WAYS TO EARN IT, and the second was missing until 2026-09-04: nothing that fits
|
|
257
|
+
* matched at all, OR the only NAME match is down there while the fitting list answered on
|
|
258
|
+
* description. A description match above is not a substitute for the row the reader typed -
|
|
259
|
+
* it is a weaker tier, and leaving the block shut hides the actual answer behind a checkbox
|
|
260
|
+
* the reader has no reason to tick.
|
|
261
|
+
*
|
|
251
262
|
* THE HOST MUST TREAT THIS AS AN OVERRIDE, NOT A SETTING: remember what the reader's own
|
|
252
263
|
* checkbox said before the first override, and put it back the moment this goes false. An
|
|
253
264
|
* auto-expansion that sticks leaves the reader with a section they never opened.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.73",
|
|
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",
|