@bicharts/chart-host 0.5.109 → 0.5.111
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-MZNTO42Q.mjs → chunk-OSXEQYDB.mjs} +214 -213
- package/dist/index.mjs +1 -1
- package/dist/react.mjs +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@ var require_papaparse_min = __commonJS({
|
|
|
23
23
|
})(exports, function r() {
|
|
24
24
|
var n = "undefined" != typeof self ? self : "undefined" != typeof window ? window : void 0 !== n ? n : {};
|
|
25
25
|
var d2, s = !n.document && !!n.postMessage, a4 = n.IS_PAPA_WORKER || false, o = {}, h3 = 0, v2 = {};
|
|
26
|
-
function
|
|
26
|
+
function P2(e) {
|
|
27
27
|
return 65279 === e.charCodeAt(0) ? e.slice(1) : e;
|
|
28
28
|
}
|
|
29
29
|
function u2(e) {
|
|
@@ -146,7 +146,7 @@ var require_papaparse_min = __commonJS({
|
|
|
146
146
|
return !y6(e4);
|
|
147
147
|
})), _3()) {
|
|
148
148
|
let t4 = function(e4, t5) {
|
|
149
|
-
e4 =
|
|
149
|
+
e4 = P2(e4), q4(m4.transformHeader) && (e4 = m4.transformHeader(e4, t5)), c4.push(e4);
|
|
150
150
|
};
|
|
151
151
|
var t2 = t4;
|
|
152
152
|
if (p4) if (Array.isArray(p4.data[0])) {
|
|
@@ -210,56 +210,56 @@ var require_papaparse_min = __commonJS({
|
|
|
210
210
|
function U2(e) {
|
|
211
211
|
return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
212
212
|
}
|
|
213
|
-
function E2(
|
|
214
|
-
var S = (
|
|
215
|
-
if (void 0 !==
|
|
216
|
-
true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !==
|
|
217
|
-
var z3 = 0,
|
|
213
|
+
function E2(C2) {
|
|
214
|
+
var S = (C2 = C2 || {}).delimiter, O2 = C2.newline, x3 = C2.comments, I2 = C2.step, A = C2.preview, T3 = C2.fastMode, D4 = null, L2 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F4;
|
|
215
|
+
if (void 0 !== C2.escapeChar && (j3 = C2.escapeChar), ("string" != typeof S || -1 < v2.BAD_DELIMITERS.indexOf(S)) && (S = ","), x3 === S) throw new Error("Comment character same as delimiter");
|
|
216
|
+
true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O2 && "\r" !== O2 && "\r\n" !== O2 && (O2 = "\n");
|
|
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 =
|
|
221
|
-
if (!i2) return
|
|
220
|
+
var n2 = i2.length, e = S.length, s2 = O2.length, a5 = x3.length, o2 = q4(I2), h4 = [], u4 = [], d3 = [], f5 = z3 = 0;
|
|
221
|
+
if (!i2) return w3();
|
|
222
222
|
if (T3 || false !== T3 && -1 === i2.indexOf(F4)) {
|
|
223
|
-
for (var l2 = i2.split(
|
|
224
|
-
if (d3 = l2[c4], z3 += d3.length, c4 !== l2.length - 1) z3 +=
|
|
225
|
-
else if (r2) return
|
|
223
|
+
for (var l2 = i2.split(O2), c4 = 0; c4 < l2.length; c4++) {
|
|
224
|
+
if (d3 = l2[c4], z3 += d3.length, c4 !== l2.length - 1) z3 += O2.length;
|
|
225
|
+
else if (r2) return w3();
|
|
226
226
|
if (!x3 || d3.substring(0, a5) !== x3) {
|
|
227
227
|
if (o2) {
|
|
228
|
-
if (h4 = [], k2(d3.split(S)),
|
|
228
|
+
if (h4 = [], k2(d3.split(S)), R3(), M2) return w3();
|
|
229
229
|
} else k2(d3.split(S));
|
|
230
|
-
if (
|
|
230
|
+
if (A && A <= c4) return h4 = h4.slice(0, A), w3(true);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
return
|
|
233
|
+
return w3();
|
|
234
234
|
}
|
|
235
|
-
for (var p4 = i2.indexOf(S, z3), g4 = i2.indexOf(
|
|
235
|
+
for (var p4 = i2.indexOf(S, z3), g4 = i2.indexOf(O2, z3), _3 = new RegExp(U2(j3) + U2(F4), "g"), m4 = i2.indexOf(F4, z3); ; ) if (i2[z3] === F4) for (m4 = z3, z3++; ; ) {
|
|
236
236
|
if (-1 === (m4 = i2.indexOf(F4, m4 + 1))) return r2 || u4.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h4.length, index: z3 }), E4();
|
|
237
237
|
if (m4 === n2 - 1) return E4(i2.substring(z3, m4).replace(_3, F4));
|
|
238
|
-
if (F4 ===
|
|
239
|
-
else if (F4 ===
|
|
238
|
+
if (F4 === j3 && i2[m4 + 1] === j3) m4++;
|
|
239
|
+
else if (F4 === j3 || 0 === m4 || i2[m4 - 1] !== j3) {
|
|
240
240
|
-1 !== p4 && p4 < m4 + 1 && (p4 = i2.indexOf(S, m4 + 1));
|
|
241
|
-
var y6 = v3(-1 === (g4 = -1 !== g4 && g4 < m4 + 1 ? i2.indexOf(
|
|
241
|
+
var y6 = v3(-1 === (g4 = -1 !== g4 && g4 < m4 + 1 ? i2.indexOf(O2, m4 + 1) : g4) ? p4 : Math.min(p4, g4));
|
|
242
242
|
if (i2.substr(m4 + 1 + y6, e) === S) {
|
|
243
|
-
d3.push(i2.substring(z3, m4).replace(_3, F4)), i2[z3 = m4 + 1 + y6 + e] !== F4 && (m4 = i2.indexOf(F4, z3)), p4 = i2.indexOf(S, z3), g4 = i2.indexOf(
|
|
243
|
+
d3.push(i2.substring(z3, m4).replace(_3, F4)), i2[z3 = m4 + 1 + y6 + e] !== F4 && (m4 = i2.indexOf(F4, z3)), p4 = i2.indexOf(S, z3), g4 = i2.indexOf(O2, z3);
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
246
|
y6 = v3(g4);
|
|
247
|
-
if (i2.substring(m4 + 1 + y6, m4 + 1 + y6 + s2) ===
|
|
248
|
-
if (d3.push(i2.substring(z3, m4).replace(_3, F4)), b5(m4 + 1 + y6 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F4, z3), o2 && (
|
|
249
|
-
if (
|
|
247
|
+
if (i2.substring(m4 + 1 + y6, m4 + 1 + y6 + s2) === O2) {
|
|
248
|
+
if (d3.push(i2.substring(z3, m4).replace(_3, F4)), b5(m4 + 1 + y6 + s2), p4 = i2.indexOf(S, z3), m4 = i2.indexOf(F4, z3), o2 && (R3(), M2)) return w3();
|
|
249
|
+
if (A && h4.length >= A) return w3(true);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
u4.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h4.length, index: z3 }), m4++;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
else if (x3 && 0 === d3.length && i2.substring(z3, z3 + a5) === x3) {
|
|
256
|
-
if (-1 === g4) return
|
|
257
|
-
z3 = g4 + s2, g4 = i2.indexOf(
|
|
256
|
+
if (-1 === g4) return w3();
|
|
257
|
+
z3 = g4 + s2, g4 = i2.indexOf(O2, z3), p4 = i2.indexOf(S, z3);
|
|
258
258
|
} else if (-1 !== p4 && (p4 < g4 || -1 === g4)) d3.push(i2.substring(z3, p4)), z3 = p4 + e, p4 = i2.indexOf(S, z3);
|
|
259
259
|
else {
|
|
260
260
|
if (-1 === g4) break;
|
|
261
|
-
if (d3.push(i2.substring(z3, g4)), b5(g4 + s2), o2 && (
|
|
262
|
-
if (
|
|
261
|
+
if (d3.push(i2.substring(z3, g4)), b5(g4 + s2), o2 && (R3(), M2)) return w3();
|
|
262
|
+
if (A && h4.length >= A) return w3(true);
|
|
263
263
|
}
|
|
264
264
|
return E4();
|
|
265
265
|
function k2(e2) {
|
|
@@ -270,18 +270,18 @@ 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 E4(e2) {
|
|
273
|
-
return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d3.push(e2), z3 = n2, k2(d3), o2 &&
|
|
273
|
+
return r2 || (void 0 === e2 && (e2 = i2.substring(z3)), d3.push(e2), z3 = n2, k2(d3), o2 && R3()), w3();
|
|
274
274
|
}
|
|
275
275
|
function b5(e2) {
|
|
276
|
-
z3 = e2, k2(d3), d3 = [], g4 = i2.indexOf(
|
|
276
|
+
z3 = e2, k2(d3), d3 = [], g4 = i2.indexOf(O2, z3);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
279
|
-
if (
|
|
278
|
+
function w3(e2) {
|
|
279
|
+
if (C2.header && !t && h4.length && !L2) {
|
|
280
280
|
var s4 = h4[0], a6 = /* @__PURE__ */ Object.create(null), o4 = new Set(s4);
|
|
281
281
|
let n4 = false;
|
|
282
282
|
for (let r4 = 0; r4 < s4.length; r4++) {
|
|
283
|
-
let i4 =
|
|
284
|
-
if (a6[i4 = q4(
|
|
283
|
+
let i4 = P2(s4[r4]);
|
|
284
|
+
if (a6[i4 = q4(C2.transformHeader) ? C2.transformHeader(i4, r4) : i4]) {
|
|
285
285
|
let e4, t2 = a6[i4];
|
|
286
286
|
for (; e4 = i4 + "_" + t2, t2++, o4.has(e4); ) ;
|
|
287
287
|
o4.add(e4), s4[r4] = e4, a6[i4]++, n4 = true, (D4 = null === D4 ? {} : D4)[e4] = i4;
|
|
@@ -290,13 +290,13 @@ var require_papaparse_min = __commonJS({
|
|
|
290
290
|
}
|
|
291
291
|
n4 && console.warn("Duplicate headers found and renamed."), L2 = true;
|
|
292
292
|
}
|
|
293
|
-
return { data: h4, errors: u4, meta: { delimiter: S, linebreak:
|
|
293
|
+
return { data: h4, errors: u4, meta: { delimiter: S, linebreak: O2, aborted: M2, truncated: !!e2, cursor: f5 + (t || 0), renamedHeaders: D4 } };
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
I2(
|
|
295
|
+
function R3() {
|
|
296
|
+
I2(w3()), h4 = [], u4 = [];
|
|
297
297
|
}
|
|
298
298
|
}, this.abort = function() {
|
|
299
|
-
|
|
299
|
+
M2 = true;
|
|
300
300
|
}, this.getCharIndex = function() {
|
|
301
301
|
return z3;
|
|
302
302
|
};
|
|
@@ -339,7 +339,7 @@ var require_papaparse_min = __commonJS({
|
|
|
339
339
|
return v2.parse = function(e, t) {
|
|
340
340
|
var i2 = (t = t || {}).dynamicTyping || false;
|
|
341
341
|
q4(i2) && (t.dynamicTypingFunction = i2, i2 = {});
|
|
342
|
-
if (t.dynamicTyping = i2, t.transform = !!q4(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i2 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e =
|
|
342
|
+
if (t.dynamicTyping = i2, t.transform = !!q4(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i2 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e = P2(e), i2 = new (t.download ? f4 : c2)(t)) : true === e.readable && q4(e.read) && q4(e.on) ? i2 = new p2(t) : (n.File && e instanceof File || e instanceof Object) && (i2 = new l(t)), i2.stream(e);
|
|
343
343
|
(i2 = (() => {
|
|
344
344
|
var e2;
|
|
345
345
|
return !!v2.WORKERS_SUPPORTED && (e2 = (() => {
|
|
@@ -499,11 +499,11 @@ function f(t) {
|
|
|
499
499
|
return t > EPS ? Math.cbrt(t) : (KAPPA * t + 16) / 116;
|
|
500
500
|
}
|
|
501
501
|
function rgbToLab(r, g3, b4) {
|
|
502
|
-
const
|
|
503
|
-
const X2 = 0.4124564 *
|
|
504
|
-
const Y2 = 0.2126729 *
|
|
505
|
-
const
|
|
506
|
-
const fx = f(X2 / Xn), fy = f(Y2 / Yn), fz = f(
|
|
502
|
+
const R3 = linearise(r), G3 = linearise(g3), B2 = linearise(b4);
|
|
503
|
+
const X2 = 0.4124564 * R3 + 0.3575761 * G3 + 0.1804375 * B2;
|
|
504
|
+
const Y2 = 0.2126729 * R3 + 0.7151522 * G3 + 0.072175 * B2;
|
|
505
|
+
const Z2 = 0.0193339 * R3 + 0.119192 * G3 + 0.9503041 * B2;
|
|
506
|
+
const fx = f(X2 / Xn), fy = f(Y2 / Yn), fz = f(Z2 / Zn);
|
|
507
507
|
return { L: 116 * fy - 16, a: 500 * (fx - fy), b: 200 * (fy - fz) };
|
|
508
508
|
}
|
|
509
509
|
function hexToLab(hex2) {
|
|
@@ -560,11 +560,11 @@ function labToHex(lab) {
|
|
|
560
560
|
const fy = (lab.L + 16) / 116, fx = fy + lab.a / 500, fz = fy - lab.b / 200;
|
|
561
561
|
const X2 = Xn * finv(fx);
|
|
562
562
|
const Y2 = Yn * (lab.L > KAPPA * EPS ? fy * fy * fy : lab.L / KAPPA);
|
|
563
|
-
const
|
|
563
|
+
const Z2 = Zn * finv(fz);
|
|
564
564
|
const lin = [
|
|
565
|
-
3.2404542 * X2 - 1.5371385 * Y2 - 0.4985314 *
|
|
566
|
-
-0.969266 * X2 + 1.8760108 * Y2 + 0.041556 *
|
|
567
|
-
0.0556434 * X2 - 0.2040259 * Y2 + 1.0572252 *
|
|
565
|
+
3.2404542 * X2 - 1.5371385 * Y2 - 0.4985314 * Z2,
|
|
566
|
+
-0.969266 * X2 + 1.8760108 * Y2 + 0.041556 * Z2,
|
|
567
|
+
0.0556434 * X2 - 0.2040259 * Y2 + 1.0572252 * Z2
|
|
568
568
|
];
|
|
569
569
|
return "#" + lin.map((v2) => {
|
|
570
570
|
const c2 = Math.max(0, Math.min(1, v2));
|
|
@@ -669,14 +669,14 @@ function censusColourSpread(container, doc) {
|
|
|
669
669
|
const d2 = cs.map(() => new Array(cs.length).fill(0));
|
|
670
670
|
let span = 0, lo = 0, hi = 1;
|
|
671
671
|
for (let i = 0; i < cs.length; i++) {
|
|
672
|
-
for (let
|
|
673
|
-
const v2 = deltaE2000(cs[i], cs[
|
|
674
|
-
d2[i][
|
|
675
|
-
d2[
|
|
672
|
+
for (let j3 = i + 1; j3 < cs.length; j3++) {
|
|
673
|
+
const v2 = deltaE2000(cs[i], cs[j3]);
|
|
674
|
+
d2[i][j3] = v2;
|
|
675
|
+
d2[j3][i] = v2;
|
|
676
676
|
if (v2 > span) {
|
|
677
677
|
span = v2;
|
|
678
678
|
lo = i;
|
|
679
|
-
hi =
|
|
679
|
+
hi = j3;
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
}
|
|
@@ -691,8 +691,8 @@ function censusColourSpread(container, doc) {
|
|
|
691
691
|
let crowd = 0;
|
|
692
692
|
for (let i = 0; i < cs.length; i++) {
|
|
693
693
|
let n = 0;
|
|
694
|
-
for (let
|
|
695
|
-
if (i ===
|
|
694
|
+
for (let j3 = 0; j3 < cs.length; j3++) {
|
|
695
|
+
if (i === j3 || d2[i][j3] <= SAME_SHADE_DELTA_E) n += top[j3].n;
|
|
696
696
|
}
|
|
697
697
|
if (n > crowd) crowd = n;
|
|
698
698
|
}
|
|
@@ -764,15 +764,15 @@ function resolveAutoColorScale(p2) {
|
|
|
764
764
|
};
|
|
765
765
|
const candidates = p2.isHighContrast ? [normHex(p2.themeAccent), normHex(p2.themeFg)] : [...palette.map(normHex), normHex(p2.themeAccent), normHex(p2.themeFg)];
|
|
766
766
|
const accent = candidates.find(usable) ?? FALLBACK_ACCENT;
|
|
767
|
-
const
|
|
767
|
+
const A = hexToLab(accent);
|
|
768
768
|
let t = 0.1;
|
|
769
|
-
let low = mixLab(bg,
|
|
769
|
+
let low = mixLab(bg, A, t);
|
|
770
770
|
while (t < 0.6 && deltaE2000(paintedOver(labToHex(low), canvas, AUTO_RAMP_DRAWN_OPACITY), bg) < SAME_SHADE_DELTA_E) {
|
|
771
771
|
t += 0.02;
|
|
772
|
-
low = mixLab(bg,
|
|
772
|
+
low = mixLab(bg, A, t);
|
|
773
773
|
}
|
|
774
774
|
const lowHex = labToHex(low);
|
|
775
|
-
let high = { ...
|
|
775
|
+
let high = { ...A };
|
|
776
776
|
let highHex = labToHex(high);
|
|
777
777
|
for (let step = 0; step < 80 && autoRampMinStep(lowHex, highHex, canvas) < AUTO_RAMP_MIN_STEP_DELTA_E; step++) {
|
|
778
778
|
const L2 = Math.max(4, Math.min(98, high.L + (darkCanvas ? 1 : -1)));
|
|
@@ -1226,14 +1226,14 @@ function A3(n) {
|
|
|
1226
1226
|
if (r && i && c3(r) !== i && (r = null), n.city !== void 0 && n.city !== null) {
|
|
1227
1227
|
let a4 = u(String(n.city)), s = O(a4), f4 = s ? F(s, n.mapKind) : null;
|
|
1228
1228
|
if (f4 && f4.length) {
|
|
1229
|
-
let d2 = n.state === void 0 || n.state === null ? "" : String(n.state).trim(),
|
|
1229
|
+
let d2 = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R3 = d2 ? u(d2) : "", g3 = d2 ? Y(d2) : null, S = [], m2 = -1;
|
|
1230
1230
|
for (let c2 of f4) {
|
|
1231
|
-
let l = c2.row,
|
|
1232
|
-
if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) ===
|
|
1231
|
+
let l = c2.row, A = 0;
|
|
1232
|
+
if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) === R3) A++;
|
|
1233
1233
|
else continue;
|
|
1234
|
-
if (i) if (T(l.cc) === i)
|
|
1234
|
+
if (i) if (T(l.cc) === i) A++;
|
|
1235
1235
|
else continue;
|
|
1236
|
-
|
|
1236
|
+
A > m2 ? (m2 = A, S = [c2]) : A === m2 && S.push(c2);
|
|
1237
1237
|
}
|
|
1238
1238
|
S.some((c2) => c2.primary) && (S = S.filter((c2) => c2.primary));
|
|
1239
1239
|
let p2 = /* @__PURE__ */ new Map();
|
|
@@ -1262,26 +1262,26 @@ function A3(n) {
|
|
|
1262
1262
|
var G = { latlon: 0, city: 1, zip3: 2, state: 3, country: 4 };
|
|
1263
1263
|
var x = 8;
|
|
1264
1264
|
function y3(n, e) {
|
|
1265
|
-
let t = new Array(n.length), o = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a4 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(),
|
|
1265
|
+
let t = new Array(n.length), o = new Array(n.length), i = new Array(n.length), r = /* @__PURE__ */ new Set(), a4 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(), R3 = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m2 = 0, p2 = null;
|
|
1266
1266
|
for (let l = 0; l < n.length; ++l) {
|
|
1267
|
-
let
|
|
1268
|
-
if (S3(
|
|
1267
|
+
let A = n[l], C2 = A3({ ...A, mapKind: e });
|
|
1268
|
+
if (S3(C2)) {
|
|
1269
1269
|
t[l] = null, o[l] = null, i[l] = null, m2++;
|
|
1270
|
-
let
|
|
1271
|
-
|
|
1272
|
-
} else if (
|
|
1273
|
-
if (t[l] =
|
|
1274
|
-
let
|
|
1275
|
-
|
|
1270
|
+
let M2 = K(A);
|
|
1271
|
+
M2 && !d2.has(M2.toLowerCase()) && (d2.add(M2.toLowerCase()), R3.length < x && R3.push(M2));
|
|
1272
|
+
} else if (C2) {
|
|
1273
|
+
if (t[l] = C2.lat, o[l] = C2.lon, i[l] = C2.precision, S++, g3[C2.precision]++, (p2 === null || G[C2.precision] > G[p2]) && (p2 = C2.precision), G[C2.precision] > G.city) {
|
|
1274
|
+
let M2 = K(A);
|
|
1275
|
+
M2 && !s.has(M2.toLowerCase()) && (s.add(M2.toLowerCase()), f4.length < x && f4.push(M2));
|
|
1276
1276
|
}
|
|
1277
1277
|
} else {
|
|
1278
1278
|
t[l] = null, o[l] = null, i[l] = null;
|
|
1279
|
-
let
|
|
1280
|
-
|
|
1279
|
+
let M2 = K(A);
|
|
1280
|
+
M2 && !r.has(M2.toLowerCase()) && (r.add(M2.toLowerCase()), a4.push(M2));
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
let c2 = !n3() && n.some((l) => l.city !== null && l.city !== void 0 && String(l.city).trim() !== "");
|
|
1284
|
-
return { lat: t, lon: o, precisions: i, precision: p2, precisionCounts: g3, coarseExamples: f4, unmatched: a4, ambiguousRows: m2, ambiguousExamples:
|
|
1284
|
+
return { lat: t, lon: o, precisions: i, precision: p2, precisionCounts: g3, coarseExamples: f4, unmatched: a4, ambiguousRows: m2, ambiguousExamples: R3, matchedRows: S, totalRows: n.length, ...c2 ? { cityTableMissing: true } : {} };
|
|
1285
1285
|
}
|
|
1286
1286
|
function K(n) {
|
|
1287
1287
|
let e = [n.city, n.state, n.zip, n.country].filter((t) => t != null && String(t).trim() !== "").map((t) => String(t).trim()).join(", ");
|
|
@@ -1422,22 +1422,22 @@ function It(n, s) {
|
|
|
1422
1422
|
return s === "us-zip5" ? w.has(n.slice(0, 3)) : true;
|
|
1423
1423
|
}
|
|
1424
1424
|
function Wt(n, s) {
|
|
1425
|
-
let i = new Array(n.length), r = /* @__PURE__ */ new Set(),
|
|
1426
|
-
for (let
|
|
1427
|
-
let I2 = Mt(n[
|
|
1428
|
-
if (i[
|
|
1425
|
+
let i = new Array(n.length), r = /* @__PURE__ */ new Set(), M2 = [], h3 = 0;
|
|
1426
|
+
for (let N3 = 0; N3 < n.length; ++N3) {
|
|
1427
|
+
let I2 = Mt(n[N3], s), O2 = I2 !== null && It(I2, s) ? I2 : null;
|
|
1428
|
+
if (i[N3] = O2, O2 !== null) h3++;
|
|
1429
1429
|
else {
|
|
1430
|
-
let d2 = n[
|
|
1430
|
+
let d2 = n[N3];
|
|
1431
1431
|
if (d2 != null) {
|
|
1432
1432
|
let p2 = String(d2).trim();
|
|
1433
1433
|
if (p2.length > 0) {
|
|
1434
1434
|
let m2 = p2.toLowerCase();
|
|
1435
|
-
r.has(m2) || (r.add(m2),
|
|
1435
|
+
r.has(m2) || (r.add(m2), M2.push(p2));
|
|
1436
1436
|
}
|
|
1437
1437
|
}
|
|
1438
1438
|
}
|
|
1439
1439
|
}
|
|
1440
|
-
return { iso: i, unmatched:
|
|
1440
|
+
return { iso: i, unmatched: M2, matchedRows: h3, totalRows: n.length };
|
|
1441
1441
|
}
|
|
1442
1442
|
|
|
1443
1443
|
// ../shape-core/dist/chunk-SV3JH46V.mjs
|
|
@@ -1544,148 +1544,149 @@ function Yt(n, e) {
|
|
|
1544
1544
|
|
|
1545
1545
|
// ../shape-core/dist/index.mjs
|
|
1546
1546
|
/*! @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. */
|
|
1547
|
-
var
|
|
1548
|
-
var
|
|
1549
|
-
function
|
|
1550
|
-
return !!E(
|
|
1551
|
-
}
|
|
1552
|
-
function
|
|
1553
|
-
let
|
|
1554
|
-
for (let
|
|
1555
|
-
if (
|
|
1556
|
-
let s = u(String(
|
|
1557
|
-
if (!V(s) && !
|
|
1558
|
-
}
|
|
1559
|
-
return Array.from(
|
|
1560
|
-
}
|
|
1561
|
-
function
|
|
1562
|
-
let
|
|
1563
|
-
if (
|
|
1564
|
-
let
|
|
1565
|
-
return
|
|
1566
|
-
}
|
|
1567
|
-
function W2(
|
|
1568
|
-
if (!Y(
|
|
1569
|
-
let
|
|
1570
|
-
return
|
|
1571
|
-
}
|
|
1572
|
-
function
|
|
1573
|
-
let
|
|
1574
|
-
if (
|
|
1575
|
-
let
|
|
1576
|
-
for (let s of
|
|
1577
|
-
return Math.round(
|
|
1547
|
+
var N2 = 2;
|
|
1548
|
+
var j2 = 400;
|
|
1549
|
+
function D3(o) {
|
|
1550
|
+
return !!E(o);
|
|
1551
|
+
}
|
|
1552
|
+
function C(o) {
|
|
1553
|
+
let e = /* @__PURE__ */ new Set();
|
|
1554
|
+
for (let n of o) {
|
|
1555
|
+
if (n == null) continue;
|
|
1556
|
+
let s = u(String(n));
|
|
1557
|
+
if (!V(s) && !e.has(s) && (e.add(s), e.size >= j2)) break;
|
|
1558
|
+
}
|
|
1559
|
+
return Array.from(e);
|
|
1560
|
+
}
|
|
1561
|
+
function R2(o) {
|
|
1562
|
+
let e = C(o);
|
|
1563
|
+
if (e.length === 0 || $3(o) < 95) return false;
|
|
1564
|
+
let n = e.filter((u2) => D3(u2) && !Y(u2)).length, s = e.filter((u2) => !D3(u2) && !!Y(u2)).length;
|
|
1565
|
+
return n >= 1 && n >= s;
|
|
1566
|
+
}
|
|
1567
|
+
function W2(o, e) {
|
|
1568
|
+
if (!Y(o)) return false;
|
|
1569
|
+
let n = E(o);
|
|
1570
|
+
return n ? e === "world" ? true : s3.has(n) : false;
|
|
1571
|
+
}
|
|
1572
|
+
function $3(o) {
|
|
1573
|
+
let e = C(o);
|
|
1574
|
+
if (e.length === 0) return 0;
|
|
1575
|
+
let n = 0;
|
|
1576
|
+
for (let s of e) D3(s) && n++;
|
|
1577
|
+
return Math.round(n / e.length * 1e3) / 10;
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1580
|
-
let
|
|
1581
|
-
if (
|
|
1582
|
-
let
|
|
1583
|
-
for (let s of
|
|
1584
|
-
return Math.round(
|
|
1579
|
+
function w2(o) {
|
|
1580
|
+
let e = C(o);
|
|
1581
|
+
if (e.length === 0) return 0;
|
|
1582
|
+
let n = 0;
|
|
1583
|
+
for (let s of e) Y(s) && n++;
|
|
1584
|
+
return Math.round(n / e.length * 1e3) / 10;
|
|
1585
1585
|
}
|
|
1586
|
-
function F3(
|
|
1587
|
-
let
|
|
1588
|
-
for (let
|
|
1589
|
-
if (
|
|
1590
|
-
let s = String(
|
|
1591
|
-
if (!V(u(s)) && !
|
|
1586
|
+
function F3(o) {
|
|
1587
|
+
let e = /* @__PURE__ */ new Set();
|
|
1588
|
+
for (let n of o) {
|
|
1589
|
+
if (n == null) continue;
|
|
1590
|
+
let s = String(n).trim();
|
|
1591
|
+
if (!V(u(s)) && !e.has(s) && (e.add(s), e.size >= j2)) break;
|
|
1592
1592
|
}
|
|
1593
|
-
return Array.from(
|
|
1593
|
+
return Array.from(e);
|
|
1594
1594
|
}
|
|
1595
|
-
function
|
|
1596
|
-
let
|
|
1597
|
-
if (
|
|
1598
|
-
let
|
|
1599
|
-
for (let s of
|
|
1600
|
-
return Math.round(
|
|
1595
|
+
function G2(o) {
|
|
1596
|
+
let e = F3(o);
|
|
1597
|
+
if (e.length === 0) return 0;
|
|
1598
|
+
let n = 0;
|
|
1599
|
+
for (let s of e) Z(s).length > 0 && n++;
|
|
1600
|
+
return Math.round(n / e.length * 1e3) / 10;
|
|
1601
1601
|
}
|
|
1602
|
-
function q3(
|
|
1603
|
-
return y2(
|
|
1602
|
+
function q3(o, e) {
|
|
1603
|
+
return y2(e, rt) ? true : F3(o).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
|
|
1604
1604
|
}
|
|
1605
|
-
function
|
|
1606
|
-
let
|
|
1607
|
-
if (
|
|
1605
|
+
function de(o, e) {
|
|
1606
|
+
let n = C(o);
|
|
1607
|
+
if (n.length === 0) return 0;
|
|
1608
1608
|
let s = 0;
|
|
1609
|
-
for (let
|
|
1610
|
-
return Math.round(s /
|
|
1609
|
+
for (let u2 of n) p3(u2, e) && s++;
|
|
1610
|
+
return Math.round(s / n.length * 1e3) / 10;
|
|
1611
1611
|
}
|
|
1612
|
-
function
|
|
1613
|
-
let
|
|
1614
|
-
for (let s of
|
|
1615
|
-
return
|
|
1612
|
+
function z2(o, e) {
|
|
1613
|
+
let n = 0;
|
|
1614
|
+
for (let s of C(o)) e(s) && n++;
|
|
1615
|
+
return n;
|
|
1616
1616
|
}
|
|
1617
|
-
function
|
|
1618
|
-
let
|
|
1619
|
-
for (let s of F3(
|
|
1620
|
-
return
|
|
1617
|
+
function pe(o, e) {
|
|
1618
|
+
let n = 0;
|
|
1619
|
+
for (let s of F3(o)) e(s) && n++;
|
|
1620
|
+
return n;
|
|
1621
1621
|
}
|
|
1622
|
-
function
|
|
1623
|
-
let
|
|
1622
|
+
function ge(o, e, n, s, u2) {
|
|
1623
|
+
let b4 = [], c2 = [], r = {}, I2 = {}, M2 = new Set(o), l = (t) => e.map((i) => i[t]);
|
|
1624
1624
|
for (let t of ["city", "country"]) {
|
|
1625
|
-
let i =
|
|
1626
|
-
i &&
|
|
1625
|
+
let i = n?.[t];
|
|
1626
|
+
i && M2.has(i) && (r[t] = i);
|
|
1627
1627
|
}
|
|
1628
|
-
let
|
|
1628
|
+
let Y2 = new Set(u2 ?? o);
|
|
1629
1629
|
for (let t of ["lat", "lon"]) {
|
|
1630
|
-
let i =
|
|
1631
|
-
i &&
|
|
1630
|
+
let i = n?.[t];
|
|
1631
|
+
i && Y2.has(i) && (r[t] = i);
|
|
1632
1632
|
}
|
|
1633
|
-
let
|
|
1634
|
-
if (
|
|
1635
|
-
let t = l(
|
|
1636
|
-
i < 95 ?
|
|
1633
|
+
let g3 = n?.zip;
|
|
1634
|
+
if (g3 && M2.has(g3)) {
|
|
1635
|
+
let t = l(g3), i = G2(t);
|
|
1636
|
+
i < 95 ? c2.push(`zip=${g3} (only ${i}% of values read as ZIPs)`) : q3(t, g3) ? r.zip = g3 : c2.push(`zip=${g3} (all values are 3-4 digits with nothing to say they are postal)`);
|
|
1637
1637
|
}
|
|
1638
|
-
let
|
|
1639
|
-
if (
|
|
1640
|
-
let t = l(
|
|
1641
|
-
i.length > 0 && i.every((a4) => W2(a4, s)) ?
|
|
1638
|
+
let d2 = n?.state;
|
|
1639
|
+
if (d2 && M2.has(d2)) {
|
|
1640
|
+
let t = l(d2), i = C(t);
|
|
1641
|
+
i.length > 0 && i.every((a4) => W2(a4, s)) ? c2.push(`state=${d2} (every value is "CA", which is both Canada and California)`) : R2(t) ? (c2.push(`state=${d2} (every value is a country, not a state)`), r.country || (r.country = d2)) : w2(t) < 95 ? c2.push(`state=${d2} (only ${w2(t)}% of values are states/provinces)`) : r.state = d2;
|
|
1642
1642
|
}
|
|
1643
|
-
let
|
|
1644
|
-
if (!
|
|
1643
|
+
let m2 = new Set(Object.values(r).filter(Boolean)), S = o.filter((t) => !m2.has(t) && !t.startsWith("__"));
|
|
1644
|
+
if (!r.state) {
|
|
1645
1645
|
let t = null;
|
|
1646
|
-
for (let i of
|
|
1646
|
+
for (let i of S) {
|
|
1647
1647
|
let a4 = l(i);
|
|
1648
|
-
if (
|
|
1649
|
-
let f4 =
|
|
1648
|
+
if (R2(a4)) continue;
|
|
1649
|
+
let f4 = w2(a4);
|
|
1650
1650
|
if (f4 < 95) continue;
|
|
1651
|
-
let
|
|
1652
|
-
|
|
1651
|
+
let O2 = z2(a4, (A) => !!Y(A)), Q2 = z2(a4, (A) => !!Y(A) && !W2(A, s));
|
|
1652
|
+
O2 < N2 && Q2 < 1 || (!t || f4 > t.pct) && (t = { name: i, pct: f4 });
|
|
1653
1653
|
}
|
|
1654
|
-
t && (
|
|
1654
|
+
t && (r.state = t.name, m2.add(t.name), b4.push(`state=${t.name} (${t.pct}% states/provinces)`));
|
|
1655
1655
|
}
|
|
1656
|
-
if (!
|
|
1657
|
-
if (
|
|
1658
|
-
let i = l(t), a4 =
|
|
1659
|
-
if (!(a4 < 95) && q3(i, t) && !(
|
|
1660
|
-
|
|
1656
|
+
if (!r.zip) for (let t of S) {
|
|
1657
|
+
if (m2.has(t)) continue;
|
|
1658
|
+
let i = l(t), a4 = G2(i);
|
|
1659
|
+
if (!(a4 < 95) && q3(i, t) && !(pe(i, (f4) => Z(f4).length > 0) < N2)) {
|
|
1660
|
+
r.zip = t, m2.add(t), b4.push(`zip=${t} (${a4}% ZIP codes)`);
|
|
1661
1661
|
break;
|
|
1662
1662
|
}
|
|
1663
1663
|
}
|
|
1664
|
-
let h3 =
|
|
1665
|
-
if (!h3 || !
|
|
1664
|
+
let h3 = r.country;
|
|
1665
|
+
if (!h3 || !R2(l(h3))) {
|
|
1666
1666
|
let t = null;
|
|
1667
|
-
for (let i of
|
|
1668
|
-
if (
|
|
1669
|
-
let a4 =
|
|
1667
|
+
for (let i of S) {
|
|
1668
|
+
if (m2.has(i) || !R2(l(i))) continue;
|
|
1669
|
+
let a4 = $3(l(i));
|
|
1670
1670
|
(!t || a4 > t.pct) && (t = { name: i, pct: a4 });
|
|
1671
1671
|
}
|
|
1672
|
-
t && (h3 && (
|
|
1672
|
+
t && (h3 && (c2.push(`country=${h3} (only ${$3(l(h3))}% of values are country identifiers; using ${t.name} instead)`), I2.country = h3), r.country = t.name, m2.add(t.name), b4.push(`country=${t.name}`));
|
|
1673
1673
|
}
|
|
1674
|
-
if (!
|
|
1674
|
+
if (!r.city) {
|
|
1675
1675
|
let t = null;
|
|
1676
|
-
for (let i of
|
|
1677
|
-
if (
|
|
1678
|
-
let a4 = l(i), f4 =
|
|
1679
|
-
f4 < m3 ||
|
|
1676
|
+
for (let i of S) {
|
|
1677
|
+
if (m2.has(i)) continue;
|
|
1678
|
+
let a4 = l(i), f4 = de(a4, s);
|
|
1679
|
+
f4 < m3 || z2(a4, (O2) => p3(O2, s)) < N2 || (!t || f4 > t.pct) && (t = { name: i, pct: f4 });
|
|
1680
1680
|
}
|
|
1681
|
-
t && (
|
|
1681
|
+
t && (r.city = t.name, b4.push(`city=${t.name} (${t.pct}% known cities)`));
|
|
1682
1682
|
}
|
|
1683
|
-
let
|
|
1684
|
-
let i = +String(t[
|
|
1685
|
-
return isFinite(i) && isFinite(a4) && i >= -90 && i <= 90 && a4 >= -180 && a4 <= 180 && String(t[
|
|
1683
|
+
let K2 = r.country ? l(r.country) : [], E2 = !!r.country && R2(K2), J2 = E2 ? new Set(K2.map((t) => E(t == null ? null : String(t))).filter(Boolean)).size : 0, H2 = E2 && J2 >= 2, v2 = !!(r.lat && r.lon) && e.some((t) => {
|
|
1684
|
+
let i = +String(t[r.lat] ?? "").trim(), a4 = +String(t[r.lon] ?? "").trim();
|
|
1685
|
+
return isFinite(i) && isFinite(a4) && i >= -90 && i <= 90 && a4 >= -180 && a4 <= 180 && String(t[r.lat] ?? "").trim() !== "" && String(t[r.lon] ?? "").trim() !== "";
|
|
1686
1686
|
});
|
|
1687
|
-
return
|
|
1687
|
+
return r.lat && r.lon && !v2 && c2.push(`lat/lon=${r.lat}/${r.lon} (no row holds a usable coordinate pair)`), r.country && !H2 && !(r.city || r.state || r.zip || v2) && c2.push(E2 ? `country=${r.country} (every row resolves to the same country - nothing to place apart)` : `country=${r.country} (values are not country identifiers)`), { bind: !!(r.city || r.state || r.zip || H2 || v2) ? r : null, backfilled: b4, refused: c2, ...Object.keys(I2).length ? { labelFallback: I2 } : {} };
|
|
1688
1688
|
}
|
|
1689
|
+
var he = 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("|"));
|
|
1689
1690
|
|
|
1690
1691
|
// src/payload.ts
|
|
1691
1692
|
function resolvePointChannel(cols, rowObjs, point) {
|
|
@@ -1699,7 +1700,7 @@ function resolvePointChannel(cols, rowObjs, point) {
|
|
|
1699
1700
|
let labelCol;
|
|
1700
1701
|
if (bind) {
|
|
1701
1702
|
const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
|
|
1702
|
-
const res =
|
|
1703
|
+
const res = ge(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
|
|
1703
1704
|
bind = res.bind;
|
|
1704
1705
|
rolesBackfilled = res.backfilled;
|
|
1705
1706
|
rolesRefused = res.refused;
|
|
@@ -1856,9 +1857,9 @@ function createMarkResolver(env) {
|
|
|
1856
1857
|
const m2 = el.getScreenCTM();
|
|
1857
1858
|
if (!m2) return Number.MAX_VALUE;
|
|
1858
1859
|
let best = Number.MAX_VALUE;
|
|
1859
|
-
const
|
|
1860
|
-
for (let i = 0; i <=
|
|
1861
|
-
const pt = el.getPointAtLength(L2 * i /
|
|
1860
|
+
const N3 = 64;
|
|
1861
|
+
for (let i = 0; i <= N3; i++) {
|
|
1862
|
+
const pt = el.getPointAtLength(L2 * i / N3);
|
|
1862
1863
|
const dx = m2.a * pt.x + m2.c * pt.y + m2.e - x3;
|
|
1863
1864
|
const dy = m2.b * pt.x + m2.d * pt.y + m2.f - y5;
|
|
1864
1865
|
const d2 = dx * dx + dy * dy;
|
|
@@ -2140,13 +2141,13 @@ function censusHitBands(container, doc) {
|
|
|
2140
2141
|
if (!OPEN_TAGS.has(tag)) continue;
|
|
2141
2142
|
const cs = styleOf2(el, ownerDoc);
|
|
2142
2143
|
const open = isUnfilled(attrOrComputed(el, "fill", cs));
|
|
2143
|
-
const
|
|
2144
|
+
const w3 = widthPx(attrOrComputed(el, "stroke-width", cs) || "1");
|
|
2144
2145
|
const geom = String(el.getAttribute?.("d") ?? "") || `${tag}#${String(el.getAttribute?.(ROW_IDX_ATTR) ?? "")}`;
|
|
2145
2146
|
const inert = String(cs?.pointerEvents ?? el.style?.pointerEvents ?? "") === "none";
|
|
2146
|
-
rows.push({ el, geom, w:
|
|
2147
|
-
if (isFinite(
|
|
2147
|
+
rows.push({ el, geom, w: w3, open, inert });
|
|
2148
|
+
if (isFinite(w3)) {
|
|
2148
2149
|
const prev = widestByGeom.get(geom);
|
|
2149
|
-
if (prev === void 0 ||
|
|
2150
|
+
if (prev === void 0 || w3 > prev) widestByGeom.set(geom, w3);
|
|
2150
2151
|
}
|
|
2151
2152
|
}
|
|
2152
2153
|
const out = { ...EMPTY3 };
|
|
@@ -2265,8 +2266,8 @@ function censusValuePlacement(container, data) {
|
|
|
2265
2266
|
const fit = 1 - ssRes / ssTot;
|
|
2266
2267
|
if (fit >= VALUE_AXIS_MIN_FIT && (!best || fit > best.fit)) {
|
|
2267
2268
|
const full = new Array(dots.length).fill(NaN);
|
|
2268
|
-
keep.forEach((k2,
|
|
2269
|
-
full[k2] = res[
|
|
2269
|
+
keep.forEach((k2, j3) => {
|
|
2270
|
+
full[k2] = res[j3];
|
|
2270
2271
|
});
|
|
2271
2272
|
best = { col: c2, axis, fit, res: full, log };
|
|
2272
2273
|
}
|
|
@@ -2317,12 +2318,12 @@ function contentExtentOf(boxes) {
|
|
|
2317
2318
|
if (usable.length === 0) return { w: 0, h: 0, source: "none" };
|
|
2318
2319
|
const inFlow = usable.filter((b4) => !b4.floating);
|
|
2319
2320
|
const counted = inFlow.length > 0 ? inFlow : usable;
|
|
2320
|
-
let
|
|
2321
|
+
let w3 = 0, h3 = 0;
|
|
2321
2322
|
for (const b4 of counted) {
|
|
2322
|
-
if (b4.right >
|
|
2323
|
+
if (b4.right > w3) w3 = b4.right;
|
|
2323
2324
|
if (b4.bottom > h3) h3 = b4.bottom;
|
|
2324
2325
|
}
|
|
2325
|
-
return { w:
|
|
2326
|
+
return { w: w3, h: h3, source: inFlow.length > 0 ? "in-flow" : "all-floating" };
|
|
2326
2327
|
}
|
|
2327
2328
|
function scrollFitFor(contentW, contentH, viewportW, viewportH, slackPx = SCROLL_SLACK_PX) {
|
|
2328
2329
|
return {
|
|
@@ -2332,8 +2333,8 @@ function scrollFitFor(contentW, contentH, viewportW, viewportH, slackPx = SCROLL
|
|
|
2332
2333
|
}
|
|
2333
2334
|
var FIT_CONTENT_SELECTOR = "text, .d3-mark, .d3-legend-mark";
|
|
2334
2335
|
var PHANTOM_FRACTION = 0.95;
|
|
2335
|
-
function isPhantomBox(
|
|
2336
|
-
return
|
|
2336
|
+
function isPhantomBox(w3, h3, refW, refH) {
|
|
2337
|
+
return w3 > refW * PHANTOM_FRACTION || h3 > refH * PHANTOM_FRACTION;
|
|
2337
2338
|
}
|
|
2338
2339
|
var MAX_FRAME_GROW_FACTOR = 20;
|
|
2339
2340
|
function planFrameGrow(inkBottomPx, elHeightPx, viewBoxH, ctmScale, slackPx = SCROLL_SLACK_PX, maxFactor = MAX_FRAME_GROW_FACTOR) {
|
|
@@ -2905,10 +2906,10 @@ function glyphSampleGrid(box, n = GLYPH_SAMPLE_N) {
|
|
|
2905
2906
|
if (!box || !(box.width > 0) || !(box.height > 0) || !(n >= 1)) return out;
|
|
2906
2907
|
const k2 = Math.floor(n);
|
|
2907
2908
|
for (let i = 0; i < k2; i++) {
|
|
2908
|
-
for (let
|
|
2909
|
+
for (let j3 = 0; j3 < k2; j3++) {
|
|
2909
2910
|
out.push({
|
|
2910
2911
|
x: box.left + box.width * (i + 0.5) / k2,
|
|
2911
|
-
y: box.top + box.height * (
|
|
2912
|
+
y: box.top + box.height * (j3 + 0.5) / k2
|
|
2912
2913
|
});
|
|
2913
2914
|
}
|
|
2914
2915
|
}
|
|
@@ -2929,10 +2930,10 @@ var LABEL_CONTRAST_CAP = 2e3;
|
|
|
2929
2930
|
var EMPTY5 = { rects: 0, scanned: 0, fixed: 0, pillsBoosted: 0, offFill: 0, pageMajority: 0, paintedOver: 0 };
|
|
2930
2931
|
function backedSamples(el, pts) {
|
|
2931
2932
|
try {
|
|
2932
|
-
const
|
|
2933
|
-
if (typeof
|
|
2934
|
-
const m2 =
|
|
2935
|
-
const svg =
|
|
2933
|
+
const ge2 = el;
|
|
2934
|
+
if (typeof ge2.isPointInFill !== "function" || typeof ge2.getScreenCTM !== "function") return null;
|
|
2935
|
+
const m2 = ge2.getScreenCTM();
|
|
2936
|
+
const svg = ge2.ownerSVGElement;
|
|
2936
2937
|
if (!m2 || !svg || typeof svg.createSVGPoint !== "function") return null;
|
|
2937
2938
|
if (pts.length === 0) return null;
|
|
2938
2939
|
const inv = m2.inverse();
|
|
@@ -2941,7 +2942,7 @@ function backedSamples(el, pts) {
|
|
|
2941
2942
|
const p2 = svg.createSVGPoint();
|
|
2942
2943
|
p2.x = pts[i].x;
|
|
2943
2944
|
p2.y = pts[i].y;
|
|
2944
|
-
hit.push(
|
|
2945
|
+
hit.push(ge2.isPointInFill(p2.matrixTransform(inv)));
|
|
2945
2946
|
}
|
|
2946
2947
|
return hit;
|
|
2947
2948
|
} catch {
|
package/dist/index.mjs
CHANGED
package/dist/react.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.111",
|
|
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",
|