@bicharts/chart-host 0.5.80 → 0.5.82
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.
|
@@ -64,7 +64,7 @@ var require_papaparse_min = __commonJS({
|
|
|
64
64
|
}, this._readChunk = function() {
|
|
65
65
|
if (this._finished) this._chunkLoaded();
|
|
66
66
|
else {
|
|
67
|
-
if (r2 = new XMLHttpRequest(), this._config.withCredentials && (r2.withCredentials = this._config.withCredentials), s || (r2.onload =
|
|
67
|
+
if (r2 = new XMLHttpRequest(), this._config.withCredentials && (r2.withCredentials = this._config.withCredentials), s || (r2.onload = y4(this._chunkLoaded, this), r2.onerror = y4(this._chunkError, this)), r2.open(this._config.downloadRequestBody ? "POST" : "GET", this._input, !s), this._config.downloadRequestHeaders) {
|
|
68
68
|
var e2, t = this._config.downloadRequestHeaders;
|
|
69
69
|
for (e2 in t) r2.setRequestHeader(e2, t[e2]);
|
|
70
70
|
}
|
|
@@ -88,7 +88,7 @@ var require_papaparse_min = __commonJS({
|
|
|
88
88
|
(e = e || {}).chunkSize || (e.chunkSize = v2.LocalChunkSize), u4.call(this, e);
|
|
89
89
|
var i4, r2, n2 = "undefined" != typeof FileReader;
|
|
90
90
|
this.stream = function(e2) {
|
|
91
|
-
this._input = e2, r2 = e2.slice || e2.webkitSlice || e2.mozSlice, n2 ? ((i4 = new FileReader()).onload =
|
|
91
|
+
this._input = e2, r2 = e2.slice || e2.webkitSlice || e2.mozSlice, n2 ? ((i4 = new FileReader()).onload = y4(this._chunkLoaded, this), i4.onerror = y4(this._chunkError, this)) : i4 = new FileReaderSync(), this._nextChunk();
|
|
92
92
|
}, this._nextChunk = function() {
|
|
93
93
|
this._finished || this._config.preview && !(this._rowCount < this._config.preview) || this._readChunk();
|
|
94
94
|
}, this._readChunk = function() {
|
|
@@ -109,7 +109,7 @@ var require_papaparse_min = __commonJS({
|
|
|
109
109
|
if (!this._finished) return e2 = this._config.chunkSize, i4 = e2 ? (t = i4.substring(0, e2), i4.substring(e2)) : (t = i4, ""), this._finished = !i4, this.parseChunk(t);
|
|
110
110
|
};
|
|
111
111
|
}
|
|
112
|
-
function
|
|
112
|
+
function p(e) {
|
|
113
113
|
u4.call(this, e = e || {});
|
|
114
114
|
var t = [], i4 = true, r2 = false;
|
|
115
115
|
this.pause = function() {
|
|
@@ -122,83 +122,83 @@ var require_papaparse_min = __commonJS({
|
|
|
122
122
|
r2 && 1 === t.length && (this._finished = true);
|
|
123
123
|
}, this._nextChunk = function() {
|
|
124
124
|
this._checkIsFinished(), t.length ? this.parseChunk(t.shift()) : i4 = true;
|
|
125
|
-
}, this._streamData =
|
|
125
|
+
}, this._streamData = y4(function(e2) {
|
|
126
126
|
try {
|
|
127
127
|
t.push("string" == typeof e2 ? e2 : e2.toString(this._config.encoding)), i4 && (i4 = false, this._checkIsFinished(), this.parseChunk(t.shift()));
|
|
128
128
|
} catch (e4) {
|
|
129
129
|
this._streamError(e4);
|
|
130
130
|
}
|
|
131
|
-
}, this), this._streamError =
|
|
131
|
+
}, this), this._streamError = y4(function(e2) {
|
|
132
132
|
this._streamCleanUp(), this._sendError(e2);
|
|
133
|
-
}, this), this._streamEnd =
|
|
133
|
+
}, this), this._streamEnd = y4(function() {
|
|
134
134
|
this._streamCleanUp(), r2 = true, this._streamData("");
|
|
135
|
-
}, this), this._streamCleanUp =
|
|
135
|
+
}, this), this._streamCleanUp = y4(function() {
|
|
136
136
|
this._input.removeListener("data", this._streamData), this._input.removeListener("end", this._streamEnd), this._input.removeListener("error", this._streamError);
|
|
137
137
|
}, this);
|
|
138
138
|
}
|
|
139
|
-
function i2(
|
|
140
|
-
var n2, s2, a4, t, o4 = Math.pow(2, 53), h3 = -o4, u5 = /^\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)))$/, i4 = this, r2 = 0, f2 = 0, l3 = false, e = false, c2 = [],
|
|
141
|
-
function
|
|
142
|
-
return "greedy" ===
|
|
139
|
+
function i2(m2) {
|
|
140
|
+
var n2, s2, a4, t, o4 = Math.pow(2, 53), h3 = -o4, u5 = /^\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)))$/, i4 = this, r2 = 0, f2 = 0, l3 = false, e = false, c2 = [], p2 = { data: [], errors: [], meta: {} };
|
|
141
|
+
function y5(e2) {
|
|
142
|
+
return "greedy" === m2.skipEmptyLines ? "" === e2.join("").trim() : 1 === e2.length && 0 === e2[0].length;
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
if (
|
|
146
|
-
return !
|
|
144
|
+
function g3() {
|
|
145
|
+
if (p2 && a4 && (k2("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + v2.DefaultDelimiter + "'"), a4 = false), m2.skipEmptyLines && (p2.data = p2.data.filter(function(e4) {
|
|
146
|
+
return !y5(e4);
|
|
147
147
|
})), _3()) {
|
|
148
148
|
let t4 = function(e4, t5) {
|
|
149
|
-
e4 = P2(e4), q2(
|
|
149
|
+
e4 = P2(e4), q2(m2.transformHeader) && (e4 = m2.transformHeader(e4, t5)), c2.push(e4);
|
|
150
150
|
};
|
|
151
151
|
var t2 = t4;
|
|
152
|
-
if (
|
|
153
|
-
for (var e2 = 0; _3() && e2 <
|
|
154
|
-
|
|
155
|
-
} else
|
|
152
|
+
if (p2) if (Array.isArray(p2.data[0])) {
|
|
153
|
+
for (var e2 = 0; _3() && e2 < p2.data.length; e2++) p2.data[e2].forEach(t4);
|
|
154
|
+
p2.data.splice(0, 1);
|
|
155
|
+
} else p2.data.forEach(t4);
|
|
156
156
|
}
|
|
157
157
|
function i5(e4, t4) {
|
|
158
|
-
for (var i6 =
|
|
159
|
-
var n4 = r5, s4 = e4[r5], s4 = ((e5, t5) => ((e6) => (
|
|
158
|
+
for (var i6 = m2.header ? {} : [], r5 = 0; r5 < e4.length; r5++) {
|
|
159
|
+
var n4 = r5, s4 = e4[r5], s4 = ((e5, t5) => ((e6) => (m2.dynamicTypingFunction && void 0 === m2.dynamicTyping[e6] && (m2.dynamicTyping[e6] = m2.dynamicTypingFunction(e6)), true === (m2.dynamicTyping[e6] || m2.dynamicTyping)))(e5) ? "true" === t5 || "TRUE" === t5 || "false" !== t5 && "FALSE" !== t5 && (((e6) => {
|
|
160
160
|
if (u5.test(e6)) {
|
|
161
161
|
e6 = parseFloat(e6);
|
|
162
162
|
if (h3 < e6 && e6 < o4) return 1;
|
|
163
163
|
}
|
|
164
|
-
})(t5) ? parseFloat(t5) : d2.test(t5) ? new Date(t5) : "" === t5 ? null : t5) : t5)(n4 =
|
|
164
|
+
})(t5) ? parseFloat(t5) : d2.test(t5) ? new Date(t5) : "" === t5 ? null : t5) : t5)(n4 = m2.header ? r5 >= c2.length ? "__parsed_extra" : c2[r5] : n4, s4 = m2.transform ? m2.transform(s4, n4) : s4);
|
|
165
165
|
"__parsed_extra" === n4 ? (i6[n4] = i6[n4] || [], i6[n4].push(s4)) : i6[n4] = s4;
|
|
166
166
|
}
|
|
167
|
-
return
|
|
167
|
+
return m2.header && (r5 > c2.length ? k2("FieldMismatch", "TooManyFields", "Too many fields: expected " + c2.length + " fields but parsed " + r5, f2 + t4) : r5 < c2.length && k2("FieldMismatch", "TooFewFields", "Too few fields: expected " + c2.length + " fields but parsed " + r5, f2 + t4)), i6;
|
|
168
168
|
}
|
|
169
169
|
var r4;
|
|
170
|
-
|
|
170
|
+
p2 && (m2.header || m2.dynamicTyping || m2.transform) && (r4 = 1, !p2.data.length || Array.isArray(p2.data[0]) ? (p2.data = p2.data.map(i5), r4 = p2.data.length) : p2.data = i5(p2.data, 0), m2.header && p2.meta && (p2.meta.fields = c2), f2 += r4);
|
|
171
171
|
}
|
|
172
172
|
function _3() {
|
|
173
|
-
return
|
|
173
|
+
return m2.header && 0 === c2.length;
|
|
174
174
|
}
|
|
175
175
|
function k2(e2, t2, i5, r4) {
|
|
176
176
|
e2 = { type: e2, code: t2, message: i5 };
|
|
177
|
-
void 0 !== r4 && (e2.row = r4),
|
|
177
|
+
void 0 !== r4 && (e2.row = r4), p2.errors.push(e2);
|
|
178
178
|
}
|
|
179
|
-
q2(
|
|
180
|
-
|
|
179
|
+
q2(m2.step) && (t = m2.step, m2.step = function(e2) {
|
|
180
|
+
p2 = e2, _3() ? g3() : (g3(), 0 !== p2.data.length && (r2 += e2.data.length, m2.preview && r2 > m2.preview ? s2.abort() : (p2.data = p2.data[0], t(p2, i4))));
|
|
181
181
|
}), this.parse = function(e2, t2, i5) {
|
|
182
|
-
var r4 =
|
|
182
|
+
var r4 = m2.quoteChar || '"', r4 = (m2.newline || (m2.newline = this.guessLineEndings(e2, r4)), a4 = false, m2.delimiter ? q2(m2.delimiter) && (m2.delimiter = m2.delimiter(e2), p2.meta.delimiter = m2.delimiter) : ((r4 = ((e4, t4, i6, r5, n4) => {
|
|
183
183
|
var s4, a5, o5, h4;
|
|
184
184
|
n4 = n4 || [",", " ", "|", ";", v2.RECORD_SEP, v2.UNIT_SEP];
|
|
185
185
|
for (var u6 = 0; u6 < n4.length; u6++) {
|
|
186
|
-
for (var d3, f4 = n4[u6], l4 = 0, c4 = 0,
|
|
187
|
-
0 <
|
|
186
|
+
for (var d3, f4 = n4[u6], l4 = 0, c4 = 0, p4 = 0, g4 = (o5 = void 0, new E4({ comments: r5, delimiter: f4, newline: t4, preview: 10 }).parse(e4)), _4 = 0; _4 < g4.data.length; _4++) i6 && y5(g4.data[_4]) ? p4++ : (d3 = g4.data[_4].length, c4 += d3, void 0 === o5 ? o5 = d3 : 0 < d3 && (l4 += Math.abs(d3 - o5), o5 = d3));
|
|
187
|
+
0 < g4.data.length && (c4 /= g4.data.length - p4), (void 0 === a5 || l4 <= a5) && (void 0 === h4 || h4 < c4) && 1.99 < c4 && (a5 = l4, s4 = f4, h4 = c4);
|
|
188
188
|
}
|
|
189
|
-
return { successful: !!(
|
|
190
|
-
})(e2,
|
|
191
|
-
return
|
|
189
|
+
return { successful: !!(m2.delimiter = s4), bestDelimiter: s4 };
|
|
190
|
+
})(e2, m2.newline, m2.skipEmptyLines, m2.comments, m2.delimitersToGuess)).successful ? m2.delimiter = r4.bestDelimiter : (a4 = true, m2.delimiter = v2.DefaultDelimiter), p2.meta.delimiter = m2.delimiter), b2(m2));
|
|
191
|
+
return m2.preview && m2.header && r4.preview++, n2 = e2, s2 = new E4(r4), p2 = s2.parse(n2, t2, i5), g3(), l3 ? { meta: { paused: true } } : p2 || { meta: { paused: false } };
|
|
192
192
|
}, this.paused = function() {
|
|
193
193
|
return l3;
|
|
194
194
|
}, this.pause = function() {
|
|
195
|
-
l3 = true, s2.abort(), n2 = q2(
|
|
195
|
+
l3 = true, s2.abort(), n2 = q2(m2.chunk) ? "" : n2.substring(s2.getCharIndex());
|
|
196
196
|
}, this.resume = function() {
|
|
197
197
|
i4.streamer._halted ? (l3 = false, i4.streamer.parseChunk(n2, true)) : setTimeout(i4.resume, 3);
|
|
198
198
|
}, this.aborted = function() {
|
|
199
199
|
return e;
|
|
200
200
|
}, this.abort = function() {
|
|
201
|
-
e = true, s2.abort(),
|
|
201
|
+
e = true, s2.abort(), p2.meta.aborted = true, q2(m2.complete) && m2.complete(p2), n2 = "";
|
|
202
202
|
}, this.guessLineEndings = function(e2, t2) {
|
|
203
203
|
e2 = e2.substring(0, 1048576);
|
|
204
204
|
var t2 = new RegExp(U3(t2) + "([^]*?)" + U3(t2), "gm"), i5 = (e2 = e2.replace(t2, "")).split("\r"), t2 = e2.split("\n"), e2 = 1 < t2.length && t2[0].length < i5[0].length;
|
|
@@ -218,48 +218,48 @@ var require_papaparse_min = __commonJS({
|
|
|
218
218
|
this.parse = function(i4, t, r2) {
|
|
219
219
|
if ("string" != typeof i4) throw new Error("Input must be a string");
|
|
220
220
|
var n2 = i4.length, e = S.length, s2 = O2.length, a4 = x2.length, o4 = q2(I2), h3 = [], u5 = [], d2 = [], f2 = z3 = 0;
|
|
221
|
-
if (!i4) return
|
|
221
|
+
if (!i4) return w2();
|
|
222
222
|
if (T2 || false !== T2 && -1 === i4.indexOf(F3)) {
|
|
223
223
|
for (var l3 = i4.split(O2), c2 = 0; c2 < l3.length; c2++) {
|
|
224
224
|
if (d2 = l3[c2], z3 += d2.length, c2 !== l3.length - 1) z3 += O2.length;
|
|
225
|
-
else if (r2) return
|
|
225
|
+
else if (r2) return w2();
|
|
226
226
|
if (!x2 || d2.substring(0, a4) !== x2) {
|
|
227
227
|
if (o4) {
|
|
228
|
-
if (h3 = [], k2(d2.split(S)), R(), M2) return
|
|
228
|
+
if (h3 = [], k2(d2.split(S)), R(), M2) return w2();
|
|
229
229
|
} else k2(d2.split(S));
|
|
230
|
-
if (A2 && A2 <= c2) return h3 = h3.slice(0, A2),
|
|
230
|
+
if (A2 && A2 <= c2) return h3 = h3.slice(0, A2), w2(true);
|
|
231
231
|
}
|
|
232
232
|
}
|
|
233
|
-
return
|
|
233
|
+
return w2();
|
|
234
234
|
}
|
|
235
|
-
for (var
|
|
236
|
-
if (-1 === (
|
|
237
|
-
if (
|
|
238
|
-
if (F3 === j2 && i4[
|
|
239
|
-
else if (F3 === j2 || 0 ===
|
|
240
|
-
-1 !==
|
|
241
|
-
var
|
|
242
|
-
if (i4.substr(
|
|
243
|
-
d2.push(i4.substring(z3,
|
|
235
|
+
for (var p2 = i4.indexOf(S, z3), g3 = i4.indexOf(O2, z3), _3 = new RegExp(U3(j2) + U3(F3), "g"), m2 = i4.indexOf(F3, z3); ; ) if (i4[z3] === F3) for (m2 = z3, z3++; ; ) {
|
|
236
|
+
if (-1 === (m2 = i4.indexOf(F3, m2 + 1))) return r2 || u5.push({ type: "Quotes", code: "MissingQuotes", message: "Quoted field unterminated", row: h3.length, index: z3 }), E5();
|
|
237
|
+
if (m2 === n2 - 1) return E5(i4.substring(z3, m2).replace(_3, F3));
|
|
238
|
+
if (F3 === j2 && i4[m2 + 1] === j2) m2++;
|
|
239
|
+
else if (F3 === j2 || 0 === m2 || i4[m2 - 1] !== j2) {
|
|
240
|
+
-1 !== p2 && p2 < m2 + 1 && (p2 = i4.indexOf(S, m2 + 1));
|
|
241
|
+
var y5 = v3(-1 === (g3 = -1 !== g3 && g3 < m2 + 1 ? i4.indexOf(O2, m2 + 1) : g3) ? p2 : Math.min(p2, g3));
|
|
242
|
+
if (i4.substr(m2 + 1 + y5, e) === S) {
|
|
243
|
+
d2.push(i4.substring(z3, m2).replace(_3, F3)), i4[z3 = m2 + 1 + y5 + e] !== F3 && (m2 = i4.indexOf(F3, z3)), p2 = i4.indexOf(S, z3), g3 = i4.indexOf(O2, z3);
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
246
|
-
|
|
247
|
-
if (i4.substring(
|
|
248
|
-
if (d2.push(i4.substring(z3,
|
|
249
|
-
if (A2 && h3.length >= A2) return
|
|
246
|
+
y5 = v3(g3);
|
|
247
|
+
if (i4.substring(m2 + 1 + y5, m2 + 1 + y5 + s2) === O2) {
|
|
248
|
+
if (d2.push(i4.substring(z3, m2).replace(_3, F3)), b4(m2 + 1 + y5 + s2), p2 = i4.indexOf(S, z3), m2 = i4.indexOf(F3, z3), o4 && (R(), M2)) return w2();
|
|
249
|
+
if (A2 && h3.length >= A2) return w2(true);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
|
-
u5.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h3.length, index: z3 }),
|
|
252
|
+
u5.push({ type: "Quotes", code: "InvalidQuotes", message: "Trailing quote on quoted field is malformed", row: h3.length, index: z3 }), m2++;
|
|
253
253
|
}
|
|
254
254
|
}
|
|
255
255
|
else if (x2 && 0 === d2.length && i4.substring(z3, z3 + a4) === x2) {
|
|
256
|
-
if (-1 ===
|
|
257
|
-
z3 =
|
|
258
|
-
} else if (-1 !==
|
|
256
|
+
if (-1 === g3) return w2();
|
|
257
|
+
z3 = g3 + s2, g3 = i4.indexOf(O2, z3), p2 = i4.indexOf(S, z3);
|
|
258
|
+
} else if (-1 !== p2 && (p2 < g3 || -1 === g3)) d2.push(i4.substring(z3, p2)), z3 = p2 + e, p2 = i4.indexOf(S, z3);
|
|
259
259
|
else {
|
|
260
|
-
if (-1 ===
|
|
261
|
-
if (d2.push(i4.substring(z3,
|
|
262
|
-
if (A2 && h3.length >= A2) return
|
|
260
|
+
if (-1 === g3) break;
|
|
261
|
+
if (d2.push(i4.substring(z3, g3)), b4(g3 + s2), o4 && (R(), M2)) return w2();
|
|
262
|
+
if (A2 && h3.length >= A2) return w2(true);
|
|
263
263
|
}
|
|
264
264
|
return E5();
|
|
265
265
|
function k2(e2) {
|
|
@@ -267,15 +267,15 @@ var require_papaparse_min = __commonJS({
|
|
|
267
267
|
}
|
|
268
268
|
function v3(e2) {
|
|
269
269
|
var t2 = 0;
|
|
270
|
-
return t2 = -1 !== e2 && (e2 = i4.substring(
|
|
270
|
+
return t2 = -1 !== e2 && (e2 = i4.substring(m2 + 1, e2)) && "" === e2.trim() ? e2.length : t2;
|
|
271
271
|
}
|
|
272
272
|
function E5(e2) {
|
|
273
|
-
return r2 || (void 0 === e2 && (e2 = i4.substring(z3)), d2.push(e2), z3 = n2, k2(d2), o4 && R()),
|
|
273
|
+
return r2 || (void 0 === e2 && (e2 = i4.substring(z3)), d2.push(e2), z3 = n2, k2(d2), o4 && R()), w2();
|
|
274
274
|
}
|
|
275
275
|
function b4(e2) {
|
|
276
|
-
z3 = e2, k2(d2), d2 = [],
|
|
276
|
+
z3 = e2, k2(d2), d2 = [], g3 = i4.indexOf(O2, z3);
|
|
277
277
|
}
|
|
278
|
-
function
|
|
278
|
+
function w2(e2) {
|
|
279
279
|
if (C2.header && !t && h3.length && !L2) {
|
|
280
280
|
var s4 = h3[0], a5 = /* @__PURE__ */ Object.create(null), o5 = new Set(s4);
|
|
281
281
|
let n4 = false;
|
|
@@ -293,7 +293,7 @@ var require_papaparse_min = __commonJS({
|
|
|
293
293
|
return { data: h3, errors: u5, meta: { delimiter: S, linebreak: O2, aborted: M2, truncated: !!e2, cursor: f2 + (t || 0), renamedHeaders: D3 } };
|
|
294
294
|
}
|
|
295
295
|
function R() {
|
|
296
|
-
I2(
|
|
296
|
+
I2(w2()), h3 = [], u5 = [];
|
|
297
297
|
}
|
|
298
298
|
}, this.abort = function() {
|
|
299
299
|
M2 = true;
|
|
@@ -301,13 +301,13 @@ var require_papaparse_min = __commonJS({
|
|
|
301
301
|
return z3;
|
|
302
302
|
};
|
|
303
303
|
}
|
|
304
|
-
function
|
|
304
|
+
function g2(e) {
|
|
305
305
|
var t = e.data, i4 = o2[t.workerId], r2 = false;
|
|
306
306
|
if (t.error) i4.userError(t.error, t.file);
|
|
307
307
|
else if (t.results && t.results.data) {
|
|
308
308
|
var n2 = { abort: function() {
|
|
309
309
|
r2 = true, _2(t.workerId, { data: [], errors: [], meta: { aborted: true } });
|
|
310
|
-
}, pause:
|
|
310
|
+
}, pause: m, resume: m };
|
|
311
311
|
if (q2(i4.userStep)) {
|
|
312
312
|
for (var s2 = 0; s2 < t.results.data.length && (i4.userStep({ data: t.results.data[s2], errors: t.results.errors, meta: t.results.meta }, n2), !r2); s2++) ;
|
|
313
313
|
delete t.results;
|
|
@@ -319,7 +319,7 @@ var require_papaparse_min = __commonJS({
|
|
|
319
319
|
var i4 = o2[e];
|
|
320
320
|
q2(i4.userComplete) && i4.userComplete(t), i4.terminate(), delete o2[e];
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function m() {
|
|
323
323
|
throw new Error("Not implemented.");
|
|
324
324
|
}
|
|
325
325
|
function b2(e) {
|
|
@@ -328,7 +328,7 @@ var require_papaparse_min = __commonJS({
|
|
|
328
328
|
for (t in e) i4[t] = b2(e[t]);
|
|
329
329
|
return i4;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function y4(e, t) {
|
|
332
332
|
return function() {
|
|
333
333
|
e.apply(t, arguments);
|
|
334
334
|
};
|
|
@@ -339,20 +339,20 @@ var require_papaparse_min = __commonJS({
|
|
|
339
339
|
return v2.parse = function(e, t) {
|
|
340
340
|
var i4 = (t = t || {}).dynamicTyping || false;
|
|
341
341
|
q2(i4) && (t.dynamicTypingFunction = i4, i4 = {});
|
|
342
|
-
if (t.dynamicTyping = i4, t.transform = !!q2(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i4 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e = P2(e), i4 = new (t.download ? f : c)(t)) : true === e.readable && q2(e.read) && q2(e.on) ? i4 = new
|
|
342
|
+
if (t.dynamicTyping = i4, t.transform = !!q2(t.transform) && t.transform, !t.worker || !v2.WORKERS_SUPPORTED) return i4 = null, v2.NODE_STREAM_INPUT, "string" == typeof e ? (e = P2(e), i4 = new (t.download ? f : c)(t)) : true === e.readable && q2(e.read) && q2(e.on) ? i4 = new p(t) : (n.File && e instanceof File || e instanceof Object) && (i4 = new l2(t)), i4.stream(e);
|
|
343
343
|
(i4 = (() => {
|
|
344
344
|
var e2;
|
|
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 =
|
|
348
|
+
})(), (e2 = new n.Worker(e2)).onmessage = g2, e2.id = h2++, o2[e2.id] = e2);
|
|
349
349
|
})()).userStep = t.step, i4.userChunk = t.chunk, i4.userComplete = t.complete, i4.userError = t.error, t.step = q2(t.step), t.chunk = q2(t.chunk), t.complete = q2(t.complete), t.error = q2(t.error), delete t.worker, i4.postMessage({ input: e, config: t, workerId: i4.id });
|
|
350
350
|
}, v2.unparse = function(e, t) {
|
|
351
|
-
var s2 = false, _3 = true,
|
|
351
|
+
var s2 = false, _3 = true, m2 = ",", y5 = "\r\n", a4 = '"', o4 = a4 + a4, i4 = false, r2 = null, h3 = false, u5 = ((() => {
|
|
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 || (
|
|
355
|
+
}).length || (m2 = 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 || (i4 = t.skipEmptyLines), "string" == typeof t.newline && (y5 = 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
|
}
|
|
@@ -368,8 +368,8 @@ var require_papaparse_min = __commonJS({
|
|
|
368
368
|
function n2(e2, t2, i5) {
|
|
369
369
|
var r4 = "", n4 = ("string" == typeof e2 && (e2 = JSON.parse(e2)), "string" == typeof t2 && (t2 = JSON.parse(t2)), Array.isArray(e2) && 0 < e2.length), s4 = !Array.isArray(t2[0]);
|
|
370
370
|
if (n4 && _3) {
|
|
371
|
-
for (var a5 = 0; a5 < e2.length; a5++) 0 < a5 && (r4 +=
|
|
372
|
-
0 < t2.length && (r4 +=
|
|
371
|
+
for (var a5 = 0; a5 < e2.length; a5++) 0 < a5 && (r4 += m2), r4 += k2(e2[a5], a5);
|
|
372
|
+
0 < t2.length && (r4 += y5);
|
|
373
373
|
}
|
|
374
374
|
for (var o5 = 0; o5 < t2.length; o5++) {
|
|
375
375
|
var h4 = (n4 ? e2 : t2[o5]).length, u6 = false, d2 = n4 ? 0 === Object.keys(t2[o5]).length : 0 === t2[o5].length;
|
|
@@ -381,12 +381,12 @@ var require_papaparse_min = __commonJS({
|
|
|
381
381
|
u6 = "" === f2.join("").trim();
|
|
382
382
|
}
|
|
383
383
|
if (!u6) {
|
|
384
|
-
for (var
|
|
385
|
-
0 <
|
|
386
|
-
var
|
|
387
|
-
r4 += k2(t2[o5][
|
|
384
|
+
for (var p2 = 0; p2 < h4; p2++) {
|
|
385
|
+
0 < p2 && !d2 && (r4 += m2);
|
|
386
|
+
var g3 = n4 && s4 ? e2[p2] : p2;
|
|
387
|
+
r4 += k2(t2[o5][g3], p2);
|
|
388
388
|
}
|
|
389
|
-
o5 < t2.length - 1 && (!i5 || 0 < h4 && !d2) && (r4 +=
|
|
389
|
+
o5 < t2.length - 1 && (!i5 || 0 < h4 && !d2) && (r4 += y5);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
392
|
return r4;
|
|
@@ -396,9 +396,9 @@ var require_papaparse_min = __commonJS({
|
|
|
396
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 = (i5 = e2.toString()).replace(u5, o4), (n4 = n4 || true === s2 || "function" == typeof s2 && s2(e2, t2) || Array.isArray(s2) && s2[t2] || ((e4, t4) => {
|
|
397
397
|
for (var i6 = 0; i6 < t4.length; i6++) if (-1 < e4.indexOf(t4[i6])) return true;
|
|
398
398
|
return false;
|
|
399
|
-
})(r4, v2.BAD_DELIMITERS) || -1 < r4.indexOf(
|
|
399
|
+
})(r4, v2.BAD_DELIMITERS) || -1 < r4.indexOf(m2) || -1 < i5.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 = i2, v2.NetworkStreamer = f, v2.FileStreamer = l2, v2.StringStreamer = c, v2.ReadableStreamStreamer =
|
|
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 = i2, v2.NetworkStreamer = f, v2.FileStreamer = l2, v2.StringStreamer = c, v2.ReadableStreamStreamer = p, n.jQuery && ((d = n.jQuery).fn.parse = function(o4) {
|
|
402
402
|
var i4 = 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;
|
|
@@ -429,7 +429,7 @@ var require_papaparse_min = __commonJS({
|
|
|
429
429
|
e = e.data;
|
|
430
430
|
void 0 === v2.WORKER_ID && e && (v2.WORKER_ID = e.workerId);
|
|
431
431
|
"string" == typeof e.input ? n.postMessage({ workerId: v2.WORKER_ID, results: v2.parse(e.input, e.config), finished: true }) : (n.File && e.input instanceof File || e.input instanceof Object) && (e = v2.parse(e.input, e.config)) && n.postMessage({ workerId: v2.WORKER_ID, results: e, finished: true });
|
|
432
|
-
}), (f.prototype = Object.create(u4.prototype)).constructor = f, (l2.prototype = Object.create(u4.prototype)).constructor = l2, (c.prototype = Object.create(c.prototype)).constructor = c, (
|
|
432
|
+
}), (f.prototype = Object.create(u4.prototype)).constructor = f, (l2.prototype = Object.create(u4.prototype)).constructor = l2, (c.prototype = Object.create(c.prototype)).constructor = c, (p.prototype = Object.create(u4.prototype)).constructor = p, v2;
|
|
433
433
|
});
|
|
434
434
|
}
|
|
435
435
|
});
|
|
@@ -481,15 +481,15 @@ var numberOr = (raw, dflt) => {
|
|
|
481
481
|
const n = raw == null || raw === "" ? NaN : Number(raw);
|
|
482
482
|
return Number.isFinite(n) ? n : dflt;
|
|
483
483
|
};
|
|
484
|
-
function resolveOptions(
|
|
484
|
+
function resolveOptions(p) {
|
|
485
485
|
return {
|
|
486
486
|
// ---- host fields: pass through exactly as supplied ----
|
|
487
|
-
width:
|
|
488
|
-
height:
|
|
489
|
-
palette:
|
|
490
|
-
geoUnmatched:
|
|
491
|
-
geo:
|
|
492
|
-
geoPoint:
|
|
487
|
+
width: p.width,
|
|
488
|
+
height: p.height,
|
|
489
|
+
palette: p.palette,
|
|
490
|
+
geoUnmatched: p.geoUnmatched,
|
|
491
|
+
geo: p.geo,
|
|
492
|
+
geoPoint: p.geoPoint,
|
|
493
493
|
// THIRD AND FOURTH OCCURRENCES OF THE animLoopDelaySec OMISSION, found together by
|
|
494
494
|
// reading the contract against this list rather than by a bug report. geoPointDest is
|
|
495
495
|
// declared on RenderOptions, passed by the visual and read by the route archetypes, and
|
|
@@ -497,8 +497,8 @@ function resolveOptions(p2) {
|
|
|
497
497
|
// endpoint" never saw the destination end at all. The guard test at the bottom of
|
|
498
498
|
// tests/defaults.test.ts now compares the two lists, because four instances of one
|
|
499
499
|
// omission is a missing check, not four mistakes.
|
|
500
|
-
geoPointDest:
|
|
501
|
-
maxMapPoints:
|
|
500
|
+
geoPointDest: p.geoPointDest,
|
|
501
|
+
maxMapPoints: p.maxMapPoints,
|
|
502
502
|
// FIFTH AND SIXTH OCCURRENCES, and the two that argue hardest for the guard test: both
|
|
503
503
|
// were passed by the visual AND read by the charts, and neither was ever declared here or
|
|
504
504
|
// in the contract - so the contract-vs-whitelist check could not see them either. What
|
|
@@ -506,41 +506,41 @@ function resolveOptions(p2) {
|
|
|
506
506
|
// 0 is MEANINGFUL for both ("let the chart choose", "no paging"), so numberOr rather than
|
|
507
507
|
// `|| DEFAULT`, which would turn an explicit 0 into something else. Clamping stays
|
|
508
508
|
// chart-side for the same reason it does for flipIntervalMs.
|
|
509
|
-
geoPointRadiusPx: Math.max(0, numberOr(
|
|
510
|
-
pageSize: Math.max(0, numberOr(
|
|
511
|
-
uiState:
|
|
512
|
-
setUiState:
|
|
513
|
-
backgroundColor:
|
|
514
|
-
themeBg:
|
|
515
|
-
themeFg:
|
|
516
|
-
isHighContrast:
|
|
517
|
-
themeAccent:
|
|
518
|
-
cultureCode:
|
|
519
|
-
allowTooltips:
|
|
520
|
-
noDataText:
|
|
521
|
-
onSelect:
|
|
509
|
+
geoPointRadiusPx: Math.max(0, numberOr(p.geoPointRadiusPx, 0)),
|
|
510
|
+
pageSize: Math.max(0, numberOr(p.pageSize, 0)),
|
|
511
|
+
uiState: p.uiState,
|
|
512
|
+
setUiState: p.setUiState,
|
|
513
|
+
backgroundColor: p.backgroundColor,
|
|
514
|
+
themeBg: p.themeBg,
|
|
515
|
+
themeFg: p.themeFg,
|
|
516
|
+
isHighContrast: p.isHighContrast,
|
|
517
|
+
themeAccent: p.themeAccent,
|
|
518
|
+
cultureCode: p.cultureCode,
|
|
519
|
+
allowTooltips: p.allowTooltips,
|
|
520
|
+
noDataText: p.noDataText,
|
|
521
|
+
onSelect: p.onSelect,
|
|
522
522
|
// ---- live-restyle knobs: `raw || undefined` / `.toString() || undefined` ----
|
|
523
|
-
colorScaleLow:
|
|
524
|
-
colorScaleHigh:
|
|
523
|
+
colorScaleLow: p.colorScaleLow || void 0,
|
|
524
|
+
colorScaleHigh: p.colorScaleHigh || void 0,
|
|
525
525
|
// "" (global, the default), "frame", or "self"; anything else fails open to global.
|
|
526
|
-
colorScaleScope:
|
|
526
|
+
colorScaleScope: p.colorScaleScope === "frame" || p.colorScaleScope === "self" ? p.colorScaleScope : "",
|
|
527
527
|
// Math.max(50, Math.min(100, Number(raw) || 95)) — only meaningful under "self".
|
|
528
|
-
colorScaleSelfClampPct: clamp(Number(
|
|
528
|
+
colorScaleSelfClampPct: clamp(Number(p.colorScaleSelfClampPct) || COLOR_SCALE_SELF_CLAMP_PCT_DEFAULT, COLOR_SCALE_SELF_CLAMP_PCT_MIN, COLOR_SCALE_SELF_CLAMP_PCT_MAX),
|
|
529
529
|
// Map fills: `raw || undefined` like the colour-scale endpoints. The no-data ->
|
|
530
530
|
// land cascade is left to the chart (so the fallback chain is visible in the
|
|
531
531
|
// generated code); HC substitution has already happened in the caller.
|
|
532
|
-
geoLandColor:
|
|
533
|
-
geoNoDataColor:
|
|
534
|
-
aggregation: (
|
|
532
|
+
geoLandColor: p.geoLandColor || void 0,
|
|
533
|
+
geoNoDataColor: p.geoNoDataColor || void 0,
|
|
534
|
+
aggregation: (p.aggregation == null ? "" : String(p.aggregation)) || void 0,
|
|
535
535
|
// A recognised value wins, anything else falls to the default: an unknown string must
|
|
536
536
|
// never reach a chart as a live mode. Both of these are read on EVERY render, so a
|
|
537
537
|
// reader can change their mind about a cached chart without regenerating it.
|
|
538
538
|
approximatePositions: (() => {
|
|
539
|
-
const v2 = (
|
|
539
|
+
const v2 = (p.approximatePositions == null ? "" : String(p.approximatePositions)).toLowerCase();
|
|
540
540
|
return v2 === "mark" || v2 === "aggregate" || v2 === "skip" ? v2 : APPROXIMATE_POSITIONS_DEFAULT;
|
|
541
541
|
})(),
|
|
542
542
|
valueAxisBaseline: (() => {
|
|
543
|
-
const v2 = (
|
|
543
|
+
const v2 = (p.valueAxisBaseline == null ? "" : String(p.valueAxisBaseline)).toLowerCase();
|
|
544
544
|
return v2 === "zero" || v2 === "fit" || v2 === "auto" ? v2 : VALUE_AXIS_BASELINE_DEFAULT;
|
|
545
545
|
})(),
|
|
546
546
|
// Same shape, and the same reason for it: an unrecognised string must never reach a chart
|
|
@@ -548,25 +548,25 @@ function resolveOptions(p2) {
|
|
|
548
548
|
// the setting that makes the chart PROVE the grid before it names a period, so a garbled
|
|
549
549
|
// value withdraws the claim rather than asserting one.
|
|
550
550
|
seasonalMarkers: (() => {
|
|
551
|
-
const v2 = (
|
|
551
|
+
const v2 = (p.seasonalMarkers == null ? "" : String(p.seasonalMarkers)).toLowerCase();
|
|
552
552
|
return v2 === "auto" || v2 === "always" || v2 === "never" ? v2 : SEASONAL_MARKERS_DEFAULT;
|
|
553
553
|
})(),
|
|
554
554
|
// ---- animation: booleans, default+clamp numerics, "" default enum ----
|
|
555
|
-
animAutoPlay: !!
|
|
555
|
+
animAutoPlay: !!p.animAutoPlay,
|
|
556
556
|
// Math.max(250, Math.min(5000, Number(raw) || 1000))
|
|
557
|
-
animPlaySpeedMs: clamp(Number(
|
|
557
|
+
animPlaySpeedMs: clamp(Number(p.animPlaySpeedMs) || ANIM_PLAY_SPEED_DEFAULT, ANIM_PLAY_SPEED_MIN, ANIM_PLAY_SPEED_MAX),
|
|
558
558
|
// Loop-restart delay (seconds on the overview between auto-play passes).
|
|
559
559
|
// Floored at 0, deliberately NO upper clamp (huge = play once per viewing),
|
|
560
560
|
// and 0 must survive as 0 — hence numberOr, not `|| DEFAULT`. This field was
|
|
561
561
|
// MISSING from the resolve list when the assembly moved here, so callers
|
|
562
562
|
// that passed it saw it dropped: the scrubber read undefined -> 0 -> every
|
|
563
563
|
// pass restarted instantly and resumed-state auto-play lost its pacing.
|
|
564
|
-
animLoopDelaySec: Math.max(ANIM_LOOP_DELAY_MIN, numberOr(
|
|
564
|
+
animLoopDelaySec: Math.max(ANIM_LOOP_DELAY_MIN, numberOr(p.animLoopDelaySec, ANIM_LOOP_DELAY_DEFAULT)),
|
|
565
565
|
// Math.max(3, Math.min(500, Number(raw) || 60))
|
|
566
|
-
animMaxIdealFrames: clamp(Number(
|
|
567
|
-
animStopAtEnd: !!
|
|
568
|
-
filtersDuringPlay: !!
|
|
569
|
-
animTimelineStyle: (
|
|
566
|
+
animMaxIdealFrames: clamp(Number(p.animMaxIdealFrames) || ANIM_MAX_IDEAL_FRAMES_DEFAULT, ANIM_MAX_IDEAL_FRAMES_MIN, ANIM_MAX_IDEAL_FRAMES_MAX),
|
|
567
|
+
animStopAtEnd: !!p.animStopAtEnd,
|
|
568
|
+
filtersDuringPlay: !!p.filtersDuringPlay,
|
|
569
|
+
animTimelineStyle: (p.animTimelineStyle || "").toString(),
|
|
570
570
|
// ---- card deck ----
|
|
571
571
|
// SECOND OCCURRENCE OF THE animLoopDelaySec BUG, six lines above (2026-08-13). The
|
|
572
572
|
// visual passed both of these, the generated code read both correctly, and this
|
|
@@ -579,7 +579,7 @@ function resolveOptions(p2) {
|
|
|
579
579
|
// flipSync DEFAULTS TRUE, so it cannot use `!!p.flipSync` — that would read a missing
|
|
580
580
|
// value as "independent" and hand every deck twelve control strips. Absent means
|
|
581
581
|
// synced; only an explicit false switches it.
|
|
582
|
-
flipSync:
|
|
582
|
+
flipSync: p.flipSync === void 0 || p.flipSync === null ? true : !!p.flipSync,
|
|
583
583
|
// WHERE the controls live, which is a different question from whether the cards move
|
|
584
584
|
// together (2026-08-13: "the ability to flip individual cards shouldn't necessarily
|
|
585
585
|
// stop being able to flip all together too"). Resolution order matters and is the whole
|
|
@@ -592,22 +592,22 @@ function resolveOptions(p2) {
|
|
|
592
592
|
// because a newer client shipped, and "both" would have done exactly that to every deck
|
|
593
593
|
// already in a report.
|
|
594
594
|
flipMode: (() => {
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
if (
|
|
598
|
-
if (
|
|
595
|
+
const m = (p.flipMode == null ? "" : String(p.flipMode)).toLowerCase();
|
|
596
|
+
if (m === "single" || m === "all" || m === "both") return m;
|
|
597
|
+
if (p.flipSync === false) return "single";
|
|
598
|
+
if (p.flipSync === true) return "all";
|
|
599
599
|
return FLIP_MODE_DEFAULT;
|
|
600
600
|
})(),
|
|
601
601
|
// 0 is MEANINGFUL here (manual only) and is the default, so numberOr — not
|
|
602
602
|
// `|| DEFAULT` — for the same reason animLoopDelaySec uses it. Clamping stays
|
|
603
603
|
// chart-side: the archetype already clamps 500..120000 and two clamps in two
|
|
604
604
|
// repositories is how they end up disagreeing.
|
|
605
|
-
flipIntervalMs: Math.max(0, numberOr(
|
|
605
|
+
flipIntervalMs: Math.max(0, numberOr(p.flipIntervalMs, 0)),
|
|
606
606
|
// `raw || undefined`, the same idiom as the colour-scale endpoints and the map fills:
|
|
607
607
|
// blank must arrive as ABSENT, not as an empty string, because the chart's fallback is
|
|
608
608
|
// `options.cardBackgroundColor || <its own choice>` and "" would satisfy a truthiness
|
|
609
609
|
// test in some hands while painting nothing in others.
|
|
610
|
-
cardBackgroundColor:
|
|
610
|
+
cardBackgroundColor: p.cardBackgroundColor || void 0
|
|
611
611
|
};
|
|
612
612
|
}
|
|
613
613
|
|
|
@@ -902,23 +902,23 @@ function A3(n) {
|
|
|
902
902
|
if (r && i2 && c3(r) !== i2 && (r = null), n.city !== void 0 && n.city !== null) {
|
|
903
903
|
let a2 = u(String(n.city)), s = O(a2), f = s ? F(s, n.mapKind) : null;
|
|
904
904
|
if (f && f.length) {
|
|
905
|
-
let d = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R = d ? u(d) : "",
|
|
905
|
+
let d = n.state === void 0 || n.state === null ? "" : String(n.state).trim(), R = d ? u(d) : "", g2 = d ? Y(d) : null, S = [], m = -1;
|
|
906
906
|
for (let c of f) {
|
|
907
907
|
let l2 = c.row, A2 = 0;
|
|
908
|
-
if (d && l2.a1 !== "") if (
|
|
908
|
+
if (d && l2.a1 !== "") if (g2 && l2.a1 === g2 || u(l2.a1) === R) A2++;
|
|
909
909
|
else continue;
|
|
910
910
|
if (i2) if (T(l2.cc) === i2) A2++;
|
|
911
911
|
else continue;
|
|
912
|
-
A2 >
|
|
912
|
+
A2 > m ? (m = A2, S = [c]) : A2 === m && S.push(c);
|
|
913
913
|
}
|
|
914
914
|
S.some((c) => c.primary) && (S = S.filter((c) => c.primary));
|
|
915
|
-
let
|
|
916
|
-
for (let c of S)
|
|
917
|
-
if (
|
|
915
|
+
let p = /* @__PURE__ */ new Map();
|
|
916
|
+
for (let c of S) p.set(c.row.lon.toFixed(2) + "," + c.row.lat.toFixed(2), c.row);
|
|
917
|
+
if (p.size === 1) {
|
|
918
918
|
let c = S[0].row;
|
|
919
919
|
return { lat: c.lat, lon: c.lon, precision: "city" };
|
|
920
920
|
}
|
|
921
|
-
if (
|
|
921
|
+
if (p.size > 1) return { ambiguous: true, matches: p.size };
|
|
922
922
|
}
|
|
923
923
|
}
|
|
924
924
|
if (!i2 || r3.has(i2)) for (let a2 of Z(n.zip)) {
|
|
@@ -938,15 +938,15 @@ 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), o2 = new Array(n.length), i2 = new Array(n.length), r = /* @__PURE__ */ new Set(), a2 = [], s = /* @__PURE__ */ new Set(), f = [], d = /* @__PURE__ */ new Set(), R = [],
|
|
941
|
+
let t = new Array(n.length), o2 = new Array(n.length), i2 = new Array(n.length), r = /* @__PURE__ */ new Set(), a2 = [], s = /* @__PURE__ */ new Set(), f = [], d = /* @__PURE__ */ new Set(), R = [], g2 = { latlon: 0, city: 0, zip3: 0, state: 0, country: 0 }, S = 0, m = 0, p = null;
|
|
942
942
|
for (let l2 = 0; l2 < n.length; ++l2) {
|
|
943
943
|
let A2 = n[l2], C2 = A3({ ...A2, mapKind: e });
|
|
944
944
|
if (S3(C2)) {
|
|
945
|
-
t[l2] = null, o2[l2] = null, i2[l2] = null,
|
|
945
|
+
t[l2] = null, o2[l2] = null, i2[l2] = null, m++;
|
|
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[l2] = C2.lat, o2[l2] = C2.lon, i2[l2] = C2.precision, S++,
|
|
949
|
+
if (t[l2] = C2.lat, o2[l2] = C2.lon, i2[l2] = C2.precision, S++, g2[C2.precision]++, (p === null || G[C2.precision] > G[p]) && (p = 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
|
}
|
|
@@ -957,7 +957,7 @@ function y3(n, e) {
|
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
let c = !n3() && n.some((l2) => l2.city !== null && l2.city !== void 0 && String(l2.city).trim() !== "");
|
|
960
|
-
return { lat: t, lon: o2, precisions: i2, precision:
|
|
960
|
+
return { lat: t, lon: o2, precisions: i2, precision: p, precisionCounts: g2, coarseExamples: f, unmatched: a2, ambiguousRows: m, 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(", ");
|
|
@@ -975,57 +975,59 @@ function o(n) {
|
|
|
975
975
|
return n ? n.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_\-./]+/g, " ").toLowerCase().split(/\s+/).filter((F3) => F3.length > 0) : [];
|
|
976
976
|
}
|
|
977
977
|
|
|
978
|
-
// ../shape-core/dist/chunk-
|
|
978
|
+
// ../shape-core/dist/chunk-7MHZMBRK.mjs
|
|
979
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
|
|
981
|
-
var
|
|
982
|
-
var
|
|
983
|
-
var
|
|
980
|
+
var St = "006007008009010011012013014015016017018019020021022023024025026027028029030031032033034035036037038039040041042043044045046047048049050051052053054056057058059060061062063064065066067068069070071072073074075076077078079080081082083084085086087088089100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191193194195196197198199200201202203204205206207208209210211212214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310312313314315316317318319320321322323324325326327328329330331333334335336337338339341342344346347349350351352354355356357358359360361362363364365366367368369370371372373374376377378379380381382383384385386387388389390391392393394395396397398400401402403404405406407408409410411412413414415416417418420421422423424425426427430431432433434435436437438439440441442443444445446447448449450451452453454455456457458460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508510511512513514515516520521522523524525526527528530531532534535537538539540541542543544545546547548549550551553554556557558559560561562563564565566567570571572573574575576577580581582583584585586587588590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620622623624625626627628629630631633634635636637638639640641644645646647648650651652653654655656657658660661662664665666667668669670671672673674675676677678679680681683684685686687688689690691692693700701703704705706707708710711712713714716717718719720721722723724725726727728729730731734735736737738739740741743744745746747748749750751752753754755756757758759760761762763764765766767768769770772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816820821822823824825826827828829830831832833834835836837838840841843844845846847850851852853855856857859860863864865870871873874875877878879880881882883884890891893894895897898900902903904905906907908910911912913914915916917918919920921922923924925926927928930931932933934935936937939940941943944945946947948949950951952953954955956957958959960961967968969970971972973974975976977978979980981982983984985986988989990991992993994995996997998999";
|
|
981
|
+
var w = new Set(St.match(/.{3}/g) ?? []);
|
|
982
|
+
var at = [["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"]];
|
|
983
|
+
var ct = new Set(at.map((n) => n[0]));
|
|
984
|
+
var yt = { "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" };
|
|
985
|
+
var ut = (() => {
|
|
984
986
|
let n = /* @__PURE__ */ new Map();
|
|
985
|
-
for (let [
|
|
986
|
-
n.set(
|
|
987
|
-
for (let [
|
|
988
|
-
let r =
|
|
987
|
+
for (let [s, i2] of at) n.set(g(i2), s);
|
|
988
|
+
n.set(g("Washington DC"), "DC"), n.set(g("Washington D.C."), "DC"), n.set(g("US Virgin Islands"), "VI");
|
|
989
|
+
for (let [s, i2] of Object.entries(yt)) {
|
|
990
|
+
let r = g(s);
|
|
989
991
|
r && !n.has(r) && n.set(r, i2);
|
|
990
992
|
}
|
|
991
993
|
return n;
|
|
992
994
|
})();
|
|
993
|
-
var
|
|
994
|
-
function
|
|
995
|
+
var lt = /* @__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"]);
|
|
996
|
+
function ft(n) {
|
|
995
997
|
return n.trim().toUpperCase();
|
|
996
998
|
}
|
|
997
|
-
function
|
|
999
|
+
function g(n) {
|
|
998
1000
|
return u(n);
|
|
999
1001
|
}
|
|
1000
|
-
var
|
|
1001
|
-
function
|
|
1002
|
+
var rt = /* @__PURE__ */ new Set(["zip", "zipcode", "postal", "postcode", "plz"]);
|
|
1003
|
+
function y2(n, s) {
|
|
1002
1004
|
if (!n) return false;
|
|
1003
|
-
for (let i2 of o(n)) if (
|
|
1005
|
+
for (let i2 of o(n)) if (s.has(i2)) return true;
|
|
1004
1006
|
return false;
|
|
1005
1007
|
}
|
|
1006
|
-
function
|
|
1008
|
+
function Mt(n, s) {
|
|
1007
1009
|
if (n == null) return null;
|
|
1008
1010
|
let i2 = String(n).trim();
|
|
1009
1011
|
if (i2.length === 0) return null;
|
|
1010
|
-
switch (
|
|
1012
|
+
switch (s) {
|
|
1011
1013
|
case "country-iso3":
|
|
1012
1014
|
case "country-iso2":
|
|
1013
1015
|
case "country-name":
|
|
1014
1016
|
return E(i2);
|
|
1015
1017
|
case "us-state-code":
|
|
1016
1018
|
case "us-state-name": {
|
|
1017
|
-
let r =
|
|
1018
|
-
return
|
|
1019
|
+
let r = ft(i2);
|
|
1020
|
+
return ct.has(r) ? r : ut.get(g(i2)) ?? null;
|
|
1019
1021
|
}
|
|
1020
1022
|
case "us-zip5":
|
|
1021
1023
|
return M3(i2);
|
|
1022
1024
|
case "us-county-fips":
|
|
1023
|
-
return /^\d{5}$/.test(i2) &&
|
|
1025
|
+
return /^\d{5}$/.test(i2) && lt.has(i2.slice(0, 2)) ? i2 : null;
|
|
1024
1026
|
default:
|
|
1025
1027
|
return null;
|
|
1026
1028
|
}
|
|
1027
1029
|
}
|
|
1028
|
-
function
|
|
1030
|
+
function Gt(n) {
|
|
1029
1031
|
switch (n) {
|
|
1030
1032
|
case "country-iso3":
|
|
1031
1033
|
case "country-iso2":
|
|
@@ -1039,26 +1041,29 @@ function Rn(n) {
|
|
|
1039
1041
|
return false;
|
|
1040
1042
|
}
|
|
1041
1043
|
}
|
|
1042
|
-
function
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1044
|
+
function It(n, s) {
|
|
1045
|
+
return s === "us-zip5" ? w.has(n.slice(0, 3)) : true;
|
|
1046
|
+
}
|
|
1047
|
+
function Wt(n, s) {
|
|
1048
|
+
let i2 = new Array(n.length), r = /* @__PURE__ */ new Set(), M2 = [], h2 = 0;
|
|
1049
|
+
for (let N2 = 0; N2 < n.length; ++N2) {
|
|
1050
|
+
let I2 = Mt(n[N2], s), O2 = I2 !== null && It(I2, s) ? I2 : null;
|
|
1051
|
+
if (i2[N2] = O2, O2 !== null) h2++;
|
|
1047
1052
|
else {
|
|
1048
|
-
let
|
|
1049
|
-
if (
|
|
1050
|
-
let
|
|
1051
|
-
if (
|
|
1052
|
-
let
|
|
1053
|
-
r.has(
|
|
1053
|
+
let d = n[N2];
|
|
1054
|
+
if (d != null) {
|
|
1055
|
+
let p = String(d).trim();
|
|
1056
|
+
if (p.length > 0) {
|
|
1057
|
+
let m = p.toLowerCase();
|
|
1058
|
+
r.has(m) || (r.add(m), M2.push(p));
|
|
1054
1059
|
}
|
|
1055
1060
|
}
|
|
1056
1061
|
}
|
|
1057
1062
|
}
|
|
1058
|
-
return { iso: i2, unmatched:
|
|
1063
|
+
return { iso: i2, unmatched: M2, matchedRows: h2, totalRows: n.length };
|
|
1059
1064
|
}
|
|
1060
1065
|
|
|
1061
|
-
// ../shape-core/dist/chunk-
|
|
1066
|
+
// ../shape-core/dist/chunk-6ZU65KK6.mjs
|
|
1062
1067
|
var import_papaparse = __toESM(require_papaparse_min(), 1);
|
|
1063
1068
|
/*! @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. */
|
|
1064
1069
|
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" };
|
|
@@ -1077,33 +1082,33 @@ Dt(N);
|
|
|
1077
1082
|
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
1083
|
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"];
|
|
1079
1084
|
var Pt = ["latitude", "longitude"];
|
|
1080
|
-
var
|
|
1081
|
-
var
|
|
1082
|
-
var
|
|
1085
|
+
var Gt2 = ["latitude", "longitude"];
|
|
1086
|
+
var yt2 = /^\s*(sum|count|count\s+distinct|distinct\s+count)\s+of\s+/i;
|
|
1087
|
+
var Wt2 = /(?<=[a-z0-9])(?=[A-Z])|(?<=[A-Za-z])(?=[0-9])|(?<=[0-9])(?=[A-Za-z])/g;
|
|
1083
1088
|
var Ft = new RegExp("\\b(" + Ot.join("|") + ")\\b|(" + Lt.join("|") + ")$", "i");
|
|
1084
|
-
var Vt = new RegExp("\\b(" + Pt.join("|") + ")\\b|(" +
|
|
1089
|
+
var Vt = new RegExp("\\b(" + Pt.join("|") + ")\\b|(" + Gt2.join("|") + ")$", "i");
|
|
1085
1090
|
function _t(n) {
|
|
1086
|
-
return n ? String(n).replace(
|
|
1091
|
+
return n ? String(n).replace(yt2, "").trim() : "";
|
|
1087
1092
|
}
|
|
1088
1093
|
function kt(n) {
|
|
1089
|
-
return !!n &&
|
|
1094
|
+
return !!n && yt2.test(String(n));
|
|
1090
1095
|
}
|
|
1091
1096
|
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
1097
|
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");
|
|
1093
1098
|
function zt(n) {
|
|
1094
1099
|
let t = _t(n);
|
|
1095
|
-
return t.length === 0 ? "" : t.replace(
|
|
1100
|
+
return t.length === 0 ? "" : t.replace(Wt2, " ");
|
|
1096
1101
|
}
|
|
1097
1102
|
function Ct(n, t) {
|
|
1098
1103
|
if (!t) return false;
|
|
1099
1104
|
let e = _t(t);
|
|
1100
1105
|
return n.test(zt(t)) || n.test(e) || n.test(o(e).join(" "));
|
|
1101
1106
|
}
|
|
1102
|
-
function
|
|
1107
|
+
function Mt2(n) {
|
|
1103
1108
|
return Ct(Vt, n);
|
|
1104
1109
|
}
|
|
1105
1110
|
function Bt(n) {
|
|
1106
|
-
return Ct(Ft, n) ||
|
|
1111
|
+
return Ct(Ft, n) || Mt2(n);
|
|
1107
1112
|
}
|
|
1108
1113
|
var At = /int|double|decimal|single|float|number|currency|money/i;
|
|
1109
1114
|
function Ht(n) {
|
|
@@ -1116,7 +1121,7 @@ function Kt(n) {
|
|
|
1116
1121
|
function Tt(n) {
|
|
1117
1122
|
let t = n ?? {}, e = Ht(t);
|
|
1118
1123
|
if (e !== "Continuous") return { nature: e, additivity: "unknown", basis: "role", suppressed: false };
|
|
1119
|
-
if (
|
|
1124
|
+
if (Mt2(t.name)) return { nature: e, additivity: "positional", basis: "name", suppressed: true };
|
|
1120
1125
|
let s = String(t.additivity ?? "").trim().toLowerCase();
|
|
1121
1126
|
if (!(s === "additive" && kt(t.name))) {
|
|
1122
1127
|
if (s === "additive") return { nature: e, additivity: "additive", basis: "measured", suppressed: false };
|
|
@@ -1206,7 +1211,7 @@ function D2(r) {
|
|
|
1206
1211
|
return Math.round(n / e.length * 1e3) / 10;
|
|
1207
1212
|
}
|
|
1208
1213
|
function Z2(r, e) {
|
|
1209
|
-
return
|
|
1214
|
+
return y2(e, rt) ? true : F2(r).some((n) => /^\d{5}(-\d{4})?$/.test(n.replace(/\.0+$/, "")));
|
|
1210
1215
|
}
|
|
1211
1216
|
function Yt(r, e) {
|
|
1212
1217
|
let n = A(r);
|
|
@@ -1236,15 +1241,15 @@ function Qt(r, e, n, s, c) {
|
|
|
1236
1241
|
let i2 = n?.[t];
|
|
1237
1242
|
i2 && X2.has(i2) && (o2[t] = i2);
|
|
1238
1243
|
}
|
|
1239
|
-
let
|
|
1240
|
-
if (
|
|
1241
|
-
let t = l2(
|
|
1242
|
-
i2 < 95 ? u4.push(`zip=${
|
|
1244
|
+
let p = n?.zip;
|
|
1245
|
+
if (p && k2.has(p)) {
|
|
1246
|
+
let t = l2(p), i2 = D2(t);
|
|
1247
|
+
i2 < 95 ? u4.push(`zip=${p} (only ${i2}% of values read as ZIPs)`) : Z2(t, p) ? o2.zip = p : u4.push(`zip=${p} (all values are 3-4 digits with nothing to say they are postal)`);
|
|
1243
1248
|
}
|
|
1244
|
-
let
|
|
1245
|
-
if (
|
|
1246
|
-
let t = l2(
|
|
1247
|
-
i2.length > 0 && i2.every((a2) => W2(a2, s)) ? u4.push(`state=${
|
|
1249
|
+
let g2 = n?.state;
|
|
1250
|
+
if (g2 && k2.has(g2)) {
|
|
1251
|
+
let t = l2(g2), i2 = A(t);
|
|
1252
|
+
i2.length > 0 && i2.every((a2) => W2(a2, s)) ? u4.push(`state=${g2} (every value is "CA", which is both Canada and California)`) : C(t) ? (u4.push(`state=${g2} (every value is a country, not a state)`), o2.country || (o2.country = g2)) : M(t) < 95 ? u4.push(`state=${g2} (only ${M(t)}% of values are states/provinces)`) : o2.state = g2;
|
|
1248
1253
|
}
|
|
1249
1254
|
let d = new Set(Object.values(o2).filter(Boolean)), x2 = r.filter((t) => !d.has(t) && !t.startsWith("__"));
|
|
1250
1255
|
if (!o2.state) {
|
|
@@ -1314,14 +1319,14 @@ function resolvePointChannel(cols, rowObjs, point) {
|
|
|
1314
1319
|
}
|
|
1315
1320
|
const hasPointBind = !!bind && !!(bind.city || bind.state || bind.zip || bind.country || bind.lat && bind.lon);
|
|
1316
1321
|
if (hasPointBind) {
|
|
1317
|
-
const
|
|
1322
|
+
const p = bind;
|
|
1318
1323
|
const built = y3(rowObjs.map((r) => ({
|
|
1319
|
-
lat:
|
|
1320
|
-
lon:
|
|
1321
|
-
city:
|
|
1322
|
-
state:
|
|
1323
|
-
zip:
|
|
1324
|
-
country:
|
|
1324
|
+
lat: p.lat ? r[p.lat] : null,
|
|
1325
|
+
lon: p.lon ? r[p.lon] : null,
|
|
1326
|
+
city: p.city ? r[p.city] : null,
|
|
1327
|
+
state: p.state ? r[p.state] : null,
|
|
1328
|
+
zip: p.zip ? r[p.zip] : null,
|
|
1329
|
+
country: p.country ? r[p.country] : null,
|
|
1325
1330
|
label: labelCol ? r[labelCol] : null
|
|
1326
1331
|
})), point?.mapKind);
|
|
1327
1332
|
pLat = built.lat;
|
|
@@ -1361,8 +1366,8 @@ function buildRenderPayload(cols, rowObjs, geo, point, destination) {
|
|
|
1361
1366
|
let geoIso = null;
|
|
1362
1367
|
let geoUnmatched;
|
|
1363
1368
|
let geoUnmatchedDistinct;
|
|
1364
|
-
if (geo && geo.column && geo.kind &&
|
|
1365
|
-
const built =
|
|
1369
|
+
if (geo && geo.column && geo.kind && Gt(geo.kind)) {
|
|
1370
|
+
const built = Wt(rowObjs.map((r) => r[geo.column]), geo.kind);
|
|
1366
1371
|
geoIso = built.iso;
|
|
1367
1372
|
geoUnmatched = { count: built.totalRows - built.matchedRows, examples: built.unmatched.slice(0, 8) };
|
|
1368
1373
|
geoUnmatchedDistinct = built.unmatched.length;
|
|
@@ -1449,26 +1454,26 @@ function createMarkResolver(env) {
|
|
|
1449
1454
|
const so = parseFloat(el.getAttribute("stroke-opacity") || "1");
|
|
1450
1455
|
return s === "transparent" || s === "none" || so <= 0.01;
|
|
1451
1456
|
};
|
|
1452
|
-
const distToPathCenterline = (el, x2,
|
|
1457
|
+
const distToPathCenterline = (el, x2, y4) => {
|
|
1453
1458
|
const L2 = el.getTotalLength();
|
|
1454
1459
|
if (!(L2 > 0)) return Number.MAX_VALUE;
|
|
1455
|
-
const
|
|
1456
|
-
if (!
|
|
1460
|
+
const m = el.getScreenCTM();
|
|
1461
|
+
if (!m) return Number.MAX_VALUE;
|
|
1457
1462
|
let best = Number.MAX_VALUE;
|
|
1458
1463
|
const N2 = 64;
|
|
1459
1464
|
for (let i2 = 0; i2 <= N2; i2++) {
|
|
1460
1465
|
const pt2 = el.getPointAtLength(L2 * i2 / N2);
|
|
1461
|
-
const dx =
|
|
1462
|
-
const dy =
|
|
1466
|
+
const dx = m.a * pt2.x + m.c * pt2.y + m.e - x2;
|
|
1467
|
+
const dy = m.b * pt2.x + m.d * pt2.y + m.f - y4;
|
|
1463
1468
|
const d = dx * dx + dy * dy;
|
|
1464
1469
|
if (d < best) best = d;
|
|
1465
1470
|
}
|
|
1466
1471
|
return Math.sqrt(best);
|
|
1467
1472
|
};
|
|
1468
|
-
const refineHitCorridor = (mark, x2,
|
|
1473
|
+
const refineHitCorridor = (mark, x2, y4, sel) => {
|
|
1469
1474
|
try {
|
|
1470
1475
|
if (!mark || !isInvisibleStrokePath(mark) || !mark.getAttribute("data-row-idx")) return mark;
|
|
1471
|
-
const stack = doc.elementsFromPoint(x2,
|
|
1476
|
+
const stack = doc.elementsFromPoint(x2, y4);
|
|
1472
1477
|
const candidates = [];
|
|
1473
1478
|
for (const el of stack) {
|
|
1474
1479
|
if (!root.contains(el)) continue;
|
|
@@ -1482,7 +1487,7 @@ function createMarkResolver(env) {
|
|
|
1482
1487
|
let best = mark;
|
|
1483
1488
|
let bestD = Number.MAX_VALUE;
|
|
1484
1489
|
for (const el of candidates) {
|
|
1485
|
-
const d = distToPathCenterline(el, x2,
|
|
1490
|
+
const d = distToPathCenterline(el, x2, y4);
|
|
1486
1491
|
if (d < bestD) {
|
|
1487
1492
|
bestD = d;
|
|
1488
1493
|
best = el;
|
|
@@ -1504,9 +1509,9 @@ function createMarkResolver(env) {
|
|
|
1504
1509
|
const findMark = (target, sel = ".d3-mark", ev) => {
|
|
1505
1510
|
if (!isElement(target)) return null;
|
|
1506
1511
|
const el = target;
|
|
1507
|
-
const
|
|
1508
|
-
if (
|
|
1509
|
-
return
|
|
1512
|
+
const m = el.closest(sel);
|
|
1513
|
+
if (m && ev) return refineHitCorridor(m, ev.clientX, ev.clientY, sel);
|
|
1514
|
+
return m;
|
|
1510
1515
|
};
|
|
1511
1516
|
const rowIdxsFromMark = (el) => {
|
|
1512
1517
|
if (!el) return [];
|
|
@@ -1519,9 +1524,9 @@ function createMarkResolver(env) {
|
|
|
1519
1524
|
}
|
|
1520
1525
|
return out;
|
|
1521
1526
|
};
|
|
1522
|
-
const penetrateOverlayAt = (x2,
|
|
1527
|
+
const penetrateOverlayAt = (x2, y4, sel) => {
|
|
1523
1528
|
try {
|
|
1524
|
-
const stack = doc.elementsFromPoint(x2,
|
|
1529
|
+
const stack = doc.elementsFromPoint(x2, y4);
|
|
1525
1530
|
for (const el of stack) {
|
|
1526
1531
|
if (!root.contains(el) || !isElement(el)) continue;
|
|
1527
1532
|
const cand = el.matches(sel) ? el : el.closest(sel);
|
|
@@ -1533,7 +1538,7 @@ function createMarkResolver(env) {
|
|
|
1533
1538
|
}
|
|
1534
1539
|
return null;
|
|
1535
1540
|
};
|
|
1536
|
-
const resolveByGeometry = (x2,
|
|
1541
|
+
const resolveByGeometry = (x2, y4, sel) => {
|
|
1537
1542
|
try {
|
|
1538
1543
|
const cands = root.querySelectorAll(sel);
|
|
1539
1544
|
let best = null, bestArea = Number.MAX_VALUE;
|
|
@@ -1542,7 +1547,7 @@ function createMarkResolver(env) {
|
|
|
1542
1547
|
if (!el.getAttribute("data-row-idx")) continue;
|
|
1543
1548
|
const r = el.getBoundingClientRect ? el.getBoundingClientRect() : null;
|
|
1544
1549
|
if (!r || r.width <= 0 || r.height <= 0) continue;
|
|
1545
|
-
if (x2 < r.left || x2 > r.right ||
|
|
1550
|
+
if (x2 < r.left || x2 > r.right || y4 < r.top || y4 > r.bottom) continue;
|
|
1546
1551
|
const area = r.width * r.height;
|
|
1547
1552
|
if (area < bestArea) {
|
|
1548
1553
|
bestArea = area;
|
|
@@ -1719,9 +1724,9 @@ function isUnfilled(fill) {
|
|
|
1719
1724
|
return f === "none" || f === "transparent" || f === "rgba(0, 0, 0, 0)" || f === "rgba(0,0,0,0)";
|
|
1720
1725
|
}
|
|
1721
1726
|
function widthPx(raw) {
|
|
1722
|
-
const
|
|
1723
|
-
if (!
|
|
1724
|
-
const n = parseFloat(
|
|
1727
|
+
const m = /^(-?\d+(?:\.\d+)?)\s*(px)?$/i.exec(raw);
|
|
1728
|
+
if (!m) return NaN;
|
|
1729
|
+
const n = parseFloat(m[1]);
|
|
1725
1730
|
return isFinite(n) ? n : NaN;
|
|
1726
1731
|
}
|
|
1727
1732
|
function censusHitBands(container, doc) {
|
|
@@ -1739,13 +1744,13 @@ function censusHitBands(container, doc) {
|
|
|
1739
1744
|
if (!OPEN_TAGS.has(tag)) continue;
|
|
1740
1745
|
const cs = styleOf(el, ownerDoc);
|
|
1741
1746
|
const open = isUnfilled(attrOrComputed(el, "fill", cs));
|
|
1742
|
-
const
|
|
1747
|
+
const w2 = widthPx(attrOrComputed(el, "stroke-width", cs) || "1");
|
|
1743
1748
|
const geom = String(el.getAttribute?.("d") ?? "") || `${tag}#${String(el.getAttribute?.(ROW_IDX_ATTR) ?? "")}`;
|
|
1744
1749
|
const inert = String(cs?.pointerEvents ?? el.style?.pointerEvents ?? "") === "none";
|
|
1745
|
-
rows.push({ el, geom, w, open, inert });
|
|
1746
|
-
if (isFinite(
|
|
1750
|
+
rows.push({ el, geom, w: w2, open, inert });
|
|
1751
|
+
if (isFinite(w2)) {
|
|
1747
1752
|
const prev = widestByGeom.get(geom);
|
|
1748
|
-
if (prev === void 0 ||
|
|
1753
|
+
if (prev === void 0 || w2 > prev) widestByGeom.set(geom, w2);
|
|
1749
1754
|
}
|
|
1750
1755
|
}
|
|
1751
1756
|
const out = { ...EMPTY2 };
|
|
@@ -1783,12 +1788,12 @@ function contentExtentOf(boxes) {
|
|
|
1783
1788
|
if (usable.length === 0) return { w: 0, h: 0, source: "none" };
|
|
1784
1789
|
const inFlow = usable.filter((b2) => !b2.floating);
|
|
1785
1790
|
const counted = inFlow.length > 0 ? inFlow : usable;
|
|
1786
|
-
let
|
|
1791
|
+
let w2 = 0, h2 = 0;
|
|
1787
1792
|
for (const b2 of counted) {
|
|
1788
|
-
if (b2.right >
|
|
1793
|
+
if (b2.right > w2) w2 = b2.right;
|
|
1789
1794
|
if (b2.bottom > h2) h2 = b2.bottom;
|
|
1790
1795
|
}
|
|
1791
|
-
return { w, h: h2, source: inFlow.length > 0 ? "in-flow" : "all-floating" };
|
|
1796
|
+
return { w: w2, h: h2, source: inFlow.length > 0 ? "in-flow" : "all-floating" };
|
|
1792
1797
|
}
|
|
1793
1798
|
function scrollFitFor(contentW, contentH, viewportW, viewportH, slackPx = SCROLL_SLACK_PX) {
|
|
1794
1799
|
return {
|
|
@@ -1798,8 +1803,8 @@ function scrollFitFor(contentW, contentH, viewportW, viewportH, slackPx = SCROLL
|
|
|
1798
1803
|
}
|
|
1799
1804
|
var FIT_CONTENT_SELECTOR = "text, .d3-mark, .d3-legend-mark";
|
|
1800
1805
|
var PHANTOM_FRACTION = 0.95;
|
|
1801
|
-
function isPhantomBox(
|
|
1802
|
-
return
|
|
1806
|
+
function isPhantomBox(w2, h2, refW, refH) {
|
|
1807
|
+
return w2 > refW * PHANTOM_FRACTION || h2 > refH * PHANTOM_FRACTION;
|
|
1803
1808
|
}
|
|
1804
1809
|
var MAX_FRAME_GROW_FACTOR = 20;
|
|
1805
1810
|
function planFrameGrow(inkBottomPx, elHeightPx, viewBoxH, ctmScale, slackPx = SCROLL_SLACK_PX, maxFactor = MAX_FRAME_GROW_FACTOR) {
|
|
@@ -1874,9 +1879,9 @@ function axisPinPlacement(band, scrollTop, viewportH) {
|
|
|
1874
1879
|
|
|
1875
1880
|
// src/fitDom.ts
|
|
1876
1881
|
var FIT_WALK_CAP = 8e3;
|
|
1877
|
-
function ctmScaleOf(
|
|
1878
|
-
if (!
|
|
1879
|
-
const s = Math.hypot(
|
|
1882
|
+
function ctmScaleOf(m) {
|
|
1883
|
+
if (!m) return 0;
|
|
1884
|
+
const s = Math.hypot(m.a, m.b);
|
|
1880
1885
|
return isFinite(s) && s > 0 ? s : 0;
|
|
1881
1886
|
}
|
|
1882
1887
|
function svgInkReach(svg) {
|
|
@@ -2042,8 +2047,8 @@ function pinScrolledAxis(container, svg) {
|
|
|
2042
2047
|
const view = doc && doc.defaultView || globalThis;
|
|
2043
2048
|
const svgBox = svg.getBoundingClientRect();
|
|
2044
2049
|
if (!(svgBox.width > 0) || !(svgBox.height > 0)) return noPin("unmeasurable");
|
|
2045
|
-
const
|
|
2046
|
-
if (!
|
|
2050
|
+
const m = typeof svg.getScreenCTM === "function" ? svg.getScreenCTM() : null;
|
|
2051
|
+
if (!m || !(m.a > 0) || !(m.d > 0) || !isFinite(m.e) || !isFinite(m.f)) return noPin("no-ctm");
|
|
2047
2052
|
const viewportH = container.clientHeight;
|
|
2048
2053
|
if (!(viewportH > 0)) return noPin("unmeasurable");
|
|
2049
2054
|
const rel = (r) => ({ left: r.left - svgBox.left, top: r.top - svgBox.top, right: r.right - svgBox.left, bottom: r.bottom - svgBox.top });
|
|
@@ -2052,11 +2057,11 @@ function pinScrolledAxis(container, svg) {
|
|
|
2052
2057
|
for (let i2 = 0; i2 < ticks.length; i2++) {
|
|
2053
2058
|
const t = ticks[i2];
|
|
2054
2059
|
if (t.closest("svg") !== svg) continue;
|
|
2055
|
-
const
|
|
2056
|
-
if (!
|
|
2057
|
-
const list = byAxis.get(
|
|
2060
|
+
const p = t.parentElement;
|
|
2061
|
+
if (!p) continue;
|
|
2062
|
+
const list = byAxis.get(p);
|
|
2058
2063
|
if (list) list.push(t);
|
|
2059
|
-
else byAxis.set(
|
|
2064
|
+
else byAxis.set(p, [t]);
|
|
2060
2065
|
}
|
|
2061
2066
|
const axes = [];
|
|
2062
2067
|
const cands = [];
|
|
@@ -2103,8 +2108,8 @@ function pinScrolledAxis(container, svg) {
|
|
|
2103
2108
|
}
|
|
2104
2109
|
const styles = svg.querySelectorAll("style");
|
|
2105
2110
|
for (let i2 = 0; i2 < styles.length; i2++) pinSvg.appendChild(styles[i2].cloneNode(true));
|
|
2106
|
-
const vbX = (svgBox.left -
|
|
2107
|
-
const vbW = svgBox.width /
|
|
2111
|
+
const vbX = (svgBox.left - m.e) / m.a, vbY = (svgBox.top + band.top - m.f) / m.d;
|
|
2112
|
+
const vbW = svgBox.width / m.a, vbH = bandPx / m.d;
|
|
2108
2113
|
pinSvg.setAttribute("viewBox", `${vbX} ${vbY} ${vbW} ${vbH}`);
|
|
2109
2114
|
pinSvg.setAttribute("preserveAspectRatio", "none");
|
|
2110
2115
|
pinSvg.setAttribute("width", String(svgBox.width));
|
|
@@ -2278,8 +2283,8 @@ function fitRenderedChart(container, opts = {}) {
|
|
|
2278
2283
|
function parseRGBA(c) {
|
|
2279
2284
|
if (typeof c !== "string") return null;
|
|
2280
2285
|
const s = c.trim();
|
|
2281
|
-
const
|
|
2282
|
-
if (
|
|
2286
|
+
const m = s.match(/^rgba?\(\s*([\d.]+)\s*,\s*([\d.]+)\s*,\s*([\d.]+)\s*(?:,\s*([\d.]+)\s*)?\)$/i);
|
|
2287
|
+
if (m) return [parseFloat(m[1]), parseFloat(m[2]), parseFloat(m[3]), m[4] !== void 0 ? parseFloat(m[4]) : 1];
|
|
2283
2288
|
let h2 = s.replace(/^#/, "");
|
|
2284
2289
|
if (h2.length === 3) h2 = h2.split("").map((ch) => ch + ch).join("");
|
|
2285
2290
|
if (h2.length === 6 && /^[0-9a-fA-F]{6}$/.test(h2)) {
|
|
@@ -2385,8 +2390,8 @@ function clamp01(v2) {
|
|
|
2385
2390
|
return Math.max(0, Math.min(1, v2));
|
|
2386
2391
|
}
|
|
2387
2392
|
function hexToRGB(hex) {
|
|
2388
|
-
const
|
|
2389
|
-
return [
|
|
2393
|
+
const p = toRGBA(hex);
|
|
2394
|
+
return [p[0], p[1], p[2]];
|
|
2390
2395
|
}
|
|
2391
2396
|
|
|
2392
2397
|
// src/labelContrastDom.ts
|
|
@@ -2397,17 +2402,17 @@ function backedSamples(el, pts) {
|
|
|
2397
2402
|
try {
|
|
2398
2403
|
const ge = el;
|
|
2399
2404
|
if (typeof ge.isPointInFill !== "function" || typeof ge.getScreenCTM !== "function") return null;
|
|
2400
|
-
const
|
|
2405
|
+
const m = ge.getScreenCTM();
|
|
2401
2406
|
const svg = ge.ownerSVGElement;
|
|
2402
|
-
if (!
|
|
2407
|
+
if (!m || !svg || typeof svg.createSVGPoint !== "function") return null;
|
|
2403
2408
|
if (pts.length === 0) return null;
|
|
2404
|
-
const inv =
|
|
2409
|
+
const inv = m.inverse();
|
|
2405
2410
|
const hit = [];
|
|
2406
2411
|
for (let i2 = 0; i2 < pts.length; i2++) {
|
|
2407
|
-
const
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
hit.push(ge.isPointInFill(
|
|
2412
|
+
const p = svg.createSVGPoint();
|
|
2413
|
+
p.x = pts[i2].x;
|
|
2414
|
+
p.y = pts[i2].y;
|
|
2415
|
+
hit.push(ge.isPointInFill(p.matrixTransform(inv)));
|
|
2411
2416
|
}
|
|
2412
2417
|
return hit;
|
|
2413
2418
|
} catch {
|
|
@@ -2568,8 +2573,8 @@ var D3_PLUGIN_PACKAGES = {
|
|
|
2568
2573
|
};
|
|
2569
2574
|
function requiredD3Plugins(code) {
|
|
2570
2575
|
const out = /* @__PURE__ */ new Set();
|
|
2571
|
-
for (const
|
|
2572
|
-
const pkg = D3_PLUGIN_PACKAGES[
|
|
2576
|
+
for (const m of String(code || "").matchAll(/\bd3\s*\.\s*(\w+)\s*\(/g)) {
|
|
2577
|
+
const pkg = D3_PLUGIN_PACKAGES[m[1]];
|
|
2573
2578
|
if (pkg) out.add(pkg);
|
|
2574
2579
|
}
|
|
2575
2580
|
return [...out].sort();
|
|
@@ -2581,8 +2586,8 @@ function explainRenderFailure(err, d3) {
|
|
|
2581
2586
|
"[@bicharts/chart-host] no d3 was provided, so the generated chart could not run. Pass it explicitly \u2014 createChartHost(el, { d3 }) / <BicChart d3={d3} /> \u2014 or set window.d3. The chart needs D3 v7 (npm install d3@7). Original error: " + msg
|
|
2582
2587
|
);
|
|
2583
2588
|
}
|
|
2584
|
-
const
|
|
2585
|
-
const name =
|
|
2589
|
+
const m = /d3\.(\w+) is not a function|(\w+) is not a function/.exec(msg);
|
|
2590
|
+
const name = m?.[1] ?? m?.[2] ?? "";
|
|
2586
2591
|
const pkg = D3_PLUGIN_PACKAGES[name];
|
|
2587
2592
|
if (pkg) {
|
|
2588
2593
|
return new Error(
|
|
@@ -2733,10 +2738,10 @@ function createChartHost(container, config) {
|
|
|
2733
2738
|
if (active && tickStillDrawn) activeTickEl.classList?.add(ACTIVE_TICK_CLASS);
|
|
2734
2739
|
const wanted = new Set(sel ?? []);
|
|
2735
2740
|
const marks = container.querySelectorAll(`.${MARK_CLASS}[${ROW_IDX_ATTR}], .${LEGEND_MARK_CLASS}[${ROW_IDX_ATTR}]`);
|
|
2736
|
-
for (const
|
|
2737
|
-
const rows = parseRowIdxs(
|
|
2738
|
-
const
|
|
2739
|
-
|
|
2741
|
+
for (const m of Array.from(marks)) {
|
|
2742
|
+
const rows = parseRowIdxs(m.getAttribute(ROW_IDX_ATTR));
|
|
2743
|
+
const on = active && rows.some((r) => wanted.has(r));
|
|
2744
|
+
m.classList?.[on ? "add" : "remove"](MARK_SELECTED_CLASS);
|
|
2740
2745
|
}
|
|
2741
2746
|
} catch {
|
|
2742
2747
|
}
|
|
@@ -2817,8 +2822,8 @@ function createChartHost(container, config) {
|
|
|
2817
2822
|
renderFn = compileRenderFn(config.code, win, doc, d3);
|
|
2818
2823
|
}
|
|
2819
2824
|
if (resolved.geo === void 0 && config.geoKind) {
|
|
2820
|
-
const
|
|
2821
|
-
if (
|
|
2825
|
+
const g2 = config.geoProvider?.(config.geoKind) ?? geoFromCache(config.geoKind);
|
|
2826
|
+
if (g2) resolved = { ...resolved, geo: g2 };
|
|
2822
2827
|
else if (!warnedGeo) {
|
|
2823
2828
|
warnedGeo = true;
|
|
2824
2829
|
try {
|
package/dist/index.mjs
CHANGED
|
@@ -110,7 +110,7 @@ import {
|
|
|
110
110
|
svgInkReach,
|
|
111
111
|
toRGBA,
|
|
112
112
|
unpinScrolledAxis
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-5EX2EOOE.mjs";
|
|
114
114
|
import "./chunk-A2GMXZP7.mjs";
|
|
115
115
|
import "./chunk-GHODWOAL.mjs";
|
|
116
116
|
|
|
@@ -611,14 +611,15 @@ function askApplyImprovements(container, reason, opts = {}) {
|
|
|
611
611
|
|
|
612
612
|
// src/qualifyGroups.ts
|
|
613
613
|
function newQualifyGroupState() {
|
|
614
|
-
return { preview: false, previewClosed: false, projected: false, notRecommended: false };
|
|
614
|
+
return { preview: false, previewClosed: false, projected: false, notRecommended: false, rankedSeen: false };
|
|
615
615
|
}
|
|
616
616
|
function qualifyGroupHeadingFor(row, state) {
|
|
617
617
|
const preview = row.isPreview === true;
|
|
618
|
-
if (preview && !state.preview && !state.notRecommended) {
|
|
618
|
+
if (preview && !state.preview && !state.notRecommended && !state.rankedSeen) {
|
|
619
619
|
state.preview = true;
|
|
620
620
|
return "preview";
|
|
621
621
|
}
|
|
622
|
+
if (!preview) state.rankedSeen = true;
|
|
622
623
|
if (state.preview && !state.previewClosed && !preview) {
|
|
623
624
|
state.previewClosed = true;
|
|
624
625
|
return "main";
|
package/dist/react.mjs
CHANGED
|
@@ -15,6 +15,8 @@ export interface QualifyGroupState {
|
|
|
15
15
|
previewClosed: boolean;
|
|
16
16
|
projected: boolean;
|
|
17
17
|
notRecommended: boolean;
|
|
18
|
+
/** A ranked (non-preview) row has been seen: from here on a badge is a badge, not a block. */
|
|
19
|
+
rankedSeen: boolean;
|
|
18
20
|
}
|
|
19
21
|
export declare function newQualifyGroupState(): QualifyGroupState;
|
|
20
22
|
/**
|
|
@@ -24,7 +26,13 @@ export declare function newQualifyGroupState(): QualifyGroupState;
|
|
|
24
26
|
*
|
|
25
27
|
* ORDER OF THE CHECKS IS THE CONTRACT:
|
|
26
28
|
* 1. "preview" opens the block - but never once the not-recommended block has opened, because a
|
|
27
|
-
* preview type the ontology ruled out is NOT floated and belongs where it landed.
|
|
29
|
+
* preview type the ontology ruled out is NOT floated and belongs where it landed. AND NEVER
|
|
30
|
+
* ONCE A RANKED ROW HAS BEEN SEEN. The preview BLOCK is the set of rows the server floated
|
|
31
|
+
* to the top (preview TYPES, which cannot be scored); a preview LANE sits on a scorable type
|
|
32
|
+
* that ranks on its own merits and is deliberately left where it ranks, carrying only its
|
|
33
|
+
* badge. Before this clause, one badged lane mid-list opened "New - in preview" above row 13
|
|
34
|
+
* and closed it with "Best fit for your data" above row 14 - two headings claiming a
|
|
35
|
+
* grouping the list did not have.
|
|
28
36
|
* 2. "main" closes it, at the first row that is not preview. Emitted only if a block opened.
|
|
29
37
|
* 3. "projected" and 4. "notRecommended" are unchanged from the single-host original.
|
|
30
38
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bicharts/chart-host",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.82",
|
|
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",
|