@bicharts/chart-host 0.6.44 → 0.6.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -211,7 +211,7 @@ var require_papaparse_min = __commonJS({
211
211
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
212
212
  }
213
213
  function E4(C2) {
214
- var S2 = (C2 = C2 || {}).delimiter, O3 = C2.newline, x3 = C2.comments, I4 = C2.step, A2 = C2.preview, T2 = C2.fastMode, D2 = null, L4 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F4;
214
+ var S2 = (C2 = C2 || {}).delimiter, O3 = C2.newline, x3 = C2.comments, I4 = C2.step, A4 = C2.preview, T2 = C2.fastMode, D2 = null, L4 = false, F4 = null == C2.quoteChar ? '"' : C2.quoteChar, j3 = F4;
215
215
  if (void 0 !== C2.escapeChar && (j3 = C2.escapeChar), ("string" != typeof S2 || -1 < v2.BAD_DELIMITERS.indexOf(S2)) && (S2 = ","), x3 === S2) throw new Error("Comment character same as delimiter");
216
216
  true === x3 ? x3 = "#" : ("string" != typeof x3 || -1 < v2.BAD_DELIMITERS.indexOf(x3)) && (x3 = false), "\n" !== O3 && "\r" !== O3 && "\r\n" !== O3 && (O3 = "\n");
217
217
  var z4 = 0, M2 = false;
@@ -227,7 +227,7 @@ var require_papaparse_min = __commonJS({
227
227
  if (o4) {
228
228
  if (h4 = [], k3(d3.split(S2)), R2(), M2) return w2();
229
229
  } else k3(d3.split(S2));
230
- if (A2 && A2 <= c4) return h4 = h4.slice(0, A2), w2(true);
230
+ if (A4 && A4 <= c4) return h4 = h4.slice(0, A4), w2(true);
231
231
  }
232
232
  }
233
233
  return w2();
@@ -246,7 +246,7 @@ var require_papaparse_min = __commonJS({
246
246
  y5 = v3(g4);
247
247
  if (i2.substring(m4 + 1 + y5, m4 + 1 + y5 + s2) === O3) {
248
248
  if (d3.push(i2.substring(z4, m4).replace(_4, F4)), b5(m4 + 1 + y5 + s2), p4 = i2.indexOf(S2, z4), m4 = i2.indexOf(F4, z4), o4 && (R2(), M2)) return w2();
249
- if (A2 && h4.length >= A2) return w2(true);
249
+ if (A4 && h4.length >= A4) return w2(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: z4 }), m4++;
@@ -259,7 +259,7 @@ var require_papaparse_min = __commonJS({
259
259
  else {
260
260
  if (-1 === g4) break;
261
261
  if (d3.push(i2.substring(z4, g4)), b5(g4 + s2), o4 && (R2(), M2)) return w2();
262
- if (A2 && h4.length >= A2) return w2(true);
262
+ if (A4 && h4.length >= A4) return w2(true);
263
263
  }
264
264
  return E5();
265
265
  function k3(e2) {
@@ -509,10 +509,10 @@ function f(t) {
509
509
  }
510
510
  function rgbToLab(r2, g3, b4) {
511
511
  const R2 = linearise(r2), G3 = linearise(g3), B3 = linearise(b4);
512
- const X4 = 0.4124564 * R2 + 0.3575761 * G3 + 0.1804375 * B3;
512
+ const X3 = 0.4124564 * R2 + 0.3575761 * G3 + 0.1804375 * B3;
513
513
  const Y3 = 0.2126729 * R2 + 0.7151522 * G3 + 0.072175 * B3;
514
514
  const Z5 = 0.0193339 * R2 + 0.119192 * G3 + 0.9503041 * B3;
515
- const fx = f(X4 / Xn), fy = f(Y3 / Yn), fz = f(Z5 / Zn);
515
+ const fx = f(X3 / Xn), fy = f(Y3 / Yn), fz = f(Z5 / Zn);
516
516
  return { L: 116 * fy - 16, a: 500 * (fx - fy), b: 200 * (fy - fz) };
517
517
  }
518
518
  function hexToLab(hex2) {
@@ -567,13 +567,13 @@ function labToHex(lab) {
567
567
  return t32 > EPS ? t32 : (116 * t - 16) / KAPPA;
568
568
  };
569
569
  const fy = (lab.L + 16) / 116, fx = fy + lab.a / 500, fz = fy - lab.b / 200;
570
- const X4 = Xn * finv(fx);
570
+ const X3 = Xn * finv(fx);
571
571
  const Y3 = Yn * (lab.L > KAPPA * EPS ? fy * fy * fy : lab.L / KAPPA);
572
572
  const Z5 = Zn * finv(fz);
573
573
  const lin = [
574
- 3.2404542 * X4 - 1.5371385 * Y3 - 0.4985314 * Z5,
575
- -0.969266 * X4 + 1.8760108 * Y3 + 0.041556 * Z5,
576
- 0.0556434 * X4 - 0.2040259 * Y3 + 1.0572252 * Z5
574
+ 3.2404542 * X3 - 1.5371385 * Y3 - 0.4985314 * Z5,
575
+ -0.969266 * X3 + 1.8760108 * Y3 + 0.041556 * Z5,
576
+ 0.0556434 * X3 - 0.2040259 * Y3 + 1.0572252 * Z5
577
577
  ];
578
578
  return "#" + lin.map((v2) => {
579
579
  const c2 = Math.max(0, Math.min(1, v2));
@@ -773,15 +773,15 @@ function resolveAutoColorScale(p2) {
773
773
  };
774
774
  const candidates = p2.isHighContrast ? [normHex(p2.themeAccent), normHex(p2.themeFg)] : [...palette.map(normHex), normHex(p2.themeAccent), normHex(p2.themeFg)];
775
775
  const accent = candidates.find(usable) ?? FALLBACK_ACCENT;
776
- const A2 = hexToLab(accent);
776
+ const A4 = hexToLab(accent);
777
777
  let t = 0.1;
778
- let low = mixLab(bg, A2, t);
778
+ let low = mixLab(bg, A4, t);
779
779
  while (t < 0.6 && deltaE2000(paintedOver(labToHex(low), canvas, AUTO_RAMP_DRAWN_OPACITY), bg) < SAME_SHADE_DELTA_E) {
780
780
  t += 0.02;
781
- low = mixLab(bg, A2, t);
781
+ low = mixLab(bg, A4, t);
782
782
  }
783
783
  const lowHex = labToHex(low);
784
- let high = { ...A2 };
784
+ let high = { ...A4 };
785
785
  let highHex = labToHex(high);
786
786
  for (let step = 0; step < 80 && autoRampMinStep(lowHex, highHex, canvas) < AUTO_RAMP_MIN_STEP_DELTA_E; step++) {
787
787
  const L4 = Math.max(4, Math.min(98, high.L + (darkCanvas ? 1 : -1)));
@@ -1240,12 +1240,12 @@ function A3(n) {
1240
1240
  if (f4 && f4.length) {
1241
1241
  let d2 = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R2 = d2 ? u(d2) : "", g3 = d2 ? Y(d2) : null, S2 = [], m2 = -1;
1242
1242
  for (let c2 of f4) {
1243
- let l = c2.row, A2 = 0;
1244
- if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) === R2) A2++;
1243
+ let l = c2.row, A4 = 0;
1244
+ if (d2 && l.a1 !== "") if (g3 && l.a1 === g3 || u(l.a1) === R2) A4++;
1245
1245
  else continue;
1246
- if (i) if (T(l.cc) === i) A2++;
1246
+ if (i) if (T(l.cc) === i) A4++;
1247
1247
  else continue;
1248
- A2 > m2 ? (m2 = A2, S2 = [c2]) : A2 === m2 && S2.push(c2);
1248
+ A4 > m2 ? (m2 = A4, S2 = [c2]) : A4 === m2 && S2.push(c2);
1249
1249
  }
1250
1250
  S2.some((c2) => c2.primary) && (S2 = S2.filter((c2) => c2.primary));
1251
1251
  let p2 = /* @__PURE__ */ new Map();
@@ -1276,19 +1276,19 @@ var x = 8;
1276
1276
  function y3(n, e) {
1277
1277
  let t = new Array(n.length), o2 = new Array(n.length), i = new Array(n.length), r2 = /* @__PURE__ */ new Set(), a2 = [], s = /* @__PURE__ */ new Set(), f4 = [], d2 = /* @__PURE__ */ new Set(), R2 = [], g3 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S2 = 0, m2 = 0, p2 = null;
1278
1278
  for (let l = 0; l < n.length; ++l) {
1279
- let A2 = n[l], C2 = A3({ ...A2, mapKind: e });
1279
+ let A4 = n[l], C2 = A3({ ...A4, mapKind: e });
1280
1280
  if (S3(C2)) {
1281
1281
  t[l] = null, o2[l] = null, i[l] = null, m2++;
1282
- let M2 = K(A2);
1282
+ let M2 = K(A4);
1283
1283
  M2 && !d2.has(M2.toLowerCase()) && (d2.add(M2.toLowerCase()), R2.length < x && R2.push(M2));
1284
1284
  } else if (C2) {
1285
1285
  if (t[l] = C2.lat, o2[l] = C2.lon, i[l] = C2.precision, S2++, g3[C2.precision]++, (p2 === null || G[C2.precision] > G[p2]) && (p2 = C2.precision), G[C2.precision] > G.city) {
1286
- let M2 = K(A2);
1286
+ let M2 = K(A4);
1287
1287
  M2 && !s.has(M2.toLowerCase()) && (s.add(M2.toLowerCase()), f4.length < x && f4.push(M2));
1288
1288
  }
1289
1289
  } else {
1290
1290
  t[l] = null, o2[l] = null, i[l] = null;
1291
- let M2 = K(A2);
1291
+ let M2 = K(A4);
1292
1292
  M2 && !r2.has(M2.toLowerCase()) && (r2.add(M2.toLowerCase()), a2.push(M2));
1293
1293
  }
1294
1294
  }
@@ -1464,11 +1464,11 @@ function It(n, s) {
1464
1464
  }
1465
1465
  function Wt(n, s) {
1466
1466
  let i = new Array(n.length), r2 = /* @__PURE__ */ new Set(), M2 = [], h3 = 0;
1467
- for (let N3 = 0; N3 < n.length; ++N3) {
1468
- let I4 = Mt(n[N3], s), O3 = I4 !== null && It(I4, s) ? I4 : null;
1469
- if (i[N3] = O3, O3 !== null) h3++;
1467
+ for (let N2 = 0; N2 < n.length; ++N2) {
1468
+ let I4 = Mt(n[N2], s), O3 = I4 !== null && It(I4, s) ? I4 : null;
1469
+ if (i[N2] = O3, O3 !== null) h3++;
1470
1470
  else {
1471
- let d2 = n[N3];
1471
+ let d2 = n[N2];
1472
1472
  if (d2 != null) {
1473
1473
  let p2 = String(d2).trim();
1474
1474
  if (p2.length > 0) {
@@ -1585,9 +1585,9 @@ var Yt = new RegExp([String.raw`\bisMeasure\b`, String.raw`\bdataType\b`, String
1585
1585
 
1586
1586
  // ../shape-core/dist/index.mjs
1587
1587
  /*! @bicharts/shape-core — Apache-2.0. Bundled reference data: GeoNames (https://www.geonames.org/) CC BY 4.0; US Census/TIGER (public domain). Full text: NOTICE in this package. */
1588
- var X3 = 2;
1589
- var de = 400;
1590
- function Z4(t) {
1588
+ var Z4 = 2;
1589
+ var me2 = 400;
1590
+ function ee3(t) {
1591
1591
  return !!E(t);
1592
1592
  }
1593
1593
  function F3(t) {
@@ -1595,26 +1595,26 @@ function F3(t) {
1595
1595
  for (let n of t) {
1596
1596
  if (n == null) continue;
1597
1597
  let o2 = u(String(n));
1598
- if (!V(o2) && !e.has(o2) && (e.add(o2), e.size >= de)) break;
1598
+ if (!V(o2) && !e.has(o2) && (e.add(o2), e.size >= me2)) break;
1599
1599
  }
1600
1600
  return Array.from(e);
1601
1601
  }
1602
- function N2(t) {
1602
+ function A2(t) {
1603
1603
  let e = F3(t);
1604
- if (e.length === 0 || ee3(t) < 95) return false;
1605
- let n = e.filter((u2) => Z4(u2) && !Y(u2)).length, o2 = e.filter((u2) => !Z4(u2) && !!Y(u2)).length;
1604
+ if (e.length === 0 || te(t) < 95) return false;
1605
+ let n = e.filter((u2) => ee3(u2) && !Y(u2)).length, o2 = e.filter((u2) => !ee3(u2) && !!Y(u2)).length;
1606
1606
  return n >= 1 && n >= o2;
1607
1607
  }
1608
- function ue2(t, e) {
1608
+ function ce3(t, e) {
1609
1609
  if (!Y(t)) return false;
1610
1610
  let n = E(t);
1611
1611
  return n ? e === "world" ? true : s3.has(n) : false;
1612
1612
  }
1613
- function ee3(t) {
1613
+ function te(t) {
1614
1614
  let e = F3(t);
1615
1615
  if (e.length === 0) return 0;
1616
1616
  let n = 0;
1617
- for (let o2 of e) Z4(o2) && n++;
1617
+ for (let o2 of e) ee3(o2) && n++;
1618
1618
  return Math.round(n / e.length * 1e3) / 10;
1619
1619
  }
1620
1620
  function z3(t) {
@@ -1624,26 +1624,26 @@ function z3(t) {
1624
1624
  for (let o2 of e) Y(o2) && n++;
1625
1625
  return Math.round(n / e.length * 1e3) / 10;
1626
1626
  }
1627
- function ne2(t) {
1627
+ function re2(t) {
1628
1628
  let e = /* @__PURE__ */ new Set();
1629
1629
  for (let n of t) {
1630
1630
  if (n == null) continue;
1631
1631
  let o2 = String(n).trim();
1632
- if (!V(u(o2)) && !e.has(o2) && (e.add(o2), e.size >= de)) break;
1632
+ if (!V(u(o2)) && !e.has(o2) && (e.add(o2), e.size >= me2)) break;
1633
1633
  }
1634
1634
  return Array.from(e);
1635
1635
  }
1636
- function te(t) {
1637
- let e = ne2(t);
1636
+ function ne2(t) {
1637
+ let e = re2(t);
1638
1638
  if (e.length === 0) return 0;
1639
1639
  let n = 0;
1640
1640
  for (let o2 of e) Z(o2).length > 0 && n++;
1641
1641
  return Math.round(n / e.length * 1e3) / 10;
1642
1642
  }
1643
- function ce3(t, e) {
1644
- return y2(e, rt) ? true : ne2(t).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
1643
+ function de(t, e) {
1644
+ return y2(e, rt) ? true : re2(t).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
1645
1645
  }
1646
- function Dn(t, e) {
1646
+ function qn2(t, e) {
1647
1647
  let n = F3(t);
1648
1648
  if (n.length === 0) return 0;
1649
1649
  let o2 = 0;
@@ -1655,85 +1655,85 @@ function J4(t, e) {
1655
1655
  for (let o2 of F3(t)) e(o2) && n++;
1656
1656
  return n;
1657
1657
  }
1658
- function Vn2(t, e) {
1658
+ function zn2(t, e) {
1659
1659
  let n = 0;
1660
- for (let o2 of ne2(t)) e(o2) && n++;
1660
+ for (let o2 of re2(t)) e(o2) && n++;
1661
1661
  return n;
1662
1662
  }
1663
- function Un(t, e, n, o2, u2) {
1664
- let l = [], a2 = [], s = {}, b4 = {}, T2 = new Set(t), C2 = (i) => e.map((c2) => c2[i]);
1665
- for (let i of ["city", "country"]) {
1666
- let c2 = n?.[i];
1667
- c2 && T2.has(c2) && (s[i] = c2);
1663
+ function $n(t, e, n, o2, u2) {
1664
+ let l = [], a2 = [], i = {}, b4 = {}, E4 = new Set(t), C2 = (s) => e.map((c2) => c2[s]);
1665
+ for (let s of ["city", "country"]) {
1666
+ let c2 = n?.[s];
1667
+ c2 && E4.has(c2) && (i[s] = c2);
1668
1668
  }
1669
- let y4 = new Set(u2 ?? t);
1670
- for (let i of ["lat", "lon"]) {
1671
- let c2 = n?.[i];
1672
- c2 && y4.has(c2) && (s[i] = c2);
1669
+ let g3 = new Set(u2 ?? t);
1670
+ for (let s of ["lat", "lon"]) {
1671
+ let c2 = n?.[s];
1672
+ c2 && g3.has(c2) && (i[s] = c2);
1673
1673
  }
1674
1674
  let f4 = n?.zip;
1675
- if (f4 && T2.has(f4)) {
1676
- let i = C2(f4), c2 = te(i);
1677
- c2 < 95 ? a2.push(`zip=${f4} (only ${c2}% of values read as ZIPs)`) : ce3(i, f4) ? s.zip = f4 : a2.push(`zip=${f4} (all values are 3-4 digits with nothing to say they are postal)`);
1675
+ if (f4 && E4.has(f4)) {
1676
+ let s = C2(f4), c2 = ne2(s);
1677
+ c2 < 95 ? a2.push(`zip=${f4} (only ${c2}% of values read as ZIPs)`) : de(s, f4) ? i.zip = f4 : a2.push(`zip=${f4} (all values are 3-4 digits with nothing to say they are postal)`);
1678
1678
  }
1679
1679
  let d2 = n?.state;
1680
- if (d2 && T2.has(d2)) {
1681
- let i = C2(d2), c2 = F3(i);
1682
- c2.length > 0 && c2.every((S2) => ue2(S2, o2)) ? a2.push(`state=${d2} (every value is "CA", which is both Canada and California)`) : N2(i) ? (a2.push(`state=${d2} (every value is a country, not a state)`), s.country || (s.country = d2)) : z3(i) < 95 ? a2.push(`state=${d2} (only ${z3(i)}% of values are states/provinces)`) : s.state = d2;
1680
+ if (d2 && E4.has(d2)) {
1681
+ let s = C2(d2), c2 = F3(s);
1682
+ c2.length > 0 && c2.every((S2) => ce3(S2, o2)) ? a2.push(`state=${d2} (every value is "CA", which is both Canada and California)`) : A2(s) ? (a2.push(`state=${d2} (every value is a country, not a state)`), i.country || (i.country = d2)) : z3(s) < 95 ? a2.push(`state=${d2} (only ${z3(s)}% of values are states/provinces)`) : i.state = d2;
1683
1683
  }
1684
- let p2 = new Set(Object.values(s).filter(Boolean)), g3 = t.filter((i) => !p2.has(i) && !i.startsWith("__"));
1685
- if (!s.state) {
1686
- let i = null;
1687
- for (let c2 of g3) {
1684
+ let p2 = new Set(Object.values(i).filter(Boolean)), y4 = t.filter((s) => !p2.has(s) && !s.startsWith("__"));
1685
+ if (!i.state) {
1686
+ let s = null;
1687
+ for (let c2 of y4) {
1688
1688
  let S2 = C2(c2);
1689
- if (N2(S2)) continue;
1690
- let v2 = z3(S2);
1691
- if (v2 < 95) continue;
1692
- let $3 = J4(S2, (D2) => !!Y(D2)), Le = J4(S2, (D2) => !!Y(D2) && !ue2(D2, o2));
1693
- $3 < X3 && Le < 1 || (!i || v2 > i.pct) && (i = { name: c2, pct: v2 });
1689
+ if (A2(S2)) continue;
1690
+ let P4 = z3(S2);
1691
+ if (P4 < 95) continue;
1692
+ let H3 = J4(S2, (D2) => !!Y(D2)), Ie = J4(S2, (D2) => !!Y(D2) && !ce3(D2, o2));
1693
+ H3 < Z4 && Ie < 1 || (!s || P4 > s.pct) && (s = { name: c2, pct: P4 });
1694
1694
  }
1695
- i && (s.state = i.name, p2.add(i.name), l.push(`state=${i.name} (${i.pct}% states/provinces)`));
1695
+ s && (i.state = s.name, p2.add(s.name), l.push(`state=${s.name} (${s.pct}% states/provinces)`));
1696
1696
  }
1697
- if (!s.zip) for (let i of g3) {
1698
- if (p2.has(i)) continue;
1699
- let c2 = C2(i), S2 = te(c2);
1700
- if (!(S2 < 95) && ce3(c2, i) && !(Vn2(c2, (v2) => Z(v2).length > 0) < X3)) {
1701
- s.zip = i, p2.add(i), l.push(`zip=${i} (${S2}% ZIP codes)`);
1697
+ if (!i.zip) for (let s of y4) {
1698
+ if (p2.has(s)) continue;
1699
+ let c2 = C2(s), S2 = ne2(c2);
1700
+ if (!(S2 < 95) && de(c2, s) && !(zn2(c2, (P4) => Z(P4).length > 0) < Z4)) {
1701
+ i.zip = s, p2.add(s), l.push(`zip=${s} (${S2}% ZIP codes)`);
1702
1702
  break;
1703
1703
  }
1704
1704
  }
1705
- let E4 = s.country;
1706
- if (!E4 || !N2(C2(E4))) {
1707
- let i = null;
1708
- for (let c2 of g3) {
1709
- if (p2.has(c2) || !N2(C2(c2))) continue;
1710
- let S2 = ee3(C2(c2));
1711
- (!i || S2 > i.pct) && (i = { name: c2, pct: S2 });
1705
+ let T2 = i.country;
1706
+ if (!T2 || !A2(C2(T2))) {
1707
+ let s = null;
1708
+ for (let c2 of y4) {
1709
+ if (p2.has(c2) || !A2(C2(c2))) continue;
1710
+ let S2 = te(C2(c2));
1711
+ (!s || S2 > s.pct) && (s = { name: c2, pct: S2 });
1712
1712
  }
1713
- i && (E4 && (a2.push(`country=${E4} (only ${ee3(C2(E4))}% of values are country identifiers; using ${i.name} instead)`), b4.country = E4), s.country = i.name, p2.add(i.name), l.push(`country=${i.name}`));
1713
+ s && (T2 && (a2.push(`country=${T2} (only ${te(C2(T2))}% of values are country identifiers; using ${s.name} instead)`), b4.country = T2), i.country = s.name, p2.add(s.name), l.push(`country=${s.name}`));
1714
1714
  }
1715
- if (!s.city) {
1716
- let i = null;
1717
- for (let c2 of g3) {
1715
+ if (!i.city) {
1716
+ let s = null;
1717
+ for (let c2 of y4) {
1718
1718
  if (p2.has(c2)) continue;
1719
- let S2 = C2(c2), v2 = Dn(S2, o2);
1720
- v2 < m3 || J4(S2, ($3) => p3($3, o2)) < X3 || (!i || v2 > i.pct) && (i = { name: c2, pct: v2 });
1719
+ let S2 = C2(c2), P4 = qn2(S2, o2);
1720
+ P4 < m3 || J4(S2, (H3) => p3(H3, o2)) < Z4 || (!s || P4 > s.pct) && (s = { name: c2, pct: P4 });
1721
1721
  }
1722
- i && (s.city = i.name, l.push(`city=${i.name} (${i.pct}% known cities)`));
1722
+ s && (i.city = s.name, l.push(`city=${s.name} (${s.pct}% known cities)`));
1723
1723
  }
1724
- let M2 = s.country ? C2(s.country) : [], R2 = !!s.country && N2(M2), _3 = R2 ? new Set(M2.map((i) => E(i == null ? null : String(i))).filter(Boolean)).size : 0, x3 = R2 && _3 >= 2, w2 = !!(s.lat && s.lon) && e.some((i) => {
1725
- let c2 = +String(i[s.lat] ?? "").trim(), S2 = +String(i[s.lon] ?? "").trim();
1726
- return isFinite(c2) && isFinite(S2) && c2 >= -90 && c2 <= 90 && S2 >= -180 && S2 <= 180 && String(i[s.lat] ?? "").trim() !== "" && String(i[s.lon] ?? "").trim() !== "";
1724
+ let L4 = i.country ? C2(i.country) : [], R2 = !!i.country && A2(L4), M2 = R2 ? new Set(L4.map((s) => E(s == null ? null : String(s))).filter(Boolean)).size : 0, x3 = R2 && M2 >= 2, w2 = !!(i.lat && i.lon) && e.some((s) => {
1725
+ let c2 = +String(s[i.lat] ?? "").trim(), S2 = +String(s[i.lon] ?? "").trim();
1726
+ return isFinite(c2) && isFinite(S2) && c2 >= -90 && c2 <= 90 && S2 >= -180 && S2 <= 180 && String(s[i.lat] ?? "").trim() !== "" && String(s[i.lon] ?? "").trim() !== "";
1727
1727
  });
1728
- return s.lat && s.lon && !w2 && a2.push(`lat/lon=${s.lat}/${s.lon} (no row holds a usable coordinate pair)`), s.country && !x3 && !(s.city || s.state || s.zip || w2) && a2.push(R2 ? `country=${s.country} (every row resolves to the same country - nothing to place apart)` : `country=${s.country} (values are not country identifiers)`), { bind: !!(s.city || s.state || s.zip || x3 || w2) ? s : null, backfilled: l, refused: a2, ...Object.keys(b4).length ? { labelFallback: b4 } : {} };
1728
+ return i.lat && i.lon && !w2 && a2.push(`lat/lon=${i.lat}/${i.lon} (no row holds a usable coordinate pair)`), i.country && !x3 && !(i.city || i.state || i.zip || w2) && a2.push(R2 ? `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 || w2) ? i : null, backfilled: l, refused: a2, ...Object.keys(b4).length ? { labelFallback: b4 } : {} };
1729
1729
  }
1730
1730
  var r = (t, ...e) => ({ part: t, langs: Object.freeze(e) });
1731
- var re2 = Object.freeze({ jaar: r("year", "nl"), kwartaal: r("quarter", "nl"), maand: r("month", "nl"), dag: r("day", "nl", "sv", "da", "nb"), jahr: r("year", "de"), quartal: r("quarter", "de"), monat: r("month", "de"), tag: r("day", "de"), ann\u00E9e: r("year", "fr"), mois: r("month", "fr"), jour: r("day", "fr"), trimestre: r("quarter", "fr", "es", "pt", "it"), a\u00F1o: r("year", "es"), mes: r("month", "es"), d\u00EDa: r("day", "es"), ano: r("year", "pt"), m\u00EAs: r("month", "pt"), dia: r("day", "pt"), anno: r("year", "it"), mese: r("month", "it"), giorno: r("day", "it"), \u0433\u043E\u0434: r("year", "ru"), \u043C\u0435\u0441\u044F\u0446: r("month", "ru"), \u0440\u0456\u043A: r("year", "uk"), \u043C\u0456\u0441\u044F\u0446\u044C: r("month", "uk"), \u043A\u0432\u0430\u0440\u0442\u0430\u043B: r("quarter", "ru", "uk"), \u0434\u0435\u043D\u044C: r("day", "ru", "uk"), rok: r("year", "pl", "cs", "sk"), kwarta\u0142: r("quarter", "pl"), miesi\u0105c: r("month", "pl"), dzie\u0144: r("day", "pl"), \u010Dtvrtlet\u00ED: r("quarter", "cs"), m\u011Bs\u00EDc: r("month", "cs"), den: r("day", "cs"), \u0161tvr\u0165rok: r("quarter", "sk"), mesiac: r("month", "sk"), de\u0148: r("day", "sk"), \u00E5r: r("year", "sv", "da", "nb"), kvartal: r("quarter", "sv", "da", "nb"), m\u00E5nad: r("month", "sv"), m\u00E5ned: r("month", "da", "nb"), vuosi: r("year", "fi"), vuosinelj\u00E4nnes: r("quarter", "fi"), kuukausi: r("month", "fi"), p\u00E4iv\u00E4: r("day", "fi"), \u00E9v: r("year", "hu"), negyed\u00E9v: r("quarter", "hu"), h\u00F3nap: r("month", "hu"), nap: r("day", "hu"), y\u0131l: r("year", "tr"), \u00E7eyrek: r("quarter", "tr"), ay: r("month", "tr"), g\u00FCn: r("day", "tr"), \u03AD\u03C4\u03BF\u03C2: r("year", "el"), \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF: r("quarter", "el"), \u03BC\u03AE\u03BD\u03B1\u03C2: r("month", "el"), \u03B7\u03BC\u03AD\u03C1\u03B1: r("day", "el"), an: r("year", "ro"), trimestru: r("quarter", "ro"), lun\u0103: r("month", "ro"), zi: r("day", "ro"), godina: r("year", "hr"), tromjese\u010Dje: r("quarter", "hr"), mjesec: r("month", "hr"), dan: r("day", "hr"), \u5E74: r("year", "ja", "zh"), \u56DB\u534A\u671F: r("quarter", "ja"), \u5B63\u5EA6: r("quarter", "zh"), \u6708: r("month", "ja", "zh"), \u65E5: r("day", "ja", "zh"), \uC5F0\uB3C4: r("year", "ko"), \uBD84\uAE30: r("quarter", "ko"), \uC6D4: r("month", "ko"), \uC77C: r("day", "ko"), tahun: r("year", "id"), kuartal: r("quarter", "id"), triwulan: r("quarter", "id"), bulan: r("month", "id"), hari: r("day", "id"), n\u0103m: r("year", "vi"), qu\u00FD: r("quarter", "vi"), th\u00E1ng: r("month", "vi"), ng\u00E0y: r("day", "vi"), \u0E1B\u0E35: r("year", "th"), \u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A: r("quarter", "th"), \u0E40\u0E14\u0E37\u0E2D\u0E19: r("month", "th"), \u0E27\u0E31\u0E19: r("day", "th"), \u0627\u0644\u0633\u0646\u0629: r("year", "ar"), \u0633\u0646\u0629: r("year", "ar"), \u0627\u0644\u0639\u0627\u0645: r("year", "ar"), \u0639\u0627\u0645: r("year", "ar"), \u0627\u0644\u0631\u0628\u0639: r("quarter", "ar"), \u0631\u0628\u0639: r("quarter", "ar"), "\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629": r("quarter", "ar"), \u0627\u0644\u0634\u0647\u0631: r("month", "ar"), \u0634\u0647\u0631: r("month", "ar"), \u0627\u0644\u064A\u0648\u0645: r("day", "ar"), \u064A\u0648\u0645: r("day", "ar"), \u05E9\u05E0\u05D4: r("year", "he"), \u05E8\u05D1\u05E2\u05D5\u05DF: r("quarter", "he"), \u05D7\u05D5\u05D3\u05E9: r("month", "he"), \u05D9\u05D5\u05DD: r("day", "he"), \u0935\u0930\u094D\u0937: r("year", "hi"), \u0938\u093E\u0932: r("year", "hi"), \u0924\u093F\u092E\u093E\u0939\u0940: r("quarter", "hi"), \u092E\u0939\u0940\u0928\u093E: r("month", "hi"), \u092E\u093E\u0939: r("month", "hi"), \u0926\u093F\u0928: r("day", "hi"), \u0633\u0627\u0644: r("year", "fa"), \u0645\u0627\u0647: r("month", "fa"), \u0631\u0648\u0632: r("day", "fa") });
1732
- var Wn = Object.freeze(Array.from(new Set(Object.values(re2).flatMap((t) => t.langs))));
1733
- var me2 = Object.freeze(["fa", "ar", "he", "th"]);
1734
- var cr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
1735
- var Cr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
1736
- var we = 2 ** 31 - 1;
1731
+ var oe2 = Object.freeze({ jaar: r("year", "nl"), kwartaal: r("quarter", "nl"), maand: r("month", "nl"), dag: r("day", "nl", "sv", "da", "nb"), jahr: r("year", "de"), quartal: r("quarter", "de"), monat: r("month", "de"), tag: r("day", "de"), ann\u00E9e: r("year", "fr"), mois: r("month", "fr"), jour: r("day", "fr"), trimestre: r("quarter", "fr", "es", "pt", "it"), a\u00F1o: r("year", "es"), mes: r("month", "es"), d\u00EDa: r("day", "es"), ano: r("year", "pt"), m\u00EAs: r("month", "pt"), dia: r("day", "pt"), anno: r("year", "it"), mese: r("month", "it"), giorno: r("day", "it"), \u0433\u043E\u0434: r("year", "ru"), \u043C\u0435\u0441\u044F\u0446: r("month", "ru"), \u0440\u0456\u043A: r("year", "uk"), \u043C\u0456\u0441\u044F\u0446\u044C: r("month", "uk"), \u043A\u0432\u0430\u0440\u0442\u0430\u043B: r("quarter", "ru", "uk"), \u0434\u0435\u043D\u044C: r("day", "ru", "uk"), rok: r("year", "pl", "cs", "sk"), kwarta\u0142: r("quarter", "pl"), miesi\u0105c: r("month", "pl"), dzie\u0144: r("day", "pl"), \u010Dtvrtlet\u00ED: r("quarter", "cs"), m\u011Bs\u00EDc: r("month", "cs"), den: r("day", "cs"), \u0161tvr\u0165rok: r("quarter", "sk"), mesiac: r("month", "sk"), de\u0148: r("day", "sk"), \u00E5r: r("year", "sv", "da", "nb"), kvartal: r("quarter", "sv", "da", "nb"), m\u00E5nad: r("month", "sv"), m\u00E5ned: r("month", "da", "nb"), vuosi: r("year", "fi"), vuosinelj\u00E4nnes: r("quarter", "fi"), kuukausi: r("month", "fi"), p\u00E4iv\u00E4: r("day", "fi"), \u00E9v: r("year", "hu"), negyed\u00E9v: r("quarter", "hu"), h\u00F3nap: r("month", "hu"), nap: r("day", "hu"), y\u0131l: r("year", "tr"), \u00E7eyrek: r("quarter", "tr"), ay: r("month", "tr"), g\u00FCn: r("day", "tr"), \u03AD\u03C4\u03BF\u03C2: r("year", "el"), \u03C4\u03C1\u03AF\u03BC\u03B7\u03BD\u03BF: r("quarter", "el"), \u03BC\u03AE\u03BD\u03B1\u03C2: r("month", "el"), \u03B7\u03BC\u03AD\u03C1\u03B1: r("day", "el"), an: r("year", "ro"), trimestru: r("quarter", "ro"), lun\u0103: r("month", "ro"), zi: r("day", "ro"), godina: r("year", "hr"), tromjese\u010Dje: r("quarter", "hr"), mjesec: r("month", "hr"), dan: r("day", "hr"), \u5E74: r("year", "ja", "zh"), \u56DB\u534A\u671F: r("quarter", "ja"), \u5B63\u5EA6: r("quarter", "zh"), \u6708: r("month", "ja", "zh"), \u65E5: r("day", "ja", "zh"), \uC5F0\uB3C4: r("year", "ko"), \uBD84\uAE30: r("quarter", "ko"), \uC6D4: r("month", "ko"), \uC77C: r("day", "ko"), tahun: r("year", "id"), kuartal: r("quarter", "id"), triwulan: r("quarter", "id"), bulan: r("month", "id"), hari: r("day", "id"), n\u0103m: r("year", "vi"), qu\u00FD: r("quarter", "vi"), th\u00E1ng: r("month", "vi"), ng\u00E0y: r("day", "vi"), \u0E1B\u0E35: r("year", "th"), \u0E44\u0E15\u0E23\u0E21\u0E32\u0E2A: r("quarter", "th"), \u0E40\u0E14\u0E37\u0E2D\u0E19: r("month", "th"), \u0E27\u0E31\u0E19: r("day", "th"), \u0627\u0644\u0633\u0646\u0629: r("year", "ar"), \u0633\u0646\u0629: r("year", "ar"), \u0627\u0644\u0639\u0627\u0645: r("year", "ar"), \u0639\u0627\u0645: r("year", "ar"), \u0627\u0644\u0631\u0628\u0639: r("quarter", "ar"), \u0631\u0628\u0639: r("quarter", "ar"), "\u0631\u0628\u0639 \u0627\u0644\u0633\u0646\u0629": r("quarter", "ar"), \u0627\u0644\u0634\u0647\u0631: r("month", "ar"), \u0634\u0647\u0631: r("month", "ar"), \u0627\u0644\u064A\u0648\u0645: r("day", "ar"), \u064A\u0648\u0645: r("day", "ar"), \u05E9\u05E0\u05D4: r("year", "he"), \u05E8\u05D1\u05E2\u05D5\u05DF: r("quarter", "he"), \u05D7\u05D5\u05D3\u05E9: r("month", "he"), \u05D9\u05D5\u05DD: r("day", "he"), \u0935\u0930\u094D\u0937: r("year", "hi"), \u0938\u093E\u0932: r("year", "hi"), \u0924\u093F\u092E\u093E\u0939\u0940: r("quarter", "hi"), \u092E\u0939\u0940\u0928\u093E: r("month", "hi"), \u092E\u093E\u0939: r("month", "hi"), \u0926\u093F\u0928: r("day", "hi"), \u0633\u0627\u0644: r("year", "fa"), \u0645\u0627\u0647: r("month", "fa"), \u0631\u0648\u0632: r("day", "fa") });
1732
+ var Hn2 = Object.freeze(Array.from(new Set(Object.values(oe2).flatMap((t) => t.langs))));
1733
+ var fe = Object.freeze(["fa", "ar", "he", "th"]);
1734
+ var hr = Object.freeze({ integer: "number", decimal: "number", double: "number", datetime: "date", date: "date", boolean: "boolean", string: "text" });
1735
+ var wr = Object.freeze({ RENDER_START: "render-start", RENDER_OK: "render-ok", RENDER_ERROR: "render-error", VIEW: "view", VIEW_VERDICT: "view-verdict" });
1736
+ var Le = 2 ** 31 - 1;
1737
1737
 
1738
1738
  // src/payload.ts
1739
1739
  var ROW_IDX_COLUMN = "__rowIdx__";
@@ -1748,7 +1748,7 @@ function resolvePointChannel(cols, rowObjs, point) {
1748
1748
  let labelCol;
1749
1749
  if (bind) {
1750
1750
  const dims = cols.filter((c2) => !c2.isMeasure).map((c2) => c2.name);
1751
- const res = Un(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1751
+ const res = $n(dims, rowObjs, bind, point?.mapKind, cols.map((c2) => c2.name));
1752
1752
  bind = res.bind;
1753
1753
  rolesBackfilled = res.backfilled;
1754
1754
  rolesRefused = res.refused;
@@ -2092,9 +2092,9 @@ function createMarkResolver(env) {
2092
2092
  const m2 = el.getScreenCTM();
2093
2093
  if (!m2) return Number.MAX_VALUE;
2094
2094
  let best = Number.MAX_VALUE;
2095
- const N3 = 64;
2096
- for (let i = 0; i <= N3; i++) {
2097
- const pt2 = el.getPointAtLength(L4 * i / N3);
2095
+ const N2 = 64;
2096
+ for (let i = 0; i <= N2; i++) {
2097
+ const pt2 = el.getPointAtLength(L4 * i / N2);
2098
2098
  const dx = m2.a * pt2.x + m2.c * pt2.y + m2.e - x3;
2099
2099
  const dy = m2.b * pt2.x + m2.d * pt2.y + m2.f - y4;
2100
2100
  const d2 = dx * dx + dy * dy;
@@ -2250,14 +2250,14 @@ function collectD3GlyphCenters(container, baseRect, out) {
2250
2250
  const isArcSector = /[Aa]/.test(dAttr) && !/[CcSsQqTt]/.test(dAttr);
2251
2251
  let local;
2252
2252
  if (isArcSector) {
2253
- const N3 = 24;
2253
+ const N2 = 24;
2254
2254
  let ax = 0, ay = 0;
2255
- for (let k3 = 0; k3 < N3; k3++) {
2256
- const sp = el.getPointAtLength(len * k3 / N3);
2255
+ for (let k3 = 0; k3 < N2; k3++) {
2256
+ const sp = el.getPointAtLength(len * k3 / N2);
2257
2257
  ax += sp.x;
2258
2258
  ay += sp.y;
2259
2259
  }
2260
- const cand = new Point(ax / N3, ay / N3);
2260
+ const cand = new Point(ax / N2, ay / N2);
2261
2261
  let inside = true;
2262
2262
  try {
2263
2263
  if (typeof el.isPointInFill === "function") {
package/dist/index.mjs CHANGED
@@ -146,7 +146,7 @@ import {
146
146
  unpinScrolledAxis,
147
147
  valuePlacementFlag,
148
148
  withoutViewOnlyKeys
149
- } from "./chunk-YPXH42CQ.mjs";
149
+ } from "./chunk-XWVIYCMM.mjs";
150
150
  import "./chunk-A2GMXZP7.mjs";
151
151
  import "./chunk-GHODWOAL.mjs";
152
152
 
package/dist/react.mjs CHANGED
@@ -7,7 +7,7 @@ import {
7
7
  loadGeo,
8
8
  syncMemberSelection,
9
9
  toSourceRows
10
- } from "./chunk-YPXH42CQ.mjs";
10
+ } from "./chunk-XWVIYCMM.mjs";
11
11
  import "./chunk-A2GMXZP7.mjs";
12
12
  import "./chunk-GHODWOAL.mjs";
13
13
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bicharts/chart-host",
3
- "version": "0.6.44",
3
+ "version": "0.6.45",
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",