precision-dashwidgets 0.2.1 → 0.2.2

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.
@@ -1,43 +1,43 @@
1
- import { defineComponent as Ee, createElementBlock as z, openBlock as B, createElementVNode as $, ref as N, watch as W, onMounted as at, onBeforeUnmount as un, createBlock as ln, createVNode as re, computed as H, withDirectives as Et, vShow as Dn, createCommentVNode as _e, Fragment as fe, renderList as we, toDisplayString as ne, vModelSelect as On, normalizeStyle as Pn, onUnmounted as qn, resolveComponent as vt, normalizeClass as Yn, vModelText as Vn, withCtx as Le, createTextVNode as mt, inject as jn, unref as be, watchEffect as Xn, renderSlot as sn } from "vue";
1
+ import { defineComponent as Ne, createElementBlock as D, openBlock as U, createElementVNode as L, ref as $, watch as H, onMounted as ot, onBeforeUnmount as un, createBlock as ln, createVNode as ie, computed as W, withDirectives as Et, vShow as Dn, createCommentVNode as Ce, Fragment as ye, renderList as ke, toDisplayString as ae, vModelSelect as On, normalizeStyle as Pn, onUnmounted as qn, resolveComponent as vt, normalizeClass as Vn, vModelText as Yn, withCtx as Ue, createTextVNode as mt, inject as jn, unref as Se, watchEffect as Xn, renderSlot as sn } from "vue";
2
2
  import { ElTooltip as Gn } from "element-plus";
3
- import { defineStore as Wn } from "pinia";
3
+ import { defineStore as Hn } from "pinia";
4
4
  /*! Element Plus Icons Vue v2.3.2 */
5
- var Hn = /* @__PURE__ */ Ee({
5
+ var Wn = /* @__PURE__ */ Ne({
6
6
  name: "InfoFilled",
7
7
  __name: "info-filled",
8
8
  setup(e) {
9
- return (t, n) => (B(), z("svg", {
9
+ return (t, n) => (U(), D("svg", {
10
10
  xmlns: "http://www.w3.org/2000/svg",
11
11
  viewBox: "0 0 1024 1024"
12
12
  }, [
13
- $("path", {
13
+ L("path", {
14
14
  fill: "currentColor",
15
15
  d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
16
16
  })
17
17
  ]));
18
18
  }
19
- }), Qn = Hn;
20
- function q(e) {
19
+ }), Qn = Wn;
20
+ function V(e) {
21
21
  return e != null && typeof e == "object" && e["@@functional/placeholder"] === !0;
22
22
  }
23
- function ve(e) {
23
+ function be(e) {
24
24
  return function t(n) {
25
- return arguments.length === 0 || q(n) ? t : e.apply(this, arguments);
25
+ return arguments.length === 0 || V(n) ? t : e.apply(this, arguments);
26
26
  };
27
27
  }
28
- function de(e) {
28
+ function we(e) {
29
29
  return function t(n, r) {
30
30
  switch (arguments.length) {
31
31
  case 0:
32
32
  return t;
33
33
  case 1:
34
- return q(n) ? t : ve(function(a) {
34
+ return V(n) ? t : be(function(a) {
35
35
  return e(n, a);
36
36
  });
37
37
  default:
38
- return q(n) && q(r) ? t : q(n) ? ve(function(a) {
38
+ return V(n) && V(r) ? t : V(n) ? be(function(a) {
39
39
  return e(a, r);
40
- }) : q(r) ? ve(function(a) {
40
+ }) : V(r) ? be(function(a) {
41
41
  return e(n, a);
42
42
  }) : e(n, r);
43
43
  }
@@ -49,29 +49,29 @@ function Kn(e) {
49
49
  case 0:
50
50
  return t;
51
51
  case 1:
52
- return q(n) ? t : de(function(o, u) {
52
+ return V(n) ? t : we(function(o, u) {
53
53
  return e(n, o, u);
54
54
  });
55
55
  case 2:
56
- return q(n) && q(r) ? t : q(n) ? de(function(o, u) {
56
+ return V(n) && V(r) ? t : V(n) ? we(function(o, u) {
57
57
  return e(o, r, u);
58
- }) : q(r) ? de(function(o, u) {
58
+ }) : V(r) ? we(function(o, u) {
59
59
  return e(n, o, u);
60
- }) : ve(function(o) {
60
+ }) : be(function(o) {
61
61
  return e(n, r, o);
62
62
  });
63
63
  default:
64
- return q(n) && q(r) && q(a) ? t : q(n) && q(r) ? de(function(o, u) {
64
+ return V(n) && V(r) && V(a) ? t : V(n) && V(r) ? we(function(o, u) {
65
65
  return e(o, u, a);
66
- }) : q(n) && q(a) ? de(function(o, u) {
66
+ }) : V(n) && V(a) ? we(function(o, u) {
67
67
  return e(o, r, u);
68
- }) : q(r) && q(a) ? de(function(o, u) {
68
+ }) : V(r) && V(a) ? we(function(o, u) {
69
69
  return e(n, o, u);
70
- }) : q(n) ? ve(function(o) {
70
+ }) : V(n) ? be(function(o) {
71
71
  return e(o, r, a);
72
- }) : q(r) ? ve(function(o) {
72
+ }) : V(r) ? be(function(o) {
73
73
  return e(n, o, a);
74
- }) : q(a) ? ve(function(o) {
74
+ }) : V(a) ? be(function(o) {
75
75
  return e(n, r, o);
76
76
  }) : e(n, r, a);
77
77
  }
@@ -84,7 +84,7 @@ function Zn(e, t) {
84
84
  var n = e < 0 ? t.length + e : e;
85
85
  return t[n];
86
86
  }
87
- var er = /* @__PURE__ */ de(function(e, t) {
87
+ var er = /* @__PURE__ */ we(function(e, t) {
88
88
  return t == null || t !== t ? e : t;
89
89
  });
90
90
  function tr(e, t) {
@@ -99,20 +99,20 @@ function tr(e, t) {
99
99
  var nr = /* @__PURE__ */ Kn(function(e, t, n) {
100
100
  return er(e, tr(t, n));
101
101
  });
102
- const cn = Wn("duckdb", () => {
103
- const e = N(null), t = N(!1), n = N(!1), r = N(""), a = N(/* @__PURE__ */ new Map()), o = N(/* @__PURE__ */ new Map()), u = N(/* @__PURE__ */ new Map());
102
+ const cn = Hn("duckdb", () => {
103
+ const e = $(null), t = $(!1), n = $(!1), r = $(""), a = $(/* @__PURE__ */ new Map()), o = $(/* @__PURE__ */ new Map()), u = $(/* @__PURE__ */ new Map());
104
104
  let l = null;
105
- const f = H(() => t.value && !r.value), c = H(() => (E) => a.value.get(E)), p = H(() => (E) => {
106
- const R = a.value.get(E);
107
- return R && !R.isLoading && !R.error;
108
- }), m = H(() => o.value.size), y = H(() => o.value.size > 0), b = async () => {
105
+ const f = W(() => t.value && !r.value), c = W(() => (E) => a.value.get(E)), p = W(() => (E) => {
106
+ const T = a.value.get(E);
107
+ return T && !T.isLoading && !T.error;
108
+ }), m = W(() => o.value.size), y = W(() => o.value.size > 0), b = async () => {
109
109
  if (typeof window > "u" || typeof Worker > "u") {
110
110
  const E = "DuckDB can only be initialized in the browser.";
111
111
  throw r.value = E, new Error(E);
112
112
  }
113
113
  return e.value ? e.value : l ? (await l, e.value) : (n.value = !0, r.value = "", l = (async () => {
114
114
  try {
115
- const E = await import("./duckdb-browser-Ca3YTI3y-BzRrOJCt.mjs"), R = {
115
+ const E = await import("./duckdb-browser-Ca3YTI3y-DK4Qsf1I.mjs"), T = {
116
116
  mvp: {
117
117
  mainModule: "/static/duckdb/duckdb-mvp.wasm",
118
118
  mainWorker: "/static/duckdb/duckdb-browser-mvp.worker.js"
@@ -121,7 +121,7 @@ const cn = Wn("duckdb", () => {
121
121
  mainModule: "/static/duckdb/duckdb-eh.wasm",
122
122
  mainWorker: "/static/duckdb/duckdb-browser-eh.worker.js"
123
123
  }
124
- }, s = await E.selectBundle(R), v = new Worker(s.mainWorker), i = new E.ConsoleLogger(E.LogLevel.WARNING);
124
+ }, s = await E.selectBundle(T), v = new Worker(s.mainWorker), i = new E.ConsoleLogger(E.LogLevel.WARNING);
125
125
  return e.value = new E.AsyncDuckDB(i, v), await e.value.instantiate(s.mainModule), t.value = !0, e.value;
126
126
  } catch (E) {
127
127
  throw r.value = `Failed to initialize DuckDB: ${(E == null ? void 0 : E.message) || E}`, e.value = null, E;
@@ -129,39 +129,39 @@ const cn = Wn("duckdb", () => {
129
129
  n.value = !1, l = null;
130
130
  }
131
131
  })(), await l, e.value);
132
- }, x = async (E) => {
132
+ }, A = async (E) => {
133
133
  e.value || await b();
134
- const R = await e.value.connect(), s = E || `conn_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
134
+ const T = await e.value.connect(), s = E || `conn_${Date.now()}_${Math.random().toString(36).slice(2, 11)}`;
135
135
  return o.value.set(s, {
136
- connection: R,
136
+ connection: T,
137
137
  viewerId: s,
138
138
  createdAt: /* @__PURE__ */ new Date()
139
- }), { connection: R, connectionId: s };
140
- }, A = async (E) => {
141
- const R = o.value.get(E);
142
- R && (await R.connection.close(), o.value.delete(E), k(E), o.value.size === 0 && console.log("No active connections remaining. Keeping DuckDB instance for potential reuse."));
143
- }, k = (E) => {
144
- for (const [R, s] of u.value)
145
- s.delete(E), s.size === 0 && console.log(`File ${R} is no longer used by any viewers`);
146
- }, C = (E, R) => {
147
- u.value.has(E) || u.value.set(E, /* @__PURE__ */ new Set()), u.value.get(E).add(R);
148
- }, I = async (E) => {
149
- const R = a.value.get(E);
150
- if (R && R.tableName)
139
+ }), { connection: T, connectionId: s };
140
+ }, M = async (E) => {
141
+ const T = o.value.get(E);
142
+ T && (await T.connection.close(), o.value.delete(E), S(E), o.value.size === 0 && console.log("No active connections remaining. Keeping DuckDB instance for potential reuse."));
143
+ }, S = (E) => {
144
+ for (const [T, s] of u.value)
145
+ s.delete(E), s.size === 0 && console.log(`File ${T} is no longer used by any viewers`);
146
+ }, k = (E, T) => {
147
+ u.value.has(E) || u.value.set(E, /* @__PURE__ */ new Set()), u.value.get(E).add(T);
148
+ }, B = async (E) => {
149
+ const T = a.value.get(E);
150
+ if (T && T.tableName)
151
151
  try {
152
152
  const s = await e.value.connect();
153
- await s.query(`DROP TABLE IF EXISTS ${R.tableName};`), await s.close();
153
+ await s.query(`DROP TABLE IF EXISTS ${T.tableName};`), await s.close();
154
154
  } catch (s) {
155
- console.warn(`Failed to drop table ${R.tableName}:`, s);
155
+ console.warn(`Failed to drop table ${T.tableName}:`, s);
156
156
  }
157
157
  a.value.delete(E), u.value.delete(E);
158
- }, U = async (E, R, s = "my_data", v = {}, i = null, h = null) => {
158
+ }, z = async (E, T, s = "my_data", v = {}, i = null, h = null) => {
159
159
  const d = h || E, g = a.value.get(d);
160
160
  if (g && !g.isLoading && !g.error)
161
- return i && C(d, i), g.tableName;
161
+ return i && k(d, i), g.tableName;
162
162
  f.value || await b(), a.value.set(d, {
163
163
  tableName: s,
164
- fileType: R,
164
+ fileType: T,
165
165
  fileUrl: E,
166
166
  // Store the current URL for reference
167
167
  isLoading: !0,
@@ -172,73 +172,73 @@ const cn = Wn("duckdb", () => {
172
172
  if (!_.ok)
173
173
  throw new Error(`Failed to fetch file: ${_.status} ${_.statusText}`);
174
174
  let w;
175
- if (R === "csv") {
176
- const T = await _.text(), L = await new Blob([T], { type: "text/csv" }).arrayBuffer();
177
- w = new Uint8Array(L);
175
+ if (T === "csv") {
176
+ const R = await _.text(), I = await new Blob([R], { type: "text/csv" }).arrayBuffer();
177
+ w = new Uint8Array(I);
178
178
  } else {
179
- const T = await _.arrayBuffer();
180
- w = new Uint8Array(T);
179
+ const R = await _.arrayBuffer();
180
+ w = new Uint8Array(R);
181
181
  }
182
- const S = `${h || s}.${R}`;
183
- await e.value.registerFileBuffer(S, w);
184
- const M = await e.value.connect();
182
+ const C = `${h || s}.${T}`;
183
+ await e.value.registerFileBuffer(C, w);
184
+ const x = await e.value.connect();
185
185
  try {
186
- let T;
187
- if (R === "csv") {
188
- const F = {
186
+ let R;
187
+ if (T === "csv") {
188
+ const N = {
189
189
  header: !0,
190
190
  delimiter: ",",
191
191
  ...v
192
192
  };
193
- T = `
193
+ R = `
194
194
  CREATE OR REPLACE TABLE ${s} AS
195
- SELECT * FROM read_csv('${S}', header=${F.header}, delim='${F.delimiter}');
195
+ SELECT * FROM read_csv('${C}', header=${N.header}, delim='${N.delimiter}');
196
196
  `;
197
- } else if (R === "parquet")
198
- T = `
197
+ } else if (T === "parquet")
198
+ R = `
199
199
  CREATE OR REPLACE TABLE ${s} AS
200
- SELECT * FROM read_parquet('${S}');
200
+ SELECT * FROM read_parquet('${C}');
201
201
  `;
202
202
  else
203
- throw new Error(`Unsupported file type: ${R}`);
204
- await M.query(T);
205
- const L = (await M.query(`SELECT COUNT(*) as count FROM ${s};`)).toArray()[0].count;
203
+ throw new Error(`Unsupported file type: ${T}`);
204
+ await x.query(R);
205
+ const I = (await x.query(`SELECT COUNT(*) as count FROM ${s};`)).toArray()[0].count;
206
206
  return a.value.set(d, {
207
207
  tableName: s,
208
- fileType: R,
208
+ fileType: T,
209
209
  fileUrl: E,
210
210
  // Store current URL for reference
211
211
  isLoading: !1,
212
212
  error: null,
213
- rowCount: L,
213
+ rowCount: I,
214
214
  loadedAt: /* @__PURE__ */ new Date()
215
- }), i && C(d, i), s;
215
+ }), i && k(d, i), s;
216
216
  } finally {
217
- await M.close();
217
+ await x.close();
218
218
  }
219
219
  } catch (_) {
220
220
  throw a.value.set(d, {
221
221
  tableName: s,
222
- fileType: R,
222
+ fileType: T,
223
223
  fileUrl: E,
224
224
  isLoading: !1,
225
225
  error: _.message
226
226
  }), _;
227
227
  }
228
- }, Y = async (E, R) => {
229
- const s = o.value.get(R);
228
+ }, Y = async (E, T) => {
229
+ const s = o.value.get(T);
230
230
  if (!s)
231
- throw new Error(`Connection not found: ${R}`);
231
+ throw new Error(`Connection not found: ${T}`);
232
232
  return (await s.connection.query(E)).toArray().map((v) => {
233
233
  const i = {};
234
234
  for (const [h, d] of Object.entries(v))
235
235
  i[h] = d;
236
236
  return i;
237
237
  });
238
- }, V = async () => {
239
- for (const [E, R] of o.value)
238
+ }, j = async () => {
239
+ for (const [E, T] of o.value)
240
240
  try {
241
- await R.connection.close(), console.log(`Closed connection: ${E}`);
241
+ await T.connection.close(), console.log(`Closed connection: ${E}`);
242
242
  } catch (s) {
243
243
  console.warn(`Error closing connection ${E}:`, s);
244
244
  }
@@ -251,23 +251,23 @@ const cn = Wn("duckdb", () => {
251
251
  e.value = null;
252
252
  }
253
253
  t.value = !1, a.value.clear(), u.value.clear(), r.value = "";
254
- }, j = async (E = !1) => {
255
- E || o.value.size === 0 ? await V() : console.log(`Skipping global cleanup. ${o.value.size} active connections remaining.`);
256
- }, X = () => {
254
+ }, X = async (E = !1) => {
255
+ E || o.value.size === 0 ? await j() : console.log(`Skipping global cleanup. ${o.value.size} active connections remaining.`);
256
+ }, G = () => {
257
257
  const E = [];
258
- for (const [R, s] of o.value)
258
+ for (const [T, s] of o.value)
259
259
  E.push({
260
- connectionId: R,
260
+ connectionId: T,
261
261
  viewerId: s.viewerId,
262
262
  createdAt: s.createdAt
263
263
  });
264
264
  return E;
265
- }, K = () => {
265
+ }, J = () => {
266
266
  const E = [];
267
- for (const [R, s] of u.value) {
268
- const v = a.value.get(R);
267
+ for (const [T, s] of u.value) {
268
+ const v = a.value.get(T);
269
269
  E.push({
270
- fileId: R,
270
+ fileId: T,
271
271
  tableName: v == null ? void 0 : v.tableName,
272
272
  fileType: v == null ? void 0 : v.fileType,
273
273
  fileUrl: v == null ? void 0 : v.fileUrl,
@@ -277,8 +277,8 @@ const cn = Wn("duckdb", () => {
277
277
  });
278
278
  }
279
279
  return E;
280
- }, P = N(null), O = N(0);
281
- function Z(E) {
280
+ }, P = $(null), O = $(0);
281
+ function ee(E) {
282
282
  return `"${String(E).replace(/"/g, '""')}"`;
283
283
  }
284
284
  return {
@@ -300,31 +300,31 @@ const cn = Wn("duckdb", () => {
300
300
  hasActiveConnections: y,
301
301
  // Actions
302
302
  initDuckDB: b,
303
- createConnection: x,
304
- closeConnection: A,
305
- cleanupViewerFileUsage: k,
306
- trackFileUsage: C,
307
- unloadFile: I,
308
- loadFile: U,
303
+ createConnection: A,
304
+ closeConnection: M,
305
+ cleanupViewerFileUsage: S,
306
+ trackFileUsage: k,
307
+ unloadFile: B,
308
+ loadFile: z,
309
309
  executeQuery: Y,
310
- cleanup: j,
311
- performGlobalCleanup: V,
312
- getConnectionInfo: X,
313
- getFileUsageInfo: K,
314
- publishViewFromQuery: async (E, R, s) => {
310
+ cleanup: X,
311
+ performGlobalCleanup: j,
312
+ getConnectionInfo: G,
313
+ getFileUsageInfo: J,
314
+ publishViewFromQuery: async (E, T, s) => {
315
315
  var i;
316
316
  const v = (i = o.value.get(s)) == null ? void 0 : i.connection;
317
317
  if (!v) throw new Error(`Connection not found: ${s}`);
318
- await v.query(`CREATE OR REPLACE VIEW ${Z(E)} AS ${R}`), P.value = E, O.value++;
318
+ await v.query(`CREATE OR REPLACE VIEW ${ee(E)} AS ${T}`), P.value = E, O.value++;
319
319
  },
320
- publishTableFromQuery: async (E, R, s) => {
320
+ publishTableFromQuery: async (E, T, s) => {
321
321
  var i;
322
322
  const v = (i = o.value.get(s)) == null ? void 0 : i.connection;
323
323
  if (!v) throw new Error(`Connection not found: ${s}`);
324
- await v.query(`CREATE OR REPLACE TABLE ${Z(E)} AS ${R}`), P.value = E, O.value++;
324
+ await v.query(`CREATE OR REPLACE TABLE ${ee(E)} AS ${T}`), P.value = E, O.value++;
325
325
  }
326
326
  };
327
- }), De = (e, t) => {
327
+ }), qe = (e, t) => {
328
328
  const n = e.__vccOpts || e;
329
329
  for (const [r, a] of t)
330
330
  n[r] = a;
@@ -371,28 +371,28 @@ const cn = Wn("duckdb", () => {
371
371
  },
372
372
  emits: ["query-results"],
373
373
  setup(e, { emit: t }) {
374
- const n = e, r = t, a = cn(), o = N({
374
+ const n = e, r = t, a = cn(), o = $({
375
375
  header: !0,
376
376
  dynamicTyping: !0,
377
377
  delimiter: ","
378
- }), u = N(!1), l = N(!1), f = N(n.url), c = N("my_data"), p = N(""), m = N(null), y = N(""), b = N("table"), x = N(1), A = N(50), k = N(null);
379
- W(
378
+ }), u = $(!1), l = $(!1), f = $(n.url), c = $("my_data"), p = $(""), m = $(null), y = $(""), b = $("table"), A = $(1), M = $(50), S = $(null);
379
+ H(
380
380
  () => n.url,
381
381
  async (h) => {
382
382
  if (f.value = h, h)
383
383
  try {
384
- await K(), await O();
384
+ await J(), await O();
385
385
  } catch {
386
386
  console.error("file can not be loaded");
387
387
  }
388
388
  },
389
389
  { immediate: !0 }
390
390
  );
391
- const C = H(() => a.isReady && k.value && !u.value), I = H(() => u.value ? "Loading..." : a.isInitializing ? "Initializing..." : a.isReady ? C.value ? "Connected" : "Not Connected" : "Not Ready"), U = H(() => !m.value || !Array.isArray(m.value) || m.value.length === 0 ? [] : Object.keys(m.value[0] || {})), Y = H(() => !m.value || !Array.isArray(m.value) ? 0 : Math.ceil(m.value.length / A.value)), V = H(() => {
391
+ const k = W(() => a.isReady && S.value && !u.value), B = W(() => u.value ? "Loading..." : a.isInitializing ? "Initializing..." : a.isReady ? k.value ? "Connected" : "Not Connected" : "Not Ready"), z = W(() => !m.value || !Array.isArray(m.value) || m.value.length === 0 ? [] : Object.keys(m.value[0] || {})), Y = W(() => !m.value || !Array.isArray(m.value) ? 0 : Math.ceil(m.value.length / M.value)), j = W(() => {
392
392
  if (!m.value || !Array.isArray(m.value)) return [];
393
- const h = (x.value - 1) * A.value, d = h + A.value;
393
+ const h = (A.value - 1) * M.value, d = h + M.value;
394
394
  return m.value.slice(h, d);
395
- }), j = H(() => [
395
+ }), X = W(() => [
396
396
  { name: "Show All", query: "SELECT * FROM data LIMIT 100;" },
397
397
  { name: "Count Rows", query: "SELECT COUNT(*) as row_count FROM data;" },
398
398
  {
@@ -409,30 +409,30 @@ const cn = Wn("duckdb", () => {
409
409
  { name: "Sample", query: "SELECT * FROM data USING SAMPLE 10;" },
410
410
  { name: "Columns", query: "PRAGMA table_info(data);" }
411
411
  ]);
412
- H(() => ({
412
+ W(() => ({
413
413
  viewerId: n.viewerId,
414
414
  fileId: n.fileId,
415
- connectionId: k.value,
415
+ connectionId: S.value,
416
416
  tableName: c.value,
417
- isConnected: C.value,
417
+ isConnected: k.value,
418
418
  activeConnections: a.activeConnectionCount,
419
419
  hasActiveConnections: a.hasActiveConnections
420
420
  }));
421
- const X = async () => {
421
+ const G = async () => {
422
422
  try {
423
423
  const { connection: h, connectionId: d } = await a.createConnection(n.viewerId);
424
- k.value = d, f.value && (await K(), O());
424
+ S.value = d, f.value && (await J(), O());
425
425
  } catch (h) {
426
426
  console.error("Failed to initialize viewer:", h), y.value = `Failed to initialize: ${h.message}`;
427
427
  }
428
- }, K = async () => {
428
+ }, J = async () => {
429
429
  if (!f.value) {
430
430
  y.value = "Please provide a valid S3 URL";
431
431
  return;
432
432
  }
433
433
  const h = n.fileId || f.value, d = a.getLoadedFile(h);
434
434
  if (d && !d.isLoading && !d.error) {
435
- c.value = d.tableName, R("SELECT * FROM data LIMIT 10;");
435
+ c.value = d.tableName, T("SELECT * FROM data LIMIT 10;");
436
436
  return;
437
437
  }
438
438
  u.value = !0, y.value = "";
@@ -448,7 +448,7 @@ const cn = Wn("duckdb", () => {
448
448
  n.fileId
449
449
  // Pass stable file ID
450
450
  );
451
- c.value = _, R("SELECT * FROM data LIMIT 10;");
451
+ c.value = _, T("SELECT * FROM data LIMIT 10;");
452
452
  } catch {
453
453
  } finally {
454
454
  u.value = !1;
@@ -457,7 +457,7 @@ const cn = Wn("duckdb", () => {
457
457
  /\bPRAGMA\s+table_info\(\s*data\s*\)/gi,
458
458
  `PRAGMA table_info(${c.value})`
459
459
  ), O = async () => {
460
- if (!p.value || !k.value) {
460
+ if (!p.value || !S.value) {
461
461
  y.value = "Please provide a valid SQL query";
462
462
  return;
463
463
  }
@@ -465,13 +465,13 @@ const cn = Wn("duckdb", () => {
465
465
  y.value = "No data table loaded";
466
466
  return;
467
467
  }
468
- l.value = !0, y.value = "", x.value = 1;
468
+ l.value = !0, y.value = "", A.value = 1;
469
469
  try {
470
470
  const h = P(p.value.trim());
471
471
  m.value = await a.executeQuery(
472
472
  h,
473
- k.value
474
- ), await a.publishViewFromQuery("umap_result", h, k.value), r("query-results", {
473
+ S.value
474
+ ), await a.publishViewFromQuery("umap_result", h, S.value), r("query-results", {
475
475
  results: m.value,
476
476
  query: h
477
477
  });
@@ -480,20 +480,20 @@ const cn = Wn("duckdb", () => {
480
480
  } finally {
481
481
  l.value = !1;
482
482
  }
483
- }, Z = (h) => {
484
- x.value = h;
483
+ }, ee = (h) => {
484
+ A.value = h;
485
485
  }, E = (h) => {
486
- A.value = h, x.value = 1;
487
- }, R = (h) => {
486
+ M.value = h, A.value = 1;
487
+ }, T = (h) => {
488
488
  p.value = h;
489
489
  }, s = (h) => h == null ? "NULL" : typeof h == "number" ? Number.isInteger(h) ? h.toString() : h.toFixed(4) : typeof h == "string" && h.length > 100 ? h.substring(0, 100) + "..." : h.toString(), v = () => {
490
490
  if (!m.value || m.value.length === 0) return;
491
491
  const h = Object.keys(m.value[0]), d = [
492
492
  h.join(","),
493
493
  ...m.value.map(
494
- (S) => h.map((M) => {
495
- const T = S[M], L = T == null ? "" : T.toString();
496
- return L.includes(",") ? `"${L}"` : L;
494
+ (C) => h.map((x) => {
495
+ const R = C[x], I = R == null ? "" : R.toString();
496
+ return I.includes(",") ? `"${I}"` : I;
497
497
  }).join(",")
498
498
  )
499
499
  ].join(`
@@ -502,118 +502,119 @@ const cn = Wn("duckdb", () => {
502
502
  }, i = () => {
503
503
  y.value = "";
504
504
  };
505
- return at(async () => {
506
- await X();
505
+ return ot(async () => {
506
+ await G();
507
507
  }), qn(async () => {
508
- k.value && (a.activeConnectionCount, a.loadedFiles.size, await a.closeConnection(k.value), a.activeConnectionCount, a.loadedFiles.size);
508
+ S.value && (a.activeConnectionCount, a.loadedFiles.size, await a.closeConnection(S.value), a.activeConnectionCount, a.loadedFiles.size);
509
509
  }), (h, d) => {
510
510
  const g = vt("bf-button"), _ = vt("el-pagination");
511
- return B(), z("div", rr, [
512
- $("header", ar, [
513
- d[3] || (d[3] = $("h1", null, "Data Explorer", -1)),
514
- $("div", {
515
- class: Yn(["status-indicator", { connected: C.value, loading: u.value }])
516
- }, ne(I.value), 3)
511
+ return U(), D("div", rr, [
512
+ L("header", ar, [
513
+ d[3] || (d[3] = L("h1", null, "Data Explorer", -1)),
514
+ L("div", {
515
+ class: Vn(["status-indicator", { connected: k.value, loading: u.value }])
516
+ }, ae(B.value), 3)
517
517
  ]),
518
- $("div", ir, [
519
- C.value ? (B(), z("div", or, [
520
- d[5] || (d[5] = $("h3", null, "SQL Query", -1)),
521
- $("div", ur, [
522
- d[4] || (d[4] = $("span", null, "Quick queries:", -1)),
523
- (B(!0), z(fe, null, we(j.value, (w) => (B(), z("button", {
518
+ L("div", ir, [
519
+ k.value ? (U(), D("div", or, [
520
+ d[5] || (d[5] = L("h3", null, "SQL Query", -1)),
521
+ L("div", ur, [
522
+ d[4] || (d[4] = L("span", null, "Quick queries:", -1)),
523
+ (U(!0), D(ye, null, ke(X.value, (w) => (U(), D("button", {
524
524
  key: w.name,
525
- onClick: (S) => R(w.query),
525
+ onClick: (C) => T(w.query),
526
526
  class: "example-btn"
527
- }, ne(w.name), 9, lr))), 128))
527
+ }, ae(w.name), 9, lr))), 128))
528
528
  ]),
529
- Et($("textarea", {
529
+ Et(L("textarea", {
530
530
  "onUpdate:modelValue": d[0] || (d[0] = (w) => p.value = w),
531
531
  placeholder: "SELECT * FROM data LIMIT 10;",
532
532
  class: "query-textarea",
533
533
  rows: "4"
534
534
  }, null, 512), [
535
- [Vn, p.value]
535
+ [Yn, p.value]
536
536
  ]),
537
- re(g, {
537
+ ie(g, {
538
+ class: "execute-query-button",
538
539
  onClick: O,
539
540
  disabled: l.value || !p.value
540
541
  }, {
541
- default: Le(() => [
542
- mt(ne(l.value ? "Running..." : "Execute Query"), 1)
542
+ default: Ue(() => [
543
+ mt(ae(l.value ? "Running..." : "Execute Query"), 1)
543
544
  ]),
544
545
  _: 1
545
546
  }, 8, ["disabled"])
546
- ])) : _e("", !0),
547
- m.value ? (B(), z("div", sr, [
548
- $("h3", null, "Results (" + ne(m.value.length) + " rows)", 1),
549
- $("div", cr, [
550
- $("div", fr, [
551
- re(g, {
547
+ ])) : Ce("", !0),
548
+ m.value ? (U(), D("div", sr, [
549
+ L("h3", null, "Results (" + ae(m.value.length) + " rows)", 1),
550
+ L("div", cr, [
551
+ L("div", fr, [
552
+ ie(g, {
552
553
  class: "secondary",
553
554
  onClick: v
554
555
  }, {
555
- default: Le(() => [...d[6] || (d[6] = [
556
+ default: Ue(() => [...d[6] || (d[6] = [
556
557
  mt("Export to CSV", -1)
557
558
  ])]),
558
559
  _: 1
559
560
  })
560
561
  ]),
561
- $("div", hr, [
562
- b.value === "table" && Y.value > 1 ? (B(), ln(_, {
562
+ L("div", hr, [
563
+ b.value === "table" && Y.value > 1 ? (U(), ln(_, {
563
564
  key: 0,
564
- "current-page": x.value,
565
- "onUpdate:currentPage": d[1] || (d[1] = (w) => x.value = w),
566
- "page-size": A.value,
565
+ "current-page": A.value,
566
+ "onUpdate:currentPage": d[1] || (d[1] = (w) => A.value = w),
567
+ "page-size": M.value,
567
568
  total: m.value.length,
568
569
  layout: "prev, pager, next",
569
- onCurrentChange: Z,
570
+ onCurrentChange: ee,
570
571
  class: "results-pagination"
571
- }, null, 8, ["current-page", "page-size", "total"])) : _e("", !0)
572
+ }, null, 8, ["current-page", "page-size", "total"])) : Ce("", !0)
572
573
  ])
573
574
  ]),
574
- d[7] || (d[7] = $("div", { class: "pagination-wrapper" }, null, -1)),
575
- b.value === "table" ? (B(), z("div", pr, [
576
- $("table", dr, [
577
- $("thead", null, [
578
- $("tr", null, [
579
- (B(!0), z(fe, null, we(U.value, (w) => (B(), z("th", { key: w }, ne(w), 1))), 128))
575
+ d[7] || (d[7] = L("div", { class: "pagination-wrapper" }, null, -1)),
576
+ b.value === "table" ? (U(), D("div", pr, [
577
+ L("table", dr, [
578
+ L("thead", null, [
579
+ L("tr", null, [
580
+ (U(!0), D(ye, null, ke(z.value, (w) => (U(), D("th", { key: w }, ae(w), 1))), 128))
580
581
  ])
581
582
  ]),
582
- $("tbody", null, [
583
- (B(!0), z(fe, null, we(V.value, (w, S) => (B(), z("tr", { key: S }, [
584
- (B(!0), z(fe, null, we(U.value, (M) => (B(), z("td", { key: M }, ne(s(w[M])), 1))), 128))
583
+ L("tbody", null, [
584
+ (U(!0), D(ye, null, ke(j.value, (w, C) => (U(), D("tr", { key: C }, [
585
+ (U(!0), D(ye, null, ke(z.value, (x) => (U(), D("td", { key: x }, ae(s(w[x])), 1))), 128))
585
586
  ]))), 128))
586
587
  ])
587
588
  ]),
588
- Y.value > 1 ? (B(), z("div", vr, [
589
- re(_, {
590
- "current-page": x.value,
591
- "onUpdate:currentPage": d[2] || (d[2] = (w) => x.value = w),
592
- "page-size": A.value,
589
+ Y.value > 1 ? (U(), D("div", vr, [
590
+ ie(_, {
591
+ "current-page": A.value,
592
+ "onUpdate:currentPage": d[2] || (d[2] = (w) => A.value = w),
593
+ "page-size": M.value,
593
594
  total: m.value.length,
594
595
  layout: " prev, pager, next",
595
596
  "page-sizes": [25, 50, 100, 200, 500],
596
- onCurrentChange: Z,
597
+ onCurrentChange: ee,
597
598
  onSizeChange: E
598
599
  }, null, 8, ["current-page", "page-size", "total"])
599
- ])) : _e("", !0)
600
- ])) : (B(), z("div", mr, [
601
- $("pre", null, ne(JSON.stringify(m.value.slice(0, 100), null, 2)), 1)
600
+ ])) : Ce("", !0)
601
+ ])) : (U(), D("div", mr, [
602
+ L("pre", null, ae(JSON.stringify(m.value.slice(0, 100), null, 2)), 1)
602
603
  ]))
603
- ])) : _e("", !0),
604
- y.value ? (B(), z("div", gr, [
605
- d[8] || (d[8] = $("h3", null, "Error", -1)),
606
- $("p", null, ne(y.value), 1),
607
- $("button", {
604
+ ])) : Ce("", !0),
605
+ y.value ? (U(), D("div", gr, [
606
+ d[8] || (d[8] = L("h3", null, "Error", -1)),
607
+ L("p", null, ae(y.value), 1),
608
+ L("button", {
608
609
  onClick: i,
609
610
  class: "clear-error-btn"
610
611
  }, "Clear")
611
- ])) : _e("", !0)
612
+ ])) : Ce("", !0)
612
613
  ])
613
614
  ]);
614
615
  };
615
616
  }
616
- }, _r = /* @__PURE__ */ De(yr, [["__scopeId", "data-v-6d7b972b"]]), wr = { class: "app-container" }, br = /* @__PURE__ */ Ee({
617
+ }, _r = /* @__PURE__ */ qe(yr, [["__scopeId", "data-v-eccd9d40"]]), wr = { class: "app-container" }, br = /* @__PURE__ */ Ne({
617
618
  __name: "DataExplorerWrap",
618
619
  props: {
619
620
  pkg: {},
@@ -624,9 +625,9 @@ const cn = Wn("duckdb", () => {
624
625
  },
625
626
  emits: ["queryResults"],
626
627
  setup(e, { emit: t }) {
627
- const n = e, r = t, a = N([]), o = N(""), u = N("parquet"), l = N("");
628
- at(async () => {
629
- var b, x, A, k, C;
628
+ const n = e, r = t, a = $([]), o = $(""), u = $("parquet"), l = $("");
629
+ ot(async () => {
630
+ var b, A, M, S, k;
630
631
  if (n.srcUrl) {
631
632
  o.value = n.srcUrl, u.value = n.srcFileType ?? (n.srcUrl.toLowerCase().endsWith(".csv") ? "csv" : "parquet"), l.value = n.srcFileId ?? "url_" + btoa(n.srcUrl).replace(/=+$/, "").replace(/[+/]/g, "_");
632
633
  return;
@@ -638,16 +639,16 @@ const cn = Wn("duckdb", () => {
638
639
  }
639
640
  try {
640
641
  await p(y);
641
- const I = (A = (x = (b = a.value) == null ? void 0 : b[0]) == null ? void 0 : x.content) == null ? void 0 : A.id;
642
- if (!I) {
642
+ const B = (M = (A = (b = a.value) == null ? void 0 : b[0]) == null ? void 0 : A.content) == null ? void 0 : M.id;
643
+ if (!B) {
643
644
  console.error("[DuckDBViewerWrapper] No files found in /view response.");
644
645
  return;
645
646
  }
646
- l.value = I, o.value = await m(y, I);
647
- const U = (C = (k = n.pkg) == null ? void 0 : k.content) == null ? void 0 : C.packageType;
648
- u.value = U === "CSV" ? "csv" : "parquet";
649
- } catch (I) {
650
- console.error(I);
647
+ l.value = B, o.value = await m(y, B);
648
+ const z = (k = (S = n.pkg) == null ? void 0 : S.content) == null ? void 0 : k.packageType;
649
+ u.value = z === "CSV" ? "csv" : "parquet";
650
+ } catch (B) {
651
+ console.error(B);
651
652
  }
652
653
  });
653
654
  function f(y) {
@@ -658,25 +659,25 @@ const cn = Wn("duckdb", () => {
658
659
  return y();
659
660
  }
660
661
  async function p(y) {
661
- const b = await c(), x = `${n.apiUrl}/packages/${y}/view?api_key=${b}`, A = await fetch(x);
662
- if (!A.ok) throw new Error(`view failed: ${A.status}`);
663
- a.value = await A.json();
662
+ const b = await c(), A = `${n.apiUrl}/packages/${y}/view?api_key=${b}`, M = await fetch(A);
663
+ if (!M.ok) throw new Error(`view failed: ${M.status}`);
664
+ a.value = await M.json();
664
665
  }
665
666
  async function m(y, b) {
666
- const x = await c(), A = `${n.apiUrl}/packages/${y}/files/${b}?api_key=${x}`, k = await fetch(A);
667
- if (!k.ok) throw new Error(`file url failed: ${k.status}`);
668
- return (await k.json()).url;
667
+ const A = await c(), M = `${n.apiUrl}/packages/${y}/files/${b}?api_key=${A}`, S = await fetch(M);
668
+ if (!S.ok) throw new Error(`file url failed: ${S.status}`);
669
+ return (await S.json()).url;
669
670
  }
670
- return (y, b) => (B(), z("div", wr, [
671
- re(_r, {
671
+ return (y, b) => (U(), D("div", wr, [
672
+ ie(_r, {
672
673
  url: o.value,
673
674
  "file-type": u.value,
674
675
  "file-id": l.value,
675
- onQueryResults: b[0] || (b[0] = (x) => f(x))
676
+ onQueryResults: b[0] || (b[0] = (A) => f(A))
676
677
  }, null, 8, ["url", "file-type", "file-id"])
677
678
  ]));
678
679
  }
679
- }), xr = /* @__PURE__ */ De(br, [["__scopeId", "data-v-d6dbc8b5"]]);
680
+ }), xr = /* @__PURE__ */ qe(br, [["__scopeId", "data-v-d6dbc8b5"]]);
680
681
  var Ar = { value: () => {
681
682
  } };
682
683
  function Ct() {
@@ -684,9 +685,9 @@ function Ct() {
684
685
  if (!(r = arguments[e] + "") || r in n || /[\s.]/.test(r)) throw new Error("illegal type: " + r);
685
686
  n[r] = [];
686
687
  }
687
- return new Ge(n);
688
+ return new We(n);
688
689
  }
689
- function Ge(e) {
690
+ function We(e) {
690
691
  this._ = e;
691
692
  }
692
693
  function Mr(e, t) {
@@ -696,8 +697,8 @@ function Mr(e, t) {
696
697
  return { type: n, name: r };
697
698
  });
698
699
  }
699
- Ge.prototype = Ct.prototype = {
700
- constructor: Ge,
700
+ We.prototype = Ct.prototype = {
701
+ constructor: We,
701
702
  on: function(e, t) {
702
703
  var n = this._, r = Mr(e + "", n), a, o = -1, u = r.length;
703
704
  if (arguments.length < 2) {
@@ -713,7 +714,7 @@ Ge.prototype = Ct.prototype = {
713
714
  copy: function() {
714
715
  var e = {}, t = this._;
715
716
  for (var n in t) e[n] = t[n].slice();
716
- return new Ge(e);
717
+ return new We(e);
717
718
  },
718
719
  call: function(e, t) {
719
720
  if ((a = arguments.length - 2) > 0) for (var n = new Array(a), r = 0, a, o; r < a; ++r) n[r] = arguments[r + 2];
@@ -739,16 +740,16 @@ function qt(e, t, n) {
739
740
  return n != null && e.push({ name: t, value: n }), e;
740
741
  }
741
742
  var gt = "http://www.w3.org/1999/xhtml";
742
- const Yt = {
743
+ const Vt = {
743
744
  svg: "http://www.w3.org/2000/svg",
744
745
  xhtml: gt,
745
746
  xlink: "http://www.w3.org/1999/xlink",
746
747
  xml: "http://www.w3.org/XML/1998/namespace",
747
748
  xmlns: "http://www.w3.org/2000/xmlns/"
748
749
  };
749
- function it(e) {
750
+ function ut(e) {
750
751
  var t = e += "", n = t.indexOf(":");
751
- return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), Yt.hasOwnProperty(t) ? { space: Yt[t], local: e } : e;
752
+ return n >= 0 && (t = e.slice(0, n)) !== "xmlns" && (e = e.slice(n + 1)), Vt.hasOwnProperty(t) ? { space: Vt[t], local: e } : e;
752
753
  }
753
754
  function Cr(e) {
754
755
  return function() {
@@ -762,7 +763,7 @@ function kr(e) {
762
763
  };
763
764
  }
764
765
  function fn(e) {
765
- var t = it(e);
766
+ var t = ut(e);
766
767
  return (t.local ? kr : Cr)(t);
767
768
  }
768
769
  function Sr() {
@@ -777,30 +778,30 @@ function Rr(e) {
777
778
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
778
779
  for (var o = t[a], u = o.length, l = r[a] = new Array(u), f, c, p = 0; p < u; ++p)
779
780
  (f = o[p]) && (c = e.call(f, f.__data__, p, o)) && ("__data__" in f && (c.__data__ = f.__data__), l[p] = c);
780
- return new J(r, this._parents);
781
+ return new Z(r, this._parents);
781
782
  }
782
783
  function Tr(e) {
783
784
  return e == null ? [] : Array.isArray(e) ? e : Array.from(e);
784
785
  }
785
- function Nr() {
786
+ function $r() {
786
787
  return [];
787
788
  }
788
789
  function hn(e) {
789
- return e == null ? Nr : function() {
790
+ return e == null ? $r : function() {
790
791
  return this.querySelectorAll(e);
791
792
  };
792
793
  }
793
- function $r(e) {
794
+ function Nr(e) {
794
795
  return function() {
795
796
  return Tr(e.apply(this, arguments));
796
797
  };
797
798
  }
798
799
  function Ir(e) {
799
- typeof e == "function" ? e = $r(e) : e = hn(e);
800
+ typeof e == "function" ? e = Nr(e) : e = hn(e);
800
801
  for (var t = this._groups, n = t.length, r = [], a = [], o = 0; o < n; ++o)
801
802
  for (var u = t[o], l = u.length, f, c = 0; c < l; ++c)
802
803
  (f = u[c]) && (r.push(e.call(f, f.__data__, c, u)), a.push(f));
803
- return new J(r, a);
804
+ return new Z(r, a);
804
805
  }
805
806
  function pn(e) {
806
807
  return function() {
@@ -818,11 +819,11 @@ function Br(e) {
818
819
  return Lr.call(this.children, e);
819
820
  };
820
821
  }
821
- function Ur() {
822
+ function Fr() {
822
823
  return this.firstElementChild;
823
824
  }
824
- function Fr(e) {
825
- return this.select(e == null ? Ur : Br(typeof e == "function" ? e : dn(e)));
825
+ function Ur(e) {
826
+ return this.select(e == null ? Fr : Br(typeof e == "function" ? e : dn(e)));
826
827
  }
827
828
  var zr = Array.prototype.filter;
828
829
  function Dr() {
@@ -841,19 +842,19 @@ function qr(e) {
841
842
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
842
843
  for (var o = t[a], u = o.length, l = r[a] = [], f, c = 0; c < u; ++c)
843
844
  (f = o[c]) && e.call(f, f.__data__, c, o) && l.push(f);
844
- return new J(r, this._parents);
845
+ return new Z(r, this._parents);
845
846
  }
846
847
  function vn(e) {
847
848
  return new Array(e.length);
848
849
  }
849
- function Yr() {
850
- return new J(this._enter || this._groups.map(vn), this._parents);
850
+ function Vr() {
851
+ return new Z(this._enter || this._groups.map(vn), this._parents);
851
852
  }
852
- function Ke(e, t) {
853
+ function Ze(e, t) {
853
854
  this.ownerDocument = e.ownerDocument, this.namespaceURI = e.namespaceURI, this._next = null, this._parent = e, this.__data__ = t;
854
855
  }
855
- Ke.prototype = {
856
- constructor: Ke,
856
+ Ze.prototype = {
857
+ constructor: Ze,
857
858
  appendChild: function(e) {
858
859
  return this._parent.insertBefore(e, this._next);
859
860
  },
@@ -867,14 +868,14 @@ Ke.prototype = {
867
868
  return this._parent.querySelectorAll(e);
868
869
  }
869
870
  };
870
- function Vr(e) {
871
+ function Yr(e) {
871
872
  return function() {
872
873
  return e;
873
874
  };
874
875
  }
875
876
  function jr(e, t, n, r, a, o) {
876
877
  for (var u = 0, l, f = t.length, c = o.length; u < c; ++u)
877
- (l = t[u]) ? (l.__data__ = o[u], r[u] = l) : n[u] = new Ke(e, o[u]);
878
+ (l = t[u]) ? (l.__data__ = o[u], r[u] = l) : n[u] = new Ze(e, o[u]);
878
879
  for (; u < f; ++u)
879
880
  (l = t[u]) && (a[u] = l);
880
881
  }
@@ -883,33 +884,33 @@ function Xr(e, t, n, r, a, o, u) {
883
884
  for (l = 0; l < p; ++l)
884
885
  (f = t[l]) && (y[l] = b = u.call(f, f.__data__, l, t) + "", c.has(b) ? a[l] = f : c.set(b, f));
885
886
  for (l = 0; l < m; ++l)
886
- b = u.call(e, o[l], l, o) + "", (f = c.get(b)) ? (r[l] = f, f.__data__ = o[l], c.delete(b)) : n[l] = new Ke(e, o[l]);
887
+ b = u.call(e, o[l], l, o) + "", (f = c.get(b)) ? (r[l] = f, f.__data__ = o[l], c.delete(b)) : n[l] = new Ze(e, o[l]);
887
888
  for (l = 0; l < p; ++l)
888
889
  (f = t[l]) && c.get(y[l]) === f && (a[l] = f);
889
890
  }
890
891
  function Gr(e) {
891
892
  return e.__data__;
892
893
  }
893
- function Wr(e, t) {
894
+ function Hr(e, t) {
894
895
  if (!arguments.length) return Array.from(this, Gr);
895
896
  var n = t ? Xr : jr, r = this._parents, a = this._groups;
896
- typeof e != "function" && (e = Vr(e));
897
+ typeof e != "function" && (e = Yr(e));
897
898
  for (var o = a.length, u = new Array(o), l = new Array(o), f = new Array(o), c = 0; c < o; ++c) {
898
- var p = r[c], m = a[c], y = m.length, b = Hr(e.call(p, p && p.__data__, c, r)), x = b.length, A = l[c] = new Array(x), k = u[c] = new Array(x), C = f[c] = new Array(y);
899
- n(p, m, A, k, C, b, t);
900
- for (var I = 0, U = 0, Y, V; I < x; ++I)
901
- if (Y = A[I]) {
902
- for (I >= U && (U = I + 1); !(V = k[U]) && ++U < x; ) ;
903
- Y._next = V || null;
899
+ var p = r[c], m = a[c], y = m.length, b = Wr(e.call(p, p && p.__data__, c, r)), A = b.length, M = l[c] = new Array(A), S = u[c] = new Array(A), k = f[c] = new Array(y);
900
+ n(p, m, M, S, k, b, t);
901
+ for (var B = 0, z = 0, Y, j; B < A; ++B)
902
+ if (Y = M[B]) {
903
+ for (B >= z && (z = B + 1); !(j = S[z]) && ++z < A; ) ;
904
+ Y._next = j || null;
904
905
  }
905
906
  }
906
- return u = new J(u, r), u._enter = l, u._exit = f, u;
907
+ return u = new Z(u, r), u._enter = l, u._exit = f, u;
907
908
  }
908
- function Hr(e) {
909
+ function Wr(e) {
909
910
  return typeof e == "object" && "length" in e ? e : Array.from(e);
910
911
  }
911
912
  function Qr() {
912
- return new J(this._exit || this._groups.map(vn), this._parents);
913
+ return new Z(this._exit || this._groups.map(vn), this._parents);
913
914
  }
914
915
  function Kr(e, t, n) {
915
916
  var r = this.enter(), a = this, o = this.exit();
@@ -917,11 +918,11 @@ function Kr(e, t, n) {
917
918
  }
918
919
  function Jr(e) {
919
920
  for (var t = e.selection ? e.selection() : e, n = this._groups, r = t._groups, a = n.length, o = r.length, u = Math.min(a, o), l = new Array(a), f = 0; f < u; ++f)
920
- for (var c = n[f], p = r[f], m = c.length, y = l[f] = new Array(m), b, x = 0; x < m; ++x)
921
- (b = c[x] || p[x]) && (y[x] = b);
921
+ for (var c = n[f], p = r[f], m = c.length, y = l[f] = new Array(m), b, A = 0; A < m; ++A)
922
+ (b = c[A] || p[A]) && (y[A] = b);
922
923
  for (; f < a; ++f)
923
924
  l[f] = n[f];
924
- return new J(l, this._parents);
925
+ return new Z(l, this._parents);
925
926
  }
926
927
  function Zr() {
927
928
  for (var e = this._groups, t = -1, n = e.length; ++t < n; )
@@ -939,7 +940,7 @@ function ea(e) {
939
940
  (c = u[p]) && (f[p] = c);
940
941
  f.sort(t);
941
942
  }
942
- return new J(a, this._parents).order();
943
+ return new Z(a, this._parents).order();
943
944
  }
944
945
  function ta(e, t) {
945
946
  return e < t ? -1 : e > t ? 1 : e >= t ? 0 : NaN;
@@ -1006,7 +1007,7 @@ function pa(e, t) {
1006
1007
  };
1007
1008
  }
1008
1009
  function da(e, t) {
1009
- var n = it(e);
1010
+ var n = ut(e);
1010
1011
  if (arguments.length < 2) {
1011
1012
  var r = this.node();
1012
1013
  return n.local ? r.getAttributeNS(n.space, n.local) : r.getAttribute(n);
@@ -1033,9 +1034,9 @@ function ga(e, t, n) {
1033
1034
  };
1034
1035
  }
1035
1036
  function ya(e, t, n) {
1036
- return arguments.length > 1 ? this.each((t == null ? va : typeof t == "function" ? ga : ma)(e, t, n ?? "")) : Ae(this.node(), e);
1037
+ return arguments.length > 1 ? this.each((t == null ? va : typeof t == "function" ? ga : ma)(e, t, n ?? "")) : Te(this.node(), e);
1037
1038
  }
1038
- function Ae(e, t) {
1039
+ function Te(e, t) {
1039
1040
  return e.style.getPropertyValue(t) || mn(e).getComputedStyle(e, null).getPropertyValue(t);
1040
1041
  }
1041
1042
  function _a(e) {
@@ -1125,10 +1126,10 @@ function Ra(e) {
1125
1126
  function Ta(e) {
1126
1127
  return arguments.length ? this.each(e == null ? ka : (typeof e == "function" ? Ra : Sa)(e)) : this.node().textContent;
1127
1128
  }
1128
- function Na() {
1129
+ function $a() {
1129
1130
  this.innerHTML = "";
1130
1131
  }
1131
- function $a(e) {
1132
+ function Na(e) {
1132
1133
  return function() {
1133
1134
  this.innerHTML = e;
1134
1135
  };
@@ -1140,19 +1141,19 @@ function Ia(e) {
1140
1141
  };
1141
1142
  }
1142
1143
  function La(e) {
1143
- return arguments.length ? this.each(e == null ? Na : (typeof e == "function" ? Ia : $a)(e)) : this.node().innerHTML;
1144
+ return arguments.length ? this.each(e == null ? $a : (typeof e == "function" ? Ia : Na)(e)) : this.node().innerHTML;
1144
1145
  }
1145
1146
  function Ba() {
1146
1147
  this.nextSibling && this.parentNode.appendChild(this);
1147
1148
  }
1148
- function Ua() {
1149
+ function Fa() {
1149
1150
  return this.each(Ba);
1150
1151
  }
1151
- function Fa() {
1152
+ function Ua() {
1152
1153
  this.previousSibling && this.parentNode.insertBefore(this, this.parentNode.firstChild);
1153
1154
  }
1154
1155
  function za() {
1155
- return this.each(Fa);
1156
+ return this.each(Ua);
1156
1157
  }
1157
1158
  function Da(e) {
1158
1159
  var t = typeof e == "function" ? e : fn(e);
@@ -1173,10 +1174,10 @@ function qa() {
1173
1174
  var e = this.parentNode;
1174
1175
  e && e.removeChild(this);
1175
1176
  }
1176
- function Ya() {
1177
+ function Va() {
1177
1178
  return this.each(qa);
1178
1179
  }
1179
- function Va() {
1180
+ function Ya() {
1180
1181
  var e = this.cloneNode(!1), t = this.parentNode;
1181
1182
  return t ? t.insertBefore(e, this.nextSibling) : e;
1182
1183
  }
@@ -1185,17 +1186,17 @@ function ja() {
1185
1186
  return t ? t.insertBefore(e, this.nextSibling) : e;
1186
1187
  }
1187
1188
  function Xa(e) {
1188
- return this.select(e ? ja : Va);
1189
+ return this.select(e ? ja : Ya);
1189
1190
  }
1190
1191
  function Ga(e) {
1191
1192
  return arguments.length ? this.property("__data__", e) : this.node().__data__;
1192
1193
  }
1193
- function Wa(e) {
1194
+ function Ha(e) {
1194
1195
  return function(t) {
1195
1196
  e.call(this, t, this.__data__);
1196
1197
  };
1197
1198
  }
1198
- function Ha(e) {
1199
+ function Wa(e) {
1199
1200
  return e.trim().split(/^|\s+/).map(function(t) {
1200
1201
  var n = "", r = t.indexOf(".");
1201
1202
  return r >= 0 && (n = t.slice(r + 1), t = t.slice(0, r)), { type: t, name: n };
@@ -1213,7 +1214,7 @@ function Qa(e) {
1213
1214
  }
1214
1215
  function Ka(e, t, n) {
1215
1216
  return function() {
1216
- var r = this.__on, a, o = Wa(t);
1217
+ var r = this.__on, a, o = Ha(t);
1217
1218
  if (r) {
1218
1219
  for (var u = 0, l = r.length; u < l; ++u)
1219
1220
  if ((a = r[u]).type === e.type && a.name === e.name) {
@@ -1225,7 +1226,7 @@ function Ka(e, t, n) {
1225
1226
  };
1226
1227
  }
1227
1228
  function Ja(e, t, n) {
1228
- var r = Ha(e + ""), a, o = r.length, u;
1229
+ var r = Wa(e + ""), a, o = r.length, u;
1229
1230
  if (arguments.length < 2) {
1230
1231
  var l = this.node().__on;
1231
1232
  if (l) {
@@ -1262,24 +1263,24 @@ function* ni() {
1262
1263
  (u = r[a]) && (yield u);
1263
1264
  }
1264
1265
  var xn = [null];
1265
- function J(e, t) {
1266
+ function Z(e, t) {
1266
1267
  this._groups = e, this._parents = t;
1267
1268
  }
1268
- function Oe() {
1269
- return new J([[document.documentElement]], xn);
1269
+ function Ve() {
1270
+ return new Z([[document.documentElement]], xn);
1270
1271
  }
1271
1272
  function ri() {
1272
1273
  return this;
1273
1274
  }
1274
- J.prototype = Oe.prototype = {
1275
- constructor: J,
1275
+ Z.prototype = Ve.prototype = {
1276
+ constructor: Z,
1276
1277
  select: Rr,
1277
1278
  selectAll: Ir,
1278
- selectChild: Fr,
1279
+ selectChild: Ur,
1279
1280
  selectChildren: Pr,
1280
1281
  filter: qr,
1281
- data: Wr,
1282
- enter: Yr,
1282
+ data: Hr,
1283
+ enter: Vr,
1283
1284
  exit: Qr,
1284
1285
  join: Kr,
1285
1286
  merge: Jr,
@@ -1298,26 +1299,26 @@ J.prototype = Oe.prototype = {
1298
1299
  classed: Ca,
1299
1300
  text: Ta,
1300
1301
  html: La,
1301
- raise: Ua,
1302
+ raise: Fa,
1302
1303
  lower: za,
1303
1304
  append: Da,
1304
1305
  insert: Pa,
1305
- remove: Ya,
1306
+ remove: Va,
1306
1307
  clone: Xa,
1307
1308
  datum: Ga,
1308
1309
  on: Ja,
1309
1310
  dispatch: ti,
1310
1311
  [Symbol.iterator]: ni
1311
1312
  };
1312
- function ue(e) {
1313
- return typeof e == "string" ? new J([[document.querySelector(e)]], [document.documentElement]) : new J([[e]], xn);
1313
+ function he(e) {
1314
+ return typeof e == "string" ? new Z([[document.querySelector(e)]], [document.documentElement]) : new Z([[e]], xn);
1314
1315
  }
1315
1316
  function ai(e) {
1316
1317
  let t;
1317
1318
  for (; t = e.sourceEvent; ) e = t;
1318
1319
  return e;
1319
1320
  }
1320
- function pe(e, t) {
1321
+ function _e(e, t) {
1321
1322
  if (e = ai(e), t === void 0 && (t = e.currentTarget), t) {
1322
1323
  var n = t.ownerSVGElement || t;
1323
1324
  if (n.createSVGPoint) {
@@ -1336,11 +1337,11 @@ function _t(e) {
1336
1337
  e.preventDefault(), e.stopImmediatePropagation();
1337
1338
  }
1338
1339
  function ii(e) {
1339
- var t = e.document.documentElement, n = ue(e).on("dragstart.drag", _t, yt);
1340
+ var t = e.document.documentElement, n = he(e).on("dragstart.drag", _t, yt);
1340
1341
  "onselectstart" in t ? n.on("selectstart.drag", _t, yt) : (t.__noselect = t.style.MozUserSelect, t.style.MozUserSelect = "none");
1341
1342
  }
1342
1343
  function oi(e, t) {
1343
- var n = e.document.documentElement, r = ue(e).on("dragstart.drag", null);
1344
+ var n = e.document.documentElement, r = he(e).on("dragstart.drag", null);
1344
1345
  t && (r.on("click.drag", _t, yt), setTimeout(function() {
1345
1346
  r.on("click.drag", null);
1346
1347
  }, 0)), "onselectstart" in n ? r.on("selectstart.drag", null) : (n.style.MozUserSelect = n.__noselect, delete n.__noselect);
@@ -1353,9 +1354,9 @@ function An(e, t) {
1353
1354
  for (var r in t) n[r] = t[r];
1354
1355
  return n;
1355
1356
  }
1356
- function Pe() {
1357
+ function Ye() {
1357
1358
  }
1358
- var Be = 0.7, Je = 1 / Be, xe = "\\s*([+-]?\\d+)\\s*", Ue = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", ae = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ui = /^#([0-9a-f]{3,8})$/, li = new RegExp(`^rgb\\(${xe},${xe},${xe}\\)$`), si = new RegExp(`^rgb\\(${ae},${ae},${ae}\\)$`), ci = new RegExp(`^rgba\\(${xe},${xe},${xe},${Ue}\\)$`), fi = new RegExp(`^rgba\\(${ae},${ae},${ae},${Ue}\\)$`), hi = new RegExp(`^hsl\\(${Ue},${ae},${ae}\\)$`), pi = new RegExp(`^hsla\\(${Ue},${ae},${ae},${Ue}\\)$`), Vt = {
1359
+ var ze = 0.7, et = 1 / ze, Re = "\\s*([+-]?\\d+)\\s*", De = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*", oe = "\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*", ui = /^#([0-9a-f]{3,8})$/, li = new RegExp(`^rgb\\(${Re},${Re},${Re}\\)$`), si = new RegExp(`^rgb\\(${oe},${oe},${oe}\\)$`), ci = new RegExp(`^rgba\\(${Re},${Re},${Re},${De}\\)$`), fi = new RegExp(`^rgba\\(${oe},${oe},${oe},${De}\\)$`), hi = new RegExp(`^hsl\\(${De},${oe},${oe}\\)$`), pi = new RegExp(`^hsla\\(${De},${oe},${oe},${De}\\)$`), Yt = {
1359
1360
  aliceblue: 15792383,
1360
1361
  antiquewhite: 16444375,
1361
1362
  aqua: 65535,
@@ -1505,7 +1506,7 @@ var Be = 0.7, Je = 1 / Be, xe = "\\s*([+-]?\\d+)\\s*", Ue = "\\s*([+-]?(?:\\d*\\
1505
1506
  yellow: 16776960,
1506
1507
  yellowgreen: 10145074
1507
1508
  };
1508
- Rt(Pe, Fe, {
1509
+ Rt(Ye, Oe, {
1509
1510
  copy(e) {
1510
1511
  return Object.assign(new this.constructor(), this, e);
1511
1512
  },
@@ -1532,94 +1533,94 @@ function vi() {
1532
1533
  function Xt() {
1533
1534
  return this.rgb().formatRgb();
1534
1535
  }
1535
- function Fe(e) {
1536
+ function Oe(e) {
1536
1537
  var t, n;
1537
- return e = (e + "").trim().toLowerCase(), (t = ui.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Gt(t) : n === 3 ? new Q(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? Ye(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? Ye(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = li.exec(e)) ? new Q(t[1], t[2], t[3], 1) : (t = si.exec(e)) ? new Q(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = ci.exec(e)) ? Ye(t[1], t[2], t[3], t[4]) : (t = fi.exec(e)) ? Ye(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = hi.exec(e)) ? Qt(t[1], t[2] / 100, t[3] / 100, 1) : (t = pi.exec(e)) ? Qt(t[1], t[2] / 100, t[3] / 100, t[4]) : Vt.hasOwnProperty(e) ? Gt(Vt[e]) : e === "transparent" ? new Q(NaN, NaN, NaN, 0) : null;
1538
+ return e = (e + "").trim().toLowerCase(), (t = ui.exec(e)) ? (n = t[1].length, t = parseInt(t[1], 16), n === 6 ? Gt(t) : n === 3 ? new K(t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, (t & 15) << 4 | t & 15, 1) : n === 8 ? je(t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, (t & 255) / 255) : n === 4 ? je(t >> 12 & 15 | t >> 8 & 240, t >> 8 & 15 | t >> 4 & 240, t >> 4 & 15 | t & 240, ((t & 15) << 4 | t & 15) / 255) : null) : (t = li.exec(e)) ? new K(t[1], t[2], t[3], 1) : (t = si.exec(e)) ? new K(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, 1) : (t = ci.exec(e)) ? je(t[1], t[2], t[3], t[4]) : (t = fi.exec(e)) ? je(t[1] * 255 / 100, t[2] * 255 / 100, t[3] * 255 / 100, t[4]) : (t = hi.exec(e)) ? Qt(t[1], t[2] / 100, t[3] / 100, 1) : (t = pi.exec(e)) ? Qt(t[1], t[2] / 100, t[3] / 100, t[4]) : Yt.hasOwnProperty(e) ? Gt(Yt[e]) : e === "transparent" ? new K(NaN, NaN, NaN, 0) : null;
1538
1539
  }
1539
1540
  function Gt(e) {
1540
- return new Q(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1541
+ return new K(e >> 16 & 255, e >> 8 & 255, e & 255, 1);
1541
1542
  }
1542
- function Ye(e, t, n, r) {
1543
- return r <= 0 && (e = t = n = NaN), new Q(e, t, n, r);
1543
+ function je(e, t, n, r) {
1544
+ return r <= 0 && (e = t = n = NaN), new K(e, t, n, r);
1544
1545
  }
1545
1546
  function mi(e) {
1546
- return e instanceof Pe || (e = Fe(e)), e ? (e = e.rgb(), new Q(e.r, e.g, e.b, e.opacity)) : new Q();
1547
+ return e instanceof Ye || (e = Oe(e)), e ? (e = e.rgb(), new K(e.r, e.g, e.b, e.opacity)) : new K();
1547
1548
  }
1548
1549
  function wt(e, t, n, r) {
1549
- return arguments.length === 1 ? mi(e) : new Q(e, t, n, r ?? 1);
1550
+ return arguments.length === 1 ? mi(e) : new K(e, t, n, r ?? 1);
1550
1551
  }
1551
- function Q(e, t, n, r) {
1552
+ function K(e, t, n, r) {
1552
1553
  this.r = +e, this.g = +t, this.b = +n, this.opacity = +r;
1553
1554
  }
1554
- Rt(Q, wt, An(Pe, {
1555
+ Rt(K, wt, An(Ye, {
1555
1556
  brighter(e) {
1556
- return e = e == null ? Je : Math.pow(Je, e), new Q(this.r * e, this.g * e, this.b * e, this.opacity);
1557
+ return e = e == null ? et : Math.pow(et, e), new K(this.r * e, this.g * e, this.b * e, this.opacity);
1557
1558
  },
1558
1559
  darker(e) {
1559
- return e = e == null ? Be : Math.pow(Be, e), new Q(this.r * e, this.g * e, this.b * e, this.opacity);
1560
+ return e = e == null ? ze : Math.pow(ze, e), new K(this.r * e, this.g * e, this.b * e, this.opacity);
1560
1561
  },
1561
1562
  rgb() {
1562
1563
  return this;
1563
1564
  },
1564
1565
  clamp() {
1565
- return new Q(ge(this.r), ge(this.g), ge(this.b), Ze(this.opacity));
1566
+ return new K(Ae(this.r), Ae(this.g), Ae(this.b), tt(this.opacity));
1566
1567
  },
1567
1568
  displayable() {
1568
1569
  return -0.5 <= this.r && this.r < 255.5 && -0.5 <= this.g && this.g < 255.5 && -0.5 <= this.b && this.b < 255.5 && 0 <= this.opacity && this.opacity <= 1;
1569
1570
  },
1570
- hex: Wt,
1571
+ hex: Ht,
1571
1572
  // Deprecated! Use color.formatHex.
1572
- formatHex: Wt,
1573
+ formatHex: Ht,
1573
1574
  formatHex8: gi,
1574
- formatRgb: Ht,
1575
- toString: Ht
1575
+ formatRgb: Wt,
1576
+ toString: Wt
1576
1577
  }));
1577
- function Wt() {
1578
- return `#${me(this.r)}${me(this.g)}${me(this.b)}`;
1578
+ function Ht() {
1579
+ return `#${xe(this.r)}${xe(this.g)}${xe(this.b)}`;
1579
1580
  }
1580
1581
  function gi() {
1581
- return `#${me(this.r)}${me(this.g)}${me(this.b)}${me((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1582
+ return `#${xe(this.r)}${xe(this.g)}${xe(this.b)}${xe((isNaN(this.opacity) ? 1 : this.opacity) * 255)}`;
1582
1583
  }
1583
- function Ht() {
1584
- const e = Ze(this.opacity);
1585
- return `${e === 1 ? "rgb(" : "rgba("}${ge(this.r)}, ${ge(this.g)}, ${ge(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1584
+ function Wt() {
1585
+ const e = tt(this.opacity);
1586
+ return `${e === 1 ? "rgb(" : "rgba("}${Ae(this.r)}, ${Ae(this.g)}, ${Ae(this.b)}${e === 1 ? ")" : `, ${e})`}`;
1586
1587
  }
1587
- function Ze(e) {
1588
+ function tt(e) {
1588
1589
  return isNaN(e) ? 1 : Math.max(0, Math.min(1, e));
1589
1590
  }
1590
- function ge(e) {
1591
+ function Ae(e) {
1591
1592
  return Math.max(0, Math.min(255, Math.round(e) || 0));
1592
1593
  }
1593
- function me(e) {
1594
- return e = ge(e), (e < 16 ? "0" : "") + e.toString(16);
1594
+ function xe(e) {
1595
+ return e = Ae(e), (e < 16 ? "0" : "") + e.toString(16);
1595
1596
  }
1596
1597
  function Qt(e, t, n, r) {
1597
- return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new ee(e, t, n, r);
1598
+ return r <= 0 ? e = t = n = NaN : n <= 0 || n >= 1 ? e = t = NaN : t <= 0 && (e = NaN), new ne(e, t, n, r);
1598
1599
  }
1599
1600
  function Mn(e) {
1600
- if (e instanceof ee) return new ee(e.h, e.s, e.l, e.opacity);
1601
- if (e instanceof Pe || (e = Fe(e)), !e) return new ee();
1602
- if (e instanceof ee) return e;
1601
+ if (e instanceof ne) return new ne(e.h, e.s, e.l, e.opacity);
1602
+ if (e instanceof Ye || (e = Oe(e)), !e) return new ne();
1603
+ if (e instanceof ne) return e;
1603
1604
  e = e.rgb();
1604
1605
  var t = e.r / 255, n = e.g / 255, r = e.b / 255, a = Math.min(t, n, r), o = Math.max(t, n, r), u = NaN, l = o - a, f = (o + a) / 2;
1605
- return l ? (t === o ? u = (n - r) / l + (n < r) * 6 : n === o ? u = (r - t) / l + 2 : u = (t - n) / l + 4, l /= f < 0.5 ? o + a : 2 - o - a, u *= 60) : l = f > 0 && f < 1 ? 0 : u, new ee(u, l, f, e.opacity);
1606
+ return l ? (t === o ? u = (n - r) / l + (n < r) * 6 : n === o ? u = (r - t) / l + 2 : u = (t - n) / l + 4, l /= f < 0.5 ? o + a : 2 - o - a, u *= 60) : l = f > 0 && f < 1 ? 0 : u, new ne(u, l, f, e.opacity);
1606
1607
  }
1607
1608
  function yi(e, t, n, r) {
1608
- return arguments.length === 1 ? Mn(e) : new ee(e, t, n, r ?? 1);
1609
+ return arguments.length === 1 ? Mn(e) : new ne(e, t, n, r ?? 1);
1609
1610
  }
1610
- function ee(e, t, n, r) {
1611
+ function ne(e, t, n, r) {
1611
1612
  this.h = +e, this.s = +t, this.l = +n, this.opacity = +r;
1612
1613
  }
1613
- Rt(ee, yi, An(Pe, {
1614
+ Rt(ne, yi, An(Ye, {
1614
1615
  brighter(e) {
1615
- return e = e == null ? Je : Math.pow(Je, e), new ee(this.h, this.s, this.l * e, this.opacity);
1616
+ return e = e == null ? et : Math.pow(et, e), new ne(this.h, this.s, this.l * e, this.opacity);
1616
1617
  },
1617
1618
  darker(e) {
1618
- return e = e == null ? Be : Math.pow(Be, e), new ee(this.h, this.s, this.l * e, this.opacity);
1619
+ return e = e == null ? ze : Math.pow(ze, e), new ne(this.h, this.s, this.l * e, this.opacity);
1619
1620
  },
1620
1621
  rgb() {
1621
1622
  var e = this.h % 360 + (this.h < 0) * 360, t = isNaN(e) || isNaN(this.s) ? 0 : this.s, n = this.l, r = n + (n < 0.5 ? n : 1 - n) * t, a = 2 * n - r;
1622
- return new Q(
1623
+ return new K(
1623
1624
  ct(e >= 240 ? e - 240 : e + 120, a, r),
1624
1625
  ct(e, a, r),
1625
1626
  ct(e < 120 ? e + 240 : e - 120, a, r),
@@ -1627,20 +1628,20 @@ Rt(ee, yi, An(Pe, {
1627
1628
  );
1628
1629
  },
1629
1630
  clamp() {
1630
- return new ee(Kt(this.h), Ve(this.s), Ve(this.l), Ze(this.opacity));
1631
+ return new ne(Kt(this.h), Xe(this.s), Xe(this.l), tt(this.opacity));
1631
1632
  },
1632
1633
  displayable() {
1633
1634
  return (0 <= this.s && this.s <= 1 || isNaN(this.s)) && 0 <= this.l && this.l <= 1 && 0 <= this.opacity && this.opacity <= 1;
1634
1635
  },
1635
1636
  formatHsl() {
1636
- const e = Ze(this.opacity);
1637
- return `${e === 1 ? "hsl(" : "hsla("}${Kt(this.h)}, ${Ve(this.s) * 100}%, ${Ve(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1637
+ const e = tt(this.opacity);
1638
+ return `${e === 1 ? "hsl(" : "hsla("}${Kt(this.h)}, ${Xe(this.s) * 100}%, ${Xe(this.l) * 100}%${e === 1 ? ")" : `, ${e})`}`;
1638
1639
  }
1639
1640
  }));
1640
1641
  function Kt(e) {
1641
1642
  return e = (e || 0) % 360, e < 0 ? e + 360 : e;
1642
1643
  }
1643
- function Ve(e) {
1644
+ function Xe(e) {
1644
1645
  return Math.max(0, Math.min(1, e || 0));
1645
1646
  }
1646
1647
  function ct(e, t, n) {
@@ -1666,7 +1667,7 @@ function Cn(e, t) {
1666
1667
  var n = t - e;
1667
1668
  return n ? _i(e, n) : En(isNaN(e) ? t : e);
1668
1669
  }
1669
- const Jt = function e(t) {
1670
+ const Jt = (function e(t) {
1670
1671
  var n = bi(t);
1671
1672
  function r(a, o) {
1672
1673
  var u = n((a = wt(a)).r, (o = wt(o)).r), l = n(a.g, o.g), f = n(a.b, o.b), c = Cn(a.opacity, o.opacity);
@@ -1675,8 +1676,8 @@ const Jt = function e(t) {
1675
1676
  };
1676
1677
  }
1677
1678
  return r.gamma = e, r;
1678
- }(1);
1679
- function ce(e, t) {
1679
+ })(1);
1680
+ function ge(e, t) {
1680
1681
  return e = +e, t = +t, function(n) {
1681
1682
  return e * (1 - n) + t * n;
1682
1683
  };
@@ -1695,7 +1696,7 @@ function Ai(e) {
1695
1696
  function Mi(e, t) {
1696
1697
  var n = bt.lastIndex = ft.lastIndex = 0, r, a, o, u = -1, l = [], f = [];
1697
1698
  for (e = e + "", t = t + ""; (r = bt.exec(e)) && (a = ft.exec(t)); )
1698
- (o = a.index) > n && (o = t.slice(n, o), l[u] ? l[u] += o : l[++u] = o), (r = r[0]) === (a = a[0]) ? l[u] ? l[u] += a : l[++u] = a : (l[++u] = null, f.push({ i: u, x: ce(r, a) })), n = ft.lastIndex;
1699
+ (o = a.index) > n && (o = t.slice(n, o), l[u] ? l[u] += o : l[++u] = o), (r = r[0]) === (a = a[0]) ? l[u] ? l[u] += a : l[++u] = a : (l[++u] = null, f.push({ i: u, x: ge(r, a) })), n = ft.lastIndex;
1699
1700
  return n < t.length && (o = t.slice(n), l[u] ? l[u] += o : l[++u] = o), l.length < 2 ? f[0] ? Ai(f[0].x) : xi(t) : (t = f.length, function(c) {
1700
1701
  for (var p = 0, m; p < t; ++p) l[(m = f[p]).i] = m.x(c);
1701
1702
  return l.join("");
@@ -1720,40 +1721,40 @@ function Sn(e, t, n, r, a, o) {
1720
1721
  scaleY: l
1721
1722
  };
1722
1723
  }
1723
- var je;
1724
+ var Ge;
1724
1725
  function Ei(e) {
1725
1726
  const t = new (typeof DOMMatrix == "function" ? DOMMatrix : WebKitCSSMatrix)(e + "");
1726
1727
  return t.isIdentity ? kn : Sn(t.a, t.b, t.c, t.d, t.e, t.f);
1727
1728
  }
1728
1729
  function Ci(e) {
1729
- return e == null || (je || (je = document.createElementNS("http://www.w3.org/2000/svg", "g")), je.setAttribute("transform", e), !(e = je.transform.baseVal.consolidate())) ? kn : (e = e.matrix, Sn(e.a, e.b, e.c, e.d, e.e, e.f));
1730
+ return e == null || (Ge || (Ge = document.createElementNS("http://www.w3.org/2000/svg", "g")), Ge.setAttribute("transform", e), !(e = Ge.transform.baseVal.consolidate())) ? kn : (e = e.matrix, Sn(e.a, e.b, e.c, e.d, e.e, e.f));
1730
1731
  }
1731
1732
  function Rn(e, t, n, r) {
1732
1733
  function a(c) {
1733
1734
  return c.length ? c.pop() + " " : "";
1734
1735
  }
1735
- function o(c, p, m, y, b, x) {
1736
+ function o(c, p, m, y, b, A) {
1736
1737
  if (c !== m || p !== y) {
1737
- var A = b.push("translate(", null, t, null, n);
1738
- x.push({ i: A - 4, x: ce(c, m) }, { i: A - 2, x: ce(p, y) });
1738
+ var M = b.push("translate(", null, t, null, n);
1739
+ A.push({ i: M - 4, x: ge(c, m) }, { i: M - 2, x: ge(p, y) });
1739
1740
  } else (m || y) && b.push("translate(" + m + t + y + n);
1740
1741
  }
1741
1742
  function u(c, p, m, y) {
1742
- c !== p ? (c - p > 180 ? p += 360 : p - c > 180 && (c += 360), y.push({ i: m.push(a(m) + "rotate(", null, r) - 2, x: ce(c, p) })) : p && m.push(a(m) + "rotate(" + p + r);
1743
+ c !== p ? (c - p > 180 ? p += 360 : p - c > 180 && (c += 360), y.push({ i: m.push(a(m) + "rotate(", null, r) - 2, x: ge(c, p) })) : p && m.push(a(m) + "rotate(" + p + r);
1743
1744
  }
1744
1745
  function l(c, p, m, y) {
1745
- c !== p ? y.push({ i: m.push(a(m) + "skewX(", null, r) - 2, x: ce(c, p) }) : p && m.push(a(m) + "skewX(" + p + r);
1746
+ c !== p ? y.push({ i: m.push(a(m) + "skewX(", null, r) - 2, x: ge(c, p) }) : p && m.push(a(m) + "skewX(" + p + r);
1746
1747
  }
1747
- function f(c, p, m, y, b, x) {
1748
+ function f(c, p, m, y, b, A) {
1748
1749
  if (c !== m || p !== y) {
1749
- var A = b.push(a(b) + "scale(", null, ",", null, ")");
1750
- x.push({ i: A - 4, x: ce(c, m) }, { i: A - 2, x: ce(p, y) });
1750
+ var M = b.push(a(b) + "scale(", null, ",", null, ")");
1751
+ A.push({ i: M - 4, x: ge(c, m) }, { i: M - 2, x: ge(p, y) });
1751
1752
  } else (m !== 1 || y !== 1) && b.push(a(b) + "scale(" + m + "," + y + ")");
1752
1753
  }
1753
1754
  return function(c, p) {
1754
1755
  var m = [], y = [];
1755
1756
  return c = e(c), p = e(p), o(c.translateX, c.translateY, p.translateX, p.translateY, m, y), u(c.rotate, p.rotate, m, y), l(c.skewX, p.skewX, m, y), f(c.scaleX, c.scaleY, p.scaleX, p.scaleY, m, y), c = p = null, function(b) {
1756
- for (var x = -1, A = y.length, k; ++x < A; ) m[(k = y[x]).i] = k.x(b);
1757
+ for (var A = -1, M = y.length, S; ++A < M; ) m[(S = y[A]).i] = S.x(b);
1757
1758
  return m.join("");
1758
1759
  };
1759
1760
  };
@@ -1765,102 +1766,102 @@ function en(e) {
1765
1766
  function Ti(e) {
1766
1767
  return ((e = Math.exp(e)) - 1 / e) / 2;
1767
1768
  }
1768
- function Ni(e) {
1769
+ function $i(e) {
1769
1770
  return ((e = Math.exp(2 * e)) - 1) / (e + 1);
1770
1771
  }
1771
- const $i = function e(t, n, r) {
1772
+ const Ni = (function e(t, n, r) {
1772
1773
  function a(o, u) {
1773
- var l = o[0], f = o[1], c = o[2], p = u[0], m = u[1], y = u[2], b = p - l, x = m - f, A = b * b + x * x, k, C;
1774
- if (A < Ri)
1775
- C = Math.log(y / c) / t, k = function(X) {
1774
+ var l = o[0], f = o[1], c = o[2], p = u[0], m = u[1], y = u[2], b = p - l, A = m - f, M = b * b + A * A, S, k;
1775
+ if (M < Ri)
1776
+ k = Math.log(y / c) / t, S = function(G) {
1776
1777
  return [
1777
- l + X * b,
1778
- f + X * x,
1779
- c * Math.exp(t * X * C)
1778
+ l + G * b,
1779
+ f + G * A,
1780
+ c * Math.exp(t * G * k)
1780
1781
  ];
1781
1782
  };
1782
1783
  else {
1783
- var I = Math.sqrt(A), U = (y * y - c * c + r * A) / (2 * c * n * I), Y = (y * y - c * c - r * A) / (2 * y * n * I), V = Math.log(Math.sqrt(U * U + 1) - U), j = Math.log(Math.sqrt(Y * Y + 1) - Y);
1784
- C = (j - V) / t, k = function(X) {
1785
- var K = X * C, P = en(V), O = c / (n * I) * (P * Ni(t * K + V) - Ti(V));
1784
+ var B = Math.sqrt(M), z = (y * y - c * c + r * M) / (2 * c * n * B), Y = (y * y - c * c - r * M) / (2 * y * n * B), j = Math.log(Math.sqrt(z * z + 1) - z), X = Math.log(Math.sqrt(Y * Y + 1) - Y);
1785
+ k = (X - j) / t, S = function(G) {
1786
+ var J = G * k, P = en(j), O = c / (n * B) * (P * $i(t * J + j) - Ti(j));
1786
1787
  return [
1787
1788
  l + O * b,
1788
- f + O * x,
1789
- c * P / en(t * K + V)
1789
+ f + O * A,
1790
+ c * P / en(t * J + j)
1790
1791
  ];
1791
1792
  };
1792
1793
  }
1793
- return k.duration = C * 1e3 * t / Math.SQRT2, k;
1794
+ return S.duration = k * 1e3 * t / Math.SQRT2, S;
1794
1795
  }
1795
1796
  return a.rho = function(o) {
1796
1797
  var u = Math.max(1e-3, +o), l = u * u, f = l * l;
1797
1798
  return e(u, l, f);
1798
1799
  }, a;
1799
- }(Math.SQRT2, 2, 4);
1800
- var Me = 0, $e = 0, Te = 0, Tn = 1e3, et, Ie, tt = 0, ye = 0, ot = 0, ze = typeof performance == "object" && performance.now ? performance : Date, Nn = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1800
+ })(Math.SQRT2, 2, 4);
1801
+ var $e = 0, Be = 0, Ie = 0, Tn = 1e3, nt, Fe, rt = 0, Me = 0, lt = 0, Pe = typeof performance == "object" && performance.now ? performance : Date, $n = typeof window == "object" && window.requestAnimationFrame ? window.requestAnimationFrame.bind(window) : function(e) {
1801
1802
  setTimeout(e, 17);
1802
1803
  };
1803
1804
  function Tt() {
1804
- return ye || (Nn(Ii), ye = ze.now() + ot);
1805
+ return Me || ($n(Ii), Me = Pe.now() + lt);
1805
1806
  }
1806
1807
  function Ii() {
1807
- ye = 0;
1808
+ Me = 0;
1808
1809
  }
1809
- function nt() {
1810
+ function at() {
1810
1811
  this._call = this._time = this._next = null;
1811
1812
  }
1812
- nt.prototype = $n.prototype = {
1813
- constructor: nt,
1813
+ at.prototype = Nn.prototype = {
1814
+ constructor: at,
1814
1815
  restart: function(e, t, n) {
1815
1816
  if (typeof e != "function") throw new TypeError("callback is not a function");
1816
- n = (n == null ? Tt() : +n) + (t == null ? 0 : +t), !this._next && Ie !== this && (Ie ? Ie._next = this : et = this, Ie = this), this._call = e, this._time = n, xt();
1817
+ n = (n == null ? Tt() : +n) + (t == null ? 0 : +t), !this._next && Fe !== this && (Fe ? Fe._next = this : nt = this, Fe = this), this._call = e, this._time = n, xt();
1817
1818
  },
1818
1819
  stop: function() {
1819
1820
  this._call && (this._call = null, this._time = 1 / 0, xt());
1820
1821
  }
1821
1822
  };
1822
- function $n(e, t, n) {
1823
- var r = new nt();
1823
+ function Nn(e, t, n) {
1824
+ var r = new at();
1824
1825
  return r.restart(e, t, n), r;
1825
1826
  }
1826
1827
  function Li() {
1827
- Tt(), ++Me;
1828
- for (var e = et, t; e; )
1829
- (t = ye - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
1830
- --Me;
1828
+ Tt(), ++$e;
1829
+ for (var e = nt, t; e; )
1830
+ (t = Me - e._time) >= 0 && e._call.call(void 0, t), e = e._next;
1831
+ --$e;
1831
1832
  }
1832
1833
  function tn() {
1833
- ye = (tt = ze.now()) + ot, Me = $e = 0;
1834
+ Me = (rt = Pe.now()) + lt, $e = Be = 0;
1834
1835
  try {
1835
1836
  Li();
1836
1837
  } finally {
1837
- Me = 0, Ui(), ye = 0;
1838
+ $e = 0, Fi(), Me = 0;
1838
1839
  }
1839
1840
  }
1840
1841
  function Bi() {
1841
- var e = ze.now(), t = e - tt;
1842
- t > Tn && (ot -= t, tt = e);
1842
+ var e = Pe.now(), t = e - rt;
1843
+ t > Tn && (lt -= t, rt = e);
1843
1844
  }
1844
- function Ui() {
1845
- for (var e, t = et, n, r = 1 / 0; t; )
1846
- t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : et = n);
1847
- Ie = e, xt(r);
1845
+ function Fi() {
1846
+ for (var e, t = nt, n, r = 1 / 0; t; )
1847
+ t._call ? (r > t._time && (r = t._time), e = t, t = t._next) : (n = t._next, t._next = null, t = e ? e._next = n : nt = n);
1848
+ Fe = e, xt(r);
1848
1849
  }
1849
1850
  function xt(e) {
1850
- if (!Me) {
1851
- $e && ($e = clearTimeout($e));
1852
- var t = e - ye;
1853
- t > 24 ? (e < 1 / 0 && ($e = setTimeout(tn, e - ze.now() - ot)), Te && (Te = clearInterval(Te))) : (Te || (tt = ze.now(), Te = setInterval(Bi, Tn)), Me = 1, Nn(tn));
1851
+ if (!$e) {
1852
+ Be && (Be = clearTimeout(Be));
1853
+ var t = e - Me;
1854
+ t > 24 ? (e < 1 / 0 && (Be = setTimeout(tn, e - Pe.now() - lt)), Ie && (Ie = clearInterval(Ie))) : (Ie || (rt = Pe.now(), Ie = setInterval(Bi, Tn)), $e = 1, $n(tn));
1854
1855
  }
1855
1856
  }
1856
1857
  function nn(e, t, n) {
1857
- var r = new nt();
1858
+ var r = new at();
1858
1859
  return t = t == null ? 0 : +t, r.restart((a) => {
1859
1860
  r.stop(), e(a + t);
1860
1861
  }, t, n), r;
1861
1862
  }
1862
- var Fi = Ct("start", "end", "cancel", "interrupt"), zi = [], In = 0, rn = 1, At = 2, We = 3, an = 4, Mt = 5, He = 6;
1863
- function ut(e, t, n, r, a, o) {
1863
+ var Ui = Ct("start", "end", "cancel", "interrupt"), zi = [], In = 0, rn = 1, At = 2, Qe = 3, an = 4, Mt = 5, Ke = 6;
1864
+ function st(e, t, n, r, a, o) {
1864
1865
  var u = e.__transition;
1865
1866
  if (!u) e.__transition = {};
1866
1867
  else if (n in u) return;
@@ -1870,7 +1871,7 @@ function ut(e, t, n, r, a, o) {
1870
1871
  // For context during callback.
1871
1872
  group: a,
1872
1873
  // For context during callback.
1873
- on: Fi,
1874
+ on: Ui,
1874
1875
  tween: zi,
1875
1876
  time: o.time,
1876
1877
  delay: o.delay,
@@ -1880,24 +1881,24 @@ function ut(e, t, n, r, a, o) {
1880
1881
  state: In
1881
1882
  });
1882
1883
  }
1883
- function Nt(e, t) {
1884
- var n = te(e, t);
1884
+ function $t(e, t) {
1885
+ var n = re(e, t);
1885
1886
  if (n.state > In) throw new Error("too late; already scheduled");
1886
1887
  return n;
1887
1888
  }
1888
- function ie(e, t) {
1889
- var n = te(e, t);
1890
- if (n.state > We) throw new Error("too late; already running");
1889
+ function ue(e, t) {
1890
+ var n = re(e, t);
1891
+ if (n.state > Qe) throw new Error("too late; already running");
1891
1892
  return n;
1892
1893
  }
1893
- function te(e, t) {
1894
+ function re(e, t) {
1894
1895
  var n = e.__transition;
1895
1896
  if (!n || !(n = n[t])) throw new Error("transition not found");
1896
1897
  return n;
1897
1898
  }
1898
1899
  function Di(e, t, n) {
1899
1900
  var r = e.__transition, a;
1900
- r[t] = n, n.timer = $n(o, 0, n.time);
1901
+ r[t] = n, n.timer = Nn(o, 0, n.time);
1901
1902
  function o(c) {
1902
1903
  n.state = rn, n.timer.restart(u, n.delay, n.time), n.delay <= c && u(c - n.delay);
1903
1904
  }
@@ -1906,13 +1907,13 @@ function Di(e, t, n) {
1906
1907
  if (n.state !== rn) return f();
1907
1908
  for (p in r)
1908
1909
  if (b = r[p], b.name === n.name) {
1909
- if (b.state === We) return nn(u);
1910
- b.state === an ? (b.state = He, b.timer.stop(), b.on.call("interrupt", e, e.__data__, b.index, b.group), delete r[p]) : +p < t && (b.state = He, b.timer.stop(), b.on.call("cancel", e, e.__data__, b.index, b.group), delete r[p]);
1910
+ if (b.state === Qe) return nn(u);
1911
+ b.state === an ? (b.state = Ke, b.timer.stop(), b.on.call("interrupt", e, e.__data__, b.index, b.group), delete r[p]) : +p < t && (b.state = Ke, b.timer.stop(), b.on.call("cancel", e, e.__data__, b.index, b.group), delete r[p]);
1911
1912
  }
1912
1913
  if (nn(function() {
1913
- n.state === We && (n.state = an, n.timer.restart(l, n.delay, n.time), l(c));
1914
+ n.state === Qe && (n.state = an, n.timer.restart(l, n.delay, n.time), l(c));
1914
1915
  }), n.state = At, n.on.call("start", e, e.__data__, n.index, n.group), n.state === At) {
1915
- for (n.state = We, a = new Array(y = n.tween.length), p = 0, m = -1; p < y; ++p)
1916
+ for (n.state = Qe, a = new Array(y = n.tween.length), p = 0, m = -1; p < y; ++p)
1916
1917
  (b = n.tween[p].value.call(e, e.__data__, n.index, n.group)) && (a[++m] = b);
1917
1918
  a.length = m + 1;
1918
1919
  }
@@ -1923,12 +1924,12 @@ function Di(e, t, n) {
1923
1924
  n.state === Mt && (n.on.call("end", e, e.__data__, n.index, n.group), f());
1924
1925
  }
1925
1926
  function f() {
1926
- n.state = He, n.timer.stop(), delete r[t];
1927
+ n.state = Ke, n.timer.stop(), delete r[t];
1927
1928
  for (var c in r) return;
1928
1929
  delete e.__transition;
1929
1930
  }
1930
1931
  }
1931
- function Qe(e, t) {
1932
+ function Je(e, t) {
1932
1933
  var n = e.__transition, r, a, o = !0, u;
1933
1934
  if (n) {
1934
1935
  t = t == null ? null : t + "";
@@ -1937,20 +1938,20 @@ function Qe(e, t) {
1937
1938
  o = !1;
1938
1939
  continue;
1939
1940
  }
1940
- a = r.state > At && r.state < Mt, r.state = He, r.timer.stop(), r.on.call(a ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[u];
1941
+ a = r.state > At && r.state < Mt, r.state = Ke, r.timer.stop(), r.on.call(a ? "interrupt" : "cancel", e, e.__data__, r.index, r.group), delete n[u];
1941
1942
  }
1942
1943
  o && delete e.__transition;
1943
1944
  }
1944
1945
  }
1945
1946
  function Oi(e) {
1946
1947
  return this.each(function() {
1947
- Qe(this, e);
1948
+ Je(this, e);
1948
1949
  });
1949
1950
  }
1950
1951
  function Pi(e, t) {
1951
1952
  var n, r;
1952
1953
  return function() {
1953
- var a = ie(this, e), o = a.tween;
1954
+ var a = ue(this, e), o = a.tween;
1954
1955
  if (o !== n) {
1955
1956
  r = n = o;
1956
1957
  for (var u = 0, l = r.length; u < l; ++u)
@@ -1966,7 +1967,7 @@ function qi(e, t, n) {
1966
1967
  var r, a;
1967
1968
  if (typeof n != "function") throw new Error();
1968
1969
  return function() {
1969
- var o = ie(this, e), u = o.tween;
1970
+ var o = ue(this, e), u = o.tween;
1970
1971
  if (u !== r) {
1971
1972
  a = (r = u).slice();
1972
1973
  for (var l = { name: t, value: n }, f = 0, c = a.length; f < c; ++f)
@@ -1979,30 +1980,30 @@ function qi(e, t, n) {
1979
1980
  o.tween = a;
1980
1981
  };
1981
1982
  }
1982
- function Yi(e, t) {
1983
+ function Vi(e, t) {
1983
1984
  var n = this._id;
1984
1985
  if (e += "", arguments.length < 2) {
1985
- for (var r = te(this.node(), n).tween, a = 0, o = r.length, u; a < o; ++a)
1986
+ for (var r = re(this.node(), n).tween, a = 0, o = r.length, u; a < o; ++a)
1986
1987
  if ((u = r[a]).name === e)
1987
1988
  return u.value;
1988
1989
  return null;
1989
1990
  }
1990
1991
  return this.each((t == null ? Pi : qi)(n, e, t));
1991
1992
  }
1992
- function $t(e, t, n) {
1993
+ function Nt(e, t, n) {
1993
1994
  var r = e._id;
1994
1995
  return e.each(function() {
1995
- var a = ie(this, r);
1996
+ var a = ue(this, r);
1996
1997
  (a.value || (a.value = {}))[t] = n.apply(this, arguments);
1997
1998
  }), function(a) {
1998
- return te(a, r).value[t];
1999
+ return re(a, r).value[t];
1999
2000
  };
2000
2001
  }
2001
2002
  function Ln(e, t) {
2002
2003
  var n;
2003
- return (typeof t == "number" ? ce : t instanceof Fe ? Jt : (n = Fe(t)) ? (t = n, Jt) : Mi)(e, t);
2004
+ return (typeof t == "number" ? ge : t instanceof Oe ? Jt : (n = Oe(t)) ? (t = n, Jt) : Mi)(e, t);
2004
2005
  }
2005
- function Vi(e) {
2006
+ function Yi(e) {
2006
2007
  return function() {
2007
2008
  this.removeAttribute(e);
2008
2009
  };
@@ -2026,14 +2027,14 @@ function Gi(e, t, n) {
2026
2027
  return u === a ? null : u === r ? o : o = t(r = u, n);
2027
2028
  };
2028
2029
  }
2029
- function Wi(e, t, n) {
2030
+ function Hi(e, t, n) {
2030
2031
  var r, a, o;
2031
2032
  return function() {
2032
2033
  var u, l = n(this), f;
2033
2034
  return l == null ? void this.removeAttribute(e) : (u = this.getAttribute(e), f = l + "", u === f ? null : u === r && f === a ? o : (a = f, o = t(r = u, l)));
2034
2035
  };
2035
2036
  }
2036
- function Hi(e, t, n) {
2037
+ function Wi(e, t, n) {
2037
2038
  var r, a, o;
2038
2039
  return function() {
2039
2040
  var u, l = n(this), f;
@@ -2041,8 +2042,8 @@ function Hi(e, t, n) {
2041
2042
  };
2042
2043
  }
2043
2044
  function Qi(e, t) {
2044
- var n = it(e), r = n === "transform" ? Si : Ln;
2045
- return this.attrTween(e, typeof t == "function" ? (n.local ? Hi : Wi)(n, r, $t(this, "attr." + e, t)) : t == null ? (n.local ? ji : Vi)(n) : (n.local ? Gi : Xi)(n, r, t));
2045
+ var n = ut(e), r = n === "transform" ? Si : Ln;
2046
+ return this.attrTween(e, typeof t == "function" ? (n.local ? Wi : Hi)(n, r, Nt(this, "attr." + e, t)) : t == null ? (n.local ? ji : Yi)(n) : (n.local ? Gi : Xi)(n, r, t));
2046
2047
  }
2047
2048
  function Ki(e, t) {
2048
2049
  return function(n) {
@@ -2075,52 +2076,52 @@ function to(e, t) {
2075
2076
  if (arguments.length < 2) return (n = this.tween(n)) && n._value;
2076
2077
  if (t == null) return this.tween(n, null);
2077
2078
  if (typeof t != "function") throw new Error();
2078
- var r = it(e);
2079
+ var r = ut(e);
2079
2080
  return this.tween(n, (r.local ? Zi : eo)(r, t));
2080
2081
  }
2081
2082
  function no(e, t) {
2082
2083
  return function() {
2083
- Nt(this, e).delay = +t.apply(this, arguments);
2084
+ $t(this, e).delay = +t.apply(this, arguments);
2084
2085
  };
2085
2086
  }
2086
2087
  function ro(e, t) {
2087
2088
  return t = +t, function() {
2088
- Nt(this, e).delay = t;
2089
+ $t(this, e).delay = t;
2089
2090
  };
2090
2091
  }
2091
2092
  function ao(e) {
2092
2093
  var t = this._id;
2093
- return arguments.length ? this.each((typeof e == "function" ? no : ro)(t, e)) : te(this.node(), t).delay;
2094
+ return arguments.length ? this.each((typeof e == "function" ? no : ro)(t, e)) : re(this.node(), t).delay;
2094
2095
  }
2095
2096
  function io(e, t) {
2096
2097
  return function() {
2097
- ie(this, e).duration = +t.apply(this, arguments);
2098
+ ue(this, e).duration = +t.apply(this, arguments);
2098
2099
  };
2099
2100
  }
2100
2101
  function oo(e, t) {
2101
2102
  return t = +t, function() {
2102
- ie(this, e).duration = t;
2103
+ ue(this, e).duration = t;
2103
2104
  };
2104
2105
  }
2105
2106
  function uo(e) {
2106
2107
  var t = this._id;
2107
- return arguments.length ? this.each((typeof e == "function" ? io : oo)(t, e)) : te(this.node(), t).duration;
2108
+ return arguments.length ? this.each((typeof e == "function" ? io : oo)(t, e)) : re(this.node(), t).duration;
2108
2109
  }
2109
2110
  function lo(e, t) {
2110
2111
  if (typeof t != "function") throw new Error();
2111
2112
  return function() {
2112
- ie(this, e).ease = t;
2113
+ ue(this, e).ease = t;
2113
2114
  };
2114
2115
  }
2115
2116
  function so(e) {
2116
2117
  var t = this._id;
2117
- return arguments.length ? this.each(lo(t, e)) : te(this.node(), t).ease;
2118
+ return arguments.length ? this.each(lo(t, e)) : re(this.node(), t).ease;
2118
2119
  }
2119
2120
  function co(e, t) {
2120
2121
  return function() {
2121
2122
  var n = t.apply(this, arguments);
2122
2123
  if (typeof n != "function") throw new Error();
2123
- ie(this, e).ease = n;
2124
+ ue(this, e).ease = n;
2124
2125
  };
2125
2126
  }
2126
2127
  function fo(e) {
@@ -2132,7 +2133,7 @@ function ho(e) {
2132
2133
  for (var t = this._groups, n = t.length, r = new Array(n), a = 0; a < n; ++a)
2133
2134
  for (var o = t[a], u = o.length, l = r[a] = [], f, c = 0; c < u; ++c)
2134
2135
  (f = o[c]) && e.call(f, f.__data__, c, o) && l.push(f);
2135
- return new se(r, this._parents, this._name, this._id);
2136
+ return new de(r, this._parents, this._name, this._id);
2136
2137
  }
2137
2138
  function po(e) {
2138
2139
  if (e._id !== this._id) throw new Error();
@@ -2141,7 +2142,7 @@ function po(e) {
2141
2142
  (y = f[b] || c[b]) && (m[b] = y);
2142
2143
  for (; l < r; ++l)
2143
2144
  u[l] = t[l];
2144
- return new se(u, this._parents, this._name, this._id);
2145
+ return new de(u, this._parents, this._name, this._id);
2145
2146
  }
2146
2147
  function vo(e) {
2147
2148
  return (e + "").trim().split(/^|\s+/).every(function(t) {
@@ -2150,7 +2151,7 @@ function vo(e) {
2150
2151
  });
2151
2152
  }
2152
2153
  function mo(e, t, n) {
2153
- var r, a, o = vo(t) ? Nt : ie;
2154
+ var r, a, o = vo(t) ? $t : ue;
2154
2155
  return function() {
2155
2156
  var u = o(this, e), l = u.on;
2156
2157
  l !== r && (a = (r = l).copy()).on(t, n), u.on = a;
@@ -2158,7 +2159,7 @@ function mo(e, t, n) {
2158
2159
  }
2159
2160
  function go(e, t) {
2160
2161
  var n = this._id;
2161
- return arguments.length < 2 ? te(this.node(), n).on.on(e) : this.each(mo(n, e, t));
2162
+ return arguments.length < 2 ? re(this.node(), n).on.on(e) : this.each(mo(n, e, t));
2162
2163
  }
2163
2164
  function yo(e) {
2164
2165
  return function() {
@@ -2175,8 +2176,8 @@ function wo(e) {
2175
2176
  typeof e != "function" && (e = kt(e));
2176
2177
  for (var r = this._groups, a = r.length, o = new Array(a), u = 0; u < a; ++u)
2177
2178
  for (var l = r[u], f = l.length, c = o[u] = new Array(f), p, m, y = 0; y < f; ++y)
2178
- (p = l[y]) && (m = e.call(p, p.__data__, y, l)) && ("__data__" in p && (m.__data__ = p.__data__), c[y] = m, ut(c[y], t, n, y, c, te(p, n)));
2179
- return new se(o, this._parents, t, n);
2179
+ (p = l[y]) && (m = e.call(p, p.__data__, y, l)) && ("__data__" in p && (m.__data__ = p.__data__), c[y] = m, st(c[y], t, n, y, c, re(p, n)));
2180
+ return new de(o, this._parents, t, n);
2180
2181
  }
2181
2182
  function bo(e) {
2182
2183
  var t = this._name, n = this._id;
@@ -2184,20 +2185,20 @@ function bo(e) {
2184
2185
  for (var r = this._groups, a = r.length, o = [], u = [], l = 0; l < a; ++l)
2185
2186
  for (var f = r[l], c = f.length, p, m = 0; m < c; ++m)
2186
2187
  if (p = f[m]) {
2187
- for (var y = e.call(p, p.__data__, m, f), b, x = te(p, n), A = 0, k = y.length; A < k; ++A)
2188
- (b = y[A]) && ut(b, t, n, A, y, x);
2188
+ for (var y = e.call(p, p.__data__, m, f), b, A = re(p, n), M = 0, S = y.length; M < S; ++M)
2189
+ (b = y[M]) && st(b, t, n, M, y, A);
2189
2190
  o.push(y), u.push(p);
2190
2191
  }
2191
- return new se(o, u, t, n);
2192
+ return new de(o, u, t, n);
2192
2193
  }
2193
- var xo = Oe.prototype.constructor;
2194
+ var xo = Ve.prototype.constructor;
2194
2195
  function Ao() {
2195
2196
  return new xo(this._groups, this._parents);
2196
2197
  }
2197
2198
  function Mo(e, t) {
2198
2199
  var n, r, a;
2199
2200
  return function() {
2200
- var o = Ae(this, e), u = (this.style.removeProperty(e), Ae(this, e));
2201
+ var o = Te(this, e), u = (this.style.removeProperty(e), Te(this, e));
2201
2202
  return o === u ? null : o === n && u === r ? a : a = t(n = o, r = u);
2202
2203
  };
2203
2204
  }
@@ -2209,27 +2210,27 @@ function Bn(e) {
2209
2210
  function Eo(e, t, n) {
2210
2211
  var r, a = n + "", o;
2211
2212
  return function() {
2212
- var u = Ae(this, e);
2213
+ var u = Te(this, e);
2213
2214
  return u === a ? null : u === r ? o : o = t(r = u, n);
2214
2215
  };
2215
2216
  }
2216
2217
  function Co(e, t, n) {
2217
2218
  var r, a, o;
2218
2219
  return function() {
2219
- var u = Ae(this, e), l = n(this), f = l + "";
2220
- return l == null && (f = l = (this.style.removeProperty(e), Ae(this, e))), u === f ? null : u === r && f === a ? o : (a = f, o = t(r = u, l));
2220
+ var u = Te(this, e), l = n(this), f = l + "";
2221
+ return l == null && (f = l = (this.style.removeProperty(e), Te(this, e))), u === f ? null : u === r && f === a ? o : (a = f, o = t(r = u, l));
2221
2222
  };
2222
2223
  }
2223
2224
  function ko(e, t) {
2224
2225
  var n, r, a, o = "style." + t, u = "end." + o, l;
2225
2226
  return function() {
2226
- var f = ie(this, e), c = f.on, p = f.value[o] == null ? l || (l = Bn(t)) : void 0;
2227
+ var f = ue(this, e), c = f.on, p = f.value[o] == null ? l || (l = Bn(t)) : void 0;
2227
2228
  (c !== n || a !== p) && (r = (n = c).copy()).on(u, a = p), f.on = r;
2228
2229
  };
2229
2230
  }
2230
2231
  function So(e, t, n) {
2231
2232
  var r = (e += "") == "transform" ? ki : Ln;
2232
- return t == null ? this.styleTween(e, Mo(e, r)).on("end.style." + e, Bn(e)) : typeof t == "function" ? this.styleTween(e, Co(e, r, $t(this, "style." + e, t))).each(ko(this._id, e)) : this.styleTween(e, Eo(e, r, t), n).on("end.style." + e, null);
2233
+ return t == null ? this.styleTween(e, Mo(e, r)).on("end.style." + e, Bn(e)) : typeof t == "function" ? this.styleTween(e, Co(e, r, Nt(this, "style." + e, t))).each(ko(this._id, e)) : this.styleTween(e, Eo(e, r, t), n).on("end.style." + e, null);
2233
2234
  }
2234
2235
  function Ro(e, t, n) {
2235
2236
  return function(r) {
@@ -2244,14 +2245,14 @@ function To(e, t, n) {
2244
2245
  }
2245
2246
  return o._value = t, o;
2246
2247
  }
2247
- function No(e, t, n) {
2248
+ function $o(e, t, n) {
2248
2249
  var r = "style." + (e += "");
2249
2250
  if (arguments.length < 2) return (r = this.tween(r)) && r._value;
2250
2251
  if (t == null) return this.tween(r, null);
2251
2252
  if (typeof t != "function") throw new Error();
2252
2253
  return this.tween(r, To(e, t, n ?? ""));
2253
2254
  }
2254
- function $o(e) {
2255
+ function No(e) {
2255
2256
  return function() {
2256
2257
  this.textContent = e;
2257
2258
  };
@@ -2263,14 +2264,14 @@ function Io(e) {
2263
2264
  };
2264
2265
  }
2265
2266
  function Lo(e) {
2266
- return this.tween("text", typeof e == "function" ? Io($t(this, "text", e)) : $o(e == null ? "" : e + ""));
2267
+ return this.tween("text", typeof e == "function" ? Io(Nt(this, "text", e)) : No(e == null ? "" : e + ""));
2267
2268
  }
2268
2269
  function Bo(e) {
2269
2270
  return function(t) {
2270
2271
  this.textContent = e.call(this, t);
2271
2272
  };
2272
2273
  }
2273
- function Uo(e) {
2274
+ function Fo(e) {
2274
2275
  var t, n;
2275
2276
  function r() {
2276
2277
  var a = e.apply(this, arguments);
@@ -2278,26 +2279,26 @@ function Uo(e) {
2278
2279
  }
2279
2280
  return r._value = e, r;
2280
2281
  }
2281
- function Fo(e) {
2282
+ function Uo(e) {
2282
2283
  var t = "text";
2283
2284
  if (arguments.length < 1) return (t = this.tween(t)) && t._value;
2284
2285
  if (e == null) return this.tween(t, null);
2285
2286
  if (typeof e != "function") throw new Error();
2286
- return this.tween(t, Uo(e));
2287
+ return this.tween(t, Fo(e));
2287
2288
  }
2288
2289
  function zo() {
2289
- for (var e = this._name, t = this._id, n = Un(), r = this._groups, a = r.length, o = 0; o < a; ++o)
2290
+ for (var e = this._name, t = this._id, n = Fn(), r = this._groups, a = r.length, o = 0; o < a; ++o)
2290
2291
  for (var u = r[o], l = u.length, f, c = 0; c < l; ++c)
2291
2292
  if (f = u[c]) {
2292
- var p = te(f, t);
2293
- ut(f, e, n, c, u, {
2293
+ var p = re(f, t);
2294
+ st(f, e, n, c, u, {
2294
2295
  time: p.time + p.delay + p.duration,
2295
2296
  delay: 0,
2296
2297
  duration: p.duration,
2297
2298
  ease: p.ease
2298
2299
  });
2299
2300
  }
2300
- return new se(r, this._parents, e, n);
2301
+ return new de(r, this._parents, e, n);
2301
2302
  }
2302
2303
  function Do() {
2303
2304
  var e, t, n = this, r = n._id, a = n.size();
@@ -2306,50 +2307,50 @@ function Do() {
2306
2307
  --a === 0 && o();
2307
2308
  } };
2308
2309
  n.each(function() {
2309
- var c = ie(this, r), p = c.on;
2310
+ var c = ue(this, r), p = c.on;
2310
2311
  p !== e && (t = (e = p).copy(), t._.cancel.push(l), t._.interrupt.push(l), t._.end.push(f)), c.on = t;
2311
2312
  }), a === 0 && o();
2312
2313
  });
2313
2314
  }
2314
2315
  var Oo = 0;
2315
- function se(e, t, n, r) {
2316
+ function de(e, t, n, r) {
2316
2317
  this._groups = e, this._parents = t, this._name = n, this._id = r;
2317
2318
  }
2318
- function Un() {
2319
+ function Fn() {
2319
2320
  return ++Oo;
2320
2321
  }
2321
- var oe = Oe.prototype;
2322
- se.prototype = {
2323
- constructor: se,
2322
+ var fe = Ve.prototype;
2323
+ de.prototype = {
2324
+ constructor: de,
2324
2325
  select: wo,
2325
2326
  selectAll: bo,
2326
- selectChild: oe.selectChild,
2327
- selectChildren: oe.selectChildren,
2327
+ selectChild: fe.selectChild,
2328
+ selectChildren: fe.selectChildren,
2328
2329
  filter: ho,
2329
2330
  merge: po,
2330
2331
  selection: Ao,
2331
2332
  transition: zo,
2332
- call: oe.call,
2333
- nodes: oe.nodes,
2334
- node: oe.node,
2335
- size: oe.size,
2336
- empty: oe.empty,
2337
- each: oe.each,
2333
+ call: fe.call,
2334
+ nodes: fe.nodes,
2335
+ node: fe.node,
2336
+ size: fe.size,
2337
+ empty: fe.empty,
2338
+ each: fe.each,
2338
2339
  on: go,
2339
2340
  attr: Qi,
2340
2341
  attrTween: to,
2341
2342
  style: So,
2342
- styleTween: No,
2343
+ styleTween: $o,
2343
2344
  text: Lo,
2344
- textTween: Fo,
2345
+ textTween: Uo,
2345
2346
  remove: _o,
2346
- tween: Yi,
2347
+ tween: Vi,
2347
2348
  delay: ao,
2348
2349
  duration: uo,
2349
2350
  ease: so,
2350
2351
  easeVarying: fo,
2351
2352
  end: Do,
2352
- [Symbol.iterator]: oe[Symbol.iterator]
2353
+ [Symbol.iterator]: fe[Symbol.iterator]
2353
2354
  };
2354
2355
  function Po(e) {
2355
2356
  return ((e *= 2) <= 1 ? e * e * e : (e -= 2) * e * e + 2) / 2;
@@ -2361,23 +2362,23 @@ var qo = {
2361
2362
  duration: 250,
2362
2363
  ease: Po
2363
2364
  };
2364
- function Yo(e, t) {
2365
+ function Vo(e, t) {
2365
2366
  for (var n; !(n = e.__transition) || !(n = n[t]); )
2366
2367
  if (!(e = e.parentNode))
2367
2368
  throw new Error(`transition ${t} not found`);
2368
2369
  return n;
2369
2370
  }
2370
- function Vo(e) {
2371
+ function Yo(e) {
2371
2372
  var t, n;
2372
- e instanceof se ? (t = e._id, e = e._name) : (t = Un(), (n = qo).time = Tt(), e = e == null ? null : e + "");
2373
+ e instanceof de ? (t = e._id, e = e._name) : (t = Fn(), (n = qo).time = Tt(), e = e == null ? null : e + "");
2373
2374
  for (var r = this._groups, a = r.length, o = 0; o < a; ++o)
2374
2375
  for (var u = r[o], l = u.length, f, c = 0; c < l; ++c)
2375
- (f = u[c]) && ut(f, e, t, c, u, n || Yo(f, t));
2376
- return new se(r, this._parents, e, t);
2376
+ (f = u[c]) && st(f, e, t, c, u, n || Vo(f, t));
2377
+ return new de(r, this._parents, e, t);
2377
2378
  }
2378
- Oe.prototype.interrupt = Oi;
2379
- Oe.prototype.transition = Vo;
2380
- const Xe = (e) => () => e;
2379
+ Ve.prototype.interrupt = Oi;
2380
+ Ve.prototype.transition = Yo;
2381
+ const He = (e) => () => e;
2381
2382
  function jo(e, {
2382
2383
  sourceEvent: t,
2383
2384
  target: n,
@@ -2392,16 +2393,16 @@ function jo(e, {
2392
2393
  _: { value: a }
2393
2394
  });
2394
2395
  }
2395
- function le(e, t, n) {
2396
+ function pe(e, t, n) {
2396
2397
  this.k = e, this.x = t, this.y = n;
2397
2398
  }
2398
- le.prototype = {
2399
- constructor: le,
2399
+ pe.prototype = {
2400
+ constructor: pe,
2400
2401
  scale: function(e) {
2401
- return e === 1 ? this : new le(this.k * e, this.x, this.y);
2402
+ return e === 1 ? this : new pe(this.k * e, this.x, this.y);
2402
2403
  },
2403
2404
  translate: function(e, t) {
2404
- return e === 0 & t === 0 ? this : new le(this.k, this.x + this.k * e, this.y + this.k * t);
2405
+ return e === 0 & t === 0 ? this : new pe(this.k, this.x + this.k * e, this.y + this.k * t);
2405
2406
  },
2406
2407
  apply: function(e) {
2407
2408
  return [e[0] * this.k + this.x, e[1] * this.k + this.y];
@@ -2431,12 +2432,12 @@ le.prototype = {
2431
2432
  return "translate(" + this.x + "," + this.y + ") scale(" + this.k + ")";
2432
2433
  }
2433
2434
  };
2434
- var rt = new le(1, 0, 0);
2435
- le.prototype;
2435
+ var it = new pe(1, 0, 0);
2436
+ pe.prototype;
2436
2437
  function ht(e) {
2437
2438
  e.stopImmediatePropagation();
2438
2439
  }
2439
- function Ne(e) {
2440
+ function Le(e) {
2440
2441
  e.preventDefault(), e.stopImmediatePropagation();
2441
2442
  }
2442
2443
  function Xo(e) {
@@ -2447,12 +2448,12 @@ function Go() {
2447
2448
  return e instanceof SVGElement ? (e = e.ownerSVGElement || e, e.hasAttribute("viewBox") ? (e = e.viewBox.baseVal, [[e.x, e.y], [e.x + e.width, e.y + e.height]]) : [[0, 0], [e.width.baseVal.value, e.height.baseVal.value]]) : [[0, 0], [e.clientWidth, e.clientHeight]];
2448
2449
  }
2449
2450
  function on() {
2450
- return this.__zoom || rt;
2451
+ return this.__zoom || it;
2451
2452
  }
2452
- function Wo(e) {
2453
+ function Ho(e) {
2453
2454
  return -e.deltaY * (e.deltaMode === 1 ? 0.05 : e.deltaMode ? 1 : 2e-3) * (e.ctrlKey ? 10 : 1);
2454
2455
  }
2455
- function Ho() {
2456
+ function Wo() {
2456
2457
  return navigator.maxTouchPoints || "ontouchstart" in this;
2457
2458
  }
2458
2459
  function Qo(e, t, n) {
@@ -2463,75 +2464,75 @@ function Qo(e, t, n) {
2463
2464
  );
2464
2465
  }
2465
2466
  function Ko() {
2466
- var e = Xo, t = Go, n = Qo, r = Wo, a = Ho, o = [0, 1 / 0], u = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, f = $i, c = Ct("start", "zoom", "end"), p, m, y, b = 500, x = 150, A = 0, k = 10;
2467
- function C(s) {
2468
- s.property("__zoom", on).on("wheel.zoom", K, { passive: !1 }).on("mousedown.zoom", P).on("dblclick.zoom", O).filter(a).on("touchstart.zoom", Z).on("touchmove.zoom", E).on("touchend.zoom touchcancel.zoom", R).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2467
+ var e = Xo, t = Go, n = Qo, r = Ho, a = Wo, o = [0, 1 / 0], u = [[-1 / 0, -1 / 0], [1 / 0, 1 / 0]], l = 250, f = Ni, c = Ct("start", "zoom", "end"), p, m, y, b = 500, A = 150, M = 0, S = 10;
2468
+ function k(s) {
2469
+ s.property("__zoom", on).on("wheel.zoom", J, { passive: !1 }).on("mousedown.zoom", P).on("dblclick.zoom", O).filter(a).on("touchstart.zoom", ee).on("touchmove.zoom", E).on("touchend.zoom touchcancel.zoom", T).style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
2469
2470
  }
2470
- C.transform = function(s, v, i, h) {
2471
+ k.transform = function(s, v, i, h) {
2471
2472
  var d = s.selection ? s.selection() : s;
2472
- d.property("__zoom", on), s !== d ? V(s, v, i, h) : d.interrupt().each(function() {
2473
- j(this, arguments).event(h).start().zoom(null, typeof v == "function" ? v.apply(this, arguments) : v).end();
2473
+ d.property("__zoom", on), s !== d ? j(s, v, i, h) : d.interrupt().each(function() {
2474
+ X(this, arguments).event(h).start().zoom(null, typeof v == "function" ? v.apply(this, arguments) : v).end();
2474
2475
  });
2475
- }, C.scaleBy = function(s, v, i, h) {
2476
- C.scaleTo(s, function() {
2476
+ }, k.scaleBy = function(s, v, i, h) {
2477
+ k.scaleTo(s, function() {
2477
2478
  var d = this.__zoom.k, g = typeof v == "function" ? v.apply(this, arguments) : v;
2478
2479
  return d * g;
2479
2480
  }, i, h);
2480
- }, C.scaleTo = function(s, v, i, h) {
2481
- C.transform(s, function() {
2482
- var d = t.apply(this, arguments), g = this.__zoom, _ = i == null ? Y(d) : typeof i == "function" ? i.apply(this, arguments) : i, w = g.invert(_), S = typeof v == "function" ? v.apply(this, arguments) : v;
2483
- return n(U(I(g, S), _, w), d, u);
2481
+ }, k.scaleTo = function(s, v, i, h) {
2482
+ k.transform(s, function() {
2483
+ var d = t.apply(this, arguments), g = this.__zoom, _ = i == null ? Y(d) : typeof i == "function" ? i.apply(this, arguments) : i, w = g.invert(_), C = typeof v == "function" ? v.apply(this, arguments) : v;
2484
+ return n(z(B(g, C), _, w), d, u);
2484
2485
  }, i, h);
2485
- }, C.translateBy = function(s, v, i, h) {
2486
- C.transform(s, function() {
2486
+ }, k.translateBy = function(s, v, i, h) {
2487
+ k.transform(s, function() {
2487
2488
  return n(this.__zoom.translate(
2488
2489
  typeof v == "function" ? v.apply(this, arguments) : v,
2489
2490
  typeof i == "function" ? i.apply(this, arguments) : i
2490
2491
  ), t.apply(this, arguments), u);
2491
2492
  }, null, h);
2492
- }, C.translateTo = function(s, v, i, h, d) {
2493
- C.transform(s, function() {
2493
+ }, k.translateTo = function(s, v, i, h, d) {
2494
+ k.transform(s, function() {
2494
2495
  var g = t.apply(this, arguments), _ = this.__zoom, w = h == null ? Y(g) : typeof h == "function" ? h.apply(this, arguments) : h;
2495
- return n(rt.translate(w[0], w[1]).scale(_.k).translate(
2496
+ return n(it.translate(w[0], w[1]).scale(_.k).translate(
2496
2497
  typeof v == "function" ? -v.apply(this, arguments) : -v,
2497
2498
  typeof i == "function" ? -i.apply(this, arguments) : -i
2498
2499
  ), g, u);
2499
2500
  }, h, d);
2500
2501
  };
2501
- function I(s, v) {
2502
- return v = Math.max(o[0], Math.min(o[1], v)), v === s.k ? s : new le(v, s.x, s.y);
2502
+ function B(s, v) {
2503
+ return v = Math.max(o[0], Math.min(o[1], v)), v === s.k ? s : new pe(v, s.x, s.y);
2503
2504
  }
2504
- function U(s, v, i) {
2505
+ function z(s, v, i) {
2505
2506
  var h = v[0] - i[0] * s.k, d = v[1] - i[1] * s.k;
2506
- return h === s.x && d === s.y ? s : new le(s.k, h, d);
2507
+ return h === s.x && d === s.y ? s : new pe(s.k, h, d);
2507
2508
  }
2508
2509
  function Y(s) {
2509
2510
  return [(+s[0][0] + +s[1][0]) / 2, (+s[0][1] + +s[1][1]) / 2];
2510
2511
  }
2511
- function V(s, v, i, h) {
2512
+ function j(s, v, i, h) {
2512
2513
  s.on("start.zoom", function() {
2513
- j(this, arguments).event(h).start();
2514
+ X(this, arguments).event(h).start();
2514
2515
  }).on("interrupt.zoom end.zoom", function() {
2515
- j(this, arguments).event(h).end();
2516
+ X(this, arguments).event(h).end();
2516
2517
  }).tween("zoom", function() {
2517
- var d = this, g = arguments, _ = j(d, g).event(h), w = t.apply(d, g), S = i == null ? Y(w) : typeof i == "function" ? i.apply(d, g) : i, M = Math.max(w[1][0] - w[0][0], w[1][1] - w[0][1]), T = d.__zoom, L = typeof v == "function" ? v.apply(d, g) : v, F = f(T.invert(S).concat(M / T.k), L.invert(S).concat(M / L.k));
2518
- return function(D) {
2519
- if (D === 1) D = L;
2518
+ var d = this, g = arguments, _ = X(d, g).event(h), w = t.apply(d, g), C = i == null ? Y(w) : typeof i == "function" ? i.apply(d, g) : i, x = Math.max(w[1][0] - w[0][0], w[1][1] - w[0][1]), R = d.__zoom, I = typeof v == "function" ? v.apply(d, g) : v, N = f(R.invert(C).concat(x / R.k), I.invert(C).concat(x / I.k));
2519
+ return function(F) {
2520
+ if (F === 1) F = I;
2520
2521
  else {
2521
- var G = F(D), he = M / G[2];
2522
- D = new le(he, S[0] - G[0] * he, S[1] - G[1] * he);
2522
+ var q = N(F), le = x / q[2];
2523
+ F = new pe(le, C[0] - q[0] * le, C[1] - q[1] * le);
2523
2524
  }
2524
- _.zoom(null, D);
2525
+ _.zoom(null, F);
2525
2526
  };
2526
2527
  });
2527
2528
  }
2528
- function j(s, v, i) {
2529
- return !i && s.__zooming || new X(s, v);
2529
+ function X(s, v, i) {
2530
+ return !i && s.__zooming || new G(s, v);
2530
2531
  }
2531
- function X(s, v) {
2532
+ function G(s, v) {
2532
2533
  this.that = s, this.args = v, this.active = 0, this.sourceEvent = null, this.extent = t.apply(s, v), this.taps = 0;
2533
2534
  }
2534
- X.prototype = {
2535
+ G.prototype = {
2535
2536
  event: function(s) {
2536
2537
  return s && (this.sourceEvent = s), this;
2537
2538
  },
@@ -2545,13 +2546,13 @@ function Ko() {
2545
2546
  return --this.active === 0 && (delete this.that.__zooming, this.emit("end")), this;
2546
2547
  },
2547
2548
  emit: function(s) {
2548
- var v = ue(this.that).datum();
2549
+ var v = he(this.that).datum();
2549
2550
  c.call(
2550
2551
  s,
2551
2552
  this.that,
2552
2553
  new jo(s, {
2553
2554
  sourceEvent: this.sourceEvent,
2554
- target: C,
2555
+ target: k,
2555
2556
  transform: this.that.__zoom,
2556
2557
  dispatch: c
2557
2558
  }),
@@ -2559,106 +2560,106 @@ function Ko() {
2559
2560
  );
2560
2561
  }
2561
2562
  };
2562
- function K(s, ...v) {
2563
+ function J(s, ...v) {
2563
2564
  if (!e.apply(this, arguments)) return;
2564
- var i = j(this, v).event(s), h = this.__zoom, d = Math.max(o[0], Math.min(o[1], h.k * Math.pow(2, r.apply(this, arguments)))), g = pe(s);
2565
+ var i = X(this, v).event(s), h = this.__zoom, d = Math.max(o[0], Math.min(o[1], h.k * Math.pow(2, r.apply(this, arguments)))), g = _e(s);
2565
2566
  if (i.wheel)
2566
2567
  (i.mouse[0][0] !== g[0] || i.mouse[0][1] !== g[1]) && (i.mouse[1] = h.invert(i.mouse[0] = g)), clearTimeout(i.wheel);
2567
2568
  else {
2568
2569
  if (h.k === d) return;
2569
- i.mouse = [g, h.invert(g)], Qe(this), i.start();
2570
+ i.mouse = [g, h.invert(g)], Je(this), i.start();
2570
2571
  }
2571
- Ne(s), i.wheel = setTimeout(_, x), i.zoom("mouse", n(U(I(h, d), i.mouse[0], i.mouse[1]), i.extent, u));
2572
+ Le(s), i.wheel = setTimeout(_, A), i.zoom("mouse", n(z(B(h, d), i.mouse[0], i.mouse[1]), i.extent, u));
2572
2573
  function _() {
2573
2574
  i.wheel = null, i.end();
2574
2575
  }
2575
2576
  }
2576
2577
  function P(s, ...v) {
2577
2578
  if (y || !e.apply(this, arguments)) return;
2578
- var i = s.currentTarget, h = j(this, v, !0).event(s), d = ue(s.view).on("mousemove.zoom", S, !0).on("mouseup.zoom", M, !0), g = pe(s, i), _ = s.clientX, w = s.clientY;
2579
- ii(s.view), ht(s), h.mouse = [g, this.__zoom.invert(g)], Qe(this), h.start();
2580
- function S(T) {
2581
- if (Ne(T), !h.moved) {
2582
- var L = T.clientX - _, F = T.clientY - w;
2583
- h.moved = L * L + F * F > A;
2579
+ var i = s.currentTarget, h = X(this, v, !0).event(s), d = he(s.view).on("mousemove.zoom", C, !0).on("mouseup.zoom", x, !0), g = _e(s, i), _ = s.clientX, w = s.clientY;
2580
+ ii(s.view), ht(s), h.mouse = [g, this.__zoom.invert(g)], Je(this), h.start();
2581
+ function C(R) {
2582
+ if (Le(R), !h.moved) {
2583
+ var I = R.clientX - _, N = R.clientY - w;
2584
+ h.moved = I * I + N * N > M;
2584
2585
  }
2585
- h.event(T).zoom("mouse", n(U(h.that.__zoom, h.mouse[0] = pe(T, i), h.mouse[1]), h.extent, u));
2586
+ h.event(R).zoom("mouse", n(z(h.that.__zoom, h.mouse[0] = _e(R, i), h.mouse[1]), h.extent, u));
2586
2587
  }
2587
- function M(T) {
2588
- d.on("mousemove.zoom mouseup.zoom", null), oi(T.view, h.moved), Ne(T), h.event(T).end();
2588
+ function x(R) {
2589
+ d.on("mousemove.zoom mouseup.zoom", null), oi(R.view, h.moved), Le(R), h.event(R).end();
2589
2590
  }
2590
2591
  }
2591
2592
  function O(s, ...v) {
2592
2593
  if (e.apply(this, arguments)) {
2593
- var i = this.__zoom, h = pe(s.changedTouches ? s.changedTouches[0] : s, this), d = i.invert(h), g = i.k * (s.shiftKey ? 0.5 : 2), _ = n(U(I(i, g), h, d), t.apply(this, v), u);
2594
- Ne(s), l > 0 ? ue(this).transition().duration(l).call(V, _, h, s) : ue(this).call(C.transform, _, h, s);
2594
+ var i = this.__zoom, h = _e(s.changedTouches ? s.changedTouches[0] : s, this), d = i.invert(h), g = i.k * (s.shiftKey ? 0.5 : 2), _ = n(z(B(i, g), h, d), t.apply(this, v), u);
2595
+ Le(s), l > 0 ? he(this).transition().duration(l).call(j, _, h, s) : he(this).call(k.transform, _, h, s);
2595
2596
  }
2596
2597
  }
2597
- function Z(s, ...v) {
2598
+ function ee(s, ...v) {
2598
2599
  if (e.apply(this, arguments)) {
2599
- var i = s.touches, h = i.length, d = j(this, v, s.changedTouches.length === h).event(s), g, _, w, S;
2600
+ var i = s.touches, h = i.length, d = X(this, v, s.changedTouches.length === h).event(s), g, _, w, C;
2600
2601
  for (ht(s), _ = 0; _ < h; ++_)
2601
- w = i[_], S = pe(w, this), S = [S, this.__zoom.invert(S), w.identifier], d.touch0 ? !d.touch1 && d.touch0[2] !== S[2] && (d.touch1 = S, d.taps = 0) : (d.touch0 = S, g = !0, d.taps = 1 + !!p);
2602
- p && (p = clearTimeout(p)), g && (d.taps < 2 && (m = S[0], p = setTimeout(function() {
2602
+ w = i[_], C = _e(w, this), C = [C, this.__zoom.invert(C), w.identifier], d.touch0 ? !d.touch1 && d.touch0[2] !== C[2] && (d.touch1 = C, d.taps = 0) : (d.touch0 = C, g = !0, d.taps = 1 + !!p);
2603
+ p && (p = clearTimeout(p)), g && (d.taps < 2 && (m = C[0], p = setTimeout(function() {
2603
2604
  p = null;
2604
- }, b)), Qe(this), d.start());
2605
+ }, b)), Je(this), d.start());
2605
2606
  }
2606
2607
  }
2607
2608
  function E(s, ...v) {
2608
2609
  if (this.__zooming) {
2609
- var i = j(this, v).event(s), h = s.changedTouches, d = h.length, g, _, w, S;
2610
- for (Ne(s), g = 0; g < d; ++g)
2611
- _ = h[g], w = pe(_, this), i.touch0 && i.touch0[2] === _.identifier ? i.touch0[0] = w : i.touch1 && i.touch1[2] === _.identifier && (i.touch1[0] = w);
2610
+ var i = X(this, v).event(s), h = s.changedTouches, d = h.length, g, _, w, C;
2611
+ for (Le(s), g = 0; g < d; ++g)
2612
+ _ = h[g], w = _e(_, this), i.touch0 && i.touch0[2] === _.identifier ? i.touch0[0] = w : i.touch1 && i.touch1[2] === _.identifier && (i.touch1[0] = w);
2612
2613
  if (_ = i.that.__zoom, i.touch1) {
2613
- var M = i.touch0[0], T = i.touch0[1], L = i.touch1[0], F = i.touch1[1], D = (D = L[0] - M[0]) * D + (D = L[1] - M[1]) * D, G = (G = F[0] - T[0]) * G + (G = F[1] - T[1]) * G;
2614
- _ = I(_, Math.sqrt(D / G)), w = [(M[0] + L[0]) / 2, (M[1] + L[1]) / 2], S = [(T[0] + F[0]) / 2, (T[1] + F[1]) / 2];
2615
- } else if (i.touch0) w = i.touch0[0], S = i.touch0[1];
2614
+ var x = i.touch0[0], R = i.touch0[1], I = i.touch1[0], N = i.touch1[1], F = (F = I[0] - x[0]) * F + (F = I[1] - x[1]) * F, q = (q = N[0] - R[0]) * q + (q = N[1] - R[1]) * q;
2615
+ _ = B(_, Math.sqrt(F / q)), w = [(x[0] + I[0]) / 2, (x[1] + I[1]) / 2], C = [(R[0] + N[0]) / 2, (R[1] + N[1]) / 2];
2616
+ } else if (i.touch0) w = i.touch0[0], C = i.touch0[1];
2616
2617
  else return;
2617
- i.zoom("touch", n(U(_, w, S), i.extent, u));
2618
+ i.zoom("touch", n(z(_, w, C), i.extent, u));
2618
2619
  }
2619
2620
  }
2620
- function R(s, ...v) {
2621
+ function T(s, ...v) {
2621
2622
  if (this.__zooming) {
2622
- var i = j(this, v).event(s), h = s.changedTouches, d = h.length, g, _;
2623
+ var i = X(this, v).event(s), h = s.changedTouches, d = h.length, g, _;
2623
2624
  for (ht(s), y && clearTimeout(y), y = setTimeout(function() {
2624
2625
  y = null;
2625
2626
  }, b), g = 0; g < d; ++g)
2626
2627
  _ = h[g], i.touch0 && i.touch0[2] === _.identifier ? delete i.touch0 : i.touch1 && i.touch1[2] === _.identifier && delete i.touch1;
2627
2628
  if (i.touch1 && !i.touch0 && (i.touch0 = i.touch1, delete i.touch1), i.touch0) i.touch0[1] = this.__zoom.invert(i.touch0[0]);
2628
- else if (i.end(), i.taps === 2 && (_ = pe(_, this), Math.hypot(m[0] - _[0], m[1] - _[1]) < k)) {
2629
- var w = ue(this).on("dblclick.zoom");
2629
+ else if (i.end(), i.taps === 2 && (_ = _e(_, this), Math.hypot(m[0] - _[0], m[1] - _[1]) < S)) {
2630
+ var w = he(this).on("dblclick.zoom");
2630
2631
  w && w.apply(this, arguments);
2631
2632
  }
2632
2633
  }
2633
2634
  }
2634
- return C.wheelDelta = function(s) {
2635
- return arguments.length ? (r = typeof s == "function" ? s : Xe(+s), C) : r;
2636
- }, C.filter = function(s) {
2637
- return arguments.length ? (e = typeof s == "function" ? s : Xe(!!s), C) : e;
2638
- }, C.touchable = function(s) {
2639
- return arguments.length ? (a = typeof s == "function" ? s : Xe(!!s), C) : a;
2640
- }, C.extent = function(s) {
2641
- return arguments.length ? (t = typeof s == "function" ? s : Xe([[+s[0][0], +s[0][1]], [+s[1][0], +s[1][1]]]), C) : t;
2642
- }, C.scaleExtent = function(s) {
2643
- return arguments.length ? (o[0] = +s[0], o[1] = +s[1], C) : [o[0], o[1]];
2644
- }, C.translateExtent = function(s) {
2645
- return arguments.length ? (u[0][0] = +s[0][0], u[1][0] = +s[1][0], u[0][1] = +s[0][1], u[1][1] = +s[1][1], C) : [[u[0][0], u[0][1]], [u[1][0], u[1][1]]];
2646
- }, C.constrain = function(s) {
2647
- return arguments.length ? (n = s, C) : n;
2648
- }, C.duration = function(s) {
2649
- return arguments.length ? (l = +s, C) : l;
2650
- }, C.interpolate = function(s) {
2651
- return arguments.length ? (f = s, C) : f;
2652
- }, C.on = function() {
2635
+ return k.wheelDelta = function(s) {
2636
+ return arguments.length ? (r = typeof s == "function" ? s : He(+s), k) : r;
2637
+ }, k.filter = function(s) {
2638
+ return arguments.length ? (e = typeof s == "function" ? s : He(!!s), k) : e;
2639
+ }, k.touchable = function(s) {
2640
+ return arguments.length ? (a = typeof s == "function" ? s : He(!!s), k) : a;
2641
+ }, k.extent = function(s) {
2642
+ return arguments.length ? (t = typeof s == "function" ? s : He([[+s[0][0], +s[0][1]], [+s[1][0], +s[1][1]]]), k) : t;
2643
+ }, k.scaleExtent = function(s) {
2644
+ return arguments.length ? (o[0] = +s[0], o[1] = +s[1], k) : [o[0], o[1]];
2645
+ }, k.translateExtent = function(s) {
2646
+ return arguments.length ? (u[0][0] = +s[0][0], u[1][0] = +s[1][0], u[0][1] = +s[0][1], u[1][1] = +s[1][1], k) : [[u[0][0], u[0][1]], [u[1][0], u[1][1]]];
2647
+ }, k.constrain = function(s) {
2648
+ return arguments.length ? (n = s, k) : n;
2649
+ }, k.duration = function(s) {
2650
+ return arguments.length ? (l = +s, k) : l;
2651
+ }, k.interpolate = function(s) {
2652
+ return arguments.length ? (f = s, k) : f;
2653
+ }, k.on = function() {
2653
2654
  var s = c.on.apply(c, arguments);
2654
- return s === c ? C : s;
2655
- }, C.clickDistance = function(s) {
2656
- return arguments.length ? (A = (s = +s) * s, C) : Math.sqrt(A);
2657
- }, C.tapDistance = function(s) {
2658
- return arguments.length ? (k = +s, C) : k;
2659
- }, C;
2660
- }
2661
- const Jo = /* @__PURE__ */ Ee({
2655
+ return s === c ? k : s;
2656
+ }, k.clickDistance = function(s) {
2657
+ return arguments.length ? (M = (s = +s) * s, k) : Math.sqrt(M);
2658
+ }, k.tapDistance = function(s) {
2659
+ return arguments.length ? (S = +s, k) : S;
2660
+ }, k;
2661
+ }
2662
+ const Jo = /* @__PURE__ */ Ne({
2662
2663
  __name: "scatterplot",
2663
2664
  props: {
2664
2665
  pointCount: { type: Number, default: 5e3 },
@@ -2668,63 +2669,66 @@ const Jo = /* @__PURE__ */ Ee({
2668
2669
  singleColor: { type: String, default: "#4285f4" },
2669
2670
  forceRegenerate: { type: Boolean, default: !1 },
2670
2671
  data: { type: Array, default: () => [] },
2671
- // each row: [x, y, ...otherCols]
2672
2672
  metaData: { type: Object, default: () => ({}) },
2673
- // schema[0]=x, schema[1]=y, schema[2+]=other column names
2674
- colorMap: { type: Map, default: () => /* @__PURE__ */ new Map() }
2675
- // for categorical
2673
+ colorMap: { type: Map, default: () => /* @__PURE__ */ new Map() },
2674
+ selectedMapEntries: { type: [Array, Map], default: () => [] }
2676
2675
  },
2677
2676
  emits: ["updateColorMap"],
2678
2677
  setup(e, { emit: t }) {
2679
- const n = e, r = N(null), a = N(null), o = N(null), u = N(null);
2680
- let l = null, f = null, c = null, p = [], m = null, y = null, b = null, x = 0, A = 0, k = 1;
2681
- W(() => n.colorMap, v, { deep: !0 });
2682
- function C(i) {
2678
+ const n = e, r = $(null), a = $(null), o = $(null), u = $(null);
2679
+ let l = null, f = null, c = null, p = [], m = null, y = null, b = null, A = 0, M = 0, S = 1;
2680
+ H(() => n.colorMap, v, { deep: !0 });
2681
+ function k(i) {
2683
2682
  if (!i || i.length < 7) return [1, 0, 0];
2684
2683
  const h = parseInt(i.slice(1, 3), 16) / 255, d = parseInt(i.slice(3, 5), 16) / 255, g = parseInt(i.slice(5, 7), 16) / 255;
2685
2684
  return [h, d, g].some(Number.isNaN) ? [1, 0, 0] : [h, d, g];
2686
2685
  }
2687
- const I = (i, h, d) => i + (h - i) * d;
2688
- function U(i, h) {
2686
+ const B = (i, h, d) => i + (h - i) * d;
2687
+ function z(i, h) {
2689
2688
  const d = i.parentElement;
2690
- d && (k = window.devicePixelRatio || 1, x = d.clientWidth || 800, A = d.clientHeight || 400, i.style.width = `${x}px`, i.style.height = `${A}px`, i.width = Math.round(x * k), i.height = Math.round(A * k), h.viewport(0, 0, i.width, i.height));
2689
+ d && (S = window.devicePixelRatio || 1, A = d.clientWidth || 800, M = d.clientHeight || 400, i.style.width = `${A}px`, i.style.height = `${M}px`, i.width = Math.round(A * S), i.height = Math.round(M * S), h.viewport(0, 0, i.width, i.height));
2691
2690
  }
2692
2691
  function Y(i, h) {
2693
- var ke, Se, Re, It, Lt, Bt, Ut, Ft, zt, Dt, Ot, Pt;
2694
- const d = (Bt = (Lt = (It = (Re = (Se = (ke = n.metaData) == null ? void 0 : ke.row_groups) == null ? void 0 : Se[0]) == null ? void 0 : Re.columns) == null ? void 0 : It[0]) == null ? void 0 : Lt.meta_data) == null ? void 0 : Bt.statistics, g = (Pt = (Ot = (Dt = (zt = (Ft = (Ut = n.metaData) == null ? void 0 : Ut.row_groups) == null ? void 0 : Ft[0]) == null ? void 0 : zt.columns) == null ? void 0 : Dt[1]) == null ? void 0 : Ot.meta_data) == null ? void 0 : Pt.statistics, _ = Number((d == null ? void 0 : d.min_value) ?? -1), w = Number((d == null ? void 0 : d.max_value) ?? 1), S = Number((g == null ? void 0 : g.min_value) ?? -1), M = Number((g == null ? void 0 : g.max_value) ?? 1), T = (_ + w) / 2, L = (S + M) / 2, F = Math.max(1e-9, w - _), D = Math.max(1e-9, M - S), G = 2 / Math.max(F, D), he = m.x / i * 2 - 1, qe = -m.y / h * 2 + 1, Ce = m.k * G, lt = he - Ce * T, st = qe - Ce * L;
2695
- return { s: Ce, tx: lt, ty: st };
2692
+ var Q, ce, me, It, Lt, Bt, Ft, Ut, zt, Dt, Ot, Pt;
2693
+ const d = (Bt = (Lt = (It = (me = (ce = (Q = n.metaData) == null ? void 0 : Q.row_groups) == null ? void 0 : ce[0]) == null ? void 0 : me.columns) == null ? void 0 : It[0]) == null ? void 0 : Lt.meta_data) == null ? void 0 : Bt.statistics, g = (Pt = (Ot = (Dt = (zt = (Ut = (Ft = n.metaData) == null ? void 0 : Ft.row_groups) == null ? void 0 : Ut[0]) == null ? void 0 : zt.columns) == null ? void 0 : Dt[1]) == null ? void 0 : Ot.meta_data) == null ? void 0 : Pt.statistics, _ = Number((d == null ? void 0 : d.min_value) ?? -1), w = Number((d == null ? void 0 : d.max_value) ?? 1), C = Number((g == null ? void 0 : g.min_value) ?? -1), x = Number((g == null ? void 0 : g.max_value) ?? 1), R = (_ + w) / 2, I = (C + x) / 2, N = Math.max(1e-9, w - _), F = Math.max(1e-9, x - C), q = 2 / Math.max(N, F), le = m.x / i * 2 - 1, te = -m.y / h * 2 + 1, se = m.k * q, ve = le - se * R, Ee = te - se * I;
2694
+ return { s: se, tx: ve, ty: Ee };
2696
2695
  }
2697
- function V(i, h, d, g) {
2698
- const { s: _, tx: w, ty: S } = Y(d, g), M = i / d * 2 - 1, T = -(h / g * 2 - 1), L = (M - w) / _, F = (T - S) / _;
2699
- return { x: L, y: F };
2696
+ function j(i, h, d, g) {
2697
+ const { s: _, tx: w, ty: C } = Y(d, g), x = i / d * 2 - 1, R = -(h / g * 2 - 1), I = (x - w) / _, N = (R - C) / _;
2698
+ return { x: I, y: N };
2700
2699
  }
2701
- function j(i, h, d, g, _) {
2700
+ function X(i, h, d, g, _) {
2702
2701
  if (!i.length || !m) return null;
2703
- const w = V(h, d, g, _);
2704
- let S = 1 / 0, M = null;
2705
- for (const T of i) {
2706
- const L = T.x - w.x, F = T.y - w.y, D = Math.hypot(L, F), G = 3 / (m.k / 2);
2707
- D < S && D < G && (S = D, M = T);
2702
+ const w = j(h, d, g, _);
2703
+ let C = 1 / 0, x = null;
2704
+ for (const R of i) {
2705
+ const I = R.x - w.x, N = R.y - w.y, F = Math.hypot(I, N), q = 3 / (m.k / 2);
2706
+ F < C && F < q && (C = F, x = R);
2708
2707
  }
2709
- return M;
2710
- }
2711
- function X() {
2712
- const i = [];
2713
- for (let h = 0; h < n.data.length; h++) {
2714
- const d = n.data[h], g = Number(d[0]), _ = Number(d[1]);
2708
+ return x;
2709
+ }
2710
+ function G() {
2711
+ var g, _;
2712
+ const i = [], h = ((g = n.metaData) == null ? void 0 : g.schema) || [], d = n.data;
2713
+ for (let w = 0; w < d.length; w++) {
2714
+ const C = d[w], x = Number(C[0]), R = Number(C[1]), I = {};
2715
+ for (let N = 0; N < h.length; N++) {
2716
+ const F = ((_ = h[N]) == null ? void 0 : _.name) ?? `col_${N}`;
2717
+ I[F] = C[N];
2718
+ }
2715
2719
  i.push({
2716
- x: g,
2717
- y: _,
2718
- rawX: g,
2719
- rawY: _,
2720
+ x,
2721
+ y: R,
2722
+ rawX: x,
2723
+ rawY: R,
2720
2724
  color: [0.5, 0.5, 0.5],
2721
- // filled by color watchers
2722
- id: h
2725
+ id: w,
2726
+ attrs: I
2723
2727
  });
2724
2728
  }
2725
2729
  return i;
2726
2730
  }
2727
- function K(i, h, d) {
2731
+ function J(i, h, d) {
2728
2732
  const g = i.createShader(i.VERTEX_SHADER);
2729
2733
  if (i.shaderSource(g, h), i.compileShader(g), !i.getShaderParameter(g, i.COMPILE_STATUS))
2730
2734
  return console.error("Vertex shader error:", i.getShaderInfoLog(g)), null;
@@ -2738,21 +2742,21 @@ const Jo = /* @__PURE__ */ Ee({
2738
2742
  if (!d.length) return null;
2739
2743
  const g = i.createBuffer();
2740
2744
  i.bindBuffer(i.ARRAY_BUFFER, g);
2741
- const _ = new Float32Array(d.flatMap((D) => [D.x, D.y]));
2745
+ const _ = new Float32Array(d.flatMap((F) => [F.x, F.y]));
2742
2746
  i.bufferData(i.ARRAY_BUFFER, _, i.STATIC_DRAW);
2743
2747
  const w = i.createBuffer();
2744
2748
  i.bindBuffer(i.ARRAY_BUFFER, w);
2745
- const S = new Float32Array(d.flatMap((D) => D.color));
2746
- i.bufferData(i.ARRAY_BUFFER, S, i.STATIC_DRAW);
2747
- const M = i.getAttribLocation(h, "a_position"), T = i.getAttribLocation(h, "a_color"), L = i.getUniformLocation(h, "u_viewMatrix"), F = i.getUniformLocation(h, "u_pointSize");
2749
+ const C = new Float32Array(d.flatMap((F) => F.color));
2750
+ i.bufferData(i.ARRAY_BUFFER, C, i.STATIC_DRAW);
2751
+ const x = i.getAttribLocation(h, "a_position"), R = i.getAttribLocation(h, "a_color"), I = i.getUniformLocation(h, "u_viewMatrix"), N = i.getUniformLocation(h, "u_pointSize");
2748
2752
  return {
2749
2753
  program: h,
2750
2754
  positionBuffer: g,
2751
2755
  colorBuffer: w,
2752
- positionAttributeLocation: M,
2753
- colorAttributeLocation: T,
2754
- viewMatrixLocation: L,
2755
- pointSizeLocation: F,
2756
+ positionAttributeLocation: x,
2757
+ colorAttributeLocation: R,
2758
+ viewMatrixLocation: I,
2759
+ pointSizeLocation: N,
2756
2760
  count: d.length
2757
2761
  };
2758
2762
  }
@@ -2761,42 +2765,42 @@ const Jo = /* @__PURE__ */ Ee({
2761
2765
  const {
2762
2766
  program: _,
2763
2767
  positionBuffer: w,
2764
- colorBuffer: S,
2765
- positionAttributeLocation: M,
2766
- colorAttributeLocation: T,
2767
- viewMatrixLocation: L,
2768
- pointSizeLocation: F,
2769
- count: D
2768
+ colorBuffer: C,
2769
+ positionAttributeLocation: x,
2770
+ colorAttributeLocation: R,
2771
+ viewMatrixLocation: I,
2772
+ pointSizeLocation: N,
2773
+ count: F
2770
2774
  } = h;
2771
- i.clearColor(0, 0, 0, 1), i.clear(i.COLOR_BUFFER_BIT), i.useProgram(_), i.enableVertexAttribArray(M), i.bindBuffer(i.ARRAY_BUFFER, w), i.vertexAttribPointer(M, 2, i.FLOAT, !1, 0, 0), i.enableVertexAttribArray(T), i.bindBuffer(i.ARRAY_BUFFER, S), i.vertexAttribPointer(T, 3, i.FLOAT, !1, 0, 0);
2772
- const G = i.canvas.clientWidth, he = i.canvas.clientHeight, { s: qe, tx: Ce, ty: lt } = Y(G, he), st = new Float32Array([
2773
- qe,
2775
+ i.clearColor(0, 0, 0, 1), i.clear(i.COLOR_BUFFER_BIT), i.useProgram(_), i.enableVertexAttribArray(x), i.bindBuffer(i.ARRAY_BUFFER, w), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0), i.enableVertexAttribArray(R), i.bindBuffer(i.ARRAY_BUFFER, C), i.vertexAttribPointer(R, 3, i.FLOAT, !1, 0, 0);
2776
+ const q = i.canvas.clientWidth, le = i.canvas.clientHeight, { s: te, tx: se, ty: ve } = Y(q, le), Ee = new Float32Array([
2777
+ te,
2774
2778
  0,
2775
2779
  0,
2776
2780
  0,
2777
2781
  0,
2778
- qe,
2782
+ te,
2779
2783
  0,
2780
2784
  0,
2781
2785
  0,
2782
2786
  0,
2783
2787
  1,
2784
2788
  0,
2785
- Ce,
2786
- lt,
2789
+ se,
2790
+ ve,
2787
2791
  0,
2788
2792
  1
2789
2793
  ]);
2790
- if (i.uniformMatrix4fv(L, !1, st), i.uniform1f(F, Math.max(1.5, d * Math.sqrt(m.k) * k)), i.enable(i.BLEND), i.blendFunc(i.SRC_ALPHA, i.ONE_MINUS_SRC_ALPHA), i.drawArrays(i.POINTS, 0, D), g) {
2791
- const ke = i.createBuffer();
2792
- i.bindBuffer(i.ARRAY_BUFFER, ke), i.bufferData(i.ARRAY_BUFFER, new Float32Array([g.x, g.y]), i.STATIC_DRAW), i.vertexAttribPointer(M, 2, i.FLOAT, !1, 0, 0);
2793
- const Se = i.createBuffer();
2794
- i.bindBuffer(i.ARRAY_BUFFER, Se), i.bufferData(i.ARRAY_BUFFER, new Float32Array([1, 1, 0.5]), i.STATIC_DRAW), i.vertexAttribPointer(T, 3, i.FLOAT, !1, 0, 0), i.uniform1f(F, Math.max(2.5, d * Math.sqrt(m.k) * 2.5 * k)), i.drawArrays(i.POINTS, 0, 1);
2795
- const Re = i.createBuffer();
2796
- i.bindBuffer(i.ARRAY_BUFFER, Re), i.bufferData(i.ARRAY_BUFFER, new Float32Array([1, 0.8, 0.2]), i.STATIC_DRAW), i.vertexAttribPointer(T, 3, i.FLOAT, !1, 0, 0), i.uniform1f(F, Math.max(3, d * Math.sqrt(m.k) * 3 * k)), i.drawArrays(i.POINTS, 0, 1), i.deleteBuffer(ke), i.deleteBuffer(Se), i.deleteBuffer(Re);
2794
+ if (i.uniformMatrix4fv(I, !1, Ee), i.uniform1f(N, Math.max(1.5, d * Math.sqrt(m.k) * S)), i.enable(i.BLEND), i.blendFunc(i.SRC_ALPHA, i.ONE_MINUS_SRC_ALPHA), i.drawArrays(i.POINTS, 0, F), g) {
2795
+ const Q = i.createBuffer();
2796
+ i.bindBuffer(i.ARRAY_BUFFER, Q), i.bufferData(i.ARRAY_BUFFER, new Float32Array([g.x, g.y]), i.STATIC_DRAW), i.vertexAttribPointer(x, 2, i.FLOAT, !1, 0, 0);
2797
+ const ce = i.createBuffer();
2798
+ i.bindBuffer(i.ARRAY_BUFFER, ce), i.bufferData(i.ARRAY_BUFFER, new Float32Array([1, 1, 0.5]), i.STATIC_DRAW), i.vertexAttribPointer(R, 3, i.FLOAT, !1, 0, 0), i.uniform1f(N, Math.max(2.5, d * Math.sqrt(m.k) * 2.5 * S)), i.drawArrays(i.POINTS, 0, 1);
2799
+ const me = i.createBuffer();
2800
+ i.bindBuffer(i.ARRAY_BUFFER, me), i.bufferData(i.ARRAY_BUFFER, new Float32Array([1, 0.8, 0.2]), i.STATIC_DRAW), i.vertexAttribPointer(R, 3, i.FLOAT, !1, 0, 0), i.uniform1f(N, Math.max(3, d * Math.sqrt(m.k) * 3 * S)), i.drawArrays(i.POINTS, 0, 1), i.deleteBuffer(Q), i.deleteBuffer(ce), i.deleteBuffer(me);
2797
2801
  }
2798
2802
  }
2799
- function Z() {
2803
+ function ee() {
2800
2804
  if (!(!a.value || !r.value)) {
2801
2805
  if (l = a.value.getContext("webgl", {
2802
2806
  preserveDrawingBuffer: !0,
@@ -2806,7 +2810,7 @@ const Jo = /* @__PURE__ */ Ee({
2806
2810
  console.error("WebGL not supported");
2807
2811
  return;
2808
2812
  }
2809
- U(a.value, l), f = K(l, `
2813
+ z(a.value, l), f = J(l, `
2810
2814
  attribute vec2 a_position;
2811
2815
  attribute vec3 a_color;
2812
2816
  uniform mat4 u_viewMatrix;
@@ -2827,80 +2831,97 @@ const Jo = /* @__PURE__ */ Ee({
2827
2831
  if (dist > 0.4) { alpha = 1.0 - (dist - 0.4) * 2.0; }
2828
2832
  gl_FragColor = vec4(v_color, alpha);
2829
2833
  }
2830
- `), f && (l.useProgram(f), p = X(), c = P(l, f, p), m = rt.translate(x / 2, A / 2).scale(1), y = Ko().scaleExtent([0.1, 100]).on("zoom", (i) => {
2834
+ `), f && (l.useProgram(f), p = G(), c = P(l, f, p), m = it.translate(A / 2, M / 2).scale(1), y = Ko().scaleExtent([0.1, 100]).on("zoom", (i) => {
2831
2835
  m = i.transform, O(l, c, 2, b);
2832
- }), ue(a.value).call(y), requestAnimationFrame(() => O(l, c, 2, null)), a.value.addEventListener("mousemove", E), a.value.addEventListener("mouseleave", R));
2836
+ }), he(a.value).call(y), requestAnimationFrame(() => O(l, c, 2, null)), a.value.addEventListener("mousemove", E), a.value.addEventListener("mouseleave", T));
2833
2837
  }
2834
2838
  }
2835
2839
  function E(i) {
2840
+ var w, C, x, R, I;
2836
2841
  if (!a.value) return;
2837
- const h = a.value.getBoundingClientRect(), d = i.clientX - h.left, g = i.clientY - h.top, _ = j(p, d, g, x, A);
2842
+ const h = a.value.getBoundingClientRect(), d = i.clientX - h.left, g = i.clientY - h.top, _ = X(p, d, g, A, M);
2838
2843
  if (_) {
2839
- const w = o.value;
2840
- w.style.left = `${i.clientX + 15}px`, w.style.top = `${i.clientY - 15}px`, w.style.opacity = "1", w.innerHTML = `<strong>(${_.rawX.toFixed(2)}, ${_.rawY.toFixed(2)})</strong>`, b = _, O(l, c, 2, b);
2844
+ const N = o.value;
2845
+ N.style.left = `${i.clientX + 15}px`, N.style.top = `${i.clientY - 15}px`, N.style.opacity = "1";
2846
+ const F = ((w = n.metaData) == null ? void 0 : w.schema) || [], q = F.findIndex((Q) => (Q == null ? void 0 : Q.name) === n.colorMode), le = n.colorMode, te = q >= 0 ? (x = _.attrs) == null ? void 0 : x[((C = F[q]) == null ? void 0 : C.name) || ""] : void 0;
2847
+ let se = "";
2848
+ const ve = n.selectedMapEntries;
2849
+ te !== void 0 && (ve instanceof Map ? se = ve.has(te) ? String(te) : "" : Array.isArray(ve) && (se = ve.some(([Q]) => Q === te) ? String(te) : ""));
2850
+ const Ee = [];
2851
+ for (let Q = 2; Q < Math.min(F.length, 7); Q++) {
2852
+ const ce = (R = F[Q]) == null ? void 0 : R.name;
2853
+ if (!ce) continue;
2854
+ const me = (I = _.attrs) == null ? void 0 : I[ce];
2855
+ Ee.push(`<div><em>${ce}</em>: ${me === void 0 ? "—" : String(me)}</div>`);
2856
+ }
2857
+ N.innerHTML = `
2858
+ <strong>(${_.rawX.toFixed(2)}, ${_.rawY.toFixed(2)})</strong>
2859
+ ${q >= 0 ? `<div><b>${le}</b>: ${se || String(te)}</div>` : ""}
2860
+ ${Ee.join("")}
2861
+ `, b = _, O(l, c, 2, b);
2841
2862
  } else
2842
2863
  o.value && (o.value.style.opacity = "0"), b !== null && (b = null, O(l, c, 2, null));
2843
2864
  }
2844
- function R() {
2865
+ function T() {
2845
2866
  o.value && (o.value.style.opacity = "0"), b !== null && (b = null, O(l, c, 2, null));
2846
2867
  }
2847
2868
  function s() {
2848
- !a.value || !l || (U(a.value, l), O(l, c, 2, b));
2869
+ !a.value || !l || (z(a.value, l), O(l, c, 2, b));
2849
2870
  }
2850
2871
  function v() {
2851
- var S;
2872
+ var C;
2852
2873
  if (!l || !c || !n.data.length) return;
2853
- const i = (((S = n.metaData) == null ? void 0 : S.schema) || []).findIndex((M) => (M == null ? void 0 : M.name) === n.colorMode), h = i >= 0 ? i : -1, d = C(n.startColor), g = C(n.endColor);
2874
+ const i = (((C = n.metaData) == null ? void 0 : C.schema) || []).findIndex((x) => (x == null ? void 0 : x.name) === n.colorMode), h = i >= 0 ? i : -1, d = k(n.startColor), g = k(n.endColor);
2854
2875
  let _ = [];
2855
2876
  if (n.colorMap && n.colorMap.size > 0 && h >= 0)
2856
- _ = n.data.flatMap((M) => n.colorMap.get(M[h]) || [0.6, 0.6, 0.6]);
2877
+ _ = n.data.flatMap((x) => n.colorMap.get(x[h]) || [0.6, 0.6, 0.6]);
2857
2878
  else if (h >= 0) {
2858
- const M = n.data.map((F) => Number(F[h])).filter(Number.isFinite), T = Math.min(...M), L = Math.max(...M) - T || 1;
2859
- _ = n.data.flatMap((F) => {
2860
- const D = Number(F[h]), G = Math.max(0, Math.min(1, (D - T) / L));
2879
+ const x = n.data.map((N) => Number(N[h])).filter(Number.isFinite), R = Math.min(...x), I = Math.max(...x) - R || 1;
2880
+ _ = n.data.flatMap((N) => {
2881
+ const F = Number(N[h]), q = Math.max(0, Math.min(1, (F - R) / I));
2861
2882
  return [
2862
- I(d[0], g[0], G),
2863
- I(d[1], g[1], G),
2864
- I(d[2], g[2], G)
2883
+ B(d[0], g[0], q),
2884
+ B(d[1], g[1], q),
2885
+ B(d[2], g[2], q)
2865
2886
  ];
2866
2887
  });
2867
2888
  } else {
2868
- const M = C(n.singleColor);
2869
- _ = n.data.flatMap(() => M);
2889
+ const x = k(n.singleColor);
2890
+ _ = n.data.flatMap(() => x);
2870
2891
  }
2871
2892
  l.deleteBuffer(c.colorBuffer);
2872
2893
  const w = l.createBuffer();
2873
2894
  l.bindBuffer(l.ARRAY_BUFFER, w), l.bufferData(l.ARRAY_BUFFER, new Float32Array(_), l.STATIC_DRAW), c.colorBuffer = w, O(l, c, 2, b);
2874
2895
  }
2875
- return W(() => n.forceRegenerate, () => {
2876
- !l || !f || (p = X(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = P(l, f, p), m = rt, a.value && y && ue(a.value).call(y.transform, m), v(), O(l, c, 2, null));
2877
- }), W(() => n.data, () => {
2896
+ return H(() => n.forceRegenerate, () => {
2897
+ !l || !f || (p = G(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = P(l, f, p), m = it, a.value && y && he(a.value).call(y.transform, m), v(), O(l, c, 2, null));
2898
+ }), H(() => n.data, () => {
2878
2899
  if (!l || !f) {
2879
- Z();
2900
+ ee();
2880
2901
  return;
2881
2902
  }
2882
- p = X(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = P(l, f, p), v(), O(l, c, 2, null);
2883
- }), W(() => n.colorMode, v), W([() => n.startColor, () => n.endColor, () => n.singleColor], v), W(() => n.pointCount, (i) => {
2884
- !l || !f || (p = X(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = P(l, f, p), v(), O(l, c, 2, null));
2885
- }), at(() => {
2903
+ p = G(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = P(l, f, p), v(), O(l, c, 2, null);
2904
+ }), H(() => n.colorMode, v), H([() => n.startColor, () => n.endColor, () => n.singleColor], v), H(() => n.pointCount, (i) => {
2905
+ !l || !f || (p = G(), c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer)), c = P(l, f, p), v(), O(l, c, 2, null));
2906
+ }), ot(() => {
2886
2907
  window.addEventListener("resize", s);
2887
2908
  }), un(() => {
2888
- a.value && (a.value.removeEventListener("mousemove", E), a.value.removeEventListener("mouseleave", R)), window.removeEventListener("resize", s), l && c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer), f && l.deleteProgram(f));
2889
- }), (i, h) => (B(), z("div", {
2909
+ a.value && (a.value.removeEventListener("mousemove", E), a.value.removeEventListener("mouseleave", T)), window.removeEventListener("resize", s), l && c && (l.deleteBuffer(c.positionBuffer), l.deleteBuffer(c.colorBuffer), f && l.deleteProgram(f));
2910
+ }), (i, h) => (U(), D("div", {
2890
2911
  class: "scatterplot-container",
2891
2912
  ref_key: "containerRef",
2892
2913
  ref: r
2893
2914
  }, [
2894
- $("canvas", {
2915
+ L("canvas", {
2895
2916
  ref_key: "canvasRef",
2896
2917
  ref: a
2897
2918
  }, null, 512),
2898
- $("div", {
2919
+ L("div", {
2899
2920
  id: "tooltip",
2900
2921
  ref_key: "tooltipRef",
2901
2922
  ref: o
2902
2923
  }, null, 512),
2903
- Et($("div", {
2924
+ Et(L("div", {
2904
2925
  id: "debug",
2905
2926
  ref_key: "debugRef",
2906
2927
  ref: u
@@ -2909,10 +2930,10 @@ const Jo = /* @__PURE__ */ Ee({
2909
2930
  ])
2910
2931
  ], 512));
2911
2932
  }
2912
- }), Zo = /* @__PURE__ */ De(Jo, [["__scopeId", "data-v-2c0af95e"]]), eu = { class: "control-panel" }, tu = { class: "color-option" }, nu = ["value"], ru = {
2933
+ }), Zo = /* @__PURE__ */ qe(Jo, [["__scopeId", "data-v-72d91e48"]]), eu = { class: "control-panel" }, tu = { class: "color-option" }, nu = ["value"], ru = {
2913
2934
  key: 0,
2914
2935
  class: "color-option"
2915
- }, au = { class: "legend" }, iu = { class: "legend-label" }, ou = /* @__PURE__ */ Ee({
2936
+ }, au = { class: "legend" }, iu = { class: "legend-label" }, ou = /* @__PURE__ */ Ne({
2916
2937
  __name: "control",
2917
2938
  props: {
2918
2939
  pointCount: { type: Number, default: 5e3 },
@@ -2934,56 +2955,56 @@ const Jo = /* @__PURE__ */ Ee({
2934
2955
  "updateColorMap"
2935
2956
  ],
2936
2957
  setup(e, { emit: t }) {
2937
- const n = e, r = t, a = N(n.pointCount), o = N(n.colorMode), u = N(n.startColor), l = N(n.endColor), f = N(n.singleColor), c = H(
2958
+ const n = e, r = t, a = $(n.pointCount), o = $(n.colorMode), u = $(n.startColor), l = $(n.endColor), f = $(n.singleColor), c = W(
2938
2959
  () => n.colorMapMap instanceof Map ? Array.from(n.colorMapMap.keys()) : []
2939
- ), p = H(
2960
+ ), p = W(
2940
2961
  () => n.colorMapMap instanceof Map ? n.colorMapMap.get(o.value) : void 0
2941
- ), m = H(() => p.value ? Array.from(p.value.entries()) : []);
2942
- function y(x) {
2943
- if (!x) return "rgb(150,150,150)";
2944
- const [A, k, C] = x;
2945
- return `rgb(${Math.round(A * 255)}, ${Math.round(k * 255)}, ${Math.round(C * 255)})`;
2962
+ ), m = W(() => p.value ? Array.from(p.value.entries()) : []);
2963
+ function y(A) {
2964
+ if (!A) return "rgb(150,150,150)";
2965
+ const [M, S, k] = A;
2966
+ return `rgb(${Math.round(M * 255)}, ${Math.round(S * 255)}, ${Math.round(k * 255)})`;
2946
2967
  }
2947
2968
  function b() {
2948
2969
  r("update:colorMode", o.value), r("updateColorMap", [o.value, p.value ?? /* @__PURE__ */ new Map()]), r("update:startColor", u.value), r("update:endColor", l.value), r("update:singleColor", f.value);
2949
2970
  }
2950
- return W(() => n.pointCount, (x) => a.value = x), W(() => n.colorMode, (x) => o.value = x), W(() => n.startColor, (x) => u.value = x), W(() => n.endColor, (x) => l.value = x), W(() => n.singleColor, (x) => f.value = x), W(o, b), W(() => n.colorMapMap, () => {
2971
+ return H(() => n.pointCount, (A) => a.value = A), H(() => n.colorMode, (A) => o.value = A), H(() => n.startColor, (A) => u.value = A), H(() => n.endColor, (A) => l.value = A), H(() => n.singleColor, (A) => f.value = A), H(o, b), H(() => n.colorMapMap, () => {
2951
2972
  n.colorMapMap instanceof Map && (o.value !== "random" && !n.colorMapMap.has(o.value) && (o.value = "random"), b());
2952
- }), (x, A) => (B(), z("div", eu, [
2953
- A[4] || (A[4] = $("h3", null, "Color Controls", -1)),
2954
- $("div", tu, [
2955
- A[2] || (A[2] = $("label", { for: "colorMode" }, "Color Mode:", -1)),
2956
- Et($("select", {
2973
+ }), (A, M) => (U(), D("div", eu, [
2974
+ M[4] || (M[4] = L("h3", null, "Color Controls", -1)),
2975
+ L("div", tu, [
2976
+ M[2] || (M[2] = L("label", { for: "colorMode" }, "Color Mode:", -1)),
2977
+ Et(L("select", {
2957
2978
  id: "colorMode",
2958
- "onUpdate:modelValue": A[0] || (A[0] = (k) => o.value = k)
2979
+ "onUpdate:modelValue": M[0] || (M[0] = (S) => o.value = S)
2959
2980
  }, [
2960
- A[1] || (A[1] = $("option", { value: "random" }, "random", -1)),
2961
- (B(!0), z(fe, null, we(c.value, (k) => (B(), z("option", {
2962
- key: k,
2963
- value: k
2964
- }, ne(k), 9, nu))), 128))
2981
+ M[1] || (M[1] = L("option", { value: "random" }, "all", -1)),
2982
+ (U(!0), D(ye, null, ke(c.value, (S) => (U(), D("option", {
2983
+ key: S,
2984
+ value: S
2985
+ }, ae(S), 9, nu))), 128))
2965
2986
  ], 512), [
2966
2987
  [On, o.value]
2967
2988
  ])
2968
2989
  ]),
2969
- m.value.length ? (B(), z("div", ru, [
2970
- $("div", au, [
2971
- A[3] || (A[3] = $("h4", null, "Legend", -1)),
2972
- (B(!0), z(fe, null, we(m.value, ([k, C], I) => (B(), z("div", {
2990
+ m.value.length ? (U(), D("div", ru, [
2991
+ L("div", au, [
2992
+ M[3] || (M[3] = L("h4", null, "Legend", -1)),
2993
+ (U(!0), D(ye, null, ke(m.value, ([S, k], B) => (U(), D("div", {
2973
2994
  class: "legend-item",
2974
- key: `${k}-${I}`
2995
+ key: `${S}-${B}`
2975
2996
  }, [
2976
- $("div", {
2997
+ L("div", {
2977
2998
  class: "legend-color",
2978
- style: Pn({ backgroundColor: y(C) })
2999
+ style: Pn({ backgroundColor: y(k) })
2979
3000
  }, null, 4),
2980
- $("div", iu, ne(k), 1)
3001
+ L("div", iu, ae(S), 1)
2981
3002
  ]))), 128))
2982
3003
  ])
2983
- ])) : _e("", !0)
3004
+ ])) : Ce("", !0)
2984
3005
  ]));
2985
3006
  }
2986
- }), uu = /* @__PURE__ */ De(ou, [["__scopeId", "data-v-91c1f44e"]]), lu = { class: "app-container" }, pt = "UMAP_1", dt = "UMAP_2", su = /* @__PURE__ */ Ee({
3007
+ }), uu = /* @__PURE__ */ qe(ou, [["__scopeId", "data-v-710a5c42"]]), lu = { class: "app-container" }, pt = "UMAP_1", dt = "UMAP_2", su = /* @__PURE__ */ Ne({
2987
3008
  __name: "wrapper",
2988
3009
  props: {
2989
3010
  apiUrl: {},
@@ -2993,8 +3014,8 @@ const Jo = /* @__PURE__ */ Ee({
2993
3014
  srcFileId: {}
2994
3015
  },
2995
3016
  setup(e) {
2996
- const t = e, n = N(5e3), r = N("random"), a = N("#ff0000"), o = N("#0000ff"), u = N("#4285f4"), l = N(!1), f = N(0), c = N([]), p = N(null), m = N(/* @__PURE__ */ new Map()), y = N(/* @__PURE__ */ new Map()), b = N([]), x = cn(), A = N(null), k = N(null);
2997
- W(
3017
+ const t = e, n = $(5e3), r = $("random"), a = $("#ff0000"), o = $("#0000ff"), u = $("#4285f4"), l = $(!1), f = $(0), c = $([]), p = $(null), m = $(/* @__PURE__ */ new Map()), y = $(/* @__PURE__ */ new Map()), b = $([]), A = cn(), M = $(null), S = $(null);
3018
+ H(
2998
3019
  () => {
2999
3020
  var s, v, i, h;
3000
3021
  return {
@@ -3007,61 +3028,61 @@ const Jo = /* @__PURE__ */ Ee({
3007
3028
  };
3008
3029
  },
3009
3030
  async ({ srcUrl: s, srcFileType: v, srcFileId: i, pkgId: h, pkgType: d, apiUrl: g }) => {
3010
- var _, w, S;
3031
+ var _, w, C;
3011
3032
  try {
3012
- if (c.value = [], p.value = null, await C(), s) {
3013
- const M = v ?? (s.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3014
- await I(s, M, i || "umap_file"), await U();
3033
+ if (c.value = [], p.value = null, await k(), s) {
3034
+ const x = v ?? (s.toLowerCase().endsWith(".csv") ? "csv" : "parquet");
3035
+ await B(s, x, i || "umap_file"), await z();
3015
3036
  return;
3016
3037
  }
3017
3038
  if (h && g) {
3018
- await X(h, g);
3019
- const M = (S = (w = (_ = b.value) == null ? void 0 : _[0]) == null ? void 0 : w.content) == null ? void 0 : S.id;
3020
- if (!M) return;
3021
- const T = await K(h, M, g);
3022
- await I(T, d === "CSV" ? "csv" : "parquet", M), await U();
3039
+ await G(h, g);
3040
+ const x = (C = (w = (_ = b.value) == null ? void 0 : _[0]) == null ? void 0 : w.content) == null ? void 0 : C.id;
3041
+ if (!x) return;
3042
+ const R = await J(h, x, g);
3043
+ await B(R, d === "CSV" ? "csv" : "parquet", x), await z();
3023
3044
  }
3024
- } catch (M) {
3025
- console.error("[UMAP Wrapper] Load failed:", (M == null ? void 0 : M.message) || M);
3045
+ } catch (x) {
3046
+ console.error("[UMAP Wrapper] Load failed:", (x == null ? void 0 : x.message) || x);
3026
3047
  }
3027
3048
  },
3028
3049
  { immediate: !0 }
3029
- ), W(n, async () => {
3030
- k.value && A.value && await Y();
3031
- }), W([() => x.sharedVersion, () => x.sharedResultName], async () => {
3032
- x.sharedResultName && (await C(), k.value = x.sharedResultName, await U());
3050
+ ), H(n, async () => {
3051
+ S.value && M.value && await Y();
3052
+ }), H([() => A.sharedVersion, () => A.sharedResultName], async () => {
3053
+ A.sharedResultName && (await k(), S.value = A.sharedResultName, await z());
3033
3054
  });
3034
- async function C() {
3035
- if (A.value) return;
3036
- const { connectionId: s } = await x.createConnection(`umap_${Date.now()}`);
3037
- A.value = s;
3055
+ async function k() {
3056
+ if (M.value) return;
3057
+ const { connectionId: s } = await A.createConnection(`umap_${Date.now()}`);
3058
+ M.value = s;
3038
3059
  }
3039
- async function I(s, v, i) {
3060
+ async function B(s, v, i) {
3040
3061
  const h = `umap_${i.replace(/[^a-zA-Z0-9_]/g, "_")}`;
3041
- k.value = await x.loadFile(s, v, h, {}, A.value, i);
3062
+ S.value = await A.loadFile(s, v, h, {}, M.value, i);
3042
3063
  }
3043
- async function U() {
3064
+ async function z() {
3044
3065
  var d, g, _, w;
3045
- if (!k.value || !A.value) return;
3046
- const s = await R(k.value), v = s.filter((S) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(S.type)), i = s.some((S) => S.name === pt) ? pt : ((d = v[0]) == null ? void 0 : d.name) || ((g = s[0]) == null ? void 0 : g.name), h = s.some((S) => S.name === dt) ? dt : ((_ = v[1]) == null ? void 0 : _.name) || ((w = s[1]) == null ? void 0 : w.name) || i;
3047
- await Y(i, h, s.map((S) => S.name)), await V(s, i, h);
3066
+ if (!S.value || !M.value) return;
3067
+ const s = await T(S.value), v = s.filter((C) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(C.type)), i = s.some((C) => C.name === pt) ? pt : ((d = v[0]) == null ? void 0 : d.name) || ((g = s[0]) == null ? void 0 : g.name), h = s.some((C) => C.name === dt) ? dt : ((_ = v[1]) == null ? void 0 : _.name) || ((w = s[1]) == null ? void 0 : w.name) || i;
3068
+ await Y(i, h, s.map((C) => C.name)), await j(s, i, h);
3048
3069
  }
3049
3070
  async function Y(s = pt, v = dt, i) {
3050
- var S;
3051
- if (!k.value || !A.value) return;
3052
- const h = (i || (await R(k.value)).map((M) => M.name)).filter((M) => M !== s && M !== v), d = `SELECT ${[
3071
+ var C;
3072
+ if (!S.value || !M.value) return;
3073
+ const h = (i || (await T(S.value)).map((x) => x.name)).filter((x) => x !== s && x !== v), d = `SELECT ${[
3053
3074
  `CAST(${P(s)} AS DOUBLE) AS __x`,
3054
3075
  `CAST(${P(v)} AS DOUBLE) AS __y`,
3055
- ...h.map((M) => P(M))
3056
- ].join(", ")} FROM ${k.value} LIMIT ${n.value}`, g = await x.executeQuery(d, A.value);
3057
- c.value = g.map((M) => [M.__x, M.__y, ...h.map((T) => M[T])]);
3076
+ ...h.map((x) => P(x))
3077
+ ].join(", ")} FROM ${S.value} LIMIT ${n.value}`, g = await A.executeQuery(d, M.value);
3078
+ c.value = g.map((x) => [x.__x, x.__y, ...h.map((R) => x[R])]);
3058
3079
  const _ = `
3059
3080
  SELECT min(${P(s)}) AS xmin, max(${P(s)}) AS xmax,
3060
3081
  min(${P(v)}) AS ymin, max(${P(v)}) AS ymax
3061
- FROM ${k.value}
3062
- `, w = ((S = await x.executeQuery(_, A.value)) == null ? void 0 : S[0]) || { xmin: -1, xmax: 1, ymin: -1, ymax: 1 };
3082
+ FROM ${S.value}
3083
+ `, w = ((C = await A.executeQuery(_, M.value)) == null ? void 0 : C[0]) || { xmin: -1, xmax: 1, ymin: -1, ymax: 1 };
3063
3084
  p.value = {
3064
- schema: [{ name: s }, { name: v }, ...h.map((M) => ({ name: M }))],
3085
+ schema: [{ name: s }, { name: v }, ...h.map((x) => ({ name: x }))],
3065
3086
  row_groups: [
3066
3087
  {
3067
3088
  columns: [
@@ -3072,7 +3093,7 @@ const Jo = /* @__PURE__ */ Ee({
3072
3093
  ]
3073
3094
  };
3074
3095
  }
3075
- async function V(s, v, i) {
3096
+ async function j(s, v, i) {
3076
3097
  y.value = /* @__PURE__ */ new Map();
3077
3098
  const h = ["#4269d0", "#efb118", "#ff725c", "#6cc5b0", "#3ca951", "#ff8ab7", "#a463f2", "#97bbf5", "#9c6b4e", "#9498a0"], d = (g) => /DOUBLE|HUGEINT|BIGINT|INTEGER|DECIMAL|FLOAT|REAL/i.test(g);
3078
3099
  for (const g of s) {
@@ -3083,8 +3104,8 @@ const Jo = /* @__PURE__ */ Ee({
3083
3104
  if (d(g.type))
3084
3105
  y.value.set(g.name, /* @__PURE__ */ new Map());
3085
3106
  else {
3086
- const _ = `SELECT DISTINCT ${P(g.name)} AS v FROM ${k.value} LIMIT 10000`, w = (await x.executeQuery(_, A.value)).map((M) => M.v).filter((M) => M != null), S = /* @__PURE__ */ new Map();
3087
- w.forEach((M, T) => S.set(M, Z(h[T % h.length]))), y.value.set(g.name, S);
3107
+ const _ = `SELECT DISTINCT ${P(g.name)} AS v FROM ${S.value} LIMIT 10000`, w = (await A.executeQuery(_, M.value)).map((x) => x.v).filter((x) => x != null), C = /* @__PURE__ */ new Map();
3108
+ w.forEach((x, R) => C.set(x, ee(h[R % h.length]))), y.value.set(g.name, C);
3088
3109
  }
3089
3110
  }
3090
3111
  (p.value || (p.value = {})).key_value_metadata = Array.from(y.value.keys()).map((g) => {
@@ -3095,17 +3116,17 @@ const Jo = /* @__PURE__ */ Ee({
3095
3116
  };
3096
3117
  }), r.value !== "random" && !y.value.has(r.value) && (r.value = "random");
3097
3118
  }
3098
- async function j() {
3119
+ async function X() {
3099
3120
  const { useGetToken: s } = await import("./useGetToken-BB_WoWij-DUKO7RtR.mjs");
3100
3121
  return s();
3101
3122
  }
3102
- async function X(s, v) {
3103
- const i = await j(), h = `${v}/packages/${s}/view?api_key=${i}`, d = await fetch(h);
3123
+ async function G(s, v) {
3124
+ const i = await X(), h = `${v}/packages/${s}/view?api_key=${i}`, d = await fetch(h);
3104
3125
  if (!d.ok) throw new Error(`view failed: ${d.status}`);
3105
3126
  b.value = await d.json();
3106
3127
  }
3107
- async function K(s, v, i) {
3108
- const h = await j(), d = `${i}/packages/${s}/files/${v}?api_key=${h}`, g = await fetch(d);
3128
+ async function J(s, v, i) {
3129
+ const h = await X(), d = `${i}/packages/${s}/files/${v}?api_key=${h}`, g = await fetch(d);
3109
3130
  if (!g.ok) throw new Error(`file url failed: ${g.status}`);
3110
3131
  return (await g.json()).url;
3111
3132
  }
@@ -3115,7 +3136,7 @@ const Jo = /* @__PURE__ */ Ee({
3115
3136
  function O() {
3116
3137
  l.value = !l.value, f.value++;
3117
3138
  }
3118
- function Z(s) {
3139
+ function ee(s) {
3119
3140
  try {
3120
3141
  if (!s || s.length < 7) return [1, 0, 0];
3121
3142
  const v = parseInt(s.slice(1, 3), 16) / 255, i = parseInt(s.slice(3, 5), 16) / 255, h = parseInt(s.slice(5, 7), 16) / 255;
@@ -3127,15 +3148,15 @@ const Jo = /* @__PURE__ */ Ee({
3127
3148
  function E(s) {
3128
3149
  m.value = s[1];
3129
3150
  }
3130
- async function R(s) {
3131
- return (await x.executeQuery(`PRAGMA table_info(${s});`, A.value)).map((v) => ({ name: v.name, type: v.type }));
3151
+ async function T(s) {
3152
+ return (await A.executeQuery(`PRAGMA table_info(${s});`, M.value)).map((v) => ({ name: v.name, type: v.type }));
3132
3153
  }
3133
- return at(async () => {
3134
- await C();
3154
+ return ot(async () => {
3155
+ await k();
3135
3156
  }), un(async () => {
3136
- A.value && await x.closeConnection(A.value);
3137
- }), (s, v) => (B(), z("div", lu, [
3138
- (B(), ln(Zo, {
3157
+ M.value && await A.closeConnection(M.value);
3158
+ }), (s, v) => (U(), D("div", lu, [
3159
+ (U(), ln(Zo, {
3139
3160
  data: c.value,
3140
3161
  metaData: p.value,
3141
3162
  pointCount: n.value,
@@ -3144,10 +3165,11 @@ const Jo = /* @__PURE__ */ Ee({
3144
3165
  startColor: a.value,
3145
3166
  endColor: o.value,
3146
3167
  singleColor: u.value,
3168
+ selectedMapEntries: Array.from(m.value),
3147
3169
  forceRegenerate: l.value,
3148
3170
  key: f.value
3149
- }, null, 8, ["data", "metaData", "pointCount", "color-map", "colorMode", "startColor", "endColor", "singleColor", "forceRegenerate"])),
3150
- re(uu, {
3171
+ }, null, 8, ["data", "metaData", "pointCount", "color-map", "colorMode", "startColor", "endColor", "singleColor", "selectedMapEntries", "forceRegenerate"])),
3172
+ ie(uu, {
3151
3173
  pointCount: n.value,
3152
3174
  "onUpdate:pointCount": v[0] || (v[0] = (i) => n.value = i),
3153
3175
  colorMode: r.value,
@@ -3165,31 +3187,31 @@ const Jo = /* @__PURE__ */ Ee({
3165
3187
  }, null, 8, ["pointCount", "colorMode", "startColor", "endColor", "singleColor", "color-scheme", "color-map-map"])
3166
3188
  ]));
3167
3189
  }
3168
- }), cu = /* @__PURE__ */ De(su, [["__scopeId", "data-v-244cd07d"]]), fu = "dashboard:globalVars";
3169
- function Fn(e = !1) {
3190
+ }), cu = /* @__PURE__ */ qe(su, [["__scopeId", "data-v-028490f3"]]), fu = "dashboard:globalVars";
3191
+ function Un(e = !1) {
3170
3192
  const t = jn(fu, null);
3171
3193
  return !t && e && console.warn("[Widget] dashboard:globalVars not provided."), t;
3172
3194
  }
3173
- const hu = { class: "data-explorer-wrap" }, pu = { class: "data-explorer-info" }, du = /* @__PURE__ */ Ee({
3195
+ const hu = { class: "data-explorer-wrap" }, pu = { class: "data-explorer-info" }, du = /* @__PURE__ */ Ne({
3174
3196
  inheritAttrs: !1,
3175
3197
  __name: "DataExplorer",
3176
3198
  setup(e) {
3177
- const t = Fn(), n = N("Data Explorer"), r = H(() => be(t.s3Url));
3199
+ const t = Un(), n = $("Data Explorer"), r = W(() => Se(t.s3Url));
3178
3200
  return Xn(() => {
3179
3201
  }), (a, o) => {
3180
3202
  const u = vt("el-icon");
3181
- return B(), z(fe, null, [
3203
+ return U(), D(ye, null, [
3182
3204
  sn(a.$slots, "default", { widgetName: n.value }, void 0, !0),
3183
- $("div", hu, [
3184
- $("div", pu, [
3185
- re(be(Gn), { placement: "top-start" }, {
3186
- content: Le(() => [...o[0] || (o[0] = [
3205
+ L("div", hu, [
3206
+ L("div", pu, [
3207
+ ie(Se(Gn), { placement: "top-start" }, {
3208
+ content: Ue(() => [...o[0] || (o[0] = [
3187
3209
  mt("Type in a query or use the suggested query buttons to run on your csv file", -1)
3188
3210
  ])]),
3189
- default: Le(() => [
3190
- re(u, { color: "#8300BF" }, {
3191
- default: Le(() => [
3192
- re(be(Qn))
3211
+ default: Ue(() => [
3212
+ ie(u, { color: "#8300BF" }, {
3213
+ default: Ue(() => [
3214
+ ie(Se(Qn))
3193
3215
  ]),
3194
3216
  _: 1
3195
3217
  })
@@ -3197,7 +3219,7 @@ const hu = { class: "data-explorer-wrap" }, pu = { class: "data-explorer-info" }
3197
3219
  _: 1
3198
3220
  })
3199
3221
  ]),
3200
- re(be(xr), { srcUrl: r.value }, null, 8, ["srcUrl"])
3222
+ ie(Se(xr), { srcUrl: r.value }, null, 8, ["srcUrl"])
3201
3223
  ])
3202
3224
  ], 64);
3203
3225
  };
@@ -3212,11 +3234,11 @@ const hu = { class: "data-explorer-wrap" }, pu = { class: "data-explorer-info" }
3212
3234
  }, {
3213
3235
  __name: "Umap",
3214
3236
  setup(e) {
3215
- const t = Fn(), n = N("Data Explorer"), r = H(() => be(t == null ? void 0 : t.s3Url));
3216
- return (a, o) => (B(), z(fe, null, [
3237
+ const t = Un(), n = $("Data Explorer"), r = W(() => Se(t == null ? void 0 : t.s3Url));
3238
+ return (a, o) => (U(), D(ye, null, [
3217
3239
  sn(a.$slots, "default", { widgetName: n.value }, void 0, !0),
3218
- $("div", vu, [
3219
- re(be(cu), { srcUrl: r.value }, null, 8, ["srcUrl"])
3240
+ L("div", vu, [
3241
+ ie(Se(cu), { srcUrl: r.value }, null, 8, ["srcUrl"])
3220
3242
  ])
3221
3243
  ], 64));
3222
3244
  }