baselode 0.1.10 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/baselode.js +1522 -1191
- package/dist/baselode.js.map +1 -1
- package/package.json +1 -1
package/dist/baselode.js
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
1
|
+
import Q from "papaparse";
|
|
2
|
+
import { jsx as $, jsxs as te } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as _t, useState as ee, useEffect as fe, useMemo as Re } from "react";
|
|
4
|
+
import Le from "plotly.js-dist-min";
|
|
5
5
|
import * as y from "three";
|
|
6
|
-
import { OrbitControls as
|
|
7
|
-
import { FlyControls as
|
|
8
|
-
import { ViewportGizmo as
|
|
9
|
-
import { EffectComposer as
|
|
10
|
-
import { RenderPass as
|
|
11
|
-
import { OutlinePass as
|
|
12
|
-
const z = "hole_id",
|
|
6
|
+
import { OrbitControls as Jt } from "three/examples/jsm/controls/OrbitControls";
|
|
7
|
+
import { FlyControls as Qt } from "three/examples/jsm/controls/FlyControls";
|
|
8
|
+
import { ViewportGizmo as en } from "three-viewport-gizmo";
|
|
9
|
+
import { EffectComposer as tn } from "three/examples/jsm/postprocessing/EffectComposer.js";
|
|
10
|
+
import { RenderPass as nn } from "three/examples/jsm/postprocessing/RenderPass.js";
|
|
11
|
+
import { OutlinePass as rn } from "three/examples/jsm/postprocessing/OutlinePass.js";
|
|
12
|
+
const z = "hole_id", re = "latitude", oe = "longitude", ke = "elevation", G = "azimuth", U = "dip", C = "from", D = "to", Ie = "mid", ue = "project_id", he = "easting", pe = "northing", Nt = "crs", W = "depth", zt = "alpha", Mt = "beta", on = "strike", se = "geology_code", le = "geology_description", ao = {
|
|
13
13
|
// A unique hole identifier across the entire dataset and all future data sets
|
|
14
14
|
[z]: "string",
|
|
15
15
|
// The hole ID from the original collar source
|
|
16
16
|
datasource_hole_id: "string",
|
|
17
17
|
// The project ID or project code from the original collar source, if available
|
|
18
|
-
[
|
|
18
|
+
[ue]: "string",
|
|
19
19
|
// The latitude of the collar, in decimal degrees (WGS84)
|
|
20
|
-
[
|
|
20
|
+
[re]: "number",
|
|
21
21
|
// The longitude of the collar, in decimal degrees (WGS84)
|
|
22
|
-
[
|
|
22
|
+
[oe]: "number",
|
|
23
23
|
// The elevation of the collar, in meters above sea level (WGS84)
|
|
24
|
-
[
|
|
24
|
+
[ke]: "number",
|
|
25
25
|
// The easting coordinate of the collar, in meters (projected CRS)
|
|
26
|
-
[
|
|
26
|
+
[he]: "number",
|
|
27
27
|
// The northing coordinate of the collar, in meters (projected CRS)
|
|
28
|
-
[
|
|
28
|
+
[pe]: "number",
|
|
29
29
|
// The coordinate reference system of the collar coordinates for easting/northing, as an EPSG code or proj string
|
|
30
|
-
[
|
|
31
|
-
},
|
|
30
|
+
[Nt]: "string"
|
|
31
|
+
}, co = {
|
|
32
32
|
// The unique hole id that maps to the collar and any other data tables
|
|
33
33
|
[z]: "string",
|
|
34
34
|
// The depth along the hole where the survey measurement was taken / started
|
|
35
|
-
[
|
|
35
|
+
[W]: "number",
|
|
36
36
|
// The depth along the hole where the survey measurement ended, if applicable (some surveys are point measurements and may not have a 'to' depth)
|
|
37
|
-
[
|
|
37
|
+
[D]: "number",
|
|
38
38
|
// The azimuth of the hole at the survey depth, in degrees from north
|
|
39
|
-
[
|
|
39
|
+
[G]: "number",
|
|
40
40
|
// The dip of the hole at the survey depth, in degrees from horizontal (negative values indicate downward inclination)
|
|
41
|
-
[
|
|
42
|
-
},
|
|
41
|
+
[U]: "number"
|
|
42
|
+
}, uo = {
|
|
43
43
|
// The unique hole id that maps to the collar and any other data tables
|
|
44
44
|
[z]: "string",
|
|
45
45
|
// The depth along the hole where the assay interval starts
|
|
46
|
-
[
|
|
46
|
+
[C]: "number",
|
|
47
47
|
// The depth along the hole where the assay interval ends
|
|
48
|
-
[
|
|
48
|
+
[D]: "number",
|
|
49
49
|
// The midpoint depth of the assay interval
|
|
50
|
-
[
|
|
50
|
+
[Ie]: "number"
|
|
51
51
|
// assay value columns are variable and not standardized here.
|
|
52
52
|
// Assays may be flattened (one column per assay type) or long (one row per assay type with an additional 'assay_type' column)
|
|
53
|
-
},
|
|
53
|
+
}, sn = {
|
|
54
54
|
[z]: "string",
|
|
55
|
-
[
|
|
56
|
-
[
|
|
57
|
-
[
|
|
58
|
-
[
|
|
59
|
-
[
|
|
60
|
-
},
|
|
55
|
+
[C]: "number",
|
|
56
|
+
[D]: "number",
|
|
57
|
+
[Ie]: "number",
|
|
58
|
+
[se]: "string",
|
|
59
|
+
[le]: "string"
|
|
60
|
+
}, mo = {
|
|
61
61
|
[z]: "string",
|
|
62
|
-
[
|
|
63
|
-
[
|
|
64
|
-
[
|
|
65
|
-
[
|
|
66
|
-
[
|
|
62
|
+
[W]: "number",
|
|
63
|
+
[U]: "number",
|
|
64
|
+
[G]: "number",
|
|
65
|
+
[zt]: "number",
|
|
66
|
+
[Mt]: "number",
|
|
67
67
|
comments: "string"
|
|
68
|
-
},
|
|
68
|
+
}, ln = {
|
|
69
69
|
[z]: ["hole_id", "holeid", "hole id", "hole-id"],
|
|
70
70
|
datasource_hole_id: ["datasource_hole_id", "datasourceholeid", "datasource hole id", "datasource-hole-id", "company_hole_id", "companyholeid", "company hole id", "company-hole-id"],
|
|
71
|
-
[
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
79
|
-
[
|
|
80
|
-
[
|
|
71
|
+
[ue]: ["project_id", "projectid", "project id", "project-id", "project_code", "projectcode", "project code", "project-code", "companyId", "company_id", "companyid", "company id", "company-id", "dataset", "project"],
|
|
72
|
+
[re]: ["latitude", "lat"],
|
|
73
|
+
[oe]: ["longitude", "lon"],
|
|
74
|
+
[ke]: ["elevation", "rl", "elev", "z"],
|
|
75
|
+
[he]: ["easting", "x"],
|
|
76
|
+
[pe]: ["northing", "y"],
|
|
77
|
+
[Nt]: ["crs", "epsg", "projection"],
|
|
78
|
+
[C]: ["from", "depth_from", "from_depth", "samp_from", "sample_from", "sampfrom", "fromdepth"],
|
|
79
|
+
[D]: ["to", "depth_to", "to_depth", "samp_to", "sample_to", "sampto", "todepth"],
|
|
80
|
+
[se]: [
|
|
81
81
|
"geology_code",
|
|
82
82
|
"geologycode",
|
|
83
83
|
"lith1",
|
|
@@ -87,7 +87,7 @@ const z = "hole_id", te = "latitude", ne = "longitude", Me = "elevation", j = "a
|
|
|
87
87
|
"plot_lithology",
|
|
88
88
|
"rock1"
|
|
89
89
|
],
|
|
90
|
-
[
|
|
90
|
+
[le]: [
|
|
91
91
|
"geology_description",
|
|
92
92
|
"geologydescription",
|
|
93
93
|
"geology_comment",
|
|
@@ -98,42 +98,42 @@ const z = "hole_id", te = "latitude", ne = "longitude", Me = "elevation", j = "a
|
|
|
98
98
|
"description",
|
|
99
99
|
"comments"
|
|
100
100
|
],
|
|
101
|
-
[
|
|
102
|
-
[
|
|
103
|
-
[
|
|
104
|
-
[
|
|
101
|
+
[G]: ["azimuth", "az", "dip_direction", "dipdir", "dip direction", "dipdrn", "dipdirection", "dip_dir", "computed_plane_azimuth", "calc_dipdir", "calc_dipdir_deg", "dipdir_calc", "dipdirect_calc"],
|
|
102
|
+
[U]: ["dip", "computed_plane_dip", "calc_dip", "calc_dip_deg", "dip_calc"],
|
|
103
|
+
[zt]: ["alpha", "alpha_angle", "alpha_angle_deg", "alpha_2"],
|
|
104
|
+
[Mt]: ["beta", "beta_angle", "beta_angle_deg", "beta_2"],
|
|
105
105
|
declination: ["declination", "dec"],
|
|
106
|
-
[
|
|
107
|
-
[
|
|
108
|
-
},
|
|
109
|
-
for (const [e, t] of Object.entries(
|
|
106
|
+
[W]: ["depth", "survey_depth", "surveydepth"],
|
|
107
|
+
[on]: ["strike", "str"]
|
|
108
|
+
}, Et = {};
|
|
109
|
+
for (const [e, t] of Object.entries(ln))
|
|
110
110
|
for (const n of t) {
|
|
111
111
|
const r = n.toLowerCase().trim();
|
|
112
|
-
|
|
112
|
+
Et[r] = e;
|
|
113
113
|
}
|
|
114
|
-
function
|
|
114
|
+
function Oe(e) {
|
|
115
115
|
return (e || "").toString().trim().toLowerCase().replace(/\s+/g, "_");
|
|
116
116
|
}
|
|
117
|
-
function
|
|
118
|
-
const r = { ...
|
|
117
|
+
function be(e, t = null, n = null) {
|
|
118
|
+
const r = { ...Et };
|
|
119
119
|
if (n) {
|
|
120
120
|
for (const [i, s] of Object.entries(n))
|
|
121
121
|
if (i != null && s != null) {
|
|
122
|
-
const l =
|
|
122
|
+
const l = Oe(i), u = Oe(s);
|
|
123
123
|
r[l] = u;
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
126
|
const o = {};
|
|
127
127
|
for (const [i, s] of Object.entries(e)) {
|
|
128
|
-
const l =
|
|
128
|
+
const l = Oe(i), u = r[l] || l;
|
|
129
129
|
o[u] = s;
|
|
130
130
|
}
|
|
131
131
|
return o;
|
|
132
132
|
}
|
|
133
|
-
function
|
|
134
|
-
return e.map((r) =>
|
|
133
|
+
function fo(e, t = null, n = null) {
|
|
134
|
+
return e.map((r) => be(r, t, n));
|
|
135
135
|
}
|
|
136
|
-
const
|
|
136
|
+
const an = /* @__PURE__ */ new Set([
|
|
137
137
|
"hole_id",
|
|
138
138
|
"holeid",
|
|
139
139
|
"id",
|
|
@@ -165,34 +165,34 @@ const on = /* @__PURE__ */ new Set([
|
|
|
165
165
|
"todepth",
|
|
166
166
|
"comment",
|
|
167
167
|
"z"
|
|
168
|
-
]),
|
|
169
|
-
function
|
|
168
|
+
]), Xe = "[baselode:data]";
|
|
169
|
+
function cn(e, t = "Unknown error") {
|
|
170
170
|
if (e instanceof Error) return e;
|
|
171
171
|
const n = typeof e == "string" && e.trim() ? e : t;
|
|
172
172
|
return new Error(n);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
175
|
-
const r =
|
|
174
|
+
function j(e, t, n = "Operation failed") {
|
|
175
|
+
const r = cn(t, n), o = new Error(`${e}: ${r.message}`);
|
|
176
176
|
return o.cause = r, o;
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function ho(e, t) {
|
|
179
179
|
if (t !== void 0) {
|
|
180
|
-
console.warn(`${
|
|
180
|
+
console.warn(`${Xe} ${e}`, t);
|
|
181
181
|
return;
|
|
182
182
|
}
|
|
183
|
-
console.warn(`${
|
|
183
|
+
console.warn(`${Xe} ${e}`);
|
|
184
184
|
}
|
|
185
|
-
function
|
|
186
|
-
console.info(`${
|
|
185
|
+
function po(e) {
|
|
186
|
+
console.info(`${Xe} ${e}`);
|
|
187
187
|
}
|
|
188
|
-
const
|
|
189
|
-
function
|
|
188
|
+
const Ve = (e, t = null) => be(e, null, t);
|
|
189
|
+
function un(e) {
|
|
190
190
|
return { holeId: e[z] };
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function kt(e, t = null) {
|
|
193
193
|
const n = e[z], r = n !== void 0 ? `${n}`.trim() : "";
|
|
194
194
|
if (!r) return null;
|
|
195
|
-
const o = e[
|
|
195
|
+
const o = e[ue] || e.project || e.project_code, i = Number(e[C]), s = Number(e[D]);
|
|
196
196
|
return !Number.isFinite(i) || !Number.isFinite(s) || s <= i ? null : {
|
|
197
197
|
holeId: r,
|
|
198
198
|
project: o,
|
|
@@ -201,7 +201,7 @@ function zt(e, t = null) {
|
|
|
201
201
|
...e
|
|
202
202
|
};
|
|
203
203
|
}
|
|
204
|
-
function
|
|
204
|
+
function At(e, t) {
|
|
205
205
|
var o;
|
|
206
206
|
const n = t.sort((i, s) => i.from - s.from), r = [];
|
|
207
207
|
return n.forEach((i) => {
|
|
@@ -210,42 +210,42 @@ function Mt(e, t) {
|
|
|
210
210
|
from: s,
|
|
211
211
|
to: l,
|
|
212
212
|
[z]: e,
|
|
213
|
-
[
|
|
213
|
+
[ue]: u,
|
|
214
214
|
...a
|
|
215
215
|
};
|
|
216
216
|
r.push(c), r.push({ ...c, z: l });
|
|
217
217
|
}), { id: e, project: (o = n[0]) == null ? void 0 : o.project, points: r };
|
|
218
218
|
}
|
|
219
|
-
function
|
|
219
|
+
function bo(e, t = null) {
|
|
220
220
|
return new Promise((n, r) => {
|
|
221
221
|
const o = /* @__PURE__ */ new Set();
|
|
222
|
-
|
|
222
|
+
Q.parse(e, {
|
|
223
223
|
header: !0,
|
|
224
224
|
dynamicTyping: !0,
|
|
225
225
|
skipEmptyLines: !0,
|
|
226
226
|
step: (i) => {
|
|
227
|
-
const l =
|
|
227
|
+
const l = Ve(i.data, t)[z];
|
|
228
228
|
l !== void 0 && `${l}`.trim() !== "" && o.add(`${l}`.trim());
|
|
229
229
|
},
|
|
230
230
|
complete: () => n(Array.from(o)),
|
|
231
|
-
error: (i) => r(
|
|
231
|
+
error: (i) => r(j("parseAssayHoleIds", i))
|
|
232
232
|
});
|
|
233
233
|
});
|
|
234
234
|
}
|
|
235
|
-
function
|
|
236
|
-
return Object.entries(e || {}).some(([t, n]) => !(
|
|
235
|
+
function dn(e) {
|
|
236
|
+
return Object.entries(e || {}).some(([t, n]) => !(an.has(t) || n == null || typeof n == "string" && n.trim() === ""));
|
|
237
237
|
}
|
|
238
|
-
function
|
|
238
|
+
function mn(e, t = null) {
|
|
239
239
|
return new Promise((n, r) => {
|
|
240
240
|
const o = /* @__PURE__ */ new Map();
|
|
241
|
-
|
|
241
|
+
Q.parse(e, {
|
|
242
242
|
header: !0,
|
|
243
243
|
dynamicTyping: !0,
|
|
244
244
|
skipEmptyLines: !0,
|
|
245
245
|
step: (i) => {
|
|
246
|
-
const s =
|
|
247
|
-
if (!
|
|
248
|
-
const u =
|
|
246
|
+
const s = Ve(i.data, t);
|
|
247
|
+
if (!dn(s)) return;
|
|
248
|
+
const u = un(s).holeId;
|
|
249
249
|
if (u !== void 0 && `${u}`.trim() !== "") {
|
|
250
250
|
const a = `${u}`.trim();
|
|
251
251
|
o.has(a) || o.set(a, {
|
|
@@ -254,24 +254,24 @@ function cn(e, t = null) {
|
|
|
254
254
|
}
|
|
255
255
|
},
|
|
256
256
|
complete: () => n(Array.from(o.values())),
|
|
257
|
-
error: (i) => r(
|
|
257
|
+
error: (i) => r(j("parseAssayHoleIdsWithAssays", i))
|
|
258
258
|
});
|
|
259
259
|
});
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function fn(e, t, n = null, r = null) {
|
|
262
262
|
return new Promise((o, i) => {
|
|
263
263
|
const s = `${t}`.trim();
|
|
264
264
|
if (!s) {
|
|
265
|
-
i(
|
|
265
|
+
i(j("parseAssayHole", new Error("Missing hole id")));
|
|
266
266
|
return;
|
|
267
267
|
}
|
|
268
268
|
const l = [];
|
|
269
|
-
|
|
269
|
+
Q.parse(e, {
|
|
270
270
|
header: !0,
|
|
271
271
|
dynamicTyping: !0,
|
|
272
272
|
skipEmptyLines: !0,
|
|
273
273
|
step: (u) => {
|
|
274
|
-
const a =
|
|
274
|
+
const a = Ve(u.data, r), c = kt(a, r);
|
|
275
275
|
c && `${c.holeId}`.trim() === s && l.push(c);
|
|
276
276
|
},
|
|
277
277
|
complete: () => {
|
|
@@ -279,39 +279,39 @@ function un(e, t, n = null, r = null) {
|
|
|
279
279
|
o(null);
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
|
-
const u =
|
|
282
|
+
const u = At(s, l);
|
|
283
283
|
o(u);
|
|
284
284
|
},
|
|
285
|
-
error: (u) => i(
|
|
285
|
+
error: (u) => i(j("parseAssayHole", u))
|
|
286
286
|
});
|
|
287
287
|
});
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function hn(e, t = null, n = null) {
|
|
290
290
|
return new Promise((r, o) => {
|
|
291
|
-
|
|
291
|
+
Q.parse(e, {
|
|
292
292
|
header: !0,
|
|
293
293
|
dynamicTyping: !0,
|
|
294
294
|
skipEmptyLines: !0,
|
|
295
295
|
complete: (i) => {
|
|
296
296
|
const s = /* @__PURE__ */ new Map();
|
|
297
297
|
i.data.forEach((u) => {
|
|
298
|
-
const a =
|
|
298
|
+
const a = Ve(u, n), c = kt(a, n);
|
|
299
299
|
c && (s.has(c.holeId) || s.set(c.holeId, []), s.get(c.holeId).push(c));
|
|
300
300
|
});
|
|
301
|
-
const l = Array.from(s.entries()).map(([u, a]) =>
|
|
301
|
+
const l = Array.from(s.entries()).map(([u, a]) => At(u, a));
|
|
302
302
|
r({ holes: l });
|
|
303
303
|
},
|
|
304
|
-
error: (i) => o(
|
|
304
|
+
error: (i) => o(j("parseAssaysCSV", i))
|
|
305
305
|
});
|
|
306
306
|
});
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function go(e = {}) {
|
|
309
309
|
const t = {};
|
|
310
310
|
return Object.entries(e || {}).forEach(([n, r]) => {
|
|
311
|
-
n && (t[
|
|
311
|
+
n && (t[Oe(n)] = r);
|
|
312
312
|
}), t;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function yo(e = {}, t = [], n) {
|
|
315
315
|
for (const r of t) {
|
|
316
316
|
const o = e[r];
|
|
317
317
|
if (o != null && `${o}`.trim() !== "")
|
|
@@ -319,8 +319,8 @@ function fo(e = {}, t = [], n) {
|
|
|
319
319
|
}
|
|
320
320
|
return n;
|
|
321
321
|
}
|
|
322
|
-
const
|
|
323
|
-
function
|
|
322
|
+
const pn = 4;
|
|
323
|
+
function xt(e = [], t = "") {
|
|
324
324
|
if (!e.length) return [];
|
|
325
325
|
if (!t) return e;
|
|
326
326
|
const n = e.findIndex((i) => i === t);
|
|
@@ -337,16 +337,16 @@ function Pe({
|
|
|
337
337
|
} = {}) {
|
|
338
338
|
return e ? r.includes(e) ? "comment" : n.includes(e) ? "categorical" : e === "dip" ? "tadpole" : !t || t === "categorical" || t === "comment" || t === "tadpole" ? o : t : t || o;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
340
|
+
function It({
|
|
341
341
|
holeIds: e = [],
|
|
342
342
|
focusedHoleId: t = "",
|
|
343
|
-
plotCount: n =
|
|
343
|
+
plotCount: n = pn,
|
|
344
344
|
defaultProp: r = "",
|
|
345
345
|
categoricalProps: o = [],
|
|
346
346
|
commentProps: i = [],
|
|
347
347
|
numericDefaultChartType: s = "markers+line"
|
|
348
348
|
} = {}) {
|
|
349
|
-
const l =
|
|
349
|
+
const l = xt(e, t);
|
|
350
350
|
return Array.from({ length: n }).map((u, a) => {
|
|
351
351
|
const c = l[a] || e[a] || "", m = Pe({
|
|
352
352
|
property: r,
|
|
@@ -362,24 +362,24 @@ function At({
|
|
|
362
362
|
};
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
|
-
const
|
|
366
|
-
[
|
|
365
|
+
const xe = "numeric", De = "categorical", Ae = "comment", Te = "hidden", We = "tadpole", ot = {
|
|
366
|
+
[xe]: [
|
|
367
367
|
{ value: "bar", label: "Bars" },
|
|
368
368
|
{ value: "markers", label: "Markers" },
|
|
369
369
|
{ value: "markers+line", label: "Markers + Line" },
|
|
370
370
|
{ value: "line", label: "Line only" }
|
|
371
371
|
],
|
|
372
|
-
[
|
|
372
|
+
[De]: [
|
|
373
373
|
{ value: "categorical", label: "Categorical bands" }
|
|
374
374
|
],
|
|
375
|
-
[
|
|
375
|
+
[Ae]: [
|
|
376
376
|
{ value: "comment", label: "Comments" }
|
|
377
377
|
],
|
|
378
|
-
[
|
|
378
|
+
[We]: [
|
|
379
379
|
{ value: "tadpole", label: "Tadpole" }
|
|
380
380
|
],
|
|
381
|
-
[
|
|
382
|
-
},
|
|
381
|
+
[Te]: []
|
|
382
|
+
}, it = /* @__PURE__ */ new Set([
|
|
383
383
|
// Hole identifiers
|
|
384
384
|
"hole_id",
|
|
385
385
|
"holeid",
|
|
@@ -434,7 +434,7 @@ const Ae = "numeric", ve = "categorical", Ee = "comment", Oe = "hidden", Ye = "t
|
|
|
434
434
|
"data_source",
|
|
435
435
|
"_hole_key",
|
|
436
436
|
"_hole_id_key"
|
|
437
|
-
]),
|
|
437
|
+
]), bn = /* @__PURE__ */ new Set([
|
|
438
438
|
"comments",
|
|
439
439
|
"comment",
|
|
440
440
|
"notes",
|
|
@@ -447,22 +447,22 @@ const Ae = "numeric", ve = "categorical", Ee = "comment", Oe = "hidden", Ye = "t
|
|
|
447
447
|
"structcomment",
|
|
448
448
|
"geology_description"
|
|
449
449
|
]);
|
|
450
|
-
function
|
|
450
|
+
function gn(e) {
|
|
451
451
|
if (!(e != null && e.length))
|
|
452
452
|
return { byType: {}, numericCols: [], categoricalCols: [], commentCols: [] };
|
|
453
453
|
const t = new Set(e.flatMap((r) => Object.keys(r || {}))), n = {};
|
|
454
454
|
for (const r of t) {
|
|
455
455
|
const o = r.toLowerCase().trim();
|
|
456
|
-
if (
|
|
457
|
-
n[r] =
|
|
456
|
+
if (it.has(o) || it.has(r)) {
|
|
457
|
+
n[r] = Te;
|
|
458
458
|
continue;
|
|
459
459
|
}
|
|
460
|
-
if (
|
|
460
|
+
if (bn.has(o)) {
|
|
461
461
|
const l = e.some((u) => {
|
|
462
462
|
const a = u[r];
|
|
463
463
|
return a != null && String(a).trim() !== "" && String(a) !== "null";
|
|
464
464
|
});
|
|
465
|
-
n[r] = l ?
|
|
465
|
+
n[r] = l ? Ae : Te;
|
|
466
466
|
continue;
|
|
467
467
|
}
|
|
468
468
|
let i = !1, s = !1;
|
|
@@ -473,24 +473,24 @@ function hn(e) {
|
|
|
473
473
|
break;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
s ? i ? n[r] =
|
|
476
|
+
s ? i ? n[r] = xe : n[r] = De : n[r] = Te;
|
|
477
477
|
}
|
|
478
478
|
return {
|
|
479
479
|
byType: n,
|
|
480
|
-
numericCols: Object.entries(n).filter(([, r]) => r ===
|
|
481
|
-
categoricalCols: Object.entries(n).filter(([, r]) => r ===
|
|
482
|
-
commentCols: Object.entries(n).filter(([, r]) => r ===
|
|
480
|
+
numericCols: Object.entries(n).filter(([, r]) => r === xe).map(([r]) => r),
|
|
481
|
+
categoricalCols: Object.entries(n).filter(([, r]) => r === De).map(([r]) => r),
|
|
482
|
+
commentCols: Object.entries(n).filter(([, r]) => r === Ae).map(([r]) => r)
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
|
-
function
|
|
486
|
-
return
|
|
485
|
+
function Ke(e) {
|
|
486
|
+
return ot[e] ?? ot[xe];
|
|
487
487
|
}
|
|
488
|
-
function
|
|
489
|
-
const t =
|
|
490
|
-
return t.length ? e ===
|
|
488
|
+
function _o(e) {
|
|
489
|
+
const t = Ke(e);
|
|
490
|
+
return t.length ? e === xe ? "line" : t[0].value : "markers+line";
|
|
491
491
|
}
|
|
492
|
-
function
|
|
493
|
-
const t = e.flatMap((l) => l.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: i } =
|
|
492
|
+
function we(e = []) {
|
|
493
|
+
const t = e.flatMap((l) => l.points || []), { numericCols: n, categoricalCols: r, commentCols: o, byType: i } = gn(t), s = n[0] || r[0] || "";
|
|
494
494
|
return {
|
|
495
495
|
numericProps: n,
|
|
496
496
|
categoricalProps: r,
|
|
@@ -499,15 +499,15 @@ function ke(e = []) {
|
|
|
499
499
|
defaultProp: s
|
|
500
500
|
};
|
|
501
501
|
}
|
|
502
|
-
async function
|
|
503
|
-
return await
|
|
502
|
+
async function yn(e, t = null) {
|
|
503
|
+
return await mn(e);
|
|
504
504
|
}
|
|
505
|
-
async function
|
|
506
|
-
return await
|
|
505
|
+
async function _n(e, t, n = null) {
|
|
506
|
+
return await fn(e, t);
|
|
507
507
|
}
|
|
508
|
-
function
|
|
508
|
+
function Nn(e = [], t = "") {
|
|
509
509
|
if (!e.length) return null;
|
|
510
|
-
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } =
|
|
510
|
+
const { numericProps: n, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } = we(e), l = e.map((a) => a.id || a.holeId).filter(Boolean), u = It({
|
|
511
511
|
holeIds: l,
|
|
512
512
|
focusedHoleId: t,
|
|
513
513
|
plotCount: 4,
|
|
@@ -526,36 +526,36 @@ function gn(e = [], t = "") {
|
|
|
526
526
|
traceConfigs: u
|
|
527
527
|
};
|
|
528
528
|
}
|
|
529
|
-
async function
|
|
530
|
-
const { holes: r } = await
|
|
529
|
+
async function No(e, t = "", n = null) {
|
|
530
|
+
const { holes: r } = await hn(e, n), o = Nn(r, t);
|
|
531
531
|
if (!o) throw new Error("No valid assay intervals found.");
|
|
532
532
|
return o;
|
|
533
533
|
}
|
|
534
|
-
function
|
|
534
|
+
function zo(e, t = null) {
|
|
535
535
|
return new Promise((n, r) => {
|
|
536
|
-
|
|
536
|
+
Q.parse(e, {
|
|
537
537
|
header: !0,
|
|
538
538
|
dynamicTyping: !0,
|
|
539
539
|
skipEmptyLines: !0,
|
|
540
540
|
complete: (o) => {
|
|
541
|
-
const i = o.data.map((s) =>
|
|
541
|
+
const i = o.data.map((s) => zn(s, t)).filter((s) => s[z] && Number.isFinite(s[W]) && Number.isFinite(s[U]) && Number.isFinite(s[G]));
|
|
542
542
|
n(i);
|
|
543
543
|
},
|
|
544
|
-
error: (o) => r(
|
|
544
|
+
error: (o) => r(j("parseSurveyCSV", o))
|
|
545
545
|
});
|
|
546
546
|
});
|
|
547
547
|
}
|
|
548
|
-
function
|
|
549
|
-
const n =
|
|
548
|
+
function zn(e, t = null) {
|
|
549
|
+
const n = be(e, null, t), r = n[z], o = n[ue] || n.project || n.project_code, i = Me(n[re]), s = Me(n[oe]), l = Me(n[W]), u = Me(n[U]), a = Me(n[G]), c = Me(n.maxdepth);
|
|
550
550
|
return {
|
|
551
551
|
raw: n,
|
|
552
552
|
[z]: r,
|
|
553
|
-
[
|
|
554
|
-
[
|
|
555
|
-
[
|
|
556
|
-
[
|
|
557
|
-
[
|
|
558
|
-
[
|
|
553
|
+
[ue]: o,
|
|
554
|
+
[re]: i,
|
|
555
|
+
[oe]: s,
|
|
556
|
+
[W]: l,
|
|
557
|
+
[U]: u,
|
|
558
|
+
[G]: a,
|
|
559
559
|
maxdepth: c,
|
|
560
560
|
// Legacy field names for backwards compatibility
|
|
561
561
|
project_code: o,
|
|
@@ -564,107 +564,107 @@ function yn(e, t = null) {
|
|
|
564
564
|
surveydepth: l
|
|
565
565
|
};
|
|
566
566
|
}
|
|
567
|
-
const
|
|
567
|
+
const Me = (e) => {
|
|
568
568
|
const t = Number(e);
|
|
569
569
|
return Number.isFinite(t) ? t : void 0;
|
|
570
570
|
};
|
|
571
|
-
function
|
|
571
|
+
function Mo(e, t) {
|
|
572
572
|
var a, c, m, d;
|
|
573
573
|
const n = /* @__PURE__ */ new Map();
|
|
574
574
|
e.forEach((f) => {
|
|
575
|
-
const
|
|
576
|
-
if (!
|
|
577
|
-
const b =
|
|
575
|
+
const h = (f[z] || f.holeId || f.id || "").toString().trim();
|
|
576
|
+
if (!h) return;
|
|
577
|
+
const b = h.toLowerCase();
|
|
578
578
|
n.has(b) || n.set(b, f);
|
|
579
579
|
});
|
|
580
|
-
const r = ((a = e[0]) == null ? void 0 : a.lat) ?? ((c = e[0]) == null ? void 0 : c[
|
|
580
|
+
const r = ((a = e[0]) == null ? void 0 : a.lat) ?? ((c = e[0]) == null ? void 0 : c[re]) ?? 0, o = ((m = e[0]) == null ? void 0 : m.lng) ?? ((d = e[0]) == null ? void 0 : d[oe]) ?? 0, i = 111132, s = 111320 * Math.cos(r * Math.PI / 180), l = /* @__PURE__ */ new Map();
|
|
581
581
|
t.forEach((f) => {
|
|
582
|
-
const
|
|
583
|
-
if (!
|
|
584
|
-
const b =
|
|
582
|
+
const h = (f[z] || "").toString().trim();
|
|
583
|
+
if (!h) return;
|
|
584
|
+
const b = h.toLowerCase();
|
|
585
585
|
l.has(b) || l.set(b, []), l.get(b).push(f);
|
|
586
586
|
});
|
|
587
587
|
const u = [];
|
|
588
|
-
return l.forEach((f,
|
|
589
|
-
const b = n.get(
|
|
588
|
+
return l.forEach((f, h) => {
|
|
589
|
+
const b = n.get(h);
|
|
590
590
|
if (!b) return;
|
|
591
|
-
const
|
|
592
|
-
if (!
|
|
593
|
-
const
|
|
594
|
-
let
|
|
595
|
-
for (let
|
|
596
|
-
const
|
|
597
|
-
if (!
|
|
598
|
-
|
|
599
|
-
x:
|
|
600
|
-
y:
|
|
591
|
+
const _ = f.filter((w) => Number.isFinite(w[W] ?? w.surveydepth)).sort((w, q) => (w[W] ?? w.surveydepth) - (q[W] ?? q.surveydepth));
|
|
592
|
+
if (!_.length) return;
|
|
593
|
+
const p = b.lat ?? b[re], g = b.lng ?? b[oe], E = 111132, M = 111320 * Math.cos(p * Math.PI / 180), v = (g - o) * s, k = (p - r) * i, F = [];
|
|
594
|
+
let T = 0, L = 0, Y = 0;
|
|
595
|
+
for (let w = 0; w < _.length; w += 1) {
|
|
596
|
+
const q = _[w], R = _[w - 1], I = q[W] ?? q.surveydepth, A = q[G] ?? q.azimuth, N = q[U] ?? q.dip;
|
|
597
|
+
if (!R) {
|
|
598
|
+
F.push({
|
|
599
|
+
x: v + T,
|
|
600
|
+
y: k + L,
|
|
601
601
|
z: 0,
|
|
602
|
-
md:
|
|
603
|
-
azimuth:
|
|
604
|
-
dip:
|
|
602
|
+
md: I,
|
|
603
|
+
azimuth: A,
|
|
604
|
+
dip: N
|
|
605
605
|
});
|
|
606
606
|
continue;
|
|
607
607
|
}
|
|
608
|
-
const
|
|
609
|
-
if (
|
|
610
|
-
const
|
|
611
|
-
Math.sin(
|
|
612
|
-
),
|
|
613
|
-
|
|
614
|
-
x:
|
|
615
|
-
y:
|
|
616
|
-
z: -
|
|
608
|
+
const O = R[W] ?? R.surveydepth, x = R[G] ?? R.azimuth, V = R[U] ?? R.dip, H = I - O;
|
|
609
|
+
if (H <= 0) continue;
|
|
610
|
+
const B = st(V), X = st(N), K = Ze(x), ie = Ze(A), ge = Math.acos(
|
|
611
|
+
Math.sin(B) * Math.sin(X) * Math.cos(K - ie) + Math.cos(B) * Math.cos(X)
|
|
612
|
+
), de = ge > 1e-6 ? 2 / ge * Math.tan(ge / 2) : 1, ve = 0.5 * H * (Math.sin(B) * Math.cos(K) + Math.sin(X) * Math.cos(ie)) * de, me = 0.5 * H * (Math.sin(B) * Math.sin(K) + Math.sin(X) * Math.sin(ie)) * de, je = 0.5 * H * (Math.cos(B) + Math.cos(X)) * de;
|
|
613
|
+
T += ve, L += me, Y += je, F.push({
|
|
614
|
+
x: v + T,
|
|
615
|
+
y: k + L,
|
|
616
|
+
z: -Y,
|
|
617
617
|
// render with z up; depth down
|
|
618
|
-
md:
|
|
619
|
-
azimuth:
|
|
620
|
-
dip:
|
|
618
|
+
md: I,
|
|
619
|
+
azimuth: A,
|
|
620
|
+
dip: N
|
|
621
621
|
});
|
|
622
622
|
}
|
|
623
|
-
const
|
|
624
|
-
...
|
|
625
|
-
lat:
|
|
626
|
-
lng: g +
|
|
623
|
+
const Z = F.map((w) => ({
|
|
624
|
+
...w,
|
|
625
|
+
lat: p + w.y / E,
|
|
626
|
+
lng: g + w.x / M
|
|
627
627
|
}));
|
|
628
628
|
u.push({
|
|
629
|
-
id: b[z] || b.holeId ||
|
|
630
|
-
project: b[
|
|
631
|
-
points:
|
|
629
|
+
id: b[z] || b.holeId || h,
|
|
630
|
+
project: b[ue] || b.project_id || b.project || "",
|
|
631
|
+
points: Z,
|
|
632
632
|
collar: b
|
|
633
633
|
});
|
|
634
634
|
}), u;
|
|
635
635
|
}
|
|
636
|
-
const
|
|
636
|
+
const Ze = (e) => e * Math.PI / 180, st = (e) => {
|
|
637
637
|
const t = Number(e), n = 90 + (Number.isFinite(t) ? t : 0), r = Math.min(180, Math.max(0, n));
|
|
638
|
-
return
|
|
638
|
+
return Ze(r);
|
|
639
639
|
};
|
|
640
|
-
function
|
|
640
|
+
function ne(e, t = void 0) {
|
|
641
641
|
const n = Number(e);
|
|
642
642
|
return Number.isFinite(n) ? n : t;
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function lt(e) {
|
|
645
645
|
return e == null ? "" : `${e}`.trim();
|
|
646
646
|
}
|
|
647
|
-
function
|
|
648
|
-
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((i) => e.some((s) =>
|
|
647
|
+
function $e(e = [], t = null) {
|
|
648
|
+
const n = t || "hole_id", o = [n, "hole_id", "holeId", "id"].find((i) => e.some((s) => lt(s == null ? void 0 : s[i])));
|
|
649
649
|
if (!o)
|
|
650
|
-
throw
|
|
650
|
+
throw j("canonicalizeHoleIdRows", new Error(`hole id column '${n}' not found`));
|
|
651
651
|
return {
|
|
652
652
|
aliasCol: o,
|
|
653
653
|
rows: e.map((i) => ({
|
|
654
654
|
...i,
|
|
655
|
-
hole_id:
|
|
655
|
+
hole_id: lt(i == null ? void 0 : i[o])
|
|
656
656
|
}))
|
|
657
657
|
};
|
|
658
658
|
}
|
|
659
|
-
function
|
|
659
|
+
function at(e) {
|
|
660
660
|
return Number(e) * Math.PI / 180;
|
|
661
661
|
}
|
|
662
|
-
function
|
|
663
|
-
const n =
|
|
662
|
+
function Ge(e, t) {
|
|
663
|
+
const n = at(e), r = at(t), o = Math.cos(r) * Math.sin(n), i = Math.cos(r) * Math.cos(n), s = Math.sin(r) * -1;
|
|
664
664
|
return { ca: o, cb: i, cc: s };
|
|
665
665
|
}
|
|
666
|
-
function
|
|
667
|
-
const s =
|
|
666
|
+
function Mn(e, t, n, r, o, i = "minimum_curvature") {
|
|
667
|
+
const s = Ge(t, n), l = Ge(r, o);
|
|
668
668
|
if (i === "tangential")
|
|
669
669
|
return {
|
|
670
670
|
dx: e * s.ca,
|
|
@@ -674,7 +674,7 @@ function _n(e, t, n, r, o, i = "minimum_curvature") {
|
|
|
674
674
|
dip: n
|
|
675
675
|
};
|
|
676
676
|
if (i === "balanced_tangential") {
|
|
677
|
-
const m = 0.5 * (t + r), d = 0.5 * (n + o), f =
|
|
677
|
+
const m = 0.5 * (t + r), d = 0.5 * (n + o), f = Ge(m, d);
|
|
678
678
|
return {
|
|
679
679
|
dx: e * f.ca,
|
|
680
680
|
dy: e * f.cb,
|
|
@@ -692,12 +692,12 @@ function _n(e, t, n, r, o, i = "minimum_curvature") {
|
|
|
692
692
|
dip: o
|
|
693
693
|
};
|
|
694
694
|
}
|
|
695
|
-
function
|
|
695
|
+
function Je(e = [], t = [], n = {}) {
|
|
696
696
|
const {
|
|
697
697
|
step: r = 1,
|
|
698
698
|
holeIdCol: o = null,
|
|
699
699
|
method: i = "minimum_curvature"
|
|
700
|
-
} = n, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, l =
|
|
700
|
+
} = n, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, l = $e(e, o), u = $e(t, o || l.aliasCol);
|
|
701
701
|
if (!l.rows.length || !u.rows.length) return [];
|
|
702
702
|
const a = /* @__PURE__ */ new Map();
|
|
703
703
|
l.rows.forEach((d) => {
|
|
@@ -709,83 +709,83 @@ function We(e = [], t = [], n = {}) {
|
|
|
709
709
|
});
|
|
710
710
|
const m = [];
|
|
711
711
|
return c.forEach((d, f) => {
|
|
712
|
-
const
|
|
713
|
-
if (!
|
|
714
|
-
const b = [...d].map((
|
|
715
|
-
...
|
|
716
|
-
from:
|
|
717
|
-
azimuth:
|
|
718
|
-
dip:
|
|
719
|
-
})).filter((
|
|
712
|
+
const h = a.get(f);
|
|
713
|
+
if (!h) return;
|
|
714
|
+
const b = [...d].map((F) => ({
|
|
715
|
+
...F,
|
|
716
|
+
from: ne(F.from),
|
|
717
|
+
azimuth: ne(F.azimuth),
|
|
718
|
+
dip: ne(F.dip)
|
|
719
|
+
})).filter((F) => Number.isFinite(F.from) && Number.isFinite(F.azimuth) && Number.isFinite(F.dip)).sort((F, T) => F.from - T.from);
|
|
720
720
|
if (!b.length) return;
|
|
721
|
-
let
|
|
722
|
-
const M = b[0].azimuth,
|
|
721
|
+
let _ = ne(h.x, 0), p = ne(h.y, 0), g = ne(h.z, 0), E = b[0].from;
|
|
722
|
+
const M = b[0].azimuth, v = b[0].dip, k = {
|
|
723
723
|
hole_id: f,
|
|
724
|
-
md:
|
|
725
|
-
x:
|
|
726
|
-
y:
|
|
724
|
+
md: E,
|
|
725
|
+
x: _,
|
|
726
|
+
y: p,
|
|
727
727
|
z: g,
|
|
728
728
|
azimuth: M,
|
|
729
|
-
dip:
|
|
729
|
+
dip: v
|
|
730
730
|
};
|
|
731
|
-
l.aliasCol !== "hole_id" &&
|
|
732
|
-
for (let
|
|
733
|
-
const
|
|
734
|
-
if (
|
|
735
|
-
const
|
|
736
|
-
for (let
|
|
737
|
-
|
|
738
|
-
const
|
|
739
|
-
|
|
740
|
-
const
|
|
731
|
+
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (k[l.aliasCol] = h[l.aliasCol]), m.push(k);
|
|
732
|
+
for (let F = 0; F < b.length - 1; F += 1) {
|
|
733
|
+
const T = b[F], L = b[F + 1], Y = T.from, w = L.from - Y;
|
|
734
|
+
if (w <= 0) continue;
|
|
735
|
+
const q = Math.max(1, Math.ceil(w / s)), R = w / q;
|
|
736
|
+
for (let I = 0; I < q; I += 1) {
|
|
737
|
+
E += R;
|
|
738
|
+
const A = (E - Y) / w, N = T.azimuth + A * (L.azimuth - T.azimuth), O = T.dip + A * (L.dip - T.dip), x = Mn(R, T.azimuth, T.dip, L.azimuth, L.dip, i);
|
|
739
|
+
_ += x.dx, p += x.dy, g += x.dz;
|
|
740
|
+
const V = {
|
|
741
741
|
hole_id: f,
|
|
742
|
-
md:
|
|
743
|
-
x:
|
|
744
|
-
y:
|
|
742
|
+
md: E,
|
|
743
|
+
x: _,
|
|
744
|
+
y: p,
|
|
745
745
|
z: g,
|
|
746
|
-
azimuth: i === "minimum_curvature" ?
|
|
747
|
-
dip: i === "minimum_curvature" ?
|
|
746
|
+
azimuth: i === "minimum_curvature" ? N : x.azimuth,
|
|
747
|
+
dip: i === "minimum_curvature" ? O : x.dip
|
|
748
748
|
};
|
|
749
|
-
l.aliasCol !== "hole_id" &&
|
|
749
|
+
l.aliasCol !== "hole_id" && h[l.aliasCol] !== void 0 && (V[l.aliasCol] = h[l.aliasCol]), m.push(V);
|
|
750
750
|
}
|
|
751
751
|
}
|
|
752
752
|
}), m;
|
|
753
753
|
}
|
|
754
|
-
function
|
|
755
|
-
return
|
|
754
|
+
function En(e, t, n = {}) {
|
|
755
|
+
return Je(e, t, { ...n, method: "minimum_curvature" });
|
|
756
756
|
}
|
|
757
|
-
function
|
|
758
|
-
return
|
|
757
|
+
function Eo(e, t, n = {}) {
|
|
758
|
+
return Je(e, t, { ...n, method: "tangential" });
|
|
759
759
|
}
|
|
760
|
-
function
|
|
761
|
-
return
|
|
760
|
+
function ko(e, t, n = {}) {
|
|
761
|
+
return Je(e, t, { ...n, method: "balanced_tangential" });
|
|
762
762
|
}
|
|
763
|
-
function
|
|
764
|
-
return
|
|
763
|
+
function Ao(e, t, n = {}) {
|
|
764
|
+
return En(e, t, n);
|
|
765
765
|
}
|
|
766
|
-
function
|
|
766
|
+
function kn(e, t) {
|
|
767
767
|
if (!e.length || !Number.isFinite(t)) return null;
|
|
768
768
|
let n = null, r = 1 / 0;
|
|
769
769
|
for (let o = 0; o < e.length; o += 1) {
|
|
770
|
-
const i = e[o], s =
|
|
770
|
+
const i = e[o], s = ne(i.md);
|
|
771
771
|
if (!Number.isFinite(s)) continue;
|
|
772
772
|
const l = Math.abs(s - t);
|
|
773
773
|
l < r && (r = l, n = i);
|
|
774
774
|
}
|
|
775
775
|
return n;
|
|
776
776
|
}
|
|
777
|
-
function
|
|
778
|
-
const r = n.holeIdCol || "hole_id", o =
|
|
777
|
+
function xo(e = [], t = [], n = {}) {
|
|
778
|
+
const r = n.holeIdCol || "hole_id", o = $e(e, r), i = $e(t, r);
|
|
779
779
|
if (!o.rows.length || !i.rows.length) return [...o.rows];
|
|
780
780
|
const s = /* @__PURE__ */ new Map();
|
|
781
781
|
return i.rows.forEach((l) => {
|
|
782
782
|
l.hole_id && (s.has(l.hole_id) || s.set(l.hole_id, []), s.get(l.hole_id).push(l));
|
|
783
783
|
}), s.forEach((l, u) => {
|
|
784
|
-
s.set(u, [...l].sort((a, c) =>
|
|
784
|
+
s.set(u, [...l].sort((a, c) => ne(a.md, 0) - ne(c.md, 0)));
|
|
785
785
|
}), o.rows.map((l) => {
|
|
786
|
-
const u =
|
|
786
|
+
const u = ne(l.from), a = ne(l.to), c = Number.isFinite(u) && Number.isFinite(a) ? 0.5 * (u + a) : void 0;
|
|
787
787
|
if (!l.hole_id || !Number.isFinite(c)) return { ...l };
|
|
788
|
-
const m =
|
|
788
|
+
const m = kn(s.get(l.hole_id) || [], c);
|
|
789
789
|
if (!m) return { ...l };
|
|
790
790
|
const d = { ...l };
|
|
791
791
|
return ["md", "x", "y", "z", "azimuth", "dip"].forEach((f) => {
|
|
@@ -793,23 +793,23 @@ function zo(e = [], t = [], n = {}) {
|
|
|
793
793
|
}), d;
|
|
794
794
|
});
|
|
795
795
|
}
|
|
796
|
-
function
|
|
796
|
+
function Io(e, t = null) {
|
|
797
797
|
return new Promise((n, r) => {
|
|
798
|
-
|
|
798
|
+
Q.parse(e, {
|
|
799
799
|
header: !0,
|
|
800
800
|
dynamicTyping: !0,
|
|
801
801
|
skipEmptyLines: !0,
|
|
802
802
|
complete: (o) => {
|
|
803
803
|
const i = /* @__PURE__ */ new Map();
|
|
804
804
|
o.data.forEach((l, u) => {
|
|
805
|
-
const a =
|
|
806
|
-
!m || d === null || d === void 0 || f === null || f === void 0 ||
|
|
805
|
+
const a = be(l, null, t), c = a[z], m = c !== void 0 ? `${c}`.trim() : "", d = a[he] ?? a.x, f = a[pe] ?? a.y, h = a[ke] ?? a.z, b = a.order ?? u;
|
|
806
|
+
!m || d === null || d === void 0 || f === null || f === void 0 || h === null || h === void 0 || (i.has(m) || i.set(m, []), i.get(m).push({
|
|
807
807
|
...a,
|
|
808
808
|
holeId: m,
|
|
809
809
|
order: b,
|
|
810
810
|
x: Number(d) ?? 0,
|
|
811
811
|
y: Number(f) ?? 0,
|
|
812
|
-
z: Number(
|
|
812
|
+
z: Number(h) ?? 0
|
|
813
813
|
}));
|
|
814
814
|
});
|
|
815
815
|
const s = Array.from(i.entries()).map(([l, u]) => ({
|
|
@@ -823,18 +823,18 @@ function Mo(e, t = null) {
|
|
|
823
823
|
}));
|
|
824
824
|
n({ holes: s });
|
|
825
825
|
},
|
|
826
|
-
error: (o) => r(
|
|
826
|
+
error: (o) => r(j("parseDrillholesCSV", o))
|
|
827
827
|
});
|
|
828
828
|
});
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function Ee(e) {
|
|
831
831
|
return e ? Array.isArray(e) ? [...e] : [] : [];
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function J(e) {
|
|
834
834
|
const t = Number(e);
|
|
835
835
|
return Number.isFinite(t) ? t : void 0;
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function Fe(e = [], t = []) {
|
|
838
838
|
const n = [...e];
|
|
839
839
|
return n.sort((r, o) => {
|
|
840
840
|
for (let i = 0; i < t.length; i += 1) {
|
|
@@ -845,37 +845,37 @@ function Se(e = [], t = []) {
|
|
|
845
845
|
return 0;
|
|
846
846
|
}), n;
|
|
847
847
|
}
|
|
848
|
-
function
|
|
848
|
+
function An(e = [], t = "Intervals") {
|
|
849
849
|
if (!e.length) return;
|
|
850
|
-
const n =
|
|
850
|
+
const n = Fe(e, [z, C, D]), r = /* @__PURE__ */ new Map();
|
|
851
851
|
n.forEach((o) => {
|
|
852
|
-
const i = `${(o == null ? void 0 : o[z]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[
|
|
852
|
+
const i = `${(o == null ? void 0 : o[z]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[C]), l = Number(o == null ? void 0 : o[D]);
|
|
853
853
|
if (!i || !Number.isFinite(s) || !Number.isFinite(l)) return;
|
|
854
854
|
const u = r.get(i);
|
|
855
855
|
if (Number.isFinite(u) && s < u)
|
|
856
|
-
throw
|
|
856
|
+
throw j(
|
|
857
857
|
"validateNoOverlappingIntervals",
|
|
858
858
|
new Error(`${t} intervals overlap for hole '${i}': from=${s} is less than previous to=${u}`)
|
|
859
859
|
);
|
|
860
860
|
r.set(i, l);
|
|
861
861
|
});
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function xn(e, t = {}) {
|
|
864
864
|
return new Promise((n, r) => {
|
|
865
|
-
|
|
865
|
+
Q.parse(e, {
|
|
866
866
|
header: !0,
|
|
867
867
|
dynamicTyping: !0,
|
|
868
868
|
skipEmptyLines: !0,
|
|
869
869
|
...t,
|
|
870
870
|
complete: (o) => n(Array.isArray(o == null ? void 0 : o.data) ? o.data : []),
|
|
871
|
-
error: (o) => r(
|
|
871
|
+
error: (o) => r(j("loadTable(csv)", o))
|
|
872
872
|
});
|
|
873
873
|
});
|
|
874
874
|
}
|
|
875
|
-
function
|
|
876
|
-
return e.map((r) =>
|
|
875
|
+
function In(e = [], t = null, n = null) {
|
|
876
|
+
return e.map((r) => be(r, t, n));
|
|
877
877
|
}
|
|
878
|
-
async function
|
|
878
|
+
async function He(e, t = {}) {
|
|
879
879
|
const {
|
|
880
880
|
kind: n = "csv",
|
|
881
881
|
columnMap: r = null,
|
|
@@ -884,114 +884,114 @@ async function $e(e, t = {}) {
|
|
|
884
884
|
} = t;
|
|
885
885
|
let s;
|
|
886
886
|
if (Array.isArray(e))
|
|
887
|
-
s =
|
|
887
|
+
s = Ee(e);
|
|
888
888
|
else if (n === "csv")
|
|
889
|
-
s = await
|
|
890
|
-
else throw n === "parquet" || n === "sql" ?
|
|
891
|
-
return
|
|
889
|
+
s = await xn(e, i);
|
|
890
|
+
else throw n === "parquet" || n === "sql" ? j("loadTable", new Error(`Unsupported kind in JS runtime: ${n}`)) : j("loadTable", new Error(`Unsupported kind: ${n}`));
|
|
891
|
+
return In(s, r, o);
|
|
892
892
|
}
|
|
893
|
-
async function
|
|
893
|
+
async function Co(e, t = {}) {
|
|
894
894
|
const {
|
|
895
895
|
crs: n = null,
|
|
896
896
|
sourceColumnMap: r = null,
|
|
897
897
|
keepAll: o = !0,
|
|
898
898
|
...i
|
|
899
|
-
} = t, s = await
|
|
899
|
+
} = t, s = await He(e, { ...i, sourceColumnMap: r });
|
|
900
900
|
if (!s.some((d) => z in d))
|
|
901
|
-
throw
|
|
902
|
-
const u = s.some((d) =>
|
|
901
|
+
throw j("loadCollars", new Error(`Collar table missing column: ${z}`));
|
|
902
|
+
const u = s.some((d) => he in d && pe in d), a = s.some((d) => re in d && oe in d);
|
|
903
903
|
if (!u && !a)
|
|
904
|
-
throw
|
|
904
|
+
throw j("loadCollars", new Error("Collar table missing coordinate columns (need easting/northing or latitude/longitude)"));
|
|
905
905
|
const c = s.map((d) => {
|
|
906
906
|
const f = { ...d };
|
|
907
907
|
if (z in f) {
|
|
908
|
-
const
|
|
909
|
-
f[z] =
|
|
908
|
+
const h = f[z];
|
|
909
|
+
f[z] = h == null ? "" : `${h}`.trim();
|
|
910
910
|
}
|
|
911
|
-
return
|
|
911
|
+
return re in f && (f[re] = J(f[re])), oe in f && (f[oe] = J(f[oe])), ke in f && (f[ke] = J(f[ke])), he in f && (f[he] = J(f[he])), pe in f && (f[pe] = J(f[pe])), !("datasource_hole_id" in f) && z in f && (f.datasource_hole_id = f[z]), f;
|
|
912
912
|
});
|
|
913
|
-
if (!c.every((d) => !(!d[z] || a && (!Number.isFinite(d[
|
|
914
|
-
throw
|
|
913
|
+
if (!c.every((d) => !(!d[z] || a && (!Number.isFinite(d[re]) || !Number.isFinite(d[oe])) || u && !a && (!Number.isFinite(d[he]) || !Number.isFinite(d[pe])))))
|
|
914
|
+
throw j("loadCollars", new Error("Collar table has missing required values"));
|
|
915
915
|
return c;
|
|
916
916
|
}
|
|
917
|
-
async function
|
|
917
|
+
async function vo(e, t = {}) {
|
|
918
918
|
const {
|
|
919
919
|
sourceColumnMap: n = null,
|
|
920
920
|
keepAll: r = !0,
|
|
921
921
|
...o
|
|
922
|
-
} = t, i = await
|
|
922
|
+
} = t, i = await He(e, { ...o, sourceColumnMap: n }), s = [z, W, G, U];
|
|
923
923
|
for (const a of s)
|
|
924
924
|
if (!i.some((m) => a in m))
|
|
925
|
-
throw
|
|
925
|
+
throw j("loadSurveys", new Error(`Survey table missing column: ${a}`));
|
|
926
926
|
const l = i.map((a) => {
|
|
927
927
|
const c = { ...a };
|
|
928
928
|
if (z in c) {
|
|
929
929
|
const m = c[z];
|
|
930
930
|
c[z] = m == null ? "" : `${m}`.trim();
|
|
931
931
|
}
|
|
932
|
-
return
|
|
932
|
+
return W in c && (c[W] = J(c[W])), D in c && (c[D] = J(c[D])), G in c && (c[G] = J(c[G])), U in c && (c[U] = J(c[U])), c;
|
|
933
933
|
});
|
|
934
|
-
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[
|
|
935
|
-
throw
|
|
936
|
-
return
|
|
934
|
+
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[W]) || !Number.isFinite(a[G]) || !Number.isFinite(a[U]))))
|
|
935
|
+
throw j("loadSurveys", new Error("Survey table has missing required values"));
|
|
936
|
+
return Fe(l, [z, W]);
|
|
937
937
|
}
|
|
938
|
-
async function
|
|
938
|
+
async function So(e, t = {}) {
|
|
939
939
|
const {
|
|
940
940
|
sourceColumnMap: n = null,
|
|
941
941
|
keepAll: r = !0,
|
|
942
942
|
...o
|
|
943
|
-
} = t, i = await
|
|
943
|
+
} = t, i = await He(e, { ...o, sourceColumnMap: n }), s = [z, C, D];
|
|
944
944
|
for (const a of s)
|
|
945
945
|
if (!i.some((m) => a in m))
|
|
946
|
-
throw
|
|
946
|
+
throw j("loadAssays", new Error(`Assay table missing column: ${a}`));
|
|
947
947
|
const l = i.map((a) => {
|
|
948
948
|
const c = { ...a };
|
|
949
949
|
if (z in c) {
|
|
950
950
|
const m = c[z];
|
|
951
951
|
c[z] = m == null ? "" : `${m}`.trim();
|
|
952
952
|
}
|
|
953
|
-
return
|
|
953
|
+
return C in c && (c[C] = J(c[C])), D in c && (c[D] = J(c[D])), C in c && D in c && Number.isFinite(c[C]) && Number.isFinite(c[D]) && (c[Ie] = 0.5 * (c[C] + c[D])), c;
|
|
954
954
|
});
|
|
955
|
-
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[
|
|
956
|
-
throw
|
|
957
|
-
return
|
|
955
|
+
if (!l.every((a) => !(!a[z] || !Number.isFinite(a[C]) || !Number.isFinite(a[D]) || !(a[D] > a[C]))))
|
|
956
|
+
throw j("loadAssays", new Error("Assay table has missing required values"));
|
|
957
|
+
return Fe(l, [z, C, D]);
|
|
958
958
|
}
|
|
959
|
-
async function
|
|
959
|
+
async function Do(e, t = {}) {
|
|
960
960
|
const {
|
|
961
961
|
sourceColumnMap: n = null,
|
|
962
962
|
keepAll: r = !0,
|
|
963
963
|
...o
|
|
964
|
-
} = t, i = await
|
|
964
|
+
} = t, i = await He(e, { ...o, sourceColumnMap: n }), s = [z, C, D];
|
|
965
965
|
for (const c of s)
|
|
966
966
|
if (!i.some((d) => c in d))
|
|
967
|
-
throw
|
|
967
|
+
throw j("loadGeology", new Error(`Geology table missing column: ${c}`));
|
|
968
968
|
const l = i.map((c) => {
|
|
969
969
|
const m = { ...c };
|
|
970
970
|
if (z in m) {
|
|
971
|
-
const
|
|
972
|
-
m[z] =
|
|
971
|
+
const h = m[z];
|
|
972
|
+
m[z] = h == null ? "" : `${h}`.trim();
|
|
973
973
|
}
|
|
974
|
-
|
|
975
|
-
const d = m[
|
|
976
|
-
return !d && f && (m[
|
|
974
|
+
C in m && (m[C] = J(m[C])), D in m && (m[D] = J(m[D])), C in m && D in m && Number.isFinite(m[C]) && Number.isFinite(m[D]) && (m[D] === m[C] && (m[C] = Math.round(m[C] * 1e3) / 1e3, m[D] = m[C] + 1e-3), m[Ie] = 0.5 * (m[C] + m[D]));
|
|
975
|
+
const d = m[se] !== void 0 && m[se] !== null && `${m[se]}`.trim() !== "", f = m[le] !== void 0 && m[le] !== null && `${m[le]}`.trim() !== "";
|
|
976
|
+
return !d && f && (m[se] = m[le]), d && !f && (m[le] = m[se]), m;
|
|
977
977
|
});
|
|
978
|
-
if (!l.every((c) => !(!c[z] || !Number.isFinite(c[
|
|
979
|
-
throw
|
|
978
|
+
if (!l.every((c) => !(!c[z] || !Number.isFinite(c[C]) || !Number.isFinite(c[D]) || !(c[D] > c[C]))))
|
|
979
|
+
throw j("loadGeology", new Error("Geology table has missing or invalid interval values"));
|
|
980
980
|
if (!l.some((c) => {
|
|
981
|
-
const m = c[
|
|
981
|
+
const m = c[se], d = c[le];
|
|
982
982
|
return m != null && `${m}`.trim() !== "" || d != null && `${d}`.trim() !== "";
|
|
983
983
|
}))
|
|
984
|
-
throw
|
|
985
|
-
if (
|
|
986
|
-
const c = new Set(Object.keys(
|
|
987
|
-
return
|
|
984
|
+
throw j("loadGeology", new Error(`Geology table missing categorical columns: ${se} or ${le}`));
|
|
985
|
+
if (An(l, "Geology"), !r) {
|
|
986
|
+
const c = new Set(Object.keys(sn));
|
|
987
|
+
return Fe(
|
|
988
988
|
l.map((m) => Object.fromEntries(Object.entries(m).filter(([d]) => c.has(d)))),
|
|
989
|
-
[z,
|
|
989
|
+
[z, C, D]
|
|
990
990
|
);
|
|
991
991
|
}
|
|
992
|
-
return
|
|
992
|
+
return Fe(l, [z, C, D]);
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Fo(e = [], t = [], n = {}) {
|
|
995
995
|
const r = Array.isArray(n.onCols) && n.onCols.length ? n.onCols : [z];
|
|
996
996
|
if (!t.length) return [...e];
|
|
997
997
|
const o = (s) => r.map((l) => `${(s == null ? void 0 : s[l]) ?? ""}`).join("|"), i = /* @__PURE__ */ new Map();
|
|
@@ -1006,20 +1006,20 @@ function xo(e = [], t = [], n = {}) {
|
|
|
1006
1006
|
}), u;
|
|
1007
1007
|
});
|
|
1008
1008
|
}
|
|
1009
|
-
function
|
|
1010
|
-
return t == null ? [...e] : e.length ? e.some((r) =>
|
|
1009
|
+
function Lo(e = [], t = null) {
|
|
1010
|
+
return t == null ? [...e] : e.length ? e.some((r) => ue in r) ? e.filter((r) => (r == null ? void 0 : r[ue]) === t) : [...e] : [];
|
|
1011
1011
|
}
|
|
1012
|
-
function
|
|
1012
|
+
function Oo(e = [], t = []) {
|
|
1013
1013
|
return e.map((n) => {
|
|
1014
1014
|
const r = { ...n };
|
|
1015
1015
|
return t.forEach((o) => {
|
|
1016
1016
|
if (!(o in r)) return;
|
|
1017
|
-
const i =
|
|
1017
|
+
const i = J(r[o]);
|
|
1018
1018
|
r[o] = i;
|
|
1019
1019
|
}), r;
|
|
1020
1020
|
});
|
|
1021
1021
|
}
|
|
1022
|
-
function
|
|
1022
|
+
function Po({
|
|
1023
1023
|
collars: e = [],
|
|
1024
1024
|
surveys: t = [],
|
|
1025
1025
|
assays: n = [],
|
|
@@ -1028,11 +1028,11 @@ function Fo({
|
|
|
1028
1028
|
metadata: i = {}
|
|
1029
1029
|
} = {}) {
|
|
1030
1030
|
return {
|
|
1031
|
-
collars:
|
|
1032
|
-
surveys:
|
|
1033
|
-
assays:
|
|
1034
|
-
geology:
|
|
1035
|
-
structures:
|
|
1031
|
+
collars: Ee(e),
|
|
1032
|
+
surveys: Ee(t),
|
|
1033
|
+
assays: Ee(n),
|
|
1034
|
+
geology: Ee(r),
|
|
1035
|
+
structures: Ee(o),
|
|
1036
1036
|
metadata: i || {}
|
|
1037
1037
|
};
|
|
1038
1038
|
}
|
|
@@ -1043,27 +1043,27 @@ const Ct = ["x", "y", "z", "dx", "dy", "dz"], Cn = {
|
|
|
1043
1043
|
dx: ["dx", "size_x", "sx", "sizex", "dim_x", "block_size_x"],
|
|
1044
1044
|
dy: ["dy", "size_y", "sy", "sizey", "dim_y", "block_size_y"],
|
|
1045
1045
|
dz: ["dz", "size_z", "sz", "sizez", "dim_z", "block_size_z"]
|
|
1046
|
-
},
|
|
1046
|
+
}, vt = {};
|
|
1047
1047
|
Object.entries(Cn).forEach(([e, t]) => {
|
|
1048
1048
|
t.forEach((n) => {
|
|
1049
|
-
|
|
1049
|
+
vt[n.toLowerCase()] = e;
|
|
1050
1050
|
});
|
|
1051
1051
|
});
|
|
1052
|
-
function
|
|
1052
|
+
function vn(e) {
|
|
1053
1053
|
const t = {};
|
|
1054
1054
|
return Object.entries(e).forEach(([n, r]) => {
|
|
1055
|
-
const o =
|
|
1055
|
+
const o = vt[n.toLowerCase().trim()] || n;
|
|
1056
1056
|
t[o] = r;
|
|
1057
1057
|
}), t;
|
|
1058
1058
|
}
|
|
1059
|
-
function
|
|
1059
|
+
function To(e) {
|
|
1060
1060
|
return new Promise((t, n) => {
|
|
1061
|
-
|
|
1061
|
+
Q.parse(e, {
|
|
1062
1062
|
header: !0,
|
|
1063
1063
|
dynamicTyping: !0,
|
|
1064
1064
|
skipEmptyLines: !0,
|
|
1065
1065
|
complete: (r) => {
|
|
1066
|
-
const i = (r.data || []).map(
|
|
1066
|
+
const i = (r.data || []).map(vn).filter(
|
|
1067
1067
|
(l) => l.x !== null && l.y !== null && l.z !== null
|
|
1068
1068
|
), s = Object.keys(i[0] || {}).filter(
|
|
1069
1069
|
(l) => !Ct.includes(l)
|
|
@@ -1071,22 +1071,22 @@ function Do(e) {
|
|
|
1071
1071
|
t({ data: i, properties: s });
|
|
1072
1072
|
},
|
|
1073
1073
|
error: (r) => {
|
|
1074
|
-
n(
|
|
1074
|
+
n(j("parseBlockModelCSV", r));
|
|
1075
1075
|
}
|
|
1076
1076
|
});
|
|
1077
1077
|
});
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1079
|
+
function wo(e) {
|
|
1080
1080
|
if (typeof e == "string")
|
|
1081
1081
|
try {
|
|
1082
1082
|
return JSON.parse(e);
|
|
1083
1083
|
} catch (t) {
|
|
1084
|
-
throw
|
|
1084
|
+
throw j("loadBlockModelMetadata", t);
|
|
1085
1085
|
}
|
|
1086
1086
|
if (e && typeof e == "object") return e;
|
|
1087
|
-
throw
|
|
1087
|
+
throw j("loadBlockModelMetadata", new Error("Invalid metadata source"));
|
|
1088
1088
|
}
|
|
1089
|
-
function
|
|
1089
|
+
function Sn(e, t) {
|
|
1090
1090
|
const n = e.map((i) => i[t]).filter((i) => i != null);
|
|
1091
1091
|
if (n.length > 0 && n.every((i) => typeof i == "number")) {
|
|
1092
1092
|
const i = Math.min(...n), s = Math.max(...n);
|
|
@@ -1094,16 +1094,16 @@ function xn(e, t) {
|
|
|
1094
1094
|
}
|
|
1095
1095
|
return { type: "categorical", categories: [...new Set(n)], values: n };
|
|
1096
1096
|
}
|
|
1097
|
-
function
|
|
1097
|
+
function Bo(e) {
|
|
1098
1098
|
if (!e || e.length === 0) return {};
|
|
1099
1099
|
const t = Object.keys(e[0]).filter(
|
|
1100
1100
|
(r) => !Ct.includes(r)
|
|
1101
1101
|
), n = {};
|
|
1102
1102
|
return t.forEach((r) => {
|
|
1103
|
-
n[r] =
|
|
1103
|
+
n[r] = Sn(e, r);
|
|
1104
1104
|
}), n;
|
|
1105
1105
|
}
|
|
1106
|
-
function
|
|
1106
|
+
function Dn(e, t) {
|
|
1107
1107
|
return !t || typeof t != "object" ? e : e.filter(
|
|
1108
1108
|
(n) => Object.entries(t).every(([r, o]) => {
|
|
1109
1109
|
const i = n[r];
|
|
@@ -1111,13 +1111,13 @@ function vn(e, t) {
|
|
|
1111
1111
|
})
|
|
1112
1112
|
);
|
|
1113
1113
|
}
|
|
1114
|
-
function
|
|
1115
|
-
return (t ?
|
|
1114
|
+
function $o(e, t = null) {
|
|
1115
|
+
return (t ? Dn(e, t) : e).reduce((r, o) => {
|
|
1116
1116
|
const i = Number(o.dx) || 0, s = Number(o.dy) || 0, l = Number(o.dz) || 0;
|
|
1117
1117
|
return r + i * s * l;
|
|
1118
1118
|
}, 0);
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function Fn(e, t, n) {
|
|
1121
1121
|
if (!t) return new n.Color("#888888");
|
|
1122
1122
|
if (t.type === "numeric") {
|
|
1123
1123
|
const i = t.max - t.min, l = (1 - (i === 0 ? 0.5 : (e - t.min) / i)) * 240;
|
|
@@ -1126,56 +1126,56 @@ function Sn(e, t, n) {
|
|
|
1126
1126
|
const o = t.categories.indexOf(e) / Math.max(t.categories.length, 1) * 360;
|
|
1127
1127
|
return new n.Color().setHSL(o / 360, 0.7, 0.5);
|
|
1128
1128
|
}
|
|
1129
|
-
const
|
|
1130
|
-
function
|
|
1129
|
+
const Qe = (e, t = null) => be(e, null, t);
|
|
1130
|
+
function Ln(e) {
|
|
1131
1131
|
if (!e.length) return null;
|
|
1132
|
-
const t = e[0], n =
|
|
1132
|
+
const t = e[0], n = C in t && D in t, r = W in t && !n;
|
|
1133
1133
|
return n ? "interval" : r ? "point" : null;
|
|
1134
1134
|
}
|
|
1135
|
-
function
|
|
1135
|
+
function ce(e) {
|
|
1136
1136
|
const t = Number(e);
|
|
1137
1137
|
return Number.isFinite(t) ? t : null;
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function St(e) {
|
|
1140
1140
|
const t = e[z] !== void 0 ? `${e[z]}`.trim() : "";
|
|
1141
1141
|
if (!t) return null;
|
|
1142
|
-
const n =
|
|
1142
|
+
const n = ce(e[W]);
|
|
1143
1143
|
return n === null ? null : {
|
|
1144
1144
|
[z]: t,
|
|
1145
|
-
[
|
|
1146
|
-
[
|
|
1147
|
-
[
|
|
1145
|
+
[W]: n,
|
|
1146
|
+
[U]: ce(e[U]),
|
|
1147
|
+
[G]: ce(e[G]),
|
|
1148
1148
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1149
1149
|
...e
|
|
1150
1150
|
};
|
|
1151
1151
|
}
|
|
1152
|
-
function
|
|
1152
|
+
function Dt(e) {
|
|
1153
1153
|
const t = e[z] !== void 0 ? `${e[z]}`.trim() : "";
|
|
1154
1154
|
if (!t) return null;
|
|
1155
|
-
const n =
|
|
1155
|
+
const n = ce(e[C]), r = ce(e[D]);
|
|
1156
1156
|
if (n === null || r === null || r <= n) return null;
|
|
1157
1157
|
const o = 0.5 * (n + r);
|
|
1158
1158
|
return {
|
|
1159
1159
|
[z]: t,
|
|
1160
|
-
[
|
|
1161
|
-
[
|
|
1160
|
+
[C]: n,
|
|
1161
|
+
[D]: r,
|
|
1162
1162
|
mid: o,
|
|
1163
|
-
[
|
|
1164
|
-
[
|
|
1163
|
+
[U]: ce(e[U]),
|
|
1164
|
+
[G]: ce(e[G]),
|
|
1165
1165
|
classification: e.classification != null ? `${e.classification}` : null,
|
|
1166
1166
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
1167
1167
|
...e
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function Vo(e) {
|
|
1171
1171
|
const t = [], n = [];
|
|
1172
1172
|
for (const r of e) {
|
|
1173
|
-
const o = [], i =
|
|
1173
|
+
const o = [], i = ce(r[U]), s = ce(r[G]);
|
|
1174
1174
|
i !== null && (i < 0 || i > 90) && o.push(`dip ${i} out of range [0, 90]`), s !== null && (s < 0 || s >= 360) && o.push(`azimuth ${s} out of range [0, 360)`), o.length ? n.push({ row: r, message: o.join("; ") }) : t.push(r);
|
|
1175
1175
|
}
|
|
1176
1176
|
return { valid: t, errors: n };
|
|
1177
1177
|
}
|
|
1178
|
-
function
|
|
1178
|
+
function Ho(e, t = null) {
|
|
1179
1179
|
return new Promise((n, r) => {
|
|
1180
1180
|
const o = {
|
|
1181
1181
|
header: !0,
|
|
@@ -1184,36 +1184,36 @@ function To(e, t = null) {
|
|
|
1184
1184
|
complete: (i) => {
|
|
1185
1185
|
const s = [];
|
|
1186
1186
|
for (const l of i.data) {
|
|
1187
|
-
const u =
|
|
1187
|
+
const u = Qe(l, t), a = St(u);
|
|
1188
1188
|
a && s.push(a);
|
|
1189
1189
|
}
|
|
1190
1190
|
n(s);
|
|
1191
1191
|
},
|
|
1192
|
-
error: (i) => r(
|
|
1192
|
+
error: (i) => r(j("parseStructuralPointsCSV", i))
|
|
1193
1193
|
};
|
|
1194
1194
|
typeof e == "string" && !e.startsWith("data:") && e.includes(`
|
|
1195
|
-
`) ?
|
|
1195
|
+
`) ? Q.parse(e, o) : Q.parse(e, o);
|
|
1196
1196
|
});
|
|
1197
1197
|
}
|
|
1198
|
-
function
|
|
1198
|
+
function jo(e, t = null) {
|
|
1199
1199
|
return new Promise((n, r) => {
|
|
1200
|
-
|
|
1200
|
+
Q.parse(e, {
|
|
1201
1201
|
header: !0,
|
|
1202
1202
|
dynamicTyping: !0,
|
|
1203
1203
|
skipEmptyLines: !0,
|
|
1204
1204
|
complete: (o) => {
|
|
1205
1205
|
const i = [];
|
|
1206
1206
|
for (const s of o.data) {
|
|
1207
|
-
const l =
|
|
1207
|
+
const l = Qe(s, t), u = Dt(l);
|
|
1208
1208
|
u && i.push(u);
|
|
1209
1209
|
}
|
|
1210
1210
|
n(i);
|
|
1211
1211
|
},
|
|
1212
|
-
error: (o) => r(
|
|
1212
|
+
error: (o) => r(j("parseStructuralIntervalsCSV", o))
|
|
1213
1213
|
});
|
|
1214
1214
|
});
|
|
1215
1215
|
}
|
|
1216
|
-
function
|
|
1216
|
+
function On(e, t = z) {
|
|
1217
1217
|
const n = /* @__PURE__ */ new Map();
|
|
1218
1218
|
for (const r of e) {
|
|
1219
1219
|
const o = r[t] != null ? String(r[t]).trim() : "";
|
|
@@ -1223,14 +1223,14 @@ function Dn(e, t = z) {
|
|
|
1223
1223
|
}
|
|
1224
1224
|
function Pn(e, t = null) {
|
|
1225
1225
|
return new Promise((n, r) => {
|
|
1226
|
-
|
|
1226
|
+
Q.parse(e, {
|
|
1227
1227
|
header: !0,
|
|
1228
1228
|
dynamicTyping: !0,
|
|
1229
1229
|
skipEmptyLines: !0,
|
|
1230
1230
|
complete: (o) => {
|
|
1231
|
-
const i = o.data.map((u) =>
|
|
1231
|
+
const i = o.data.map((u) => Qe(u, t)), s = Ln(i);
|
|
1232
1232
|
if (!s) {
|
|
1233
|
-
r(
|
|
1233
|
+
r(j(
|
|
1234
1234
|
"parseStructuralCSV",
|
|
1235
1235
|
new Error("Structural CSV requires either 'depth' (point) or 'from'/'to' (interval) columns")
|
|
1236
1236
|
));
|
|
@@ -1238,69 +1238,69 @@ function Pn(e, t = null) {
|
|
|
1238
1238
|
}
|
|
1239
1239
|
const l = [];
|
|
1240
1240
|
for (const u of i) {
|
|
1241
|
-
const a = s === "interval" ?
|
|
1241
|
+
const a = s === "interval" ? Dt(u) : St(u);
|
|
1242
1242
|
a && l.push(a);
|
|
1243
1243
|
}
|
|
1244
1244
|
n({ schema: s, rows: l });
|
|
1245
1245
|
},
|
|
1246
|
-
error: (o) => r(
|
|
1246
|
+
error: (o) => r(j("parseStructuralCSV", o))
|
|
1247
1247
|
});
|
|
1248
1248
|
});
|
|
1249
1249
|
}
|
|
1250
|
-
function
|
|
1250
|
+
function Tn(e) {
|
|
1251
1251
|
return new Promise((t) => {
|
|
1252
|
-
|
|
1252
|
+
Q.parse(e, {
|
|
1253
1253
|
header: !0,
|
|
1254
1254
|
dynamicTyping: !0,
|
|
1255
1255
|
skipEmptyLines: !0,
|
|
1256
1256
|
complete: (n) => {
|
|
1257
1257
|
const r = /* @__PURE__ */ new Map();
|
|
1258
1258
|
for (const i of n.data) {
|
|
1259
|
-
const s =
|
|
1259
|
+
const s = be(i), l = s[z] != null ? `${s[z]}`.trim() : "";
|
|
1260
1260
|
if (!l) continue;
|
|
1261
|
-
const u = Number(s[
|
|
1261
|
+
const u = Number(s[C]), a = Number(s[D]);
|
|
1262
1262
|
if (!Number.isFinite(u) || !Number.isFinite(a) || a <= u) continue;
|
|
1263
|
-
const c = (u + a) / 2, { [
|
|
1263
|
+
const c = (u + a) / 2, { [U]: m, [G]: d, ...f } = s, h = {
|
|
1264
1264
|
...f,
|
|
1265
1265
|
[z]: l,
|
|
1266
|
-
[
|
|
1267
|
-
[
|
|
1268
|
-
[
|
|
1269
|
-
[
|
|
1266
|
+
[C]: u,
|
|
1267
|
+
[D]: a,
|
|
1268
|
+
[Ie]: c,
|
|
1269
|
+
[W]: c,
|
|
1270
1270
|
// unified depth field for y-axis rendering
|
|
1271
1271
|
_source: "assay"
|
|
1272
1272
|
};
|
|
1273
|
-
r.has(l) || r.set(l, []), r.get(l).push(
|
|
1273
|
+
r.has(l) || r.set(l, []), r.get(l).push(h);
|
|
1274
1274
|
}
|
|
1275
1275
|
const o = Array.from(r.entries()).map(([i, s]) => ({
|
|
1276
1276
|
holeId: i,
|
|
1277
|
-
points: s.sort((l, u) => l[
|
|
1277
|
+
points: s.sort((l, u) => l[C] - u[C])
|
|
1278
1278
|
}));
|
|
1279
1279
|
t(o);
|
|
1280
1280
|
}
|
|
1281
1281
|
});
|
|
1282
1282
|
});
|
|
1283
1283
|
}
|
|
1284
|
-
function
|
|
1284
|
+
function wn(e) {
|
|
1285
1285
|
return new Promise((t) => {
|
|
1286
|
-
|
|
1286
|
+
Q.parse(e, {
|
|
1287
1287
|
header: !0,
|
|
1288
1288
|
dynamicTyping: !0,
|
|
1289
1289
|
skipEmptyLines: !0,
|
|
1290
1290
|
complete: (n) => {
|
|
1291
1291
|
const r = /* @__PURE__ */ new Map();
|
|
1292
1292
|
for (const o of n.data) {
|
|
1293
|
-
const i =
|
|
1293
|
+
const i = be(o), s = (i[z] ?? "").toString().trim();
|
|
1294
1294
|
if (!s) continue;
|
|
1295
|
-
const l = Number(i[
|
|
1295
|
+
const l = Number(i[C]), u = Number(i[D]);
|
|
1296
1296
|
if (!Number.isFinite(l) || !Number.isFinite(u) || u <= l) continue;
|
|
1297
|
-
const a = (l + u) / 2, { [
|
|
1297
|
+
const a = (l + u) / 2, { [U]: c, [G]: m, ...d } = i, f = {
|
|
1298
1298
|
...d,
|
|
1299
1299
|
[z]: s,
|
|
1300
|
-
[
|
|
1301
|
-
[
|
|
1302
|
-
[
|
|
1303
|
-
[
|
|
1300
|
+
[C]: l,
|
|
1301
|
+
[D]: u,
|
|
1302
|
+
[Ie]: a,
|
|
1303
|
+
[W]: a,
|
|
1304
1304
|
_source: "geology"
|
|
1305
1305
|
};
|
|
1306
1306
|
r.has(s) || r.set(s, []), r.get(s).push(f);
|
|
@@ -1308,20 +1308,20 @@ function kn(e) {
|
|
|
1308
1308
|
t({
|
|
1309
1309
|
holes: Array.from(r.entries()).map(([o, i]) => ({
|
|
1310
1310
|
holeId: o,
|
|
1311
|
-
points: i.sort((s, l) => s[
|
|
1311
|
+
points: i.sort((s, l) => s[C] - l[C])
|
|
1312
1312
|
}))
|
|
1313
1313
|
});
|
|
1314
1314
|
}
|
|
1315
1315
|
});
|
|
1316
1316
|
});
|
|
1317
1317
|
}
|
|
1318
|
-
async function
|
|
1318
|
+
async function Ro({ assayCsv: e, structuralCsv: t, geologyCsv: n } = {}) {
|
|
1319
1319
|
const [r, o, i] = await Promise.all([
|
|
1320
|
-
e ?
|
|
1320
|
+
e ? Tn(e) : Promise.resolve([]),
|
|
1321
1321
|
t ? Pn(t).then(
|
|
1322
|
-
({ rows: l }) =>
|
|
1322
|
+
({ rows: l }) => On(l.map((u) => ({ ...u, _source: "structural" })))
|
|
1323
1323
|
) : Promise.resolve([]),
|
|
1324
|
-
n ?
|
|
1324
|
+
n ? wn(n).then(({ holes: l }) => l) : Promise.resolve([])
|
|
1325
1325
|
]), s = new Map(r.map((l) => [l.holeId, { ...l, points: [...l.points] }]));
|
|
1326
1326
|
for (const l of [...o, ...i]) {
|
|
1327
1327
|
const u = l.holeId;
|
|
@@ -1334,7 +1334,7 @@ async function $o({ assayCsv: e, structuralCsv: t, geologyCsv: n } = {}) {
|
|
|
1334
1334
|
}
|
|
1335
1335
|
return { holes: Array.from(s.values()) };
|
|
1336
1336
|
}
|
|
1337
|
-
function
|
|
1337
|
+
function Bn(e, t) {
|
|
1338
1338
|
if (!e || e.length === 0 || !Number.isFinite(t)) return null;
|
|
1339
1339
|
const n = e.length;
|
|
1340
1340
|
if (n === 1) {
|
|
@@ -1343,8 +1343,8 @@ function Ln(e, t) {
|
|
|
1343
1343
|
}
|
|
1344
1344
|
let r = -1;
|
|
1345
1345
|
for (let g = 0; g < n - 1; g++) {
|
|
1346
|
-
const
|
|
1347
|
-
if (t >=
|
|
1346
|
+
const E = Number(e[g].md), M = Number(e[g + 1].md);
|
|
1347
|
+
if (t >= E && t <= M) {
|
|
1348
1348
|
r = g;
|
|
1349
1349
|
break;
|
|
1350
1350
|
}
|
|
@@ -1361,19 +1361,19 @@ function Ln(e, t) {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
const l = Number(o.x) + s * (Number(i.x) - Number(o.x)), u = Number(o.y) + s * (Number(i.y) - Number(o.y)), a = Number(o.z) + s * (Number(i.z) - Number(o.z));
|
|
1363
1363
|
let c, m, d;
|
|
1364
|
-
const f = Number(o.azimuth),
|
|
1365
|
-
if (Number.isFinite(f) && Number.isFinite(
|
|
1366
|
-
const g = Number.isFinite(b) && Number.isFinite(
|
|
1367
|
-
c = Math.cos(
|
|
1364
|
+
const f = Number(o.azimuth), h = Number(o.dip), b = Number(i.azimuth), _ = Number(i.dip);
|
|
1365
|
+
if (Number.isFinite(f) && Number.isFinite(h)) {
|
|
1366
|
+
const g = Number.isFinite(b) && Number.isFinite(_) ? f + s * (b - f) : f, E = Number.isFinite(b) && Number.isFinite(_) ? h + s * (_ - h) : h, M = g * Math.PI / 180, v = E * Math.PI / 180;
|
|
1367
|
+
c = Math.cos(v) * Math.sin(M), m = Math.cos(v) * Math.cos(M), d = -Math.sin(v);
|
|
1368
1368
|
} else {
|
|
1369
|
-
const g = Number(i.x) - Number(o.x),
|
|
1370
|
-
if (
|
|
1371
|
-
c = g /
|
|
1369
|
+
const g = Number(i.x) - Number(o.x), E = Number(i.y) - Number(o.y), M = Number(i.z) - Number(o.z), v = Math.sqrt(g * g + E * E + M * M);
|
|
1370
|
+
if (v < 1e-10) return { x: l, y: u, z: a, dx: 0, dy: 0, dz: -1 };
|
|
1371
|
+
c = g / v, m = E / v, d = M / v;
|
|
1372
1372
|
}
|
|
1373
|
-
const
|
|
1374
|
-
return
|
|
1373
|
+
const p = Math.sqrt(c * c + m * m + d * d);
|
|
1374
|
+
return p < 1e-10 ? { x: l, y: u, z: a, dx: 0, dy: 0, dz: -1 } : { x: l, y: u, z: a, dx: c / p, dy: m / p, dz: d / p };
|
|
1375
1375
|
}
|
|
1376
|
-
function
|
|
1376
|
+
function $n(e, t, n, r = {}) {
|
|
1377
1377
|
const { betaZeroAxis: o = "B", betaHandedness: i = 1 } = r, { dx: s, dy: l, dz: u } = n, a = [s, l, u];
|
|
1378
1378
|
let c = [0, 0, 1];
|
|
1379
1379
|
const m = a[0] * c[0] + a[1] * c[1] + a[2] * c[2];
|
|
@@ -1382,22 +1382,22 @@ function Tn(e, t, n, r = {}) {
|
|
|
1382
1382
|
c[1] * a[2] - c[2] * a[1],
|
|
1383
1383
|
c[2] * a[0] - c[0] * a[2],
|
|
1384
1384
|
c[0] * a[1] - c[1] * a[0]
|
|
1385
|
-
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2),
|
|
1386
|
-
a[1] *
|
|
1387
|
-
a[2] *
|
|
1388
|
-
a[0] *
|
|
1389
|
-
],
|
|
1385
|
+
], f = Math.sqrt(d[0] ** 2 + d[1] ** 2 + d[2] ** 2), h = f > 1e-10 ? [d[0] / f, d[1] / f, d[2] / f] : [1, 0, 0], b = [
|
|
1386
|
+
a[1] * h[2] - a[2] * h[1],
|
|
1387
|
+
a[2] * h[0] - a[0] * h[2],
|
|
1388
|
+
a[0] * h[1] - a[1] * h[0]
|
|
1389
|
+
], _ = Math.sqrt(b[0] ** 2 + b[1] ** 2 + b[2] ** 2), p = _ > 1e-10 ? [b[0] / _, b[1] / _, b[2] / _] : [0, 1, 0], g = o === "R" ? h : p, E = t * Math.PI / 180 * i, M = Math.cos(E), v = Math.sin(E), k = g[0] * a[0] + g[1] * a[1] + g[2] * a[2], F = [
|
|
1390
1390
|
a[1] * g[2] - a[2] * g[1],
|
|
1391
1391
|
a[2] * g[0] - a[0] * g[2],
|
|
1392
1392
|
a[0] * g[1] - a[1] * g[0]
|
|
1393
|
-
],
|
|
1394
|
-
g[0] * M +
|
|
1395
|
-
g[1] * M +
|
|
1396
|
-
g[2] * M +
|
|
1397
|
-
],
|
|
1398
|
-
return
|
|
1399
|
-
}
|
|
1400
|
-
function
|
|
1393
|
+
], T = [
|
|
1394
|
+
g[0] * M + F[0] * v + a[0] * k * (1 - M),
|
|
1395
|
+
g[1] * M + F[1] * v + a[1] * k * (1 - M),
|
|
1396
|
+
g[2] * M + F[2] * v + a[2] * k * (1 - M)
|
|
1397
|
+
], L = (90 - e) * Math.PI / 180, Y = Math.cos(L), Z = Math.sin(L), w = Y * T[0] + Z * a[0], q = Y * T[1] + Z * a[1], R = Y * T[2] + Z * a[2], I = Math.sqrt(w * w + q * q + R * R);
|
|
1398
|
+
return I < 1e-10 ? { nx: 0, ny: 0, nz: 1 } : { nx: w / I, ny: q / I, nz: R / I };
|
|
1399
|
+
}
|
|
1400
|
+
function Vn(e, t, n = {}) {
|
|
1401
1401
|
if (!(e != null && e.length) || !(t != null && t.length)) return [];
|
|
1402
1402
|
const r = /* @__PURE__ */ new Map();
|
|
1403
1403
|
for (const i of t) {
|
|
@@ -1414,25 +1414,336 @@ function wn(e, t, n = {}) {
|
|
|
1414
1414
|
if (!l || l.length === 0) continue;
|
|
1415
1415
|
const u = i.depth != null ? Number(i.depth) : i.mid != null ? Number(i.mid) : null;
|
|
1416
1416
|
if (!Number.isFinite(u)) continue;
|
|
1417
|
-
const a =
|
|
1417
|
+
const a = Bn(l, u);
|
|
1418
1418
|
if (!a) continue;
|
|
1419
|
-
const { x: c, y: m, z: d, dx: f, dy:
|
|
1420
|
-
let
|
|
1421
|
-
const
|
|
1422
|
-
if (Number.isFinite(
|
|
1423
|
-
const
|
|
1424
|
-
|
|
1419
|
+
const { x: c, y: m, z: d, dx: f, dy: h, dz: b } = a;
|
|
1420
|
+
let _, p, g;
|
|
1421
|
+
const E = i.alpha != null ? Number(i.alpha) : null, M = i.beta != null ? Number(i.beta) : null;
|
|
1422
|
+
if (Number.isFinite(E)) {
|
|
1423
|
+
const v = Number.isFinite(M) ? M : 0, k = $n(E, v, { dx: f, dy: h, dz: b }, n);
|
|
1424
|
+
_ = k.nx, p = k.ny, g = k.nz;
|
|
1425
1425
|
} else {
|
|
1426
|
-
const
|
|
1427
|
-
if (!Number.isFinite(
|
|
1428
|
-
const
|
|
1429
|
-
|
|
1426
|
+
const v = i.dip != null ? Number(i.dip) : null, k = i.azimuth != null ? Number(i.azimuth) : null;
|
|
1427
|
+
if (!Number.isFinite(v) || !Number.isFinite(k)) continue;
|
|
1428
|
+
const F = v * Math.PI / 180, T = k * Math.PI / 180;
|
|
1429
|
+
_ = Math.sin(T) * Math.sin(F), p = Math.cos(T) * Math.sin(F), g = Math.cos(F);
|
|
1430
1430
|
}
|
|
1431
|
-
o.push({ ...i, x: c, y: m, z: d, nx:
|
|
1431
|
+
o.push({ ...i, x: c, y: m, z: d, nx: _, ny: p, nz: g });
|
|
1432
1432
|
}
|
|
1433
1433
|
return o;
|
|
1434
1434
|
}
|
|
1435
|
-
const
|
|
1435
|
+
const Hn = "baselode", Go = Hn, jn = [
|
|
1436
|
+
"#8b1e3f",
|
|
1437
|
+
"#2563eb",
|
|
1438
|
+
"#16a34a",
|
|
1439
|
+
"#f59e0b",
|
|
1440
|
+
"#7c3aed",
|
|
1441
|
+
"#0ea5e9",
|
|
1442
|
+
"#ef4444",
|
|
1443
|
+
"#10b981",
|
|
1444
|
+
"#f97316",
|
|
1445
|
+
"#8b5cf6"
|
|
1446
|
+
], P = {
|
|
1447
|
+
bg: "#ffffff",
|
|
1448
|
+
panel: "#f8fafc",
|
|
1449
|
+
ink: "#1e293b",
|
|
1450
|
+
ink_soft: "#64748b",
|
|
1451
|
+
grid: "#e8e8e8",
|
|
1452
|
+
line: "#d0d0d0",
|
|
1453
|
+
accent: "#f59e0b",
|
|
1454
|
+
accent_2: "#fcd34d",
|
|
1455
|
+
muted_1: "#94a3b8",
|
|
1456
|
+
muted_2: "#cbd5e1",
|
|
1457
|
+
muted_3: "#e2e8f0",
|
|
1458
|
+
primary: "#8b1e3f",
|
|
1459
|
+
primary_2: "#a8324f"
|
|
1460
|
+
}, Ce = {
|
|
1461
|
+
layout: {
|
|
1462
|
+
paper_bgcolor: P.bg,
|
|
1463
|
+
plot_bgcolor: P.bg,
|
|
1464
|
+
colorway: jn,
|
|
1465
|
+
font: {
|
|
1466
|
+
family: "Inter, system-ui, sans-serif",
|
|
1467
|
+
size: 12,
|
|
1468
|
+
color: P.ink
|
|
1469
|
+
},
|
|
1470
|
+
title: {
|
|
1471
|
+
font: { size: 14, color: P.ink },
|
|
1472
|
+
x: 0.05
|
|
1473
|
+
},
|
|
1474
|
+
hovermode: "x unified",
|
|
1475
|
+
hoverlabel: {
|
|
1476
|
+
bgcolor: P.bg,
|
|
1477
|
+
bordercolor: P.line,
|
|
1478
|
+
font: { size: 12, color: P.ink }
|
|
1479
|
+
},
|
|
1480
|
+
legend: {
|
|
1481
|
+
bgcolor: "rgba(255,255,255,0.9)",
|
|
1482
|
+
bordercolor: P.muted_3,
|
|
1483
|
+
borderwidth: 1,
|
|
1484
|
+
font: { size: 11, color: P.ink },
|
|
1485
|
+
orientation: "h",
|
|
1486
|
+
yanchor: "bottom",
|
|
1487
|
+
y: 1.02,
|
|
1488
|
+
xanchor: "left",
|
|
1489
|
+
x: 0
|
|
1490
|
+
},
|
|
1491
|
+
xaxis: {
|
|
1492
|
+
showline: !0,
|
|
1493
|
+
linewidth: 1,
|
|
1494
|
+
linecolor: P.line,
|
|
1495
|
+
mirror: !1,
|
|
1496
|
+
ticks: "outside",
|
|
1497
|
+
tickwidth: 1,
|
|
1498
|
+
tickcolor: P.line,
|
|
1499
|
+
ticklen: 4,
|
|
1500
|
+
showgrid: !0,
|
|
1501
|
+
gridcolor: P.grid,
|
|
1502
|
+
gridwidth: 1,
|
|
1503
|
+
zeroline: !1,
|
|
1504
|
+
title_font: { color: P.ink, size: 12 },
|
|
1505
|
+
tickfont: { color: P.ink_soft, size: 10 }
|
|
1506
|
+
},
|
|
1507
|
+
yaxis: {
|
|
1508
|
+
showline: !0,
|
|
1509
|
+
linewidth: 1,
|
|
1510
|
+
linecolor: P.line,
|
|
1511
|
+
mirror: !1,
|
|
1512
|
+
ticks: "outside",
|
|
1513
|
+
tickwidth: 1,
|
|
1514
|
+
tickcolor: P.line,
|
|
1515
|
+
ticklen: 4,
|
|
1516
|
+
showgrid: !0,
|
|
1517
|
+
gridcolor: P.grid,
|
|
1518
|
+
gridwidth: 1,
|
|
1519
|
+
zeroline: !1,
|
|
1520
|
+
title_font: { color: P.ink, size: 12 },
|
|
1521
|
+
tickfont: { color: P.ink_soft, size: 10 }
|
|
1522
|
+
},
|
|
1523
|
+
modebar: {
|
|
1524
|
+
remove: ["select2d", "lasso2d", "autoScale2d"]
|
|
1525
|
+
},
|
|
1526
|
+
bargap: 0.18,
|
|
1527
|
+
bargroupgap: 0.08
|
|
1528
|
+
},
|
|
1529
|
+
data: {
|
|
1530
|
+
scatter: [{
|
|
1531
|
+
mode: "lines+markers",
|
|
1532
|
+
line: { width: 2, color: P.primary },
|
|
1533
|
+
marker: {
|
|
1534
|
+
size: 7,
|
|
1535
|
+
color: P.primary_2,
|
|
1536
|
+
line: { width: 1.5, color: P.bg }
|
|
1537
|
+
}
|
|
1538
|
+
}],
|
|
1539
|
+
bar: [{
|
|
1540
|
+
marker: {
|
|
1541
|
+
color: P.primary,
|
|
1542
|
+
line: { color: P.bg, width: 0 }
|
|
1543
|
+
}
|
|
1544
|
+
}],
|
|
1545
|
+
histogram: [{
|
|
1546
|
+
marker: {
|
|
1547
|
+
color: P.primary,
|
|
1548
|
+
line: { color: P.bg, width: 0 }
|
|
1549
|
+
}
|
|
1550
|
+
}],
|
|
1551
|
+
box: [{
|
|
1552
|
+
fillcolor: P.accent,
|
|
1553
|
+
line: { color: P.ink, width: 1.5 },
|
|
1554
|
+
marker: { color: P.ink }
|
|
1555
|
+
}],
|
|
1556
|
+
violin: [{
|
|
1557
|
+
fillcolor: P.accent,
|
|
1558
|
+
line: { color: P.ink, width: 1.5 },
|
|
1559
|
+
marker: { color: P.ink }
|
|
1560
|
+
}],
|
|
1561
|
+
heatmap: [{
|
|
1562
|
+
colorscale: [
|
|
1563
|
+
[0, "#ffffff"],
|
|
1564
|
+
[0.2, "#f1f5f9"],
|
|
1565
|
+
[0.4, "#cbd5e1"],
|
|
1566
|
+
[0.6, "#94a3b8"],
|
|
1567
|
+
[0.8, "#475569"],
|
|
1568
|
+
[1, "#1e293b"]
|
|
1569
|
+
],
|
|
1570
|
+
colorbar: {
|
|
1571
|
+
outlinecolor: P.line,
|
|
1572
|
+
tickcolor: P.line,
|
|
1573
|
+
tickfont: { color: P.ink_soft }
|
|
1574
|
+
}
|
|
1575
|
+
}],
|
|
1576
|
+
contour: [{
|
|
1577
|
+
colorscale: [
|
|
1578
|
+
[0, "#ffffff"],
|
|
1579
|
+
[0.25, "#fef3c7"],
|
|
1580
|
+
[0.5, "#f59e0b"],
|
|
1581
|
+
[0.75, "#92400e"],
|
|
1582
|
+
[1, "#1e293b"]
|
|
1583
|
+
],
|
|
1584
|
+
colorbar: {
|
|
1585
|
+
outlinecolor: P.line,
|
|
1586
|
+
tickcolor: P.line,
|
|
1587
|
+
tickfont: { color: P.ink_soft }
|
|
1588
|
+
}
|
|
1589
|
+
}]
|
|
1590
|
+
}
|
|
1591
|
+
}, Uo = Ce, S = {
|
|
1592
|
+
bg: "#1b1b1f",
|
|
1593
|
+
panel: "#25252a",
|
|
1594
|
+
ink: "#f0f0e4",
|
|
1595
|
+
ink_soft: "#c8c8b8",
|
|
1596
|
+
grid: "#2a2a26",
|
|
1597
|
+
line: "#3a3a34",
|
|
1598
|
+
accent: "#ffffbb",
|
|
1599
|
+
accent_2: "#f3ef9b",
|
|
1600
|
+
muted_1: "#8a8a80",
|
|
1601
|
+
muted_2: "#5e5e56",
|
|
1602
|
+
muted_3: "#3a3a34"
|
|
1603
|
+
}, Yo = "baselode-dark", qo = {
|
|
1604
|
+
layout: {
|
|
1605
|
+
font: {
|
|
1606
|
+
family: "Inter, Arial, sans-serif",
|
|
1607
|
+
color: S.ink,
|
|
1608
|
+
size: 14
|
|
1609
|
+
},
|
|
1610
|
+
title: {
|
|
1611
|
+
x: 0.02,
|
|
1612
|
+
xanchor: "left",
|
|
1613
|
+
font: {
|
|
1614
|
+
family: "Inter, Arial, sans-serif",
|
|
1615
|
+
size: 22,
|
|
1616
|
+
color: S.ink
|
|
1617
|
+
}
|
|
1618
|
+
},
|
|
1619
|
+
paper_bgcolor: S.bg,
|
|
1620
|
+
plot_bgcolor: S.bg,
|
|
1621
|
+
colorway: [
|
|
1622
|
+
S.ink,
|
|
1623
|
+
S.accent,
|
|
1624
|
+
S.muted_1,
|
|
1625
|
+
S.accent_2,
|
|
1626
|
+
S.muted_2,
|
|
1627
|
+
S.muted_3
|
|
1628
|
+
],
|
|
1629
|
+
margin: { l: 70, r: 30, t: 70, b: 60 },
|
|
1630
|
+
hovermode: "x unified",
|
|
1631
|
+
hoverlabel: {
|
|
1632
|
+
bgcolor: S.panel,
|
|
1633
|
+
bordercolor: S.accent,
|
|
1634
|
+
font: {
|
|
1635
|
+
family: "Inter, Arial, sans-serif",
|
|
1636
|
+
color: S.ink,
|
|
1637
|
+
size: 13
|
|
1638
|
+
}
|
|
1639
|
+
},
|
|
1640
|
+
legend: {
|
|
1641
|
+
bgcolor: "rgba(37,37,42,0.88)",
|
|
1642
|
+
bordercolor: S.line,
|
|
1643
|
+
borderwidth: 1,
|
|
1644
|
+
font: {
|
|
1645
|
+
family: "Inter, Arial, sans-serif",
|
|
1646
|
+
color: S.ink,
|
|
1647
|
+
size: 12
|
|
1648
|
+
},
|
|
1649
|
+
orientation: "h",
|
|
1650
|
+
yanchor: "bottom",
|
|
1651
|
+
y: 1.02,
|
|
1652
|
+
xanchor: "left",
|
|
1653
|
+
x: 0
|
|
1654
|
+
},
|
|
1655
|
+
xaxis: {
|
|
1656
|
+
showline: !1,
|
|
1657
|
+
ticks: "outside",
|
|
1658
|
+
tickwidth: 1,
|
|
1659
|
+
tickcolor: S.muted_1,
|
|
1660
|
+
ticklen: 6,
|
|
1661
|
+
showgrid: !0,
|
|
1662
|
+
gridcolor: S.grid,
|
|
1663
|
+
gridwidth: 1,
|
|
1664
|
+
zeroline: !1,
|
|
1665
|
+
title_font: { color: S.ink },
|
|
1666
|
+
tickfont: { color: S.ink_soft }
|
|
1667
|
+
},
|
|
1668
|
+
yaxis: {
|
|
1669
|
+
showline: !1,
|
|
1670
|
+
ticks: "outside",
|
|
1671
|
+
tickwidth: 1,
|
|
1672
|
+
tickcolor: S.muted_1,
|
|
1673
|
+
ticklen: 6,
|
|
1674
|
+
showgrid: !0,
|
|
1675
|
+
gridcolor: S.grid,
|
|
1676
|
+
gridwidth: 1,
|
|
1677
|
+
zeroline: !1,
|
|
1678
|
+
title_font: { color: S.ink },
|
|
1679
|
+
tickfont: { color: S.ink_soft }
|
|
1680
|
+
},
|
|
1681
|
+
bargap: 0.18,
|
|
1682
|
+
bargroupgap: 0.08
|
|
1683
|
+
},
|
|
1684
|
+
data: {
|
|
1685
|
+
scatter: [{
|
|
1686
|
+
mode: "lines+markers",
|
|
1687
|
+
line: { width: 2.5, color: S.ink },
|
|
1688
|
+
marker: {
|
|
1689
|
+
size: 7,
|
|
1690
|
+
color: S.ink,
|
|
1691
|
+
line: { width: 1.5, color: S.bg }
|
|
1692
|
+
}
|
|
1693
|
+
}],
|
|
1694
|
+
bar: [{
|
|
1695
|
+
marker: {
|
|
1696
|
+
color: S.ink,
|
|
1697
|
+
line: { color: S.bg, width: 0 }
|
|
1698
|
+
}
|
|
1699
|
+
}],
|
|
1700
|
+
histogram: [{
|
|
1701
|
+
marker: {
|
|
1702
|
+
color: S.ink,
|
|
1703
|
+
line: { color: S.bg, width: 0 }
|
|
1704
|
+
}
|
|
1705
|
+
}],
|
|
1706
|
+
box: [{
|
|
1707
|
+
fillcolor: S.accent,
|
|
1708
|
+
line: { color: S.ink, width: 1.5 },
|
|
1709
|
+
marker: { color: S.ink }
|
|
1710
|
+
}],
|
|
1711
|
+
violin: [{
|
|
1712
|
+
fillcolor: S.accent,
|
|
1713
|
+
line: { color: S.ink, width: 1.5 },
|
|
1714
|
+
marker: { color: S.ink }
|
|
1715
|
+
}],
|
|
1716
|
+
heatmap: [{
|
|
1717
|
+
colorscale: [
|
|
1718
|
+
[0, "#1b1b1f"],
|
|
1719
|
+
[0.2, "#2e2e28"],
|
|
1720
|
+
[0.4, "#5e5e50"],
|
|
1721
|
+
[0.6, "#c8c89a"],
|
|
1722
|
+
[0.8, "#f3ef9b"],
|
|
1723
|
+
[1, "#ffffbb"]
|
|
1724
|
+
],
|
|
1725
|
+
colorbar: {
|
|
1726
|
+
outlinecolor: S.ink,
|
|
1727
|
+
tickcolor: S.ink,
|
|
1728
|
+
tickfont: { color: S.ink_soft }
|
|
1729
|
+
}
|
|
1730
|
+
}],
|
|
1731
|
+
contour: [{
|
|
1732
|
+
colorscale: [
|
|
1733
|
+
[0, "#1b1b1f"],
|
|
1734
|
+
[0.25, "#2e2e28"],
|
|
1735
|
+
[0.5, "#6b6b50"],
|
|
1736
|
+
[0.75, "#f3ef9b"],
|
|
1737
|
+
[1, "#ffffbb"]
|
|
1738
|
+
],
|
|
1739
|
+
colorbar: {
|
|
1740
|
+
outlinecolor: S.ink,
|
|
1741
|
+
tickcolor: S.ink,
|
|
1742
|
+
tickfont: { color: S.ink_soft }
|
|
1743
|
+
}
|
|
1744
|
+
}]
|
|
1745
|
+
}
|
|
1746
|
+
}, Rn = "#7f7f7f", Be = {
|
|
1436
1747
|
Au: "#FFD700",
|
|
1437
1748
|
// gold
|
|
1438
1749
|
Ag: "#C0C0C0",
|
|
@@ -1469,7 +1780,7 @@ const $n = "#7f7f7f", Le = {
|
|
|
1469
1780
|
// aluminium / yellow
|
|
1470
1781
|
U: "#8BC34A"
|
|
1471
1782
|
// uranium / lime green
|
|
1472
|
-
},
|
|
1783
|
+
}, Gn = {
|
|
1473
1784
|
// Sedimentary
|
|
1474
1785
|
shale: "#607D8B",
|
|
1475
1786
|
mudstone: "#78909C",
|
|
@@ -1508,11 +1819,11 @@ const $n = "#7f7f7f", Le = {
|
|
|
1508
1819
|
calcite: "#F9FBE7",
|
|
1509
1820
|
vein: "#FFFFFF",
|
|
1510
1821
|
unknown: "#9E9E9E"
|
|
1511
|
-
},
|
|
1512
|
-
commodity:
|
|
1513
|
-
lithology:
|
|
1822
|
+
}, Ue = {
|
|
1823
|
+
commodity: Be,
|
|
1824
|
+
lithology: Gn
|
|
1514
1825
|
};
|
|
1515
|
-
function
|
|
1826
|
+
function Un(e, t, n = Rn) {
|
|
1516
1827
|
if (!t || e == null) return n;
|
|
1517
1828
|
const r = String(e).trim();
|
|
1518
1829
|
if (Object.prototype.hasOwnProperty.call(t, r)) return t[r];
|
|
@@ -1521,13 +1832,13 @@ function Vn(e, t, n = $n) {
|
|
|
1521
1832
|
if (String(i).trim().toLowerCase() === o) return s;
|
|
1522
1833
|
return n;
|
|
1523
1834
|
}
|
|
1524
|
-
function
|
|
1835
|
+
function Yn(e) {
|
|
1525
1836
|
if (e == null) return {};
|
|
1526
1837
|
if (typeof e == "string") {
|
|
1527
1838
|
const t = e.trim().toLowerCase();
|
|
1528
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1529
|
-
return
|
|
1530
|
-
const n = Object.keys(
|
|
1839
|
+
if (Object.prototype.hasOwnProperty.call(Ue, t))
|
|
1840
|
+
return Ue[t];
|
|
1841
|
+
const n = Object.keys(Ue).sort().join(", ");
|
|
1531
1842
|
throw new RangeError(
|
|
1532
1843
|
`Unknown built-in colour map '${e}'. Available maps: ${n}`
|
|
1533
1844
|
);
|
|
@@ -1537,39 +1848,39 @@ function Hn(e) {
|
|
|
1537
1848
|
`colourMap must be null, a string, or a plain object; got ${Array.isArray(e) ? "Array" : Object.prototype.toString.call(e)}`
|
|
1538
1849
|
);
|
|
1539
1850
|
}
|
|
1540
|
-
const
|
|
1541
|
-
function
|
|
1851
|
+
const qn = "#8b1e3f", Xn = "#a8324f";
|
|
1852
|
+
function Wn(e) {
|
|
1542
1853
|
if (!e) return null;
|
|
1543
1854
|
const t = e.split(/[_\-/\s]+/);
|
|
1544
1855
|
for (const n of t) {
|
|
1545
|
-
if (Object.prototype.hasOwnProperty.call(
|
|
1546
|
-
return
|
|
1856
|
+
if (Object.prototype.hasOwnProperty.call(Be, n))
|
|
1857
|
+
return Be[n];
|
|
1547
1858
|
const r = n.toLowerCase();
|
|
1548
|
-
for (const [o, i] of Object.entries(
|
|
1859
|
+
for (const [o, i] of Object.entries(Be))
|
|
1549
1860
|
if (o.toLowerCase() === r) return i;
|
|
1550
1861
|
}
|
|
1551
1862
|
return null;
|
|
1552
1863
|
}
|
|
1553
|
-
const
|
|
1554
|
-
function
|
|
1864
|
+
const Zn = "#6b7280", Kn = { l: 42, r: 4, t: 4, b: 30 }, ct = 10, ut = 12;
|
|
1865
|
+
function dt(e) {
|
|
1555
1866
|
return e ? typeof e == "string" ? { text: e } : e : {};
|
|
1556
1867
|
}
|
|
1557
|
-
function
|
|
1558
|
-
const t =
|
|
1868
|
+
function Ft(e = {}) {
|
|
1869
|
+
const t = dt(e.xaxis && e.xaxis.title), n = dt(e.yaxis && e.yaxis.title);
|
|
1559
1870
|
return {
|
|
1560
1871
|
...e,
|
|
1561
|
-
margin:
|
|
1872
|
+
margin: Kn,
|
|
1562
1873
|
autosize: !0,
|
|
1563
1874
|
width: void 0,
|
|
1564
1875
|
xaxis: {
|
|
1565
1876
|
...e.xaxis || {},
|
|
1566
1877
|
tickfont: {
|
|
1567
1878
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1568
|
-
size:
|
|
1879
|
+
size: ct
|
|
1569
1880
|
},
|
|
1570
1881
|
title: {
|
|
1571
1882
|
...t,
|
|
1572
|
-
font: { ...t.font || {}, size:
|
|
1883
|
+
font: { ...t.font || {}, size: ut }
|
|
1573
1884
|
}
|
|
1574
1885
|
},
|
|
1575
1886
|
yaxis: {
|
|
@@ -1577,16 +1888,16 @@ function St(e = {}) {
|
|
|
1577
1888
|
automargin: !0,
|
|
1578
1889
|
tickfont: {
|
|
1579
1890
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1580
|
-
size:
|
|
1891
|
+
size: ct
|
|
1581
1892
|
},
|
|
1582
1893
|
title: {
|
|
1583
1894
|
...n,
|
|
1584
|
-
font: { ...n.font || {}, size:
|
|
1895
|
+
font: { ...n.font || {}, size: ut }
|
|
1585
1896
|
}
|
|
1586
1897
|
}
|
|
1587
1898
|
};
|
|
1588
1899
|
}
|
|
1589
|
-
function
|
|
1900
|
+
function Jn(e, t) {
|
|
1590
1901
|
var r;
|
|
1591
1902
|
if (!e || !t) return !1;
|
|
1592
1903
|
const n = e.points || [];
|
|
@@ -1597,7 +1908,7 @@ function qn(e, t) {
|
|
|
1597
1908
|
}
|
|
1598
1909
|
return !1;
|
|
1599
1910
|
}
|
|
1600
|
-
function
|
|
1911
|
+
function Qn(e, t, n) {
|
|
1601
1912
|
if (!e || !t) return [];
|
|
1602
1913
|
const r = (e == null ? void 0 : e.points) || [], o = [], i = /* @__PURE__ */ new Set();
|
|
1603
1914
|
return r.forEach((s) => {
|
|
@@ -1626,11 +1937,11 @@ function Xn(e, t, n) {
|
|
|
1626
1937
|
});
|
|
1627
1938
|
}), o.sort((s, l) => l.z - s.z);
|
|
1628
1939
|
}
|
|
1629
|
-
function
|
|
1940
|
+
function er(e, t, n, r) {
|
|
1630
1941
|
if (!e.length) return { data: [], layout: {} };
|
|
1631
|
-
const
|
|
1632
|
-
if (!
|
|
1633
|
-
const
|
|
1942
|
+
const o = e.filter((d) => Number.isFinite(d == null ? void 0 : d.from) && Number.isFinite(d == null ? void 0 : d.to) && d.to > d.from).map((d) => ({ ...d, category: `${(d == null ? void 0 : d.val) ?? ""}`.trim() })).filter((d) => d.category !== "" && !/^(nan|null|none)$/i.test(d.category)).sort((d, f) => d.from - f.from || d.to - f.to);
|
|
1943
|
+
if (!o.length) return { data: [], layout: {} };
|
|
1944
|
+
const i = Yn(n), s = [
|
|
1634
1945
|
"#1f77b4",
|
|
1635
1946
|
// blue
|
|
1636
1947
|
"#ff7f0e",
|
|
@@ -1659,111 +1970,115 @@ function Wn(e, t, n) {
|
|
|
1659
1970
|
// violet
|
|
1660
1971
|
"#636363"
|
|
1661
1972
|
// dark gray
|
|
1662
|
-
],
|
|
1663
|
-
function
|
|
1664
|
-
if (
|
|
1665
|
-
const
|
|
1666
|
-
if (
|
|
1973
|
+
], l = [...new Set(o.map((d) => d.category))];
|
|
1974
|
+
function u(d, f) {
|
|
1975
|
+
if (i && Object.keys(i).length > 0) {
|
|
1976
|
+
const h = Un(d, i, null);
|
|
1977
|
+
if (h !== null) return h;
|
|
1667
1978
|
}
|
|
1668
|
-
return
|
|
1979
|
+
return s[f % s.length];
|
|
1669
1980
|
}
|
|
1670
|
-
const
|
|
1671
|
-
|
|
1981
|
+
const a = new Map(
|
|
1982
|
+
l.map((d, f) => [d, u(d, f)])
|
|
1672
1983
|
);
|
|
1673
|
-
return { data:
|
|
1674
|
-
const
|
|
1984
|
+
return { data: l.map((d) => {
|
|
1985
|
+
const f = o.filter((h) => h.category === d);
|
|
1675
1986
|
return {
|
|
1676
1987
|
type: "bar",
|
|
1677
|
-
x:
|
|
1678
|
-
y:
|
|
1679
|
-
base:
|
|
1988
|
+
x: f.map(() => 0.5),
|
|
1989
|
+
y: f.map((h) => h.to - h.from),
|
|
1990
|
+
base: f.map((h) => h.from),
|
|
1680
1991
|
width: 1,
|
|
1681
|
-
marker: { color:
|
|
1682
|
-
name:
|
|
1992
|
+
marker: { color: a.get(d), line: { width: 0 } },
|
|
1993
|
+
name: d,
|
|
1683
1994
|
showlegend: !1,
|
|
1684
|
-
customdata:
|
|
1685
|
-
hovertemplate: `${t}: ${
|
|
1995
|
+
customdata: f.map((h) => [h.from, h.to]),
|
|
1996
|
+
hovertemplate: `${t}: ${d}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`
|
|
1686
1997
|
};
|
|
1687
|
-
}), layout:
|
|
1998
|
+
}), layout: Ft({
|
|
1688
1999
|
barmode: "overlay",
|
|
1689
2000
|
bargap: 0,
|
|
1690
2001
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1691
2002
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1692
2003
|
showlegend: !1,
|
|
1693
|
-
title: t || void 0
|
|
2004
|
+
title: t || void 0,
|
|
2005
|
+
template: r !== void 0 ? r : Ce
|
|
1694
2006
|
}) };
|
|
1695
2007
|
}
|
|
1696
|
-
function
|
|
2008
|
+
function tr(e, t, n, r, o) {
|
|
1697
2009
|
if (!e.length) return { data: [], layout: {} };
|
|
1698
|
-
const
|
|
1699
|
-
x: e.map((
|
|
1700
|
-
y: e.map((
|
|
2010
|
+
const i = n === "bar", s = n === "markers", l = n === "line", u = r || qn, a = r || Xn, c = {
|
|
2011
|
+
x: e.map((h) => h.val),
|
|
2012
|
+
y: e.map((h) => h.z),
|
|
1701
2013
|
hovertemplate: `${t}: %{x}<br>from: %{customdata[0]:.3f} to: %{customdata[1]:.3f}<extra></extra>`,
|
|
1702
|
-
customdata: e.map((
|
|
1703
|
-
},
|
|
2014
|
+
customdata: e.map((h) => [Math.min(h.from, h.to), Math.max(h.from, h.to)])
|
|
2015
|
+
}, m = {
|
|
1704
2016
|
type: "data",
|
|
1705
2017
|
symmetric: !1,
|
|
1706
|
-
array: e.map((
|
|
1707
|
-
arrayminus: e.map((
|
|
2018
|
+
array: e.map((h) => h.errorPlus),
|
|
2019
|
+
arrayminus: e.map((h) => h.errorMinus),
|
|
1708
2020
|
thickness: 1.5,
|
|
1709
2021
|
width: 2,
|
|
1710
|
-
color:
|
|
2022
|
+
color: Zn
|
|
1711
2023
|
};
|
|
1712
|
-
return { data: [
|
|
1713
|
-
...
|
|
2024
|
+
return { data: [i ? {
|
|
2025
|
+
...c,
|
|
1714
2026
|
type: "bar",
|
|
1715
2027
|
orientation: "h",
|
|
1716
|
-
marker: { color:
|
|
1717
|
-
error_y:
|
|
2028
|
+
marker: { color: u },
|
|
2029
|
+
error_y: m
|
|
1718
2030
|
} : {
|
|
1719
|
-
...
|
|
2031
|
+
...c,
|
|
1720
2032
|
type: "scatter",
|
|
1721
|
-
mode:
|
|
1722
|
-
line: { color:
|
|
1723
|
-
marker: { size: 7, color:
|
|
1724
|
-
error_y:
|
|
1725
|
-
}], layout:
|
|
2033
|
+
mode: s ? "markers" : l ? "lines" : "lines+markers",
|
|
2034
|
+
line: { color: u, width: 2 },
|
|
2035
|
+
marker: { size: 7, color: a },
|
|
2036
|
+
error_y: l ? void 0 : m
|
|
2037
|
+
}], layout: Ft({
|
|
1726
2038
|
xaxis: { title: t, zeroline: !1 },
|
|
1727
2039
|
yaxis: { title: "Depth (m)", autorange: "reversed", zeroline: !1 },
|
|
1728
2040
|
barmode: "overlay",
|
|
1729
|
-
showlegend: !1
|
|
2041
|
+
showlegend: !1,
|
|
2042
|
+
template: o !== void 0 ? o : Ce
|
|
1730
2043
|
}) };
|
|
1731
2044
|
}
|
|
1732
|
-
function
|
|
2045
|
+
function Lt({ points: e, isCategorical: t, property: n, chartType: r, colourMap: o, template: i }) {
|
|
1733
2046
|
if (!e || !e.length || !n) return { data: [], layout: {} };
|
|
1734
2047
|
if (t || r === "categorical")
|
|
1735
|
-
return
|
|
1736
|
-
const
|
|
1737
|
-
return
|
|
2048
|
+
return er(e, n, o, i);
|
|
2049
|
+
const s = Wn(n);
|
|
2050
|
+
return tr(e, n, r, s, i);
|
|
1738
2051
|
}
|
|
1739
|
-
function
|
|
2052
|
+
function Xo(e = [], {
|
|
1740
2053
|
fromCol: t = "from",
|
|
1741
2054
|
toCol: n = "to",
|
|
1742
2055
|
categoryCol: r = "geology_code",
|
|
1743
|
-
colourMap: o = null
|
|
2056
|
+
colourMap: o = null,
|
|
2057
|
+
template: i = void 0
|
|
1744
2058
|
} = {}) {
|
|
1745
|
-
const
|
|
1746
|
-
return e.forEach((
|
|
1747
|
-
const
|
|
1748
|
-
if (!Number.isFinite(
|
|
1749
|
-
const
|
|
1750
|
-
|
|
1751
|
-
z:
|
|
1752
|
-
val: `${
|
|
1753
|
-
from:
|
|
1754
|
-
to:
|
|
1755
|
-
errorPlus:
|
|
1756
|
-
errorMinus:
|
|
2059
|
+
const s = [];
|
|
2060
|
+
return e.forEach((l) => {
|
|
2061
|
+
const u = Number(l == null ? void 0 : l[t]), a = Number(l == null ? void 0 : l[n]), c = l == null ? void 0 : l[r];
|
|
2062
|
+
if (!Number.isFinite(u) || !Number.isFinite(a) || a <= u || c == null || `${c}`.trim() === "") return;
|
|
2063
|
+
const m = (u + a) / 2;
|
|
2064
|
+
s.push({
|
|
2065
|
+
z: m,
|
|
2066
|
+
val: `${c}`,
|
|
2067
|
+
from: u,
|
|
2068
|
+
to: a,
|
|
2069
|
+
errorPlus: a - m,
|
|
2070
|
+
errorMinus: m - u
|
|
1757
2071
|
});
|
|
1758
|
-
}),
|
|
1759
|
-
points:
|
|
2072
|
+
}), s.sort((l, u) => u.z - l.z), Lt({
|
|
2073
|
+
points: s,
|
|
1760
2074
|
isCategorical: !0,
|
|
1761
2075
|
property: r,
|
|
1762
2076
|
chartType: "categorical",
|
|
1763
|
-
colourMap: o
|
|
2077
|
+
colourMap: o,
|
|
2078
|
+
template: i
|
|
1764
2079
|
});
|
|
1765
2080
|
}
|
|
1766
|
-
const
|
|
2081
|
+
const Ot = [
|
|
1767
2082
|
"#0f172a",
|
|
1768
2083
|
"#1e3a5f",
|
|
1769
2084
|
"#7c3aed",
|
|
@@ -1774,24 +2089,24 @@ const Dt = [
|
|
|
1774
2089
|
"#db2777",
|
|
1775
2090
|
"#65a30d",
|
|
1776
2091
|
"#9333ea"
|
|
1777
|
-
],
|
|
2092
|
+
], nr = { l: 42, r: 4, t: 4, b: 30 }, mt = 10, ft = 12;
|
|
1778
2093
|
function Pt(e = {}) {
|
|
1779
2094
|
return {
|
|
1780
2095
|
...e,
|
|
1781
|
-
margin:
|
|
2096
|
+
margin: nr,
|
|
1782
2097
|
autosize: !0,
|
|
1783
2098
|
width: void 0,
|
|
1784
2099
|
xaxis: {
|
|
1785
2100
|
...e.xaxis || {},
|
|
1786
2101
|
tickfont: {
|
|
1787
2102
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1788
|
-
size:
|
|
2103
|
+
size: mt
|
|
1789
2104
|
},
|
|
1790
2105
|
title: {
|
|
1791
2106
|
...e.xaxis && e.xaxis.title || {},
|
|
1792
2107
|
font: {
|
|
1793
2108
|
...e.xaxis && e.xaxis.title && e.xaxis.title.font || {},
|
|
1794
|
-
size:
|
|
2109
|
+
size: ft
|
|
1795
2110
|
}
|
|
1796
2111
|
}
|
|
1797
2112
|
},
|
|
@@ -1800,66 +2115,67 @@ function Pt(e = {}) {
|
|
|
1800
2115
|
automargin: !0,
|
|
1801
2116
|
tickfont: {
|
|
1802
2117
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1803
|
-
size:
|
|
2118
|
+
size: mt
|
|
1804
2119
|
},
|
|
1805
2120
|
title: {
|
|
1806
2121
|
...e.yaxis && e.yaxis.title || {},
|
|
1807
2122
|
font: {
|
|
1808
2123
|
...e.yaxis && e.yaxis.title && e.yaxis.title.font || {},
|
|
1809
|
-
size:
|
|
2124
|
+
size: ft
|
|
1810
2125
|
}
|
|
1811
2126
|
}
|
|
1812
2127
|
}
|
|
1813
2128
|
};
|
|
1814
2129
|
}
|
|
1815
|
-
function
|
|
2130
|
+
function rr(e, {
|
|
1816
2131
|
tailScale: t = 5,
|
|
1817
2132
|
colorBy: n = null,
|
|
1818
|
-
palette: r =
|
|
1819
|
-
depthCol: o =
|
|
1820
|
-
dipCol: i =
|
|
1821
|
-
azCol: s =
|
|
2133
|
+
palette: r = Ot,
|
|
2134
|
+
depthCol: o = W,
|
|
2135
|
+
dipCol: i = U,
|
|
2136
|
+
azCol: s = G,
|
|
2137
|
+
template: l = void 0
|
|
1822
2138
|
} = {}) {
|
|
1823
|
-
const
|
|
1824
|
-
(
|
|
2139
|
+
const u = e.filter(
|
|
2140
|
+
(b) => b[o] != null && b[i] != null && b[s] != null
|
|
1825
2141
|
);
|
|
1826
|
-
if (!
|
|
2142
|
+
if (!u.length)
|
|
1827
2143
|
return { data: [], layout: {} };
|
|
1828
|
-
const
|
|
1829
|
-
n && [...new Set(
|
|
1830
|
-
|
|
2144
|
+
const a = {};
|
|
2145
|
+
n && [...new Set(u.map((_) => _[n]).filter((_) => _ != null))].sort().forEach((_, p) => {
|
|
2146
|
+
a[_] = r[p % r.length];
|
|
1831
2147
|
});
|
|
1832
|
-
const
|
|
1833
|
-
for (const
|
|
1834
|
-
const
|
|
1835
|
-
|
|
1836
|
-
const
|
|
1837
|
-
|
|
1838
|
-
const
|
|
1839
|
-
|
|
2148
|
+
const c = /* @__PURE__ */ new Map(), m = [];
|
|
2149
|
+
for (const b of u) {
|
|
2150
|
+
const _ = Number(b[o]), p = Number(b[i]), g = Number(b[s]), E = n ? b[n] ?? "_default" : "_default", M = n ? a[E] ?? "#0f172a" : "#0f172a";
|
|
2151
|
+
c.has(E) || c.set(E, { xs: [], ys: [], dips: [], azs: [], color: M });
|
|
2152
|
+
const v = c.get(E);
|
|
2153
|
+
v.xs.push(p), v.ys.push(_), v.dips.push(p), v.azs.push(g);
|
|
2154
|
+
const k = g * Math.PI / 180, F = t * (Math.abs(p) / 90), T = Math.sin(k) * F, L = Math.cos(k) * F;
|
|
2155
|
+
m.push({
|
|
1840
2156
|
type: "line",
|
|
1841
|
-
x0:
|
|
1842
|
-
y0:
|
|
1843
|
-
x1:
|
|
1844
|
-
y1:
|
|
1845
|
-
line: { color:
|
|
2157
|
+
x0: p,
|
|
2158
|
+
y0: _,
|
|
2159
|
+
x1: p + T,
|
|
2160
|
+
y1: _ + L,
|
|
2161
|
+
line: { color: M, width: 2 }
|
|
1846
2162
|
});
|
|
1847
2163
|
}
|
|
1848
|
-
const
|
|
1849
|
-
for (const [
|
|
1850
|
-
|
|
2164
|
+
const d = [], f = n && c.size > 1;
|
|
2165
|
+
for (const [b, _] of c.entries())
|
|
2166
|
+
d.push({
|
|
1851
2167
|
type: "scatter",
|
|
1852
|
-
x:
|
|
1853
|
-
y:
|
|
2168
|
+
x: _.xs,
|
|
2169
|
+
y: _.ys,
|
|
1854
2170
|
mode: "markers",
|
|
1855
|
-
name:
|
|
1856
|
-
marker: { size: 8, color:
|
|
1857
|
-
showlegend:
|
|
1858
|
-
customdata:
|
|
2171
|
+
name: b !== "_default" ? String(b) : void 0,
|
|
2172
|
+
marker: { size: 8, color: _.color },
|
|
2173
|
+
showlegend: f && b !== "_default",
|
|
2174
|
+
customdata: _.dips.map((p, g) => [p, _.azs[g]]),
|
|
1859
2175
|
hovertemplate: "Depth: %{y}<br>Dip: %{customdata[0]}<br>Az: %{customdata[1]}<extra></extra>"
|
|
1860
2176
|
});
|
|
1861
|
-
return { data:
|
|
1862
|
-
shapes:
|
|
2177
|
+
return { data: d, layout: {
|
|
2178
|
+
shapes: m,
|
|
1863
2179
|
height: 400,
|
|
1864
2180
|
margin: { l: 40, r: 10, t: 10, b: 40 },
|
|
1865
2181
|
xaxis: {
|
|
@@ -1870,55 +2186,58 @@ function Jn(e, {
|
|
|
1870
2186
|
tickvals: [-90, -60, -30, 0, 30, 60, 90]
|
|
1871
2187
|
},
|
|
1872
2188
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1873
|
-
showlegend: !!
|
|
2189
|
+
showlegend: !!f,
|
|
2190
|
+
template: l !== void 0 ? l : Ce
|
|
1874
2191
|
} };
|
|
1875
2192
|
}
|
|
1876
|
-
function
|
|
2193
|
+
function Wo(e, {
|
|
1877
2194
|
labelCol: t = "structure_type",
|
|
1878
|
-
palette: n =
|
|
1879
|
-
fromCol: r =
|
|
1880
|
-
toCol: o =
|
|
2195
|
+
palette: n = Ot,
|
|
2196
|
+
fromCol: r = C,
|
|
2197
|
+
toCol: o = D,
|
|
2198
|
+
template: i = void 0
|
|
1881
2199
|
} = {}) {
|
|
1882
|
-
const
|
|
1883
|
-
const
|
|
1884
|
-
if (
|
|
1885
|
-
const
|
|
1886
|
-
return
|
|
1887
|
-
}).map((
|
|
1888
|
-
if (!
|
|
2200
|
+
const s = e.filter((d) => d[r] != null && d[o] != null && Number(d[o]) > Number(d[r])).filter((d) => {
|
|
2201
|
+
const f = d[t];
|
|
2202
|
+
if (f == null) return !1;
|
|
2203
|
+
const h = String(f).trim();
|
|
2204
|
+
return h !== "" && !/^(nan|null|none)$/i.test(h);
|
|
2205
|
+
}).map((d) => ({ from: Number(d[r]), to: Number(d[o]), label: String(d[t]).trim() })).sort((d, f) => d.from - f.from);
|
|
2206
|
+
if (!s.length)
|
|
1889
2207
|
return { data: [], layout: {} };
|
|
1890
|
-
const
|
|
1891
|
-
return
|
|
1892
|
-
|
|
2208
|
+
const l = [], u = [], a = [];
|
|
2209
|
+
return s.forEach((d, f) => {
|
|
2210
|
+
l.push({
|
|
1893
2211
|
type: "rect",
|
|
1894
2212
|
xref: "x",
|
|
1895
2213
|
yref: "y",
|
|
1896
2214
|
x0: 0,
|
|
1897
2215
|
x1: 1,
|
|
1898
|
-
y0:
|
|
1899
|
-
y1:
|
|
1900
|
-
fillcolor: n[
|
|
2216
|
+
y0: d.from,
|
|
2217
|
+
y1: d.to,
|
|
2218
|
+
fillcolor: n[f % n.length],
|
|
1901
2219
|
line: { width: 0 },
|
|
1902
2220
|
layer: "below"
|
|
1903
|
-
}),
|
|
2221
|
+
}), u.push(0.5 * (d.from + d.to)), a.push(d.label);
|
|
1904
2222
|
}), { data: [{
|
|
1905
2223
|
type: "scatter",
|
|
1906
|
-
x: Array(
|
|
1907
|
-
y:
|
|
2224
|
+
x: Array(a.length).fill(0.5),
|
|
2225
|
+
y: u,
|
|
1908
2226
|
mode: "text",
|
|
1909
|
-
text:
|
|
2227
|
+
text: a,
|
|
1910
2228
|
textposition: "middle center",
|
|
1911
2229
|
showlegend: !1,
|
|
1912
2230
|
hoverinfo: "text"
|
|
1913
2231
|
}], layout: Pt({
|
|
1914
|
-
shapes:
|
|
2232
|
+
shapes: l,
|
|
1915
2233
|
height: 400,
|
|
1916
2234
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1917
2235
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1918
|
-
showlegend: !1
|
|
2236
|
+
showlegend: !1,
|
|
2237
|
+
template: i !== void 0 ? i : Ce
|
|
1919
2238
|
}) };
|
|
1920
2239
|
}
|
|
1921
|
-
function
|
|
2240
|
+
function ht(e, t) {
|
|
1922
2241
|
if (!e) return "";
|
|
1923
2242
|
const n = String(e).trim().split(/\s+/), r = [];
|
|
1924
2243
|
let o = "";
|
|
@@ -1926,64 +2245,66 @@ function mt(e, t) {
|
|
|
1926
2245
|
o && o.length + 1 + i.length > t ? (r.push(o), o = i) : o = o ? `${o} ${i}` : i;
|
|
1927
2246
|
return o && r.push(o), r.join("<br>");
|
|
1928
2247
|
}
|
|
1929
|
-
function
|
|
2248
|
+
function or(e, {
|
|
1930
2249
|
commentCol: t = "comments",
|
|
1931
|
-
fromCol: n =
|
|
1932
|
-
toCol: r =
|
|
2250
|
+
fromCol: n = C,
|
|
2251
|
+
toCol: r = D,
|
|
1933
2252
|
bgColor: o = "#f1f5f9",
|
|
1934
2253
|
borderColor: i = "#cbd5e1",
|
|
1935
2254
|
textColor: s = "#1e293b",
|
|
1936
|
-
charsPerLine: l = 18
|
|
2255
|
+
charsPerLine: l = 18,
|
|
2256
|
+
template: u = void 0
|
|
1937
2257
|
} = {}) {
|
|
1938
|
-
const
|
|
1939
|
-
const
|
|
1940
|
-
return { from: Number(
|
|
1941
|
-
}).sort((
|
|
1942
|
-
if (!
|
|
2258
|
+
const a = e.filter((p) => p[n] != null && p[r] != null && Number(p[r]) > Number(p[n])).map((p) => {
|
|
2259
|
+
const g = p[t], E = g != null && String(g).trim() !== "" && String(g) !== "null" ? String(g).trim() : "";
|
|
2260
|
+
return { from: Number(p[n]), to: Number(p[r]), comment: E };
|
|
2261
|
+
}).sort((p, g) => p.from - g.from);
|
|
2262
|
+
if (!a.length)
|
|
1943
2263
|
return { data: [], layout: {} };
|
|
1944
|
-
const
|
|
1945
|
-
for (const
|
|
1946
|
-
const
|
|
1947
|
-
|
|
2264
|
+
const c = [], m = [], d = [], f = [], h = [];
|
|
2265
|
+
for (const p of a) {
|
|
2266
|
+
const g = 0.5 * (p.from + p.to), E = !!p.comment;
|
|
2267
|
+
c.push({
|
|
1948
2268
|
type: "rect",
|
|
1949
2269
|
xref: "x",
|
|
1950
2270
|
yref: "y",
|
|
1951
2271
|
x0: 0,
|
|
1952
2272
|
x1: 1,
|
|
1953
|
-
y0:
|
|
1954
|
-
y1:
|
|
1955
|
-
fillcolor:
|
|
2273
|
+
y0: p.from,
|
|
2274
|
+
y1: p.to,
|
|
2275
|
+
fillcolor: E ? o : "rgba(0,0,0,0)",
|
|
1956
2276
|
line: { color: i, width: 1 },
|
|
1957
2277
|
layer: "below"
|
|
1958
|
-
}),
|
|
2278
|
+
}), E && (m.push(0.5), d.push(g), f.push(ht(p.comment, l)), h.push(`${p.from.toFixed(3)}–${p.to.toFixed(3)} m<br>${ht(p.comment, 40)}`));
|
|
1959
2279
|
}
|
|
1960
|
-
return { data:
|
|
2280
|
+
return { data: m.length ? [{
|
|
1961
2281
|
type: "scatter",
|
|
1962
|
-
x:
|
|
1963
|
-
y:
|
|
2282
|
+
x: m,
|
|
2283
|
+
y: d,
|
|
1964
2284
|
mode: "text",
|
|
1965
|
-
text:
|
|
2285
|
+
text: f,
|
|
1966
2286
|
textposition: "middle center",
|
|
1967
2287
|
textfont: { color: s, size: 10 },
|
|
1968
|
-
hovertext:
|
|
2288
|
+
hovertext: h,
|
|
1969
2289
|
hoverinfo: "text",
|
|
1970
2290
|
showlegend: !1
|
|
1971
2291
|
}] : [], layout: Pt({
|
|
1972
|
-
shapes:
|
|
2292
|
+
shapes: c,
|
|
1973
2293
|
height: 400,
|
|
1974
2294
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1975
2295
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1976
|
-
showlegend: !1
|
|
2296
|
+
showlegend: !1,
|
|
2297
|
+
template: u !== void 0 ? u : Ce
|
|
1977
2298
|
}) };
|
|
1978
2299
|
}
|
|
1979
|
-
function
|
|
2300
|
+
function Zo(e, {
|
|
1980
2301
|
symbolSize: t = 10,
|
|
1981
2302
|
xCol: n = "easting",
|
|
1982
2303
|
yCol: r = "northing"
|
|
1983
2304
|
} = {}) {
|
|
1984
|
-
const o = e[n] != null ? Number(e[n]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[
|
|
2305
|
+
const o = e[n] != null ? Number(e[n]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[U] != null ? Number(e[U]) : null, l = e[G] != null ? Number(e[G]) : null;
|
|
1985
2306
|
if (o === null || i === null || s === null || l === null) return null;
|
|
1986
|
-
const u = (l - 90 + 360) % 360, a = u * Math.PI / 180, c = l * Math.PI / 180, m = t * Math.sin(a), d = t * Math.cos(a), f = t * 0.4 * (s / 90),
|
|
2307
|
+
const u = (l - 90 + 360) % 360, a = u * Math.PI / 180, c = l * Math.PI / 180, m = t * Math.sin(a), d = t * Math.cos(a), f = t * 0.4 * (s / 90), h = f * Math.sin(c), b = f * Math.cos(c);
|
|
1987
2308
|
return {
|
|
1988
2309
|
strike: u,
|
|
1989
2310
|
dipValue: s,
|
|
@@ -1993,109 +2314,110 @@ function Ho(e, {
|
|
|
1993
2314
|
strikeY0: i - d,
|
|
1994
2315
|
strikeX1: o + m,
|
|
1995
2316
|
strikeY1: i + d,
|
|
1996
|
-
tickX1: o +
|
|
2317
|
+
tickX1: o + h,
|
|
1997
2318
|
tickY1: i + b
|
|
1998
2319
|
};
|
|
1999
2320
|
}
|
|
2000
|
-
const
|
|
2001
|
-
function
|
|
2321
|
+
const Tt = "markers+line";
|
|
2322
|
+
function ir(e, t) {
|
|
2002
2323
|
var r;
|
|
2003
|
-
const n =
|
|
2004
|
-
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) ||
|
|
2005
|
-
}
|
|
2006
|
-
function
|
|
2007
|
-
const
|
|
2008
|
-
return
|
|
2009
|
-
const
|
|
2010
|
-
if (!
|
|
2011
|
-
const
|
|
2012
|
-
if (!
|
|
2013
|
-
let
|
|
2324
|
+
const n = Ke(e);
|
|
2325
|
+
return n.some((o) => o.value === t) ? t : ((r = n[0]) == null ? void 0 : r.value) || Tt;
|
|
2326
|
+
}
|
|
2327
|
+
function Ko({ config: e, graph: t, holeOptions: n = [], propertyOptions: r = [], onConfigChange: o, template: i }) {
|
|
2328
|
+
const s = _t(null), l = t == null ? void 0 : t.hole, u = (t == null ? void 0 : t.points) || [], a = (e == null ? void 0 : e.property) || "", c = (e == null ? void 0 : e.chartType) || Tt, m = (e == null ? void 0 : e.holeId) || "", d = (t == null ? void 0 : t.displayType) || (t != null && t.isComment ? Ae : t != null && t.isCategorical ? De : xe), f = Ke(d), h = ir(d, c), [b, _] = ee("");
|
|
2329
|
+
return fe(() => {
|
|
2330
|
+
const p = d === Ae, g = d === We;
|
|
2331
|
+
if (!l || !a || !p && !g && u.length === 0) return;
|
|
2332
|
+
const E = s.current;
|
|
2333
|
+
if (!E) return;
|
|
2334
|
+
let M;
|
|
2014
2335
|
try {
|
|
2015
|
-
|
|
2016
|
-
points:
|
|
2017
|
-
isCategorical:
|
|
2018
|
-
property:
|
|
2019
|
-
chartType:
|
|
2336
|
+
p ? M = or(u, { commentCol: a, fromCol: "from", toCol: "to" }) : g ? M = rr(u) : M = Lt({
|
|
2337
|
+
points: u,
|
|
2338
|
+
isCategorical: d === De,
|
|
2339
|
+
property: a,
|
|
2340
|
+
chartType: h,
|
|
2341
|
+
template: i
|
|
2020
2342
|
});
|
|
2021
|
-
} catch (
|
|
2022
|
-
console.error("Plot build error",
|
|
2343
|
+
} catch (k) {
|
|
2344
|
+
console.error("Plot build error", k), _((k == null ? void 0 : k.message) || "Plot build error");
|
|
2023
2345
|
return;
|
|
2024
2346
|
}
|
|
2025
|
-
if ((!(
|
|
2347
|
+
if ((!(M != null && M.data) || M.data.length === 0) && !p)
|
|
2026
2348
|
return;
|
|
2027
|
-
const
|
|
2349
|
+
const v = {
|
|
2028
2350
|
displayModeBar: !0,
|
|
2029
2351
|
responsive: !0,
|
|
2030
2352
|
useResizeHandler: !0,
|
|
2031
2353
|
modeBarButtonsToRemove: ["select2d", "lasso2d", "autoScale2d"]
|
|
2032
2354
|
};
|
|
2033
2355
|
try {
|
|
2034
|
-
|
|
2035
|
-
|
|
2356
|
+
_(""), Le.react(E, M.data, M.layout, v), requestAnimationFrame(() => {
|
|
2357
|
+
E && E.parentElement && Le.Plots.resize(E);
|
|
2036
2358
|
});
|
|
2037
|
-
} catch (
|
|
2038
|
-
console.error("Plot render error",
|
|
2359
|
+
} catch (k) {
|
|
2360
|
+
console.error("Plot render error", k), _((k == null ? void 0 : k.message) || "Plot render error");
|
|
2039
2361
|
}
|
|
2040
2362
|
return () => {
|
|
2041
|
-
if (
|
|
2363
|
+
if (E)
|
|
2042
2364
|
try {
|
|
2043
|
-
|
|
2044
|
-
} catch (
|
|
2045
|
-
console.warn("Plot purge error",
|
|
2365
|
+
Le.purge(E);
|
|
2366
|
+
} catch (k) {
|
|
2367
|
+
console.warn("Plot purge error", k);
|
|
2046
2368
|
}
|
|
2047
2369
|
};
|
|
2048
|
-
}, [
|
|
2049
|
-
const
|
|
2050
|
-
if (!
|
|
2051
|
-
const
|
|
2370
|
+
}, [l, a, h, d, u, i]), fe(() => {
|
|
2371
|
+
const p = s.current;
|
|
2372
|
+
if (!p || typeof ResizeObserver > "u") return;
|
|
2373
|
+
const g = new ResizeObserver(() => {
|
|
2052
2374
|
try {
|
|
2053
|
-
|
|
2054
|
-
} catch (
|
|
2055
|
-
console.warn("Plot resize error",
|
|
2375
|
+
p && p.data && Le.Plots.resize(p);
|
|
2376
|
+
} catch (E) {
|
|
2377
|
+
console.warn("Plot resize error", E);
|
|
2056
2378
|
}
|
|
2057
2379
|
});
|
|
2058
|
-
return
|
|
2059
|
-
}, []), !
|
|
2380
|
+
return g.observe(p), () => g.disconnect();
|
|
2381
|
+
}, []), !l || !a ? /* @__PURE__ */ $("div", { className: "plot-card empty", children: /* @__PURE__ */ $("div", { className: "placeholder", children: e != null && e.holeId ? t != null && t.loading ? `Loading ${e.holeId}...` : "Select a property" : "Loading demo data..." }) }) : d !== Ae && d !== We && u.length === 0 ? /* @__PURE__ */ $("div", { className: "plot-card empty", children: /* @__PURE__ */ $("div", { className: "placeholder", children: "No data" }) }) : b ? /* @__PURE__ */ $("div", { className: "plot-card empty", children: /* @__PURE__ */ te("div", { className: "placeholder", children: [
|
|
2060
2382
|
"Plot error: ",
|
|
2061
|
-
|
|
2062
|
-
] }) }) : /* @__PURE__ */
|
|
2063
|
-
/* @__PURE__ */
|
|
2383
|
+
b
|
|
2384
|
+
] }) }) : /* @__PURE__ */ te("div", { className: "plot-card", children: [
|
|
2385
|
+
/* @__PURE__ */ $("div", { className: "plot-title", children: /* @__PURE__ */ $(
|
|
2064
2386
|
"select",
|
|
2065
2387
|
{
|
|
2066
2388
|
className: "plot-select",
|
|
2067
|
-
value:
|
|
2068
|
-
onChange: (
|
|
2069
|
-
children: n.map((
|
|
2070
|
-
const
|
|
2071
|
-
return /* @__PURE__ */
|
|
2389
|
+
value: m,
|
|
2390
|
+
onChange: (p) => o && o({ holeId: p.target.value }),
|
|
2391
|
+
children: n.map((p) => {
|
|
2392
|
+
const g = typeof p == "string" ? p : p.holeId, E = typeof p == "string" ? p : p.label || p.holeId;
|
|
2393
|
+
return /* @__PURE__ */ $("option", { value: g, children: E }, g);
|
|
2072
2394
|
})
|
|
2073
2395
|
}
|
|
2074
2396
|
) }),
|
|
2075
|
-
/* @__PURE__ */
|
|
2076
|
-
r.length > 0 && /* @__PURE__ */
|
|
2397
|
+
/* @__PURE__ */ te("div", { className: "plot-controls column", children: [
|
|
2398
|
+
r.length > 0 && /* @__PURE__ */ $(
|
|
2077
2399
|
"select",
|
|
2078
2400
|
{
|
|
2079
2401
|
className: "plot-select",
|
|
2080
|
-
value:
|
|
2081
|
-
onChange: (
|
|
2082
|
-
children: r.map((
|
|
2402
|
+
value: a,
|
|
2403
|
+
onChange: (p) => o && o({ property: p.target.value }),
|
|
2404
|
+
children: r.map((p) => /* @__PURE__ */ $("option", { value: p, children: p }, p))
|
|
2083
2405
|
}
|
|
2084
2406
|
),
|
|
2085
|
-
|
|
2407
|
+
f.length > 1 && /* @__PURE__ */ $(
|
|
2086
2408
|
"select",
|
|
2087
2409
|
{
|
|
2088
2410
|
className: "plot-select",
|
|
2089
|
-
value:
|
|
2090
|
-
onChange: (
|
|
2091
|
-
children:
|
|
2411
|
+
value: h,
|
|
2412
|
+
onChange: (p) => o && o({ chartType: p.target.value }),
|
|
2413
|
+
children: f.map((p) => /* @__PURE__ */ $("option", { value: p.value, children: p.label }, p.value))
|
|
2092
2414
|
}
|
|
2093
2415
|
)
|
|
2094
2416
|
] }),
|
|
2095
|
-
/* @__PURE__ */
|
|
2417
|
+
/* @__PURE__ */ $("div", { className: "plotly-chart", ref: s })
|
|
2096
2418
|
] });
|
|
2097
2419
|
}
|
|
2098
|
-
function
|
|
2420
|
+
function pt(e, t) {
|
|
2099
2421
|
if (!(t != null && t.length)) return e;
|
|
2100
2422
|
const n = new Map(e.map((r) => [r.id || r.holeId, { ...r }]));
|
|
2101
2423
|
for (const r of t) {
|
|
@@ -2109,7 +2431,7 @@ function dt(e, t) {
|
|
|
2109
2431
|
}
|
|
2110
2432
|
return Array.from(n.values());
|
|
2111
2433
|
}
|
|
2112
|
-
function
|
|
2434
|
+
function sr(e, t) {
|
|
2113
2435
|
if (!e || !t) return [];
|
|
2114
2436
|
const n = /* @__PURE__ */ new Set(), r = [];
|
|
2115
2437
|
for (const o of e.points || []) {
|
|
@@ -2120,146 +2442,146 @@ function tr(e, t) {
|
|
|
2120
2442
|
}
|
|
2121
2443
|
return r;
|
|
2122
2444
|
}
|
|
2123
|
-
function
|
|
2445
|
+
function Jo({
|
|
2124
2446
|
initialFocusedHoleId: e = "",
|
|
2125
2447
|
sourceFile: t = null,
|
|
2126
2448
|
extraHoles: n = [],
|
|
2127
2449
|
plotCount: r = 4
|
|
2128
2450
|
} = {}) {
|
|
2129
|
-
const [o, i] =
|
|
2130
|
-
|
|
2131
|
-
!t ||
|
|
2132
|
-
if (!
|
|
2133
|
-
const
|
|
2134
|
-
l(
|
|
2135
|
-
holeIds:
|
|
2136
|
-
focusedHoleId:
|
|
2451
|
+
const [o, i] = ee([]), [s, l] = ee([]), [u, a] = ee([]), [c, m] = ee([]), [d, f] = ee([]), [h, b] = ee({}), [_, p] = ee(""), [g, E] = ee([]), [M, v] = ee(""), [k, F] = ee(e || ""), [T, L] = ee([]), Y = _t(null);
|
|
2452
|
+
fe(() => {
|
|
2453
|
+
!t || Y.current === t || (Y.current = t, yn(t).then((I) => {
|
|
2454
|
+
if (!I) return;
|
|
2455
|
+
const A = Array.from(new Map(I.map((N) => [N.holeId, N])).values());
|
|
2456
|
+
l(A), E(It({
|
|
2457
|
+
holeIds: A.map((N) => N.holeId),
|
|
2458
|
+
focusedHoleId: k,
|
|
2137
2459
|
plotCount: r,
|
|
2138
2460
|
defaultProp: "",
|
|
2139
2461
|
categoricalProps: c,
|
|
2140
2462
|
commentProps: d,
|
|
2141
2463
|
numericDefaultChartType: "markers+line"
|
|
2142
2464
|
}));
|
|
2143
|
-
}).catch((
|
|
2144
|
-
console.info("Assay metadata load skipped:",
|
|
2465
|
+
}).catch((I) => {
|
|
2466
|
+
console.info("Assay metadata load skipped:", I.message);
|
|
2145
2467
|
}));
|
|
2146
|
-
}, [t,
|
|
2468
|
+
}, [t, k, r, c, d]), fe(() => {
|
|
2147
2469
|
if (!(n != null && n.length)) return;
|
|
2148
|
-
const
|
|
2149
|
-
l((
|
|
2150
|
-
const
|
|
2151
|
-
return
|
|
2470
|
+
const I = n.map((A) => ({ holeId: A.id || A.holeId })).filter((A) => A.holeId);
|
|
2471
|
+
l((A) => {
|
|
2472
|
+
const N = new Set(A.map((x) => x.holeId)), O = I.filter((x) => !N.has(x.holeId));
|
|
2473
|
+
return O.length ? [...A, ...O] : A;
|
|
2152
2474
|
});
|
|
2153
|
-
}, [n]),
|
|
2154
|
-
|
|
2155
|
-
}, [g]),
|
|
2475
|
+
}, [n]), fe(() => {
|
|
2476
|
+
v((I) => I && I.startsWith("Loading ") && I.includes(" for hole ") ? I : "");
|
|
2477
|
+
}, [g]), fe(() => {
|
|
2156
2478
|
if (!s.length) {
|
|
2157
|
-
|
|
2479
|
+
E([]);
|
|
2158
2480
|
return;
|
|
2159
2481
|
}
|
|
2160
|
-
const
|
|
2161
|
-
|
|
2162
|
-
var
|
|
2163
|
-
const
|
|
2164
|
-
property:
|
|
2165
|
-
chartType:
|
|
2482
|
+
const I = xt(s.map((A) => A.holeId), k);
|
|
2483
|
+
E((A) => Array.from({ length: r }).map((O, x) => {
|
|
2484
|
+
var K;
|
|
2485
|
+
const V = A[x] || {}, H = s.some((ie) => ie.holeId === V.holeId) ? V.holeId : I[x] || ((K = s[x]) == null ? void 0 : K.holeId) || "", B = V.property || _, X = Pe({
|
|
2486
|
+
property: B,
|
|
2487
|
+
chartType: V.chartType,
|
|
2166
2488
|
categoricalProps: c,
|
|
2167
2489
|
commentProps: d,
|
|
2168
2490
|
numericDefaultChartType: "markers+line"
|
|
2169
2491
|
});
|
|
2170
|
-
return { holeId:
|
|
2492
|
+
return { holeId: H, property: B, chartType: X };
|
|
2171
2493
|
}));
|
|
2172
|
-
}, [s,
|
|
2494
|
+
}, [s, k, _, c, d, r]), fe(() => {
|
|
2173
2495
|
if (!t) return;
|
|
2174
|
-
g.map((
|
|
2175
|
-
const
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
const
|
|
2179
|
-
[
|
|
2496
|
+
g.map((A) => A.holeId).filter(Boolean).forEach((A) => {
|
|
2497
|
+
const N = o.some((x) => (x.id || x.holeId) === A), O = T.includes(A);
|
|
2498
|
+
N || O || (L((x) => [...x, A]), _n(t, A).then((x) => {
|
|
2499
|
+
L((V) => V.filter((H) => H !== A)), x && i((V) => {
|
|
2500
|
+
const H = pt(
|
|
2501
|
+
[...V.filter((X) => (X.id || X.holeId) !== A), x],
|
|
2180
2502
|
n
|
|
2181
|
-
),
|
|
2182
|
-
return a(
|
|
2183
|
-
...
|
|
2184
|
-
property:
|
|
2503
|
+
), B = we(H);
|
|
2504
|
+
return a(B.numericProps), m(B.categoricalProps), f(B.commentProps), b(B.columnMeta), !_ && B.defaultProp && (p(B.defaultProp), E((X) => X.map((K) => ({
|
|
2505
|
+
...K,
|
|
2506
|
+
property: K.property || B.defaultProp,
|
|
2185
2507
|
chartType: Pe({
|
|
2186
|
-
property:
|
|
2187
|
-
chartType:
|
|
2188
|
-
categoricalProps:
|
|
2189
|
-
commentProps:
|
|
2508
|
+
property: K.property || B.defaultProp,
|
|
2509
|
+
chartType: K.chartType,
|
|
2510
|
+
categoricalProps: B.categoricalProps,
|
|
2511
|
+
commentProps: B.commentProps,
|
|
2190
2512
|
numericDefaultChartType: "markers+line"
|
|
2191
2513
|
})
|
|
2192
|
-
})))),
|
|
2514
|
+
})))), H;
|
|
2193
2515
|
});
|
|
2194
|
-
}).catch((
|
|
2195
|
-
console.error(
|
|
2516
|
+
}).catch((x) => {
|
|
2517
|
+
console.error(x), L((V) => V.filter((H) => H !== A)), v(x.message || `Error loading hole ${A}`);
|
|
2196
2518
|
}));
|
|
2197
2519
|
});
|
|
2198
|
-
}, [g, t, o,
|
|
2199
|
-
n != null && n.length && i((
|
|
2200
|
-
if (!
|
|
2201
|
-
const
|
|
2202
|
-
return a(
|
|
2520
|
+
}, [g, t, o, T, _, n]), fe(() => {
|
|
2521
|
+
n != null && n.length && i((I) => {
|
|
2522
|
+
if (!I.length) {
|
|
2523
|
+
const O = we(n);
|
|
2524
|
+
return a(O.numericProps), m(O.categoricalProps), f(O.commentProps), b(O.columnMeta), !_ && O.defaultProp && p(O.defaultProp), n;
|
|
2203
2525
|
}
|
|
2204
|
-
const
|
|
2205
|
-
return a(
|
|
2526
|
+
const A = pt(I, n), N = we(A);
|
|
2527
|
+
return a(N.numericProps), m(N.categoricalProps), f(N.commentProps), b(N.columnMeta), !_ && N.defaultProp && p(N.defaultProp), A;
|
|
2206
2528
|
});
|
|
2207
2529
|
}, [n]);
|
|
2208
|
-
const
|
|
2530
|
+
const Z = Re(
|
|
2209
2531
|
() => [...u, ...c, ...d],
|
|
2210
2532
|
[u, c, d]
|
|
2211
|
-
),
|
|
2212
|
-
() => s.map((
|
|
2533
|
+
), w = Re(
|
|
2534
|
+
() => s.map((I) => ({ holeId: I.holeId, label: I.holeId })).sort((I, A) => I.label.localeCompare(A.label)),
|
|
2213
2535
|
[s]
|
|
2214
|
-
),
|
|
2215
|
-
const
|
|
2216
|
-
return Array.from({ length: r }).map((
|
|
2217
|
-
const
|
|
2218
|
-
let
|
|
2219
|
-
|
|
2220
|
-
const
|
|
2536
|
+
), q = Re(() => {
|
|
2537
|
+
const I = [...u, ...c, ...d];
|
|
2538
|
+
return Array.from({ length: r }).map((A, N) => {
|
|
2539
|
+
const O = g[N] || {}, x = o.find((me) => (me.id || me.holeId) === O.holeId) || null, V = x ? I.filter((me) => Jn(x, me)) : I;
|
|
2540
|
+
let H = O.property || _;
|
|
2541
|
+
x && !V.includes(H) && (H = V[0] || H);
|
|
2542
|
+
const B = d.includes(H), X = !B && c.includes(H), K = !B && !X && H === "dip", ie = B ? "comment" : K ? "tadpole" : X ? "categorical" : "numeric", ge = K ? "tadpole" : O.chartType || (B ? "comment" : X ? "categorical" : "markers+line"), de = O.holeId || (x == null ? void 0 : x.id) || (x == null ? void 0 : x.holeId) || "", ve = K ? (x == null ? void 0 : x.points) || [] : B ? sr(x, H) : Qn(x, H, X);
|
|
2221
2543
|
return {
|
|
2222
|
-
config: { holeId:
|
|
2223
|
-
hole:
|
|
2224
|
-
loading:
|
|
2225
|
-
isCategorical:
|
|
2226
|
-
isComment:
|
|
2227
|
-
isTadpole:
|
|
2228
|
-
displayType:
|
|
2229
|
-
points:
|
|
2230
|
-
propertyOptions:
|
|
2231
|
-
label:
|
|
2544
|
+
config: { holeId: de, property: H, chartType: ge },
|
|
2545
|
+
hole: x,
|
|
2546
|
+
loading: T.includes(O.holeId),
|
|
2547
|
+
isCategorical: X,
|
|
2548
|
+
isComment: B,
|
|
2549
|
+
isTadpole: K,
|
|
2550
|
+
displayType: ie,
|
|
2551
|
+
points: ve,
|
|
2552
|
+
propertyOptions: V,
|
|
2553
|
+
label: de
|
|
2232
2554
|
};
|
|
2233
2555
|
});
|
|
2234
|
-
}, [g, o,
|
|
2235
|
-
|
|
2236
|
-
const
|
|
2237
|
-
return
|
|
2238
|
-
property:
|
|
2239
|
-
chartType:
|
|
2556
|
+
}, [g, o, _, c, d, T, r, u]), R = (I, A) => {
|
|
2557
|
+
E((N) => {
|
|
2558
|
+
const O = [...N], V = { ...O[I] || {}, ...A };
|
|
2559
|
+
return A.property && (V.chartType = Pe({
|
|
2560
|
+
property: A.property,
|
|
2561
|
+
chartType: V.chartType,
|
|
2240
2562
|
categoricalProps: c,
|
|
2241
2563
|
commentProps: d,
|
|
2242
2564
|
numericDefaultChartType: "markers+line"
|
|
2243
|
-
})),
|
|
2565
|
+
})), O[I] = V, O;
|
|
2244
2566
|
});
|
|
2245
2567
|
};
|
|
2246
2568
|
return {
|
|
2247
2569
|
error: M,
|
|
2248
|
-
focusedHoleId:
|
|
2249
|
-
setFocusedHoleId:
|
|
2250
|
-
setError:
|
|
2570
|
+
focusedHoleId: k,
|
|
2571
|
+
setFocusedHoleId: F,
|
|
2572
|
+
setError: v,
|
|
2251
2573
|
holeCount: s.length,
|
|
2252
2574
|
numericProps: u,
|
|
2253
2575
|
categoricalProps: c,
|
|
2254
2576
|
commentProps: d,
|
|
2255
|
-
columnMeta:
|
|
2256
|
-
propertyOptions:
|
|
2257
|
-
labeledHoleOptions:
|
|
2258
|
-
traceGraphs:
|
|
2259
|
-
handleConfigChange:
|
|
2577
|
+
columnMeta: h,
|
|
2578
|
+
propertyOptions: Z,
|
|
2579
|
+
labeledHoleOptions: w,
|
|
2580
|
+
traceGraphs: q,
|
|
2581
|
+
handleConfigChange: R
|
|
2260
2582
|
};
|
|
2261
2583
|
}
|
|
2262
|
-
const
|
|
2584
|
+
const lr = [
|
|
2263
2585
|
"#313695",
|
|
2264
2586
|
"#4575b4",
|
|
2265
2587
|
"#74add1",
|
|
@@ -2271,7 +2593,7 @@ const nr = [
|
|
|
2271
2593
|
"#d73027",
|
|
2272
2594
|
"#a50026"
|
|
2273
2595
|
];
|
|
2274
|
-
function
|
|
2596
|
+
function ar(e = [], t = lr) {
|
|
2275
2597
|
const n = e.filter((a) => Number.isFinite(a));
|
|
2276
2598
|
if (!n.length)
|
|
2277
2599
|
return {
|
|
@@ -2298,12 +2620,12 @@ function rr(e = [], t = nr) {
|
|
|
2298
2620
|
};
|
|
2299
2621
|
}
|
|
2300
2622
|
const l = t.map((a, c) => {
|
|
2301
|
-
const m = c / s, d = (c + 1) / s, f = Math.floor(m * r.length),
|
|
2623
|
+
const m = c / s, d = (c + 1) / s, f = Math.floor(m * r.length), h = Math.min(r.length - 1, Math.floor(d * r.length)), b = r[f], _ = c === s - 1 ? i : r[h];
|
|
2302
2624
|
return {
|
|
2303
2625
|
index: c,
|
|
2304
2626
|
min: b,
|
|
2305
|
-
max:
|
|
2306
|
-
label:
|
|
2627
|
+
max: _,
|
|
2628
|
+
label: cr(b, _)
|
|
2307
2629
|
};
|
|
2308
2630
|
}), u = (i - o) / s;
|
|
2309
2631
|
return {
|
|
@@ -2314,11 +2636,11 @@ function rr(e = [], t = nr) {
|
|
|
2314
2636
|
colors: t
|
|
2315
2637
|
};
|
|
2316
2638
|
}
|
|
2317
|
-
function
|
|
2639
|
+
function cr(e, t) {
|
|
2318
2640
|
const n = (r) => Number.isFinite(r) ? Math.abs(r) >= 1e3 ? r.toFixed(0) : Math.abs(r) >= 10 ? r.toFixed(1) : Math.abs(r) >= 0.1 ? r.toFixed(2) : r.toFixed(3) : "n/a";
|
|
2319
2641
|
return `${n(e)} – ${n(t)}`;
|
|
2320
2642
|
}
|
|
2321
|
-
function
|
|
2643
|
+
function wt(e, t) {
|
|
2322
2644
|
if (!Number.isFinite(e) || !t || !Array.isArray(t.bins) || !t.bins.length)
|
|
2323
2645
|
return -1;
|
|
2324
2646
|
if (t.max === t.min)
|
|
@@ -2330,28 +2652,28 @@ function kt(e, t) {
|
|
|
2330
2652
|
}
|
|
2331
2653
|
return -1;
|
|
2332
2654
|
}
|
|
2333
|
-
function
|
|
2334
|
-
const r =
|
|
2655
|
+
function ur(e, t, n = "#8b1e3f") {
|
|
2656
|
+
const r = wt(e, t);
|
|
2335
2657
|
return r < 0 ? n : t.colors[r] || n;
|
|
2336
2658
|
}
|
|
2337
|
-
function
|
|
2659
|
+
function Bt(e) {
|
|
2338
2660
|
return Array.isArray(e) ? e : [];
|
|
2339
2661
|
}
|
|
2340
|
-
function
|
|
2662
|
+
function Ye(e) {
|
|
2341
2663
|
const t = Number(e);
|
|
2342
2664
|
return Number.isFinite(t) ? t : void 0;
|
|
2343
2665
|
}
|
|
2344
|
-
function
|
|
2666
|
+
function $t(e = {}) {
|
|
2345
2667
|
return {
|
|
2346
2668
|
...e,
|
|
2347
|
-
x:
|
|
2348
|
-
y:
|
|
2349
|
-
z:
|
|
2669
|
+
x: Ye(e.x),
|
|
2670
|
+
y: Ye(e.y),
|
|
2671
|
+
z: Ye(e.z)
|
|
2350
2672
|
};
|
|
2351
2673
|
}
|
|
2352
|
-
function
|
|
2674
|
+
function dr(e = [], t = [0, 0], n = 0) {
|
|
2353
2675
|
const [r, o] = t, i = Number(n) * Math.PI / 180, s = Math.cos(i), l = Math.sin(i);
|
|
2354
|
-
return
|
|
2676
|
+
return Bt(e).map($t).map((u) => {
|
|
2355
2677
|
if (!Number.isFinite(u.x) || !Number.isFinite(u.y)) return { ...u };
|
|
2356
2678
|
const a = u.x - r, c = u.y - o;
|
|
2357
2679
|
return {
|
|
@@ -2361,12 +2683,12 @@ function sr(e = [], t = [0, 0], n = 0) {
|
|
|
2361
2683
|
};
|
|
2362
2684
|
});
|
|
2363
2685
|
}
|
|
2364
|
-
function
|
|
2365
|
-
const o =
|
|
2686
|
+
function mr(e = [], t = [0, 0], n = 0, r = 50) {
|
|
2687
|
+
const o = dr(e, t, n), i = 0.5 * Number(r || 0);
|
|
2366
2688
|
return !Number.isFinite(i) || i <= 0 ? o : o.filter((s) => Number.isFinite(s.across) && Math.abs(s.across) <= i);
|
|
2367
2689
|
}
|
|
2368
|
-
function
|
|
2369
|
-
let r =
|
|
2690
|
+
function Qo(e = [], t = null, n = null) {
|
|
2691
|
+
let r = Bt(e).map($t);
|
|
2370
2692
|
if (Array.isArray(t) && t.length === 2) {
|
|
2371
2693
|
const [o, i] = t;
|
|
2372
2694
|
r = r.filter((s) => Number.isFinite(s.z) && s.z <= Number(o) && s.z >= Number(i));
|
|
@@ -2376,46 +2698,46 @@ function Go(e = [], t = null, n = null) {
|
|
|
2376
2698
|
color_value: o == null ? void 0 : o[n]
|
|
2377
2699
|
}))), r;
|
|
2378
2700
|
}
|
|
2379
|
-
function
|
|
2380
|
-
let i =
|
|
2701
|
+
function ei(e = [], t = [0, 0], n = 0, r = 50, o = null) {
|
|
2702
|
+
let i = mr(e, t, n, r);
|
|
2381
2703
|
return o && (i = i.map((s) => ({
|
|
2382
2704
|
...s,
|
|
2383
2705
|
color_value: s == null ? void 0 : s[o]
|
|
2384
2706
|
}))), i;
|
|
2385
2707
|
}
|
|
2386
|
-
function
|
|
2708
|
+
function et(e) {
|
|
2387
2709
|
return Array.isArray(e) ? e : [];
|
|
2388
2710
|
}
|
|
2389
|
-
function
|
|
2711
|
+
function tt(e = {}) {
|
|
2390
2712
|
return e.hole_id ?? e.holeId ?? e.id;
|
|
2391
2713
|
}
|
|
2392
|
-
function
|
|
2714
|
+
function _e(e, t = void 0) {
|
|
2393
2715
|
const n = Number(e);
|
|
2394
2716
|
return Number.isFinite(n) ? n : t;
|
|
2395
2717
|
}
|
|
2396
|
-
function
|
|
2718
|
+
function ti(e = [], t = null) {
|
|
2397
2719
|
const n = /* @__PURE__ */ new Map();
|
|
2398
|
-
|
|
2399
|
-
const i =
|
|
2720
|
+
et(e).forEach((o) => {
|
|
2721
|
+
const i = tt(o);
|
|
2400
2722
|
if (i == null || `${i}`.trim() === "") return;
|
|
2401
2723
|
const s = `${i}`;
|
|
2402
2724
|
n.has(s) || n.set(s, []), n.get(s).push(o);
|
|
2403
2725
|
});
|
|
2404
2726
|
const r = [];
|
|
2405
2727
|
return n.forEach((o, i) => {
|
|
2406
|
-
const s = [...o].sort((u, a) =>
|
|
2728
|
+
const s = [...o].sort((u, a) => _e(u.md, 0) - _e(a.md, 0)), l = {
|
|
2407
2729
|
hole_id: i,
|
|
2408
|
-
x: s.map((u) =>
|
|
2409
|
-
y: s.map((u) =>
|
|
2410
|
-
z: s.map((u) =>
|
|
2730
|
+
x: s.map((u) => _e(u.x, 0)),
|
|
2731
|
+
y: s.map((u) => _e(u.y, 0)),
|
|
2732
|
+
z: s.map((u) => _e(u.z, 0)),
|
|
2411
2733
|
color: null
|
|
2412
2734
|
};
|
|
2413
2735
|
t && (l.color = s.map((u) => u == null ? void 0 : u[t])), r.push(l);
|
|
2414
2736
|
}), r;
|
|
2415
2737
|
}
|
|
2416
|
-
function
|
|
2417
|
-
return
|
|
2418
|
-
hole_id:
|
|
2738
|
+
function ni(e = [], t = 1, n = null) {
|
|
2739
|
+
return et(e).map((r) => ({
|
|
2740
|
+
hole_id: tt(r),
|
|
2419
2741
|
from: r == null ? void 0 : r.from,
|
|
2420
2742
|
to: r == null ? void 0 : r.to,
|
|
2421
2743
|
radius: t,
|
|
@@ -2423,21 +2745,21 @@ function qo(e = [], t = 1, n = null) {
|
|
|
2423
2745
|
value: n ? r == null ? void 0 : r[n] : null
|
|
2424
2746
|
}));
|
|
2425
2747
|
}
|
|
2426
|
-
function
|
|
2427
|
-
return t ?
|
|
2428
|
-
hole_id:
|
|
2748
|
+
function ri(e = [], t = null) {
|
|
2749
|
+
return t ? et(e).filter((n) => Object.prototype.hasOwnProperty.call(n || {}, t)).map((n) => ({
|
|
2750
|
+
hole_id: tt(n),
|
|
2429
2751
|
label: n == null ? void 0 : n[t],
|
|
2430
|
-
depth: 0.5 * (
|
|
2752
|
+
depth: 0.5 * (_e(n == null ? void 0 : n.from, 0) + _e(n == null ? void 0 : n.to, 0))
|
|
2431
2753
|
})) : [];
|
|
2432
2754
|
}
|
|
2433
|
-
function
|
|
2755
|
+
function Ne(e) {
|
|
2434
2756
|
e.selectables = [
|
|
2435
2757
|
...e.blocks,
|
|
2436
2758
|
...e.drillMeshes,
|
|
2437
2759
|
...e.structuralMeshes
|
|
2438
2760
|
];
|
|
2439
2761
|
}
|
|
2440
|
-
const
|
|
2762
|
+
const fr = {
|
|
2441
2763
|
bedding: "#2563eb",
|
|
2442
2764
|
foliation: "#16a34a",
|
|
2443
2765
|
joint: "#9333ea",
|
|
@@ -2446,11 +2768,11 @@ const ar = {
|
|
|
2446
2768
|
"shear zone": "#0ea5e9",
|
|
2447
2769
|
"fault zone": "#ef4444"
|
|
2448
2770
|
};
|
|
2449
|
-
function
|
|
2450
|
-
const n = t ||
|
|
2771
|
+
function hr(e, t) {
|
|
2772
|
+
const n = t || fr, r = (e || "").toLowerCase().trim(), o = n[r] || "#888888";
|
|
2451
2773
|
return new y.Color(o).getHex();
|
|
2452
2774
|
}
|
|
2453
|
-
function
|
|
2775
|
+
function pr(e, t) {
|
|
2454
2776
|
const n = e * Math.PI / 180, r = t * Math.PI / 180;
|
|
2455
2777
|
return new y.Vector3(
|
|
2456
2778
|
Math.sin(r) * Math.sin(n),
|
|
@@ -2461,7 +2783,7 @@ function ur(e, t) {
|
|
|
2461
2783
|
// Up component
|
|
2462
2784
|
).normalize();
|
|
2463
2785
|
}
|
|
2464
|
-
function
|
|
2786
|
+
function br(e, t = {}) {
|
|
2465
2787
|
const {
|
|
2466
2788
|
radius: n = 5,
|
|
2467
2789
|
discThickness: r = 0.2,
|
|
@@ -2472,34 +2794,34 @@ function mr(e, t = {}) {
|
|
|
2472
2794
|
for (const a of e) {
|
|
2473
2795
|
const c = a.x != null ? a.x : a.easting != null ? a.easting : null, m = a.y != null ? a.y : a.northing != null ? a.northing : null, d = a.z != null ? a.z : a.elevation != null ? a.elevation : null;
|
|
2474
2796
|
if (c == null || m == null || d == null || !Number.isFinite(c) || !Number.isFinite(m) || !Number.isFinite(d)) continue;
|
|
2475
|
-
const f = a[
|
|
2797
|
+
const f = a[U] != null ? Number(a[U]) : null, h = a[G] != null ? Number(a[G]) : null;
|
|
2476
2798
|
let b;
|
|
2477
2799
|
if (a.nx != null && Number.isFinite(a.nx) && a.ny != null && Number.isFinite(a.ny) && a.nz != null && Number.isFinite(a.nz))
|
|
2478
2800
|
b = new y.Vector3(a.nx, a.ny, a.nz).normalize();
|
|
2479
2801
|
else {
|
|
2480
|
-
if (f == null ||
|
|
2481
|
-
b =
|
|
2802
|
+
if (f == null || h == null || !Number.isFinite(f) || !Number.isFinite(h)) continue;
|
|
2803
|
+
b = pr(f, h);
|
|
2482
2804
|
}
|
|
2483
|
-
const
|
|
2484
|
-
color:
|
|
2805
|
+
const _ = new y.CylinderGeometry(n, n, r, i, 1, !1), p = new y.MeshStandardMaterial({
|
|
2806
|
+
color: hr(a.structure_type, s),
|
|
2485
2807
|
transparent: !0,
|
|
2486
2808
|
opacity: o,
|
|
2487
2809
|
side: y.DoubleSide
|
|
2488
|
-
}), g = new y.Mesh(
|
|
2810
|
+
}), g = new y.Mesh(_, p);
|
|
2489
2811
|
g.position.set(c, m, d), g.quaternion.setFromUnitVectors(u, b), g.userData = {
|
|
2490
2812
|
type: "structure",
|
|
2491
2813
|
hole_id: a.hole_id,
|
|
2492
2814
|
depth: a.depth ?? a.mid,
|
|
2493
2815
|
structure_type: a.structure_type,
|
|
2494
2816
|
dip: f,
|
|
2495
|
-
azimuth:
|
|
2817
|
+
azimuth: h,
|
|
2496
2818
|
comments: a.comments
|
|
2497
2819
|
}, l.add(g);
|
|
2498
2820
|
}
|
|
2499
2821
|
return l;
|
|
2500
2822
|
}
|
|
2501
|
-
function
|
|
2502
|
-
if (!e.scene || (
|
|
2823
|
+
function gr(e, t, n, r = {}) {
|
|
2824
|
+
if (!e.scene || (Vt(e), !(t != null && t.length) || !(n != null && n.length))) return;
|
|
2503
2825
|
const { maxDiscs: o = 3e3 } = r;
|
|
2504
2826
|
let i = t;
|
|
2505
2827
|
if (i.length > o) {
|
|
@@ -2508,20 +2830,20 @@ function dr(e, t, n, r = {}) {
|
|
|
2508
2830
|
a.push(i[Math.floor(c * u)]);
|
|
2509
2831
|
i = a;
|
|
2510
2832
|
}
|
|
2511
|
-
const s = n.flatMap((u) => (u.points || []).map((a) => ({ ...a, hole_id: u.id }))), l =
|
|
2512
|
-
l.length && (e.structuralGroup =
|
|
2833
|
+
const s = n.flatMap((u) => (u.points || []).map((a) => ({ ...a, hole_id: u.id }))), l = Vn(i, s, r);
|
|
2834
|
+
l.length && (e.structuralGroup = br(l, r), e.scene.add(e.structuralGroup), e.structuralGroup.traverse((u) => {
|
|
2513
2835
|
u.isMesh && e.structuralMeshes.push(u);
|
|
2514
|
-
}),
|
|
2836
|
+
}), Ne(e));
|
|
2515
2837
|
}
|
|
2516
|
-
function
|
|
2838
|
+
function Vt(e) {
|
|
2517
2839
|
e.structuralGroup && (e.scene.remove(e.structuralGroup), e.structuralGroup.traverse((t) => {
|
|
2518
2840
|
t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
2519
|
-
}), e.structuralGroup = null), e.structuralMeshes = [],
|
|
2841
|
+
}), e.structuralGroup = null), e.structuralMeshes = [], Ne(e);
|
|
2520
2842
|
}
|
|
2521
|
-
function
|
|
2843
|
+
function yr(e, t) {
|
|
2522
2844
|
e.structuralGroup && (e.structuralGroup.visible = !!t);
|
|
2523
2845
|
}
|
|
2524
|
-
function
|
|
2846
|
+
function nt(e) {
|
|
2525
2847
|
var n, r, o, i, s, l, u, a, c;
|
|
2526
2848
|
if (!e) return "";
|
|
2527
2849
|
const t = (m) => Number.isFinite(m) ? m.toFixed(3) : "nan";
|
|
@@ -2537,7 +2859,7 @@ function Qe(e) {
|
|
|
2537
2859
|
t((c = e.up) == null ? void 0 : c.z)
|
|
2538
2860
|
].join("|");
|
|
2539
2861
|
}
|
|
2540
|
-
function
|
|
2862
|
+
function Ht(e) {
|
|
2541
2863
|
return !e.camera || !e.controls ? null : {
|
|
2542
2864
|
camera: {
|
|
2543
2865
|
x: e.camera.position.x,
|
|
@@ -2556,37 +2878,37 @@ function $t(e) {
|
|
|
2556
2878
|
}
|
|
2557
2879
|
};
|
|
2558
2880
|
}
|
|
2559
|
-
function
|
|
2881
|
+
function _r(e, t) {
|
|
2560
2882
|
if (!e.camera || !e.controls || !t) return !1;
|
|
2561
2883
|
const n = t.camera || {}, r = t.target || {}, o = t.up || {};
|
|
2562
|
-
return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature =
|
|
2884
|
+
return [n.x, n.y, n.z, r.x, r.y, r.z, o.x, o.y, o.z].every(Number.isFinite) ? (e.camera.position.set(n.x, n.y, n.z), e.controls.target.set(r.x, r.y, r.z), e.camera.up.set(o.x, o.y, o.z), e.camera.lookAt(r.x, r.y, r.z), e.controls.update(), e._lastViewSignature = nt(t), !0) : !1;
|
|
2563
2885
|
}
|
|
2564
|
-
function
|
|
2886
|
+
function Nr(e) {
|
|
2565
2887
|
if (!e.viewChangeHandler) return;
|
|
2566
2888
|
const t = Date.now();
|
|
2567
2889
|
if (t - e._lastViewEmitMs < 250) return;
|
|
2568
|
-
const n =
|
|
2890
|
+
const n = Ht(e);
|
|
2569
2891
|
if (!n) return;
|
|
2570
|
-
const r =
|
|
2892
|
+
const r = nt(n);
|
|
2571
2893
|
r !== e._lastViewSignature && (e._lastViewSignature = r, e._lastViewEmitMs = t, e.viewChangeHandler(n));
|
|
2572
2894
|
}
|
|
2573
|
-
function
|
|
2574
|
-
const l = (t + n) / 2, u = (r + o) / 2, a = (i + s) / 2, c = n - t, m = o - r, d = s - i,
|
|
2575
|
-
e.controls.target.set(l, u, a), e.camera.position.set(l +
|
|
2895
|
+
function rt(e, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s }) {
|
|
2896
|
+
const l = (t + n) / 2, u = (r + o) / 2, a = (i + s) / 2, c = n - t, m = o - r, d = s - i, h = Math.max(c, m, d, 1) * 2;
|
|
2897
|
+
e.controls.target.set(l, u, a), e.camera.position.set(l + h, u + h, a + h), e.camera.lookAt(l, u, a), e.controls.update();
|
|
2576
2898
|
}
|
|
2577
|
-
function
|
|
2899
|
+
function zr(e, t = 1e3) {
|
|
2578
2900
|
!e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(t, t, t), e.camera.lookAt(0, 0, 0), e.controls.update());
|
|
2579
2901
|
}
|
|
2580
|
-
function
|
|
2902
|
+
function Mr(e, t = 2e3) {
|
|
2581
2903
|
!e.camera || !e.controls || (e.controls.target.set(0, 0, 0), e.camera.position.set(0, 0, t), e.camera.up.set(0, 1, 0), e.camera.lookAt(0, 0, 0), e.controls.update());
|
|
2582
2904
|
}
|
|
2583
|
-
function
|
|
2905
|
+
function Er(e, t = 0, n = 0) {
|
|
2584
2906
|
e.controls && typeof e.controls.pan == "function" && (e.controls.pan(t, n), e.controls.update());
|
|
2585
2907
|
}
|
|
2586
|
-
function
|
|
2908
|
+
function kr(e, t = 1.1) {
|
|
2587
2909
|
!e.controls || typeof e.controls.dollyIn != "function" || typeof e.controls.dollyOut != "function" || (t > 1 ? e.controls.dollyOut(t) : e.controls.dollyIn(1 / t), e.controls.update());
|
|
2588
2910
|
}
|
|
2589
|
-
function
|
|
2911
|
+
function Ar(e, t = 1.2) {
|
|
2590
2912
|
if (!e.lastBounds) return;
|
|
2591
2913
|
const {
|
|
2592
2914
|
minX: n,
|
|
@@ -2598,13 +2920,13 @@ function Nr(e, t = 1.2) {
|
|
|
2598
2920
|
} = e.lastBounds, u = (r - n) * t, a = (i - o) * t, c = (l - s) * t, m = (n + r) / 2, d = (o + i) / 2, f = (s + l) / 2, b = Math.max(u, a, c, 1) * 2;
|
|
2599
2921
|
e.controls.target.set(m, d, f), e.camera.position.set(m + b, d + b, f + b), e.camera.lookAt(m, d, f), e.controls.update();
|
|
2600
2922
|
}
|
|
2601
|
-
const
|
|
2602
|
-
function
|
|
2923
|
+
const xr = 1, Ir = 120;
|
|
2924
|
+
function Cr(e, t) {
|
|
2603
2925
|
if (!e.camera || !e.controls || !Number.isFinite(t)) return !1;
|
|
2604
|
-
const n = Math.min(
|
|
2926
|
+
const n = Math.min(Ir, Math.max(xr, t)), r = e.controls.target, o = e.camera.position.distanceTo(r), i = e.camera.fov * Math.PI / 180, s = 2 * o * Math.tan(i / 2), l = n * Math.PI / 180, u = s / (2 * Math.tan(l / 2)), a = e.camera.position.clone().sub(r).normalize();
|
|
2605
2927
|
return e.camera.position.copy(r).addScaledVector(a, u), e.camera.fov = n, e.camera.updateProjectionMatrix(), e.controls.update(), !0;
|
|
2606
2928
|
}
|
|
2607
|
-
function
|
|
2929
|
+
function vr(e, t = "orbit") {
|
|
2608
2930
|
if (e.controlMode = t === "fly" ? "fly" : "orbit", e.controlMode === "fly")
|
|
2609
2931
|
e.controls && (e.controls.enabled = !1), e.flyControls && (e.flyControls.enabled = !0);
|
|
2610
2932
|
else if (e.flyControls && (e.flyControls.enabled = !1), e.controls) {
|
|
@@ -2613,14 +2935,14 @@ function Ar(e, t = "orbit") {
|
|
|
2613
2935
|
e.controls.target.copy(n), e.controls.update();
|
|
2614
2936
|
}
|
|
2615
2937
|
}
|
|
2616
|
-
const
|
|
2617
|
-
function
|
|
2938
|
+
const ae = "#9ca3af";
|
|
2939
|
+
function bt(e, t) {
|
|
2618
2940
|
const n = Number(e == null ? void 0 : e.md), r = Number(t == null ? void 0 : t.md);
|
|
2619
2941
|
if (!Number.isFinite(n) || !Number.isFinite(r)) return null;
|
|
2620
2942
|
const o = Math.min(n, r), i = Math.max(n, r);
|
|
2621
2943
|
return i <= o ? null : { segStart: o, segEnd: i };
|
|
2622
2944
|
}
|
|
2623
|
-
function
|
|
2945
|
+
function Sr(e, t, n) {
|
|
2624
2946
|
let r = 0, o = 0;
|
|
2625
2947
|
for (let s = 0; s < e.length; s += 1) {
|
|
2626
2948
|
const l = e[s], u = Number(l == null ? void 0 : l.from), a = Number(l == null ? void 0 : l.to), c = Number(l == null ? void 0 : l.value);
|
|
@@ -2632,18 +2954,18 @@ function Cr(e, t, n) {
|
|
|
2632
2954
|
const i = r / o;
|
|
2633
2955
|
return Number.isFinite(i) ? i : null;
|
|
2634
2956
|
}
|
|
2635
|
-
function
|
|
2636
|
-
if (!Number.isFinite(e)) return new y.Color(
|
|
2637
|
-
if (
|
|
2638
|
-
const r =
|
|
2957
|
+
function Dr(e, t) {
|
|
2958
|
+
if (!Number.isFinite(e)) return new y.Color(ae);
|
|
2959
|
+
if (wt(e, t) < 0) return new y.Color(ae);
|
|
2960
|
+
const r = ur(e, t, ae);
|
|
2639
2961
|
return new y.Color(r);
|
|
2640
2962
|
}
|
|
2641
|
-
function
|
|
2642
|
-
if (!e || !String(e).trim()) return
|
|
2643
|
-
const t =
|
|
2963
|
+
function Fr(e) {
|
|
2964
|
+
if (!e || !String(e).trim()) return ae;
|
|
2965
|
+
const t = jt(String(e).toLowerCase().trim());
|
|
2644
2966
|
return "#" + new y.Color().setHSL(t, 0.7, 0.5).getHexString();
|
|
2645
2967
|
}
|
|
2646
|
-
function
|
|
2968
|
+
function Lr(e = {}) {
|
|
2647
2969
|
return {
|
|
2648
2970
|
preserveView: !!e.preserveView,
|
|
2649
2971
|
assayIntervalsByHole: e.assayIntervalsByHole || null,
|
|
@@ -2651,7 +2973,7 @@ function vr(e = {}) {
|
|
|
2651
2973
|
isCategoricalVariable: !!e.isCategoricalVariable
|
|
2652
2974
|
};
|
|
2653
2975
|
}
|
|
2654
|
-
function
|
|
2976
|
+
function Or(e, t) {
|
|
2655
2977
|
if (!e || !t) return [];
|
|
2656
2978
|
const n = [];
|
|
2657
2979
|
return Object.values(e).forEach((r) => {
|
|
@@ -2661,27 +2983,27 @@ function Sr(e, t) {
|
|
|
2661
2983
|
});
|
|
2662
2984
|
}), n;
|
|
2663
2985
|
}
|
|
2664
|
-
function
|
|
2986
|
+
function qe(e) {
|
|
2665
2987
|
return {
|
|
2666
2988
|
holeId: e.id,
|
|
2667
2989
|
project: e.project
|
|
2668
2990
|
};
|
|
2669
2991
|
}
|
|
2670
|
-
function
|
|
2992
|
+
function Pr(e) {
|
|
2671
2993
|
return `${e ?? ""}`.trim().toLowerCase();
|
|
2672
2994
|
}
|
|
2673
|
-
function
|
|
2674
|
-
const n = `${e ?? ""}:${t ?? 0}`, r =
|
|
2995
|
+
function Tr(e, t) {
|
|
2996
|
+
const n = `${e ?? ""}:${t ?? 0}`, r = jt(n), o = (t ?? 0) % 14 / 14, i = (r * 0.15 + o * 0.85) % 1, s = new y.Color();
|
|
2675
2997
|
return s.setHSL(i, 1, 0.5), s;
|
|
2676
2998
|
}
|
|
2677
|
-
function
|
|
2999
|
+
function jt(e) {
|
|
2678
3000
|
const t = `${e ?? ""}`;
|
|
2679
3001
|
let n = 2166136261;
|
|
2680
3002
|
for (let r = 0; r < t.length; r += 1)
|
|
2681
3003
|
n ^= t.charCodeAt(r), n = Math.imul(n, 16777619);
|
|
2682
3004
|
return (n >>> 0) / 4294967295;
|
|
2683
3005
|
}
|
|
2684
|
-
function
|
|
3006
|
+
function wr(e, t, n) {
|
|
2685
3007
|
let r = null, o = 0;
|
|
2686
3008
|
for (const i of e) {
|
|
2687
3009
|
const s = Number(i == null ? void 0 : i.from), l = Number(i == null ? void 0 : i.to);
|
|
@@ -2691,116 +3013,116 @@ function Pr(e, t, n) {
|
|
|
2691
3013
|
}
|
|
2692
3014
|
return r;
|
|
2693
3015
|
}
|
|
2694
|
-
function
|
|
3016
|
+
function Br(e, t) {
|
|
2695
3017
|
if (!t || !e) return [];
|
|
2696
3018
|
const n = e.id || e.holeId;
|
|
2697
3019
|
if (!n) return [];
|
|
2698
3020
|
const r = t[n];
|
|
2699
3021
|
if (Array.isArray(r) && r.length) return r;
|
|
2700
|
-
const o =
|
|
3022
|
+
const o = Pr(n);
|
|
2701
3023
|
if (o) {
|
|
2702
3024
|
const i = t[o];
|
|
2703
3025
|
if (Array.isArray(i) && i.length) return i;
|
|
2704
3026
|
}
|
|
2705
3027
|
return [];
|
|
2706
3028
|
}
|
|
2707
|
-
function
|
|
3029
|
+
function $r({ selectedAssayVariable: e, assayIntervals: t, assayScale: n, holeId: r, segmentIndex: o, p1: i, p2: s, isCategorical: l }) {
|
|
2708
3030
|
if (!e)
|
|
2709
|
-
return
|
|
3031
|
+
return Tr(r, o);
|
|
2710
3032
|
if (e === "__HAS_ASSAY__") {
|
|
2711
|
-
if (!(t != null && t.length)) return new y.Color(
|
|
2712
|
-
const c =
|
|
3033
|
+
if (!(t != null && t.length)) return new y.Color(ae);
|
|
3034
|
+
const c = bt(i, s);
|
|
2713
3035
|
return c ? t.some((d) => {
|
|
2714
|
-
const f = Number(d == null ? void 0 : d.from),
|
|
2715
|
-
if (!Number.isFinite(f) || !Number.isFinite(
|
|
3036
|
+
const f = Number(d == null ? void 0 : d.from), h = Number(d == null ? void 0 : d.to);
|
|
3037
|
+
if (!Number.isFinite(f) || !Number.isFinite(h)) return !1;
|
|
2716
3038
|
const b = Math.max(c.segStart, f);
|
|
2717
|
-
return Math.min(c.segEnd,
|
|
2718
|
-
}) ? new y.Color("#ff8c42") : new y.Color(
|
|
3039
|
+
return Math.min(c.segEnd, h) > b;
|
|
3040
|
+
}) ? new y.Color("#ff8c42") : new y.Color(ae) : new y.Color(ae);
|
|
2719
3041
|
}
|
|
2720
|
-
if (!(t != null && t.length)) return new y.Color(
|
|
2721
|
-
const u =
|
|
2722
|
-
if (!u) return new y.Color(
|
|
3042
|
+
if (!(t != null && t.length)) return new y.Color(ae);
|
|
3043
|
+
const u = bt(i, s);
|
|
3044
|
+
if (!u) return new y.Color(ae);
|
|
2723
3045
|
if (l) {
|
|
2724
|
-
const c =
|
|
2725
|
-
return new y.Color(
|
|
2726
|
-
}
|
|
2727
|
-
const a =
|
|
2728
|
-
return
|
|
2729
|
-
}
|
|
2730
|
-
function
|
|
2731
|
-
if (!e.scene || (
|
|
2732
|
-
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: s } =
|
|
2733
|
-
let a = 1 / 0, c = -1 / 0, m = 1 / 0, d = -1 / 0, f = 1 / 0,
|
|
2734
|
-
const b = new y.Vector3(),
|
|
2735
|
-
t.forEach((
|
|
2736
|
-
const M = g * 137.5 % 360 / 360,
|
|
2737
|
-
a = Math.min(a,
|
|
2738
|
-
const
|
|
2739
|
-
return
|
|
3046
|
+
const c = wr(t, u.segStart, u.segEnd);
|
|
3047
|
+
return new y.Color(Fr(c));
|
|
3048
|
+
}
|
|
3049
|
+
const a = Sr(t, u.segStart, u.segEnd);
|
|
3050
|
+
return Dr(a, n);
|
|
3051
|
+
}
|
|
3052
|
+
function Vr(e, t, n = {}) {
|
|
3053
|
+
if (!e.scene || (Rt(e), !t || t.length === 0)) return;
|
|
3054
|
+
const { preserveView: r, assayIntervalsByHole: o, selectedAssayVariable: i, isCategoricalVariable: s } = Lr(n), l = s ? [] : Or(o, i), u = ar(l);
|
|
3055
|
+
let a = 1 / 0, c = -1 / 0, m = 1 / 0, d = -1 / 0, f = 1 / 0, h = -1 / 0;
|
|
3056
|
+
const b = new y.Vector3(), _ = new y.Vector3(0, 1, 0);
|
|
3057
|
+
t.forEach((p, g) => {
|
|
3058
|
+
const M = g * 137.5 % 360 / 360, v = new y.Color().setHSL(M, 0.75, 0.55), k = (p.points || []).map((L) => {
|
|
3059
|
+
a = Math.min(a, L.x), c = Math.max(c, L.x), m = Math.min(m, L.y), d = Math.max(d, L.y), f = Math.min(f, L.z), h = Math.max(h, L.z);
|
|
3060
|
+
const Y = new y.Vector3(L.x, L.y, L.z);
|
|
3061
|
+
return Y.md = L.md, Y;
|
|
2740
3062
|
});
|
|
2741
|
-
if (
|
|
2742
|
-
if (
|
|
2743
|
-
const
|
|
2744
|
-
color:
|
|
2745
|
-
emissive:
|
|
3063
|
+
if (k.length < 2) {
|
|
3064
|
+
if (k.length === 1) {
|
|
3065
|
+
const L = new y.SphereGeometry(5, 12, 12), Y = new y.MeshLambertMaterial({
|
|
3066
|
+
color: v,
|
|
3067
|
+
emissive: v,
|
|
2746
3068
|
emissiveIntensity: 0.2
|
|
2747
|
-
}),
|
|
2748
|
-
|
|
3069
|
+
}), Z = new y.Mesh(L, Y);
|
|
3070
|
+
Z.position.copy(k[0]), Z.userData = qe(p), e.scene.add(Z), e.drillLines.push(Z), e.drillMeshes.push(Z);
|
|
2749
3071
|
}
|
|
2750
3072
|
return;
|
|
2751
3073
|
}
|
|
2752
|
-
const
|
|
2753
|
-
|
|
2754
|
-
const
|
|
2755
|
-
for (let
|
|
2756
|
-
const
|
|
2757
|
-
if (
|
|
2758
|
-
const
|
|
3074
|
+
const F = new y.Group();
|
|
3075
|
+
F.userData = qe(p);
|
|
3076
|
+
const T = i ? Br(p, o) : [];
|
|
3077
|
+
for (let L = 0; L < k.length - 1; L += 1) {
|
|
3078
|
+
const Y = k[L], Z = k[L + 1], w = b.subVectors(Z, Y), q = w.length();
|
|
3079
|
+
if (q <= 1e-3) continue;
|
|
3080
|
+
const R = 2.2, I = new y.CylinderGeometry(R, R, q, 6, 1, !0), A = $r({
|
|
2759
3081
|
selectedAssayVariable: i,
|
|
2760
|
-
assayIntervals:
|
|
3082
|
+
assayIntervals: T,
|
|
2761
3083
|
assayScale: u,
|
|
2762
|
-
holeId:
|
|
2763
|
-
segmentIndex:
|
|
2764
|
-
p1:
|
|
2765
|
-
p2:
|
|
3084
|
+
holeId: p.id,
|
|
3085
|
+
segmentIndex: L,
|
|
3086
|
+
p1: Y,
|
|
3087
|
+
p2: Z,
|
|
2766
3088
|
isCategorical: s
|
|
2767
|
-
}),
|
|
2768
|
-
color:
|
|
3089
|
+
}), N = new y.MeshLambertMaterial({
|
|
3090
|
+
color: A,
|
|
2769
3091
|
flatShading: !0,
|
|
2770
|
-
emissive:
|
|
3092
|
+
emissive: A,
|
|
2771
3093
|
emissiveIntensity: 0.15
|
|
2772
|
-
}),
|
|
2773
|
-
|
|
3094
|
+
}), O = new y.Mesh(I, N);
|
|
3095
|
+
O.position.copy(Y.clone().addScaledVector(w, 0.5)), O.quaternion.setFromUnitVectors(_, w.clone().normalize()), O.userData = qe(p), F.add(O), e.drillMeshes.push(O);
|
|
2774
3096
|
}
|
|
2775
|
-
e.scene.add(
|
|
2776
|
-
}), e.camera && e.controls && (e.lastBounds = { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ:
|
|
3097
|
+
e.scene.add(F), e.drillLines.push(F);
|
|
3098
|
+
}), e.camera && e.controls && (e.lastBounds = { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ: h }, r || rt(e, { minX: a, maxX: c, minY: m, maxY: d, minZ: f, maxZ: h })), Ne(e);
|
|
2777
3099
|
}
|
|
2778
|
-
function
|
|
3100
|
+
function Rt(e) {
|
|
2779
3101
|
e.drillLines.forEach((t) => {
|
|
2780
3102
|
e.scene.remove(t), t.isGroup ? t.traverse((n) => {
|
|
2781
3103
|
n.isMesh && (n.geometry.dispose(), n.material.dispose());
|
|
2782
3104
|
}) : t.isMesh && (t.geometry.dispose(), t.material.dispose());
|
|
2783
|
-
}), e.drillLines = [], e.drillMeshes = [],
|
|
3105
|
+
}), e.drillLines = [], e.drillMeshes = [], Ne(e);
|
|
2784
3106
|
}
|
|
2785
|
-
const
|
|
2786
|
-
function
|
|
3107
|
+
const gt = "#ffffbb", Hr = 2, jr = 1.5, Rr = 1;
|
|
3108
|
+
function Gr(e) {
|
|
2787
3109
|
const { renderer: t, scene: n, camera: r, container: o } = e;
|
|
2788
3110
|
if (!t || !n || !r) return;
|
|
2789
|
-
const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, s = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, l = new
|
|
3111
|
+
const i = (o == null ? void 0 : o.clientWidth) || t.domElement.clientWidth || 1, s = (o == null ? void 0 : o.clientHeight) || t.domElement.clientHeight || 1, l = new tn(t), u = new nn(n, r);
|
|
2790
3112
|
l.addPass(u);
|
|
2791
|
-
const a = new y.Vector2(i, s), c = new
|
|
2792
|
-
c.visibleEdgeColor.set(
|
|
3113
|
+
const a = new y.Vector2(i, s), c = new rn(a, n, r);
|
|
3114
|
+
c.visibleEdgeColor.set(gt), c.hiddenEdgeColor.set(gt), c.edgeStrength = Hr, c.edgeThickness = jr, c.edgeGlow = Rr, c.pulsePeriod = 0, c.selectedObjects = [], l.addPass(c), l.setSize(i, s), e._composer = l, e._outlinePass = c;
|
|
2793
3115
|
}
|
|
2794
|
-
function
|
|
3116
|
+
function Ur(e, t, n) {
|
|
2795
3117
|
!e._composer || !e._outlinePass || (e._composer.setSize(t, n), e._outlinePass.resolution.set(t, n));
|
|
2796
3118
|
}
|
|
2797
|
-
function
|
|
3119
|
+
function Se(e, t) {
|
|
2798
3120
|
e._outlinePass && (e._outlinePass.selectedObjects = t ? [t] : [], e._selectedObject = t || null);
|
|
2799
3121
|
}
|
|
2800
|
-
function
|
|
3122
|
+
function yt(e) {
|
|
2801
3123
|
e._composer && (e._composer.dispose(), e._composer = null), e._outlinePass = null, e._selectedObject = null, e.selectables = [];
|
|
2802
3124
|
}
|
|
2803
|
-
const
|
|
3125
|
+
const Yr = [
|
|
2804
3126
|
{ normal: [1, 0, 0], neibDir: [1, 0, 0], verts: [[1, -1, -1], [1, 1, -1], [1, 1, 1], [1, -1, 1]] },
|
|
2805
3127
|
{ normal: [-1, 0, 0], neibDir: [-1, 0, 0], verts: [[-1, -1, 1], [-1, 1, 1], [-1, 1, -1], [-1, -1, -1]] },
|
|
2806
3128
|
{ normal: [0, 1, 0], neibDir: [0, 1, 0], verts: [[-1, 1, 1], [1, 1, 1], [1, 1, -1], [-1, 1, -1]] },
|
|
@@ -2808,54 +3130,54 @@ const Hr = [
|
|
|
2808
3130
|
{ normal: [0, 0, 1], neibDir: [0, 0, 1], verts: [[-1, -1, 1], [1, -1, 1], [1, 1, 1], [-1, 1, 1]] },
|
|
2809
3131
|
{ normal: [0, 0, -1], neibDir: [0, 0, -1], verts: [[1, -1, -1], [-1, -1, -1], [-1, 1, -1], [1, 1, -1]] }
|
|
2810
3132
|
];
|
|
2811
|
-
function
|
|
2812
|
-
if (!e.scene || (
|
|
3133
|
+
function qr(e, t, n, r, o = {}) {
|
|
3134
|
+
if (!e.scene || (Gt(e), !t || !n || !r)) return;
|
|
2813
3135
|
const { autoCenter: i = !0, opacity: s = 1 } = o;
|
|
2814
3136
|
let l = 1 / 0, u = -1 / 0, a = 1 / 0, c = -1 / 0, m = 1 / 0, d = -1 / 0;
|
|
2815
|
-
t.forEach((
|
|
2816
|
-
const
|
|
2817
|
-
l = Math.min(l,
|
|
3137
|
+
t.forEach((N) => {
|
|
3138
|
+
const O = Number(N.x ?? N.center_x ?? 0), x = Number(N.y ?? N.center_y ?? 0), V = Number(N.z ?? N.center_z ?? 0), H = Number(N.dx ?? N.size_x ?? 1), B = Number(N.dy ?? N.size_y ?? 1), X = Number(N.dz ?? N.size_z ?? 1);
|
|
3139
|
+
l = Math.min(l, O - H / 2), u = Math.max(u, O + H / 2), a = Math.min(a, x - B / 2), c = Math.max(c, x + B / 2), m = Math.min(m, V - X / 2), d = Math.max(d, V + X / 2);
|
|
2818
3140
|
});
|
|
2819
|
-
let f = 0,
|
|
2820
|
-
o.offset ? (f = Number(o.offset.x ?? 0),
|
|
2821
|
-
const
|
|
2822
|
-
t.map((
|
|
2823
|
-
),
|
|
2824
|
-
let
|
|
2825
|
-
if (t.forEach((
|
|
2826
|
-
const
|
|
2827
|
-
|
|
2828
|
-
const
|
|
2829
|
-
if (
|
|
2830
|
-
const
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
}),
|
|
3141
|
+
let f = 0, h = 0, b = 0;
|
|
3142
|
+
o.offset ? (f = Number(o.offset.x ?? 0), h = Number(o.offset.y ?? 0), b = Number(o.offset.z ?? 0)) : i && (f = -((l + u) / 2), h = -((a + c) / 2), b = -((m + d) / 2));
|
|
3143
|
+
const _ = l + f, p = u + f, g = a + h, E = c + h, M = m + b, v = d + b, k = (N, O, x) => `${Math.round(N)},${Math.round(O)},${Math.round(x)}`, F = new Set(
|
|
3144
|
+
t.map((N) => k(Number(N.x ?? 0), Number(N.y ?? 0), Number(N.z ?? 0)))
|
|
3145
|
+
), T = [], L = [], Y = [], Z = [], w = [];
|
|
3146
|
+
let q = 0;
|
|
3147
|
+
if (t.forEach((N) => {
|
|
3148
|
+
const O = Number(N.x ?? N.center_x ?? 0), x = Number(N.y ?? N.center_y ?? 0), V = Number(N.z ?? N.center_z ?? 0), H = Number(N.dx ?? N.size_x ?? 1), B = Number(N.dy ?? N.size_y ?? 1), X = Number(N.dz ?? N.size_z ?? 1), K = O + f, ie = x + h, ge = V + b, de = Fn(N[n], r, y), { r: ve, g: me, b: je } = de;
|
|
3149
|
+
Yr.forEach((ye) => {
|
|
3150
|
+
const Yt = O + ye.neibDir[0] * H, qt = x + ye.neibDir[1] * B, Xt = V + ye.neibDir[2] * X;
|
|
3151
|
+
if (F.has(k(Yt, qt, Xt))) return;
|
|
3152
|
+
const ze = q;
|
|
3153
|
+
ye.verts.forEach(([Wt, Zt, Kt]) => {
|
|
3154
|
+
T.push(K + Wt * H / 2, ie + Zt * B / 2, ge + Kt * X / 2), L.push(ye.normal[0], ye.normal[1], ye.normal[2]), Y.push(ve, me, je), q++;
|
|
3155
|
+
}), Z.push(ze, ze + 1, ze + 2, ze, ze + 2, ze + 3), w.push(N);
|
|
2834
3156
|
});
|
|
2835
|
-
}),
|
|
2836
|
-
const
|
|
2837
|
-
|
|
2838
|
-
const
|
|
3157
|
+
}), T.length === 0) return;
|
|
3158
|
+
const R = new y.BufferGeometry();
|
|
3159
|
+
R.setAttribute("position", new y.Float32BufferAttribute(T, 3)), R.setAttribute("normal", new y.Float32BufferAttribute(L, 3)), R.setAttribute("color", new y.Float32BufferAttribute(Y, 3)), R.setIndex(Z);
|
|
3160
|
+
const I = new y.MeshLambertMaterial({
|
|
2839
3161
|
vertexColors: !0,
|
|
2840
3162
|
transparent: s < 1,
|
|
2841
3163
|
opacity: s,
|
|
2842
3164
|
side: y.DoubleSide
|
|
2843
|
-
}),
|
|
2844
|
-
|
|
3165
|
+
}), A = new y.Mesh(R, I);
|
|
3166
|
+
A.userData._isMergedBlocks = !0, A.userData._quadToBlock = w, A.userData._offset = { x: f, y: h, z: b }, e.scene.add(A), e.blocks.push(A), Ne(e), e.camera && e.controls && (e.lastBounds = { minX: _, maxX: p, minY: g, maxY: E, minZ: M, maxZ: v }, rt(e, { minX: _, maxX: p, minY: g, maxY: E, minZ: M, maxZ: v }));
|
|
2845
3167
|
}
|
|
2846
|
-
function
|
|
3168
|
+
function Gt(e) {
|
|
2847
3169
|
var t;
|
|
2848
3170
|
e.blocks.forEach((n) => {
|
|
2849
3171
|
e.scene.remove(n), n.geometry.dispose(), n.material.dispose();
|
|
2850
|
-
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null),
|
|
3172
|
+
}), e.blocks = [], e._blockHighlightMesh && ((t = e.scene) == null || t.remove(e._blockHighlightMesh), e._blockHighlightMesh.geometry.dispose(), e._blockHighlightMesh.material.dispose(), e._blockHighlightMesh = null), Ne(e);
|
|
2851
3173
|
}
|
|
2852
|
-
function
|
|
3174
|
+
function Xr(e, t) {
|
|
2853
3175
|
const n = Math.max(0, Math.min(1, Number(t)));
|
|
2854
3176
|
e.blocks.forEach((r) => {
|
|
2855
3177
|
r.material && (r.material.opacity = n, r.material.transparent = n < 1, r.material.needsUpdate = !0);
|
|
2856
3178
|
});
|
|
2857
3179
|
}
|
|
2858
|
-
function
|
|
3180
|
+
function Wr(e, t, n) {
|
|
2859
3181
|
const r = (n == null ? void 0 : n.x) ?? 0, o = (n == null ? void 0 : n.y) ?? 0, i = (n == null ? void 0 : n.z) ?? 0, s = Number(t.x ?? t.center_x ?? 0) + r, l = Number(t.y ?? t.center_y ?? 0) + o, u = Number(t.z ?? t.center_z ?? 0) + i, a = Number(t.dx ?? t.size_x ?? 1), c = Number(t.dy ?? t.size_y ?? 1), m = Number(t.dz ?? t.size_z ?? 1);
|
|
2860
3182
|
if (!e._blockHighlightMesh) {
|
|
2861
3183
|
const d = new y.BoxGeometry(1, 1, 1), f = new y.MeshBasicMaterial({ transparent: !0, opacity: 0, depthWrite: !1 });
|
|
@@ -2863,31 +3185,31 @@ function Gr(e, t, n) {
|
|
|
2863
3185
|
}
|
|
2864
3186
|
return e._blockHighlightMesh.position.set(s, l, u), e._blockHighlightMesh.scale.set(a, c, m), e._blockHighlightMesh;
|
|
2865
3187
|
}
|
|
2866
|
-
function
|
|
3188
|
+
function Ut(e) {
|
|
2867
3189
|
var o, i;
|
|
2868
3190
|
if (!e._outlinePass || e.selectables.length === 0) {
|
|
2869
|
-
e._outlinePass &&
|
|
3191
|
+
e._outlinePass && Se(e, null);
|
|
2870
3192
|
return;
|
|
2871
3193
|
}
|
|
2872
3194
|
const t = e.raycaster.intersectObjects(e.selectables, !0);
|
|
2873
3195
|
if (t.length === 0) {
|
|
2874
|
-
|
|
3196
|
+
Se(e, null);
|
|
2875
3197
|
return;
|
|
2876
3198
|
}
|
|
2877
3199
|
const n = t[0], r = n.object;
|
|
2878
3200
|
if ((o = r == null ? void 0 : r.userData) != null && o._isMergedBlocks) {
|
|
2879
3201
|
const s = Math.floor(n.faceIndex / 2), l = (i = r.userData._quadToBlock) == null ? void 0 : i[s];
|
|
2880
3202
|
if (l) {
|
|
2881
|
-
|
|
3203
|
+
Se(e, Wr(e, l, r.userData._offset));
|
|
2882
3204
|
return;
|
|
2883
3205
|
}
|
|
2884
3206
|
}
|
|
2885
|
-
|
|
3207
|
+
Se(e, r);
|
|
2886
3208
|
}
|
|
2887
|
-
function
|
|
3209
|
+
function Zr(e) {
|
|
2888
3210
|
const t = e.renderer;
|
|
2889
3211
|
t && (e.handleCanvasClick = (n) => {
|
|
2890
|
-
var f,
|
|
3212
|
+
var f, h, b, _, p, g, E;
|
|
2891
3213
|
if (n.button !== 0) return;
|
|
2892
3214
|
if ((f = e.gizmo) != null && f.domElement) {
|
|
2893
3215
|
const M = e.gizmo.domElement.getBoundingClientRect();
|
|
@@ -2895,32 +3217,32 @@ function Ur(e) {
|
|
|
2895
3217
|
return;
|
|
2896
3218
|
}
|
|
2897
3219
|
const r = t.domElement.getBoundingClientRect(), o = n.clientX - r.left, i = n.clientY - r.top;
|
|
2898
|
-
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera),
|
|
3220
|
+
if (e.pointer.x = o / r.width * 2 - 1, e.pointer.y = -(i / r.height * 2) + 1, e.raycaster.setFromCamera(e.pointer, e.camera), Ut(e), e.blocks.length > 0) {
|
|
2899
3221
|
const M = e.raycaster.intersectObjects(e.blocks, !1);
|
|
2900
3222
|
if (M.length > 0) {
|
|
2901
|
-
const
|
|
2902
|
-
if ((
|
|
2903
|
-
const
|
|
2904
|
-
|
|
3223
|
+
const v = M[0], k = v.object;
|
|
3224
|
+
if ((h = k == null ? void 0 : k.userData) != null && h._isMergedBlocks && e.blockClickHandler) {
|
|
3225
|
+
const F = Math.floor(v.faceIndex / 2), T = k.userData._quadToBlock[F];
|
|
3226
|
+
T && e.blockClickHandler(T);
|
|
2905
3227
|
}
|
|
2906
3228
|
return;
|
|
2907
3229
|
}
|
|
2908
3230
|
}
|
|
2909
3231
|
const s = e.raycaster.intersectObjects(e.drillMeshes, !0), l = e.raycaster.intersectObjects(e.structuralMeshes, !0), u = ((b = s[0]) == null ? void 0 : b.distance) ?? 1 / 0;
|
|
2910
|
-
if ((((
|
|
3232
|
+
if ((((_ = l[0]) == null ? void 0 : _.distance) ?? 1 / 0) < u && l.length > 0) {
|
|
2911
3233
|
const M = l[0].object;
|
|
2912
3234
|
e.drillholeClickHandler && e.drillholeClickHandler({ type: "structure", ...M.userData });
|
|
2913
3235
|
return;
|
|
2914
3236
|
}
|
|
2915
3237
|
if (s.length === 0) return;
|
|
2916
3238
|
let c = s[0].object;
|
|
2917
|
-
for (; c && c.parent && !((
|
|
3239
|
+
for (; c && c.parent && !((p = c.userData) != null && p.holeId); )
|
|
2918
3240
|
c = c.parent;
|
|
2919
|
-
const m = (g = c == null ? void 0 : c.userData) == null ? void 0 : g.holeId, d = (
|
|
3241
|
+
const m = (g = c == null ? void 0 : c.userData) == null ? void 0 : g.holeId, d = (E = c == null ? void 0 : c.userData) == null ? void 0 : E.project;
|
|
2920
3242
|
m && e.drillholeClickHandler && e.drillholeClickHandler({ holeId: m, project: d });
|
|
2921
3243
|
}, t.domElement.addEventListener("click", e.handleCanvasClick));
|
|
2922
3244
|
}
|
|
2923
|
-
class
|
|
3245
|
+
class oi {
|
|
2924
3246
|
constructor() {
|
|
2925
3247
|
this.container = null, this.scene = null, this.camera = null, this.renderer = null, this.controls = null, this.flyControls = null, this.gizmo = null, this.blocks = [], this.drillLines = [], this.drillMeshes = [], this.structuralGroup = null, this.structuralMeshes = [], this.frameId = null, this.clock = new y.Clock(), this.handleCanvasClick = null, this.raycaster = new y.Raycaster(), this.pointer = new y.Vector2(), this.drillholeClickHandler = null, this.blockClickHandler = null, this.controlMode = "orbit", this._tmpDir = new y.Vector3(), this.viewChangeHandler = null, this._lastViewSignature = "", this._lastViewEmitMs = 0, this.selectables = [], this._selectedObject = null, this._composer = null, this._blockHighlightMesh = null, this._outlinePass = null;
|
|
2926
3248
|
}
|
|
@@ -2934,21 +3256,21 @@ class Wo {
|
|
|
2934
3256
|
const i = new y.DirectionalLight(16777215, 1.5);
|
|
2935
3257
|
i.position.set(10, 10, 5), this.scene.add(i);
|
|
2936
3258
|
const s = new y.AxesHelper(20);
|
|
2937
|
-
this.scene.add(s), this.controls = new
|
|
3259
|
+
this.scene.add(s), this.controls = new Jt(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.controls.screenSpacePanning = !0, this.controls.enableZoom = !0, this.controls.zoomSpeed = 1.2, this.controls.minDistance = 3e-3, this.controls.maxDistance = 4e4, this.controls.mouseButtons = {
|
|
2938
3260
|
LEFT: y.MOUSE.PAN,
|
|
2939
3261
|
MIDDLE: y.MOUSE.DOLLY,
|
|
2940
3262
|
RIGHT: y.MOUSE.ROTATE
|
|
2941
3263
|
}, this.controls.touches = {
|
|
2942
3264
|
ONE: y.TOUCH.ROTATE,
|
|
2943
3265
|
TWO: y.TOUCH.PAN
|
|
2944
|
-
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new
|
|
3266
|
+
}, this.controls.maxPolarAngle = Math.PI, this.flyControls = new Qt(this.camera, this.renderer.domElement), this.flyControls.movementSpeed = 2e3, this.flyControls.rollSpeed = Math.PI / 12, this.flyControls.dragToLook = !0, this.flyControls.enabled = !1, this.gizmo = new en(this.camera, this.renderer, {
|
|
2945
3267
|
container: this.container,
|
|
2946
3268
|
placement: "top-right",
|
|
2947
3269
|
size: 110,
|
|
2948
3270
|
offset: { top: 12, right: 12 },
|
|
2949
3271
|
animated: !0,
|
|
2950
3272
|
speed: 1.5
|
|
2951
|
-
}), this.gizmo.attachControls(this.controls),
|
|
3273
|
+
}), this.gizmo.attachControls(this.controls), Zr(this), Gr(this);
|
|
2952
3274
|
const l = () => {
|
|
2953
3275
|
var a;
|
|
2954
3276
|
this.frameId = requestAnimationFrame(l);
|
|
@@ -2960,16 +3282,16 @@ class Wo {
|
|
|
2960
3282
|
resize() {
|
|
2961
3283
|
if (!this.container || !this.camera || !this.renderer) return;
|
|
2962
3284
|
const t = this.container.clientWidth, n = this.container.clientHeight;
|
|
2963
|
-
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(),
|
|
3285
|
+
this.camera.aspect = t / n, this.camera.updateProjectionMatrix(), this.renderer.setSize(t, n), this.gizmo && this.gizmo.update(), Ur(this, t, n);
|
|
2964
3286
|
}
|
|
2965
3287
|
dispose() {
|
|
2966
|
-
this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null,
|
|
3288
|
+
this.frameId && cancelAnimationFrame(this.frameId), this.renderer && this.handleCanvasClick && this.renderer.domElement.removeEventListener("click", this.handleCanvasClick), this.gizmo && (this.gizmo.dispose(), this.gizmo = null), this.viewChangeHandler = null, Gt(this), Rt(this), Vt(this), yt(this), this.controls && this.controls.dispose(), this.flyControls && this.flyControls.dispose(), this.renderer && (this.renderer.dispose(), this.container && this.renderer.domElement && this.container.removeChild(this.renderer.domElement));
|
|
2967
3289
|
}
|
|
2968
3290
|
// ---------------------------------------------------------------------------
|
|
2969
3291
|
// Data renderers — delegate to domain modules
|
|
2970
3292
|
// ---------------------------------------------------------------------------
|
|
2971
3293
|
setDrillholes(t, n = {}) {
|
|
2972
|
-
|
|
3294
|
+
Vr(this, t, n);
|
|
2973
3295
|
}
|
|
2974
3296
|
/**
|
|
2975
3297
|
* Render block model data as a single merged mesh of exterior faces only.
|
|
@@ -2979,20 +3301,20 @@ class Wo {
|
|
|
2979
3301
|
* @param {Object} [options]
|
|
2980
3302
|
*/
|
|
2981
3303
|
setBlocks(t, n, r, o = {}) {
|
|
2982
|
-
|
|
3304
|
+
qr(this, t, n, r, o);
|
|
2983
3305
|
}
|
|
2984
3306
|
/**
|
|
2985
3307
|
* Update the opacity of all currently rendered blocks.
|
|
2986
3308
|
* @param {number} opacity - New opacity value between 0 and 1
|
|
2987
3309
|
*/
|
|
2988
3310
|
setBlockOpacity(t) {
|
|
2989
|
-
|
|
3311
|
+
Xr(this, t);
|
|
2990
3312
|
}
|
|
2991
3313
|
setStructuralDiscs(t, n, r = {}) {
|
|
2992
|
-
|
|
3314
|
+
gr(this, t, n, r);
|
|
2993
3315
|
}
|
|
2994
3316
|
setStructuralDiscsVisible(t) {
|
|
2995
|
-
|
|
3317
|
+
yr(this, t);
|
|
2996
3318
|
}
|
|
2997
3319
|
// ---------------------------------------------------------------------------
|
|
2998
3320
|
// Click handlers
|
|
@@ -3014,50 +3336,50 @@ class Wo {
|
|
|
3014
3336
|
this.viewChangeHandler = typeof t == "function" ? t : null;
|
|
3015
3337
|
}
|
|
3016
3338
|
getViewState() {
|
|
3017
|
-
return
|
|
3339
|
+
return Ht(this);
|
|
3018
3340
|
}
|
|
3019
3341
|
setViewState(t) {
|
|
3020
|
-
return
|
|
3342
|
+
return _r(this, t);
|
|
3021
3343
|
}
|
|
3022
3344
|
_buildViewSignature(t) {
|
|
3023
|
-
return
|
|
3345
|
+
return nt(t);
|
|
3024
3346
|
}
|
|
3025
3347
|
_emitViewChangeIfNeeded() {
|
|
3026
|
-
|
|
3348
|
+
Nr(this);
|
|
3027
3349
|
}
|
|
3028
3350
|
_fitCameraToBounds({ minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s }) {
|
|
3029
|
-
|
|
3351
|
+
rt(this, { minX: t, maxX: n, minY: r, maxY: o, minZ: i, maxZ: s });
|
|
3030
3352
|
}
|
|
3031
3353
|
recenterCameraToOrigin(t = 1e3) {
|
|
3032
|
-
|
|
3354
|
+
zr(this, t);
|
|
3033
3355
|
}
|
|
3034
3356
|
lookDown(t = 2e3) {
|
|
3035
|
-
|
|
3357
|
+
Mr(this, t);
|
|
3036
3358
|
}
|
|
3037
3359
|
pan(t = 0, n = 0) {
|
|
3038
|
-
|
|
3360
|
+
Er(this, t, n);
|
|
3039
3361
|
}
|
|
3040
3362
|
dolly(t = 1.1) {
|
|
3041
|
-
|
|
3363
|
+
kr(this, t);
|
|
3042
3364
|
}
|
|
3043
3365
|
focusOnLastBounds(t = 1.2) {
|
|
3044
|
-
|
|
3366
|
+
Ar(this, t);
|
|
3045
3367
|
}
|
|
3046
3368
|
/**
|
|
3047
3369
|
* Change the camera field-of-view while keeping the visible scene the same apparent size.
|
|
3048
3370
|
* @param {number} fovDeg - Desired FOV in degrees
|
|
3049
3371
|
*/
|
|
3050
3372
|
setCameraFov(t) {
|
|
3051
|
-
|
|
3373
|
+
Cr(this, t);
|
|
3052
3374
|
}
|
|
3053
3375
|
setControlMode(t = "orbit") {
|
|
3054
|
-
|
|
3376
|
+
vr(this, t);
|
|
3055
3377
|
}
|
|
3056
3378
|
// ---------------------------------------------------------------------------
|
|
3057
3379
|
// Selection glow public API
|
|
3058
3380
|
// ---------------------------------------------------------------------------
|
|
3059
3381
|
_syncSelectables() {
|
|
3060
|
-
|
|
3382
|
+
Ne(this);
|
|
3061
3383
|
}
|
|
3062
3384
|
/**
|
|
3063
3385
|
* Register the objects that are candidates for click-select glow.
|
|
@@ -3071,7 +3393,7 @@ class Wo {
|
|
|
3071
3393
|
* @param {THREE.Object3D|null} object
|
|
3072
3394
|
*/
|
|
3073
3395
|
selectObject(t) {
|
|
3074
|
-
|
|
3396
|
+
Se(this, t || null);
|
|
3075
3397
|
}
|
|
3076
3398
|
/**
|
|
3077
3399
|
* Return the currently selected object, or null if nothing is selected.
|
|
@@ -3084,14 +3406,14 @@ class Wo {
|
|
|
3084
3406
|
* Dispose the effect composer and all GPU resources used by the selection glow.
|
|
3085
3407
|
*/
|
|
3086
3408
|
disposeGlow() {
|
|
3087
|
-
|
|
3409
|
+
yt(this);
|
|
3088
3410
|
}
|
|
3089
3411
|
/** @private */
|
|
3090
3412
|
_updateSelectionFromPointer() {
|
|
3091
|
-
|
|
3413
|
+
Ut(this);
|
|
3092
3414
|
}
|
|
3093
3415
|
}
|
|
3094
|
-
function
|
|
3416
|
+
function ii({
|
|
3095
3417
|
controlMode: e = "orbit",
|
|
3096
3418
|
onToggleFly: t = () => {
|
|
3097
3419
|
},
|
|
@@ -3102,14 +3424,14 @@ function Zo({
|
|
|
3102
3424
|
onFit: o = () => {
|
|
3103
3425
|
}
|
|
3104
3426
|
}) {
|
|
3105
|
-
return /* @__PURE__ */
|
|
3106
|
-
/* @__PURE__ */
|
|
3107
|
-
/* @__PURE__ */
|
|
3108
|
-
/* @__PURE__ */
|
|
3109
|
-
/* @__PURE__ */
|
|
3427
|
+
return /* @__PURE__ */ te("div", { className: "baselode-3d-controls", children: [
|
|
3428
|
+
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: n, children: "Recenter to (0,0,0)" }),
|
|
3429
|
+
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: r, children: "Look down" }),
|
|
3430
|
+
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: o, children: "Fit to scene" }),
|
|
3431
|
+
/* @__PURE__ */ $("button", { type: "button", className: "ghost-button", onClick: t, children: e === "orbit" ? "Enable fly controls" : "Disable fly controls" })
|
|
3110
3432
|
] });
|
|
3111
3433
|
}
|
|
3112
|
-
function
|
|
3434
|
+
function si({
|
|
3113
3435
|
properties: e = [],
|
|
3114
3436
|
selectedProperty: t = "",
|
|
3115
3437
|
onPropertyChange: n = () => {
|
|
@@ -3123,9 +3445,9 @@ function Ko({
|
|
|
3123
3445
|
}
|
|
3124
3446
|
}) {
|
|
3125
3447
|
var u, a;
|
|
3126
|
-
return /* @__PURE__ */
|
|
3127
|
-
/* @__PURE__ */
|
|
3128
|
-
/* @__PURE__ */
|
|
3448
|
+
return /* @__PURE__ */ te("div", { className: "bm-widget", children: [
|
|
3449
|
+
/* @__PURE__ */ $("label", { className: "bm-widget__label", htmlFor: "bm-property-select", children: "Color by" }),
|
|
3450
|
+
/* @__PURE__ */ te(
|
|
3129
3451
|
"select",
|
|
3130
3452
|
{
|
|
3131
3453
|
id: "bm-property-select",
|
|
@@ -3133,19 +3455,19 @@ function Ko({
|
|
|
3133
3455
|
value: t,
|
|
3134
3456
|
onChange: (c) => n(c.target.value),
|
|
3135
3457
|
children: [
|
|
3136
|
-
e.length === 0 && /* @__PURE__ */
|
|
3137
|
-
e.map((c) => /* @__PURE__ */
|
|
3458
|
+
e.length === 0 && /* @__PURE__ */ $("option", { value: "", children: "— no attributes —" }),
|
|
3459
|
+
e.map((c) => /* @__PURE__ */ $("option", { value: c, children: c }, c))
|
|
3138
3460
|
]
|
|
3139
3461
|
}
|
|
3140
3462
|
),
|
|
3141
|
-
i && i.type === "numeric" && /* @__PURE__ */
|
|
3142
|
-
/* @__PURE__ */
|
|
3143
|
-
/* @__PURE__ */
|
|
3144
|
-
/* @__PURE__ */
|
|
3463
|
+
i && i.type === "numeric" && /* @__PURE__ */ te("div", { className: "bm-widget__scale", children: [
|
|
3464
|
+
/* @__PURE__ */ $("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((u = i.min) == null ? void 0 : u.toFixed(2)) ?? "—" }),
|
|
3465
|
+
/* @__PURE__ */ $("div", { className: "bm-widget__scale-bar" }),
|
|
3466
|
+
/* @__PURE__ */ $("span", { className: "bm-widget__scale-label bm-widget__scale-label--max", children: ((a = i.max) == null ? void 0 : a.toFixed(2)) ?? "—" })
|
|
3145
3467
|
] }),
|
|
3146
|
-
i && i.type === "categorical" && /* @__PURE__ */
|
|
3468
|
+
i && i.type === "categorical" && /* @__PURE__ */ $("div", { className: "bm-widget__categories", children: (i.categories || []).map((c, m) => {
|
|
3147
3469
|
const d = Math.round(m / Math.max(i.categories.length, 1) * 360);
|
|
3148
|
-
return /* @__PURE__ */
|
|
3470
|
+
return /* @__PURE__ */ $(
|
|
3149
3471
|
"span",
|
|
3150
3472
|
{
|
|
3151
3473
|
className: "bm-widget__category-chip",
|
|
@@ -3155,12 +3477,12 @@ function Ko({
|
|
|
3155
3477
|
c
|
|
3156
3478
|
);
|
|
3157
3479
|
}) }),
|
|
3158
|
-
/* @__PURE__ */
|
|
3480
|
+
/* @__PURE__ */ te("label", { className: "bm-widget__label", htmlFor: "bm-opacity-slider", children: [
|
|
3159
3481
|
"Opacity (",
|
|
3160
3482
|
Math.round(r * 100),
|
|
3161
3483
|
"%)"
|
|
3162
3484
|
] }),
|
|
3163
|
-
/* @__PURE__ */
|
|
3485
|
+
/* @__PURE__ */ $(
|
|
3164
3486
|
"input",
|
|
3165
3487
|
{
|
|
3166
3488
|
id: "bm-opacity-slider",
|
|
@@ -3173,10 +3495,10 @@ function Ko({
|
|
|
3173
3495
|
onChange: (c) => o(parseFloat(c.target.value))
|
|
3174
3496
|
}
|
|
3175
3497
|
),
|
|
3176
|
-
s && /* @__PURE__ */
|
|
3177
|
-
/* @__PURE__ */
|
|
3178
|
-
/* @__PURE__ */
|
|
3179
|
-
/* @__PURE__ */
|
|
3498
|
+
s && /* @__PURE__ */ te("div", { className: "bm-widget__popup", children: [
|
|
3499
|
+
/* @__PURE__ */ te("div", { className: "bm-widget__popup-header", children: [
|
|
3500
|
+
/* @__PURE__ */ $("span", { children: "Block attributes" }),
|
|
3501
|
+
/* @__PURE__ */ $(
|
|
3180
3502
|
"button",
|
|
3181
3503
|
{
|
|
3182
3504
|
type: "button",
|
|
@@ -3187,14 +3509,14 @@ function Ko({
|
|
|
3187
3509
|
}
|
|
3188
3510
|
)
|
|
3189
3511
|
] }),
|
|
3190
|
-
/* @__PURE__ */
|
|
3191
|
-
/* @__PURE__ */
|
|
3192
|
-
/* @__PURE__ */
|
|
3512
|
+
/* @__PURE__ */ $("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ $("tbody", { children: Object.entries(s).map(([c, m]) => /* @__PURE__ */ te("tr", { children: [
|
|
3513
|
+
/* @__PURE__ */ $("th", { children: c }),
|
|
3514
|
+
/* @__PURE__ */ $("td", { children: m == null ? "—" : String(m) })
|
|
3193
3515
|
] }, c)) }) })
|
|
3194
3516
|
] })
|
|
3195
3517
|
] });
|
|
3196
3518
|
}
|
|
3197
|
-
function
|
|
3519
|
+
function li(e) {
|
|
3198
3520
|
const t = typeof e == "string" ? JSON.parse(e) : e;
|
|
3199
3521
|
if (t.schema_version !== "1.0")
|
|
3200
3522
|
throw new Error(
|
|
@@ -3222,7 +3544,7 @@ function Jo(e) {
|
|
|
3222
3544
|
blocks: n
|
|
3223
3545
|
};
|
|
3224
3546
|
}
|
|
3225
|
-
function
|
|
3547
|
+
function Kr(e) {
|
|
3226
3548
|
const t = new y.BufferGeometry(), n = new Float32Array(e.vertices.length * 3);
|
|
3227
3549
|
e.vertices.forEach(([o, i, s], l) => {
|
|
3228
3550
|
n[l * 3] = o, n[l * 3 + 1] = i, n[l * 3 + 2] = s;
|
|
@@ -3232,11 +3554,11 @@ function Yr(e) {
|
|
|
3232
3554
|
r[l * 3] = o, r[l * 3 + 1] = i, r[l * 3 + 2] = s;
|
|
3233
3555
|
}), t.setIndex(new y.BufferAttribute(r, 1)), t;
|
|
3234
3556
|
}
|
|
3235
|
-
function
|
|
3557
|
+
function ai(e, t, n = {}) {
|
|
3236
3558
|
const { defaultOpacity: r = 1 } = n, o = new y.Group();
|
|
3237
3559
|
return t.blocks.forEach((i) => {
|
|
3238
|
-
var b,
|
|
3239
|
-
const s =
|
|
3560
|
+
var b, _;
|
|
3561
|
+
const s = Kr(i), l = ((b = i.material) == null ? void 0 : b.color) ?? "#888888", u = ((_ = i.material) == null ? void 0 : _.opacity) ?? r, a = u < 1, c = new y.MeshStandardMaterial({
|
|
3240
3562
|
color: new y.Color(l),
|
|
3241
3563
|
opacity: u,
|
|
3242
3564
|
transparent: a,
|
|
@@ -3247,153 +3569,162 @@ function Qo(e, t, n = {}) {
|
|
|
3247
3569
|
id: i.id,
|
|
3248
3570
|
attributes: i.attributes
|
|
3249
3571
|
};
|
|
3250
|
-
const d = new y.EdgesGeometry(s, 15), f = new y.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }),
|
|
3251
|
-
|
|
3572
|
+
const d = new y.EdgesGeometry(s, 15), f = new y.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }), h = new y.LineSegments(d, f);
|
|
3573
|
+
h.visible = !1, m.add(h), o.add(m);
|
|
3252
3574
|
}), e.add(o), o;
|
|
3253
3575
|
}
|
|
3254
3576
|
export {
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3272
|
-
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3577
|
+
lr as ASSAY_COLOR_PALETTE_10,
|
|
3578
|
+
an as ASSAY_NON_VALUE_FIELDS,
|
|
3579
|
+
G as AZIMUTH,
|
|
3580
|
+
jn as BASELODE_COLORWAY,
|
|
3581
|
+
S as BASELODE_DARK,
|
|
3582
|
+
qo as BASELODE_DARK_TEMPLATE,
|
|
3583
|
+
Yo as BASELODE_DARK_TEMPLATE_NAME,
|
|
3584
|
+
uo as BASELODE_DATA_MODEL_DRILL_ASSAY,
|
|
3585
|
+
ao as BASELODE_DATA_MODEL_DRILL_COLLAR,
|
|
3586
|
+
sn as BASELODE_DATA_MODEL_DRILL_GEOLOGY,
|
|
3587
|
+
co as BASELODE_DATA_MODEL_DRILL_SURVEY,
|
|
3588
|
+
mo as BASELODE_DATA_MODEL_STRUCTURAL_POINT,
|
|
3589
|
+
P as BASELODE_LIGHT,
|
|
3590
|
+
Uo as BASELODE_LIGHT_TEMPLATE,
|
|
3591
|
+
Go as BASELODE_LIGHT_TEMPLATE_NAME,
|
|
3592
|
+
Ce as BASELODE_TEMPLATE,
|
|
3593
|
+
Hn as BASELODE_TEMPLATE_NAME,
|
|
3594
|
+
Ue as BUILTIN_COLOUR_MAPS,
|
|
3595
|
+
ii as Baselode3DControls,
|
|
3596
|
+
oi as Baselode3DScene,
|
|
3597
|
+
si as BlockModelWidget,
|
|
3598
|
+
ot as CHART_OPTIONS,
|
|
3599
|
+
bn as COMMENT_COLUMN_NAMES,
|
|
3600
|
+
Be as COMMODITY_COLOURS,
|
|
3601
|
+
Nt as CRS,
|
|
3602
|
+
ln as DEFAULT_COLUMN_MAP,
|
|
3603
|
+
W as DEPTH,
|
|
3604
|
+
U as DIP,
|
|
3605
|
+
De as DISPLAY_CATEGORICAL,
|
|
3606
|
+
Ae as DISPLAY_COMMENT,
|
|
3607
|
+
Te as DISPLAY_HIDDEN,
|
|
3608
|
+
xe as DISPLAY_NUMERIC,
|
|
3609
|
+
We as DISPLAY_TADPOLE,
|
|
3610
|
+
he as EASTING,
|
|
3611
|
+
ke as ELEVATION,
|
|
3612
|
+
Zn as ERROR_COLOR,
|
|
3613
|
+
Rn as FALLBACK_COLOUR,
|
|
3614
|
+
Ir as FOV_MAX_DEG,
|
|
3615
|
+
xr as FOV_MIN_DEG,
|
|
3616
|
+
C as FROM,
|
|
3617
|
+
se as GEOLOGY_CODE,
|
|
3618
|
+
le as GEOLOGY_DESCRIPTION,
|
|
3619
|
+
it as HIDDEN_COLUMNS,
|
|
3289
3620
|
z as HOLE_ID,
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3312
|
-
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
|
|
3345
|
-
|
|
3346
|
-
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3621
|
+
re as LATITUDE,
|
|
3622
|
+
Gn as LITHOLOGY_COLOURS,
|
|
3623
|
+
oe as LONGITUDE,
|
|
3624
|
+
Ie as MID,
|
|
3625
|
+
pe as NORTHING,
|
|
3626
|
+
qn as NUMERIC_LINE_COLOR,
|
|
3627
|
+
Xn as NUMERIC_MARKER_COLOR,
|
|
3628
|
+
ue as PROJECT_ID,
|
|
3629
|
+
on as STRIKE,
|
|
3630
|
+
D as TO,
|
|
3631
|
+
Ko as TracePlot,
|
|
3632
|
+
ai as addGradeBlocksToScene,
|
|
3633
|
+
$n as alphaBetaToNormal,
|
|
3634
|
+
ri as annotationsFromIntervals,
|
|
3635
|
+
Po as assembleDataset,
|
|
3636
|
+
xo as attachAssayPositions,
|
|
3637
|
+
ko as balancedTangentialDesurvey,
|
|
3638
|
+
Nn as buildAssayState,
|
|
3639
|
+
Xo as buildCategoricalStripLogConfig,
|
|
3640
|
+
or as buildCommentsConfig,
|
|
3641
|
+
ar as buildEqualRangeColorScale,
|
|
3642
|
+
Qn as buildIntervalPoints,
|
|
3643
|
+
Lt as buildPlotConfig,
|
|
3644
|
+
Zo as buildStrikeDipSymbol,
|
|
3645
|
+
br as buildStructuralDiscs,
|
|
3646
|
+
Wo as buildStructuralStripConfig,
|
|
3647
|
+
rr as buildTadpoleConfig,
|
|
3648
|
+
Ao as buildTraces,
|
|
3649
|
+
nt as buildViewSignature,
|
|
3650
|
+
$o as calculateBlockVolume,
|
|
3651
|
+
Sn as calculatePropertyStats,
|
|
3652
|
+
gn as classifyColumns,
|
|
3653
|
+
Oo as coerceNumeric,
|
|
3654
|
+
Vn as computeStructuralPositions,
|
|
3655
|
+
_o as defaultChartType,
|
|
3656
|
+
we as deriveAssayProps,
|
|
3657
|
+
Mo as desurveyTraces,
|
|
3658
|
+
pr as dipAzimuthToNormal,
|
|
3659
|
+
kr as dolly,
|
|
3660
|
+
Nr as emitViewChangeIfNeeded,
|
|
3661
|
+
Dn as filterBlocks,
|
|
3662
|
+
Lo as filterByProject,
|
|
3663
|
+
rt as fitCameraToBounds,
|
|
3664
|
+
Ar as focusOnLastBounds,
|
|
3665
|
+
Bo as getBlockStats,
|
|
3666
|
+
Fr as getCategoryHexColor,
|
|
3667
|
+
Ke as getChartOptions,
|
|
3668
|
+
Fn as getColorForValue,
|
|
3669
|
+
Un as getColour,
|
|
3670
|
+
wt as getEqualRangeBinIndex,
|
|
3671
|
+
ur as getEqualRangeColor,
|
|
3672
|
+
Ht as getViewState,
|
|
3673
|
+
Kr as gradeBlockToThreeGeometry,
|
|
3674
|
+
On as groupRowsByHole,
|
|
3675
|
+
Jn as holeHasData,
|
|
3676
|
+
Bn as interpolateTrace,
|
|
3677
|
+
ni as intervalsAsTubes,
|
|
3678
|
+
Fo as joinAssaysToTraces,
|
|
3679
|
+
No as loadAssayFile,
|
|
3680
|
+
_n as loadAssayHole,
|
|
3681
|
+
yn as loadAssayMetadata,
|
|
3682
|
+
So as loadAssays,
|
|
3683
|
+
wo as loadBlockModelMetadata,
|
|
3684
|
+
Co as loadCollars,
|
|
3685
|
+
Do as loadGeology,
|
|
3686
|
+
li as loadGradeBlocksFromJson,
|
|
3687
|
+
vo as loadSurveys,
|
|
3688
|
+
He as loadTable,
|
|
3689
|
+
po as logDataInfo,
|
|
3690
|
+
ho as logDataWarning,
|
|
3691
|
+
Mr as lookDown,
|
|
3692
|
+
En as minimumCurvatureDesurvey,
|
|
3693
|
+
vn as normalizeBlockRow,
|
|
3694
|
+
go as normalizeCsvRow,
|
|
3695
|
+
Oe as normalizeFieldName,
|
|
3696
|
+
Er as pan,
|
|
3697
|
+
Tn as parseAssayCsvTextToHoles,
|
|
3698
|
+
fn as parseAssayHole,
|
|
3699
|
+
bo as parseAssayHoleIds,
|
|
3700
|
+
mn as parseAssayHoleIdsWithAssays,
|
|
3701
|
+
hn as parseAssaysCSV,
|
|
3702
|
+
To as parseBlockModelCSV,
|
|
3703
|
+
Io as parseDrillholesCSV,
|
|
3704
|
+
wn as parseGeologyCsvText,
|
|
3374
3705
|
Pn as parseStructuralCSV,
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
|
|
3384
|
-
|
|
3385
|
-
|
|
3386
|
-
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3397
|
-
|
|
3706
|
+
jo as parseStructuralIntervalsCSV,
|
|
3707
|
+
Ho as parseStructuralPointsCSV,
|
|
3708
|
+
zo as parseSurveyCSV,
|
|
3709
|
+
Ro as parseUnifiedDataset,
|
|
3710
|
+
yo as pickFirstPresent,
|
|
3711
|
+
Qo as planView,
|
|
3712
|
+
dr as projectTraceToSection,
|
|
3713
|
+
zr as recenterCameraToOrigin,
|
|
3714
|
+
xt as reorderHoleIds,
|
|
3715
|
+
Yn as resolveColourMap,
|
|
3716
|
+
ei as sectionView,
|
|
3717
|
+
mr as sectionWindow,
|
|
3718
|
+
vr as setControlMode,
|
|
3719
|
+
Cr as setFov,
|
|
3720
|
+
_r as setViewState,
|
|
3721
|
+
be as standardizeColumns,
|
|
3722
|
+
fo as standardizeRowArray,
|
|
3723
|
+
Eo as tangentialDesurvey,
|
|
3724
|
+
cn as toError,
|
|
3725
|
+
ti as tracesAsSegments,
|
|
3726
|
+
Jo as useDrillholeTraceGrid,
|
|
3727
|
+
Vo as validateStructuralPoints,
|
|
3728
|
+
j as withDataErrorContext
|
|
3398
3729
|
};
|
|
3399
3730
|
//# sourceMappingURL=baselode.js.map
|