baselode 0.1.20 → 0.1.21
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 +1524 -1354
- package/dist/baselode.js.map +1 -1
- package/dist/{baselode3dScene-qMfVRKxK.js → baselode3dScene-CLEvddGM.js} +299 -293
- package/dist/baselode3dScene-CLEvddGM.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/tool-ui.js +29 -29
- package/package.json +1 -1
- package/dist/baselode3dScene-qMfVRKxK.js.map +0 -1
package/dist/baselode.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
import { _ as
|
|
2
|
-
import { p as
|
|
1
|
+
import { _ as Nt, w as G, H as N, P as de, F as L, T as M, c as vt, L as re, a as oe, D as j, A as Y, b as W, E as he, N as ge, d as Ae, M as ve, G as le, e as ce, B as Et, f as et, g as ke, h as ze, i as tt, j as Ue, k as At, l as nt, m as St, n as Tt, o as It } from "./baselode3dScene-CLEvddGM.js";
|
|
2
|
+
import { p as Nr, q as vr, r as Er, s as Ar, t as Sr, u as Tr, v as Ir, x as Cr, y as Lr, z as Mr, C as Pr, I as Or, J as xr, K as Dr, O as Rr, Q as zr, R as $r, S as kr, U as Fr, V as wr, W as Hr, X as Gr, Y as Ur, Z as Br, $ as Vr, a0 as jr, a1 as Yr, a2 as Wr, a3 as qr, a4 as Xr, a5 as Kr, a6 as Zr, a7 as Jr, a8 as Qr, a9 as eo, aa as to, ab as no, ac as ro, ad as oo, ae as so, af as io, ag as ao, ah as lo, ai as co, aj as uo, ak as mo, al as fo, am as po, an as ho, ao as go, ap as yo, aq as bo, ar as _o, as as No, at as vo, au as Eo, av as Ao, aw as So, ax as To, ay as Io, az as Co, aA as Lo, aB as Mo, aC as Po, aD as Oo, aE as xo, aF as Do, aG as Ro, aH as zo, aI as $o, aJ as ko, aK as Fo, aL as wo, aM as Ho, aN as Go, aO as Uo, aP as Bo, aQ as Vo, aR as jo, aS as Yo, aT as Wo, aU as qo, aV as Xo, aW as Ko, aX as Zo, aY as Jo, aZ as Qo, a_ as es, a$ as ts, b0 as ns, b1 as rs, b2 as os, b3 as ss, b4 as is, b5 as as, b6 as ls, b7 as cs, b8 as us, b9 as ds, ba as ms, bb as fs, bc as ps, bd as hs, be as gs, bf as ys, bg as bs } from "./baselode3dScene-CLEvddGM.js";
|
|
3
3
|
import J from "papaparse";
|
|
4
|
-
import { jsx as
|
|
5
|
-
import { useRef as _e, useState as
|
|
6
|
-
import
|
|
4
|
+
import { jsxs as H, jsx as E, Fragment as Ct } from "react/jsx-runtime";
|
|
5
|
+
import { useRef as _e, useState as K, useEffect as ne, useMemo as ee, useCallback as Oe } from "react";
|
|
6
|
+
import Ee from "plotly.js-dist-min";
|
|
7
7
|
import * as Q from "three";
|
|
8
|
-
function
|
|
8
|
+
function Se(e) {
|
|
9
9
|
return (e || "").toString().trim().toLowerCase().replace(/\s+/g, "_");
|
|
10
10
|
}
|
|
11
11
|
function ie(e, n = null, t = null) {
|
|
12
|
-
const
|
|
12
|
+
const r = { ...Nt };
|
|
13
13
|
if (t) {
|
|
14
|
-
for (const [i,
|
|
15
|
-
if (i != null &&
|
|
16
|
-
const a =
|
|
17
|
-
|
|
14
|
+
for (const [i, s] of Object.entries(t))
|
|
15
|
+
if (i != null && s != null) {
|
|
16
|
+
const a = Se(i), l = Se(s);
|
|
17
|
+
r[a] = l;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
for (const [i,
|
|
22
|
-
const a =
|
|
23
|
-
|
|
20
|
+
const o = {};
|
|
21
|
+
for (const [i, s] of Object.entries(e)) {
|
|
22
|
+
const a = Se(i), l = r[a] || a;
|
|
23
|
+
o[l] = s;
|
|
24
24
|
}
|
|
25
|
-
return
|
|
25
|
+
return o;
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return e.map((
|
|
27
|
+
function Mn(e, n = null, t = null) {
|
|
28
|
+
return e.map((r) => ie(r, n, t));
|
|
29
29
|
}
|
|
30
|
-
const
|
|
30
|
+
const Lt = /* @__PURE__ */ new Set([
|
|
31
31
|
"hole_id",
|
|
32
32
|
"holeid",
|
|
33
33
|
"id",
|
|
@@ -59,84 +59,84 @@ const It = /* @__PURE__ */ new Set([
|
|
|
59
59
|
"todepth",
|
|
60
60
|
"comment",
|
|
61
61
|
"z"
|
|
62
|
-
]),
|
|
63
|
-
function
|
|
64
|
-
return { holeId: e[
|
|
65
|
-
}
|
|
66
|
-
function
|
|
67
|
-
const t = e[
|
|
68
|
-
if (!
|
|
69
|
-
const
|
|
70
|
-
return !Number.isFinite(i) || !Number.isFinite(
|
|
71
|
-
holeId:
|
|
72
|
-
project:
|
|
62
|
+
]), Le = (e, n = null) => ie(e, null, n);
|
|
63
|
+
function Mt(e) {
|
|
64
|
+
return { holeId: e[N] };
|
|
65
|
+
}
|
|
66
|
+
function rt(e, n = null) {
|
|
67
|
+
const t = e[N], r = t !== void 0 ? `${t}`.trim() : "";
|
|
68
|
+
if (!r) return null;
|
|
69
|
+
const o = e[de] || e.project || e.project_code, i = Number(e[L]), s = Number(e[M]);
|
|
70
|
+
return !Number.isFinite(i) || !Number.isFinite(s) || s <= i ? null : {
|
|
71
|
+
holeId: r,
|
|
72
|
+
project: o,
|
|
73
73
|
from: i,
|
|
74
|
-
to:
|
|
74
|
+
to: s,
|
|
75
75
|
...e
|
|
76
76
|
};
|
|
77
77
|
}
|
|
78
|
-
function
|
|
79
|
-
var
|
|
80
|
-
const t = n.sort((i,
|
|
78
|
+
function ot(e, n) {
|
|
79
|
+
var o;
|
|
80
|
+
const t = n.sort((i, s) => i.from - s.from), r = [];
|
|
81
81
|
return t.forEach((i) => {
|
|
82
|
-
const { from:
|
|
83
|
-
z:
|
|
84
|
-
from:
|
|
82
|
+
const { from: s, to: a, project: l, ...u } = i, c = {
|
|
83
|
+
z: s,
|
|
84
|
+
from: s,
|
|
85
85
|
to: a,
|
|
86
|
-
[
|
|
86
|
+
[N]: e,
|
|
87
87
|
[de]: l,
|
|
88
88
|
...u
|
|
89
89
|
};
|
|
90
|
-
|
|
91
|
-
}), { id: e, project: (
|
|
90
|
+
r.push(c), r.push({ ...c, z: a });
|
|
91
|
+
}), { id: e, project: (o = t[0]) == null ? void 0 : o.project, points: r };
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
return new Promise((t,
|
|
95
|
-
const
|
|
93
|
+
function Pn(e, n = null) {
|
|
94
|
+
return new Promise((t, r) => {
|
|
95
|
+
const o = /* @__PURE__ */ new Set();
|
|
96
96
|
J.parse(e, {
|
|
97
97
|
header: !0,
|
|
98
98
|
dynamicTyping: !0,
|
|
99
99
|
skipEmptyLines: !0,
|
|
100
100
|
step: (i) => {
|
|
101
|
-
const a =
|
|
102
|
-
a !== void 0 && `${a}`.trim() !== "" &&
|
|
101
|
+
const a = Le(i.data, n)[N];
|
|
102
|
+
a !== void 0 && `${a}`.trim() !== "" && o.add(`${a}`.trim());
|
|
103
103
|
},
|
|
104
|
-
complete: () => t(Array.from(
|
|
105
|
-
error: (i) =>
|
|
104
|
+
complete: () => t(Array.from(o)),
|
|
105
|
+
error: (i) => r(G("parseAssayHoleIds", i))
|
|
106
106
|
});
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function
|
|
110
|
-
return Object.entries(e || {}).some(([n, t]) => !(
|
|
109
|
+
function Pt(e) {
|
|
110
|
+
return Object.entries(e || {}).some(([n, t]) => !(Lt.has(n) || t == null || typeof t == "string" && t.trim() === ""));
|
|
111
111
|
}
|
|
112
|
-
function
|
|
113
|
-
return new Promise((t,
|
|
114
|
-
const
|
|
112
|
+
function Ot(e, n = null) {
|
|
113
|
+
return new Promise((t, r) => {
|
|
114
|
+
const o = /* @__PURE__ */ new Map();
|
|
115
115
|
J.parse(e, {
|
|
116
116
|
header: !0,
|
|
117
117
|
dynamicTyping: !0,
|
|
118
118
|
skipEmptyLines: !0,
|
|
119
119
|
step: (i) => {
|
|
120
|
-
const
|
|
121
|
-
if (!
|
|
122
|
-
const l =
|
|
120
|
+
const s = Le(i.data, n);
|
|
121
|
+
if (!Pt(s)) return;
|
|
122
|
+
const l = Mt(s).holeId;
|
|
123
123
|
if (l !== void 0 && `${l}`.trim() !== "") {
|
|
124
124
|
const u = `${l}`.trim();
|
|
125
|
-
|
|
125
|
+
o.has(u) || o.set(u, {
|
|
126
126
|
holeId: u
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
|
-
complete: () => t(Array.from(
|
|
131
|
-
error: (i) =>
|
|
130
|
+
complete: () => t(Array.from(o.values())),
|
|
131
|
+
error: (i) => r(G("parseAssayHoleIdsWithAssays", i))
|
|
132
132
|
});
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
return new Promise((
|
|
137
|
-
const
|
|
138
|
-
if (!
|
|
139
|
-
i(
|
|
135
|
+
function xt(e, n, t = null, r = null) {
|
|
136
|
+
return new Promise((o, i) => {
|
|
137
|
+
const s = `${n}`.trim();
|
|
138
|
+
if (!s) {
|
|
139
|
+
i(G("parseAssayHole", new Error("Missing hole id")));
|
|
140
140
|
return;
|
|
141
141
|
}
|
|
142
142
|
const a = [];
|
|
@@ -145,421 +145,421 @@ function Tt(e, n, t = null, s = null) {
|
|
|
145
145
|
dynamicTyping: !0,
|
|
146
146
|
skipEmptyLines: !0,
|
|
147
147
|
step: (l) => {
|
|
148
|
-
const u =
|
|
149
|
-
c && `${c.holeId}`.trim() ===
|
|
148
|
+
const u = Le(l.data, r), c = rt(u, r);
|
|
149
|
+
c && `${c.holeId}`.trim() === s && a.push(c);
|
|
150
150
|
},
|
|
151
151
|
complete: () => {
|
|
152
152
|
if (!a.length) {
|
|
153
|
-
|
|
153
|
+
o(null);
|
|
154
154
|
return;
|
|
155
155
|
}
|
|
156
|
-
const l =
|
|
157
|
-
|
|
156
|
+
const l = ot(s, a);
|
|
157
|
+
o(l);
|
|
158
158
|
},
|
|
159
|
-
error: (l) => i(
|
|
159
|
+
error: (l) => i(G("parseAssayHole", l))
|
|
160
160
|
});
|
|
161
161
|
});
|
|
162
162
|
}
|
|
163
|
-
function
|
|
164
|
-
return new Promise((
|
|
163
|
+
function Dt(e, n = null, t = null) {
|
|
164
|
+
return new Promise((r, o) => {
|
|
165
165
|
J.parse(e, {
|
|
166
166
|
header: !0,
|
|
167
167
|
dynamicTyping: !0,
|
|
168
168
|
skipEmptyLines: !0,
|
|
169
169
|
complete: (i) => {
|
|
170
|
-
const
|
|
170
|
+
const s = /* @__PURE__ */ new Map();
|
|
171
171
|
i.data.forEach((l) => {
|
|
172
|
-
const u =
|
|
173
|
-
c && (
|
|
172
|
+
const u = Le(l, t), c = rt(u, t);
|
|
173
|
+
c && (s.has(c.holeId) || s.set(c.holeId, []), s.get(c.holeId).push(c));
|
|
174
174
|
});
|
|
175
|
-
const a = Array.from(
|
|
176
|
-
|
|
175
|
+
const a = Array.from(s.entries()).map(([l, u]) => ot(l, u));
|
|
176
|
+
r({ holes: a });
|
|
177
177
|
},
|
|
178
|
-
error: (i) =>
|
|
178
|
+
error: (i) => o(G("parseAssaysCSV", i))
|
|
179
179
|
});
|
|
180
180
|
});
|
|
181
181
|
}
|
|
182
|
-
function
|
|
182
|
+
function On(e = {}) {
|
|
183
183
|
const n = {};
|
|
184
|
-
return Object.entries(e || {}).forEach(([t,
|
|
185
|
-
t && (n[
|
|
184
|
+
return Object.entries(e || {}).forEach(([t, r]) => {
|
|
185
|
+
t && (n[Se(t)] = r);
|
|
186
186
|
}), n;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
for (const
|
|
190
|
-
const
|
|
191
|
-
if (
|
|
192
|
-
return
|
|
188
|
+
function xn(e = {}, n = [], t) {
|
|
189
|
+
for (const r of n) {
|
|
190
|
+
const o = e[r];
|
|
191
|
+
if (o != null && `${o}`.trim() !== "")
|
|
192
|
+
return o;
|
|
193
193
|
}
|
|
194
194
|
return t;
|
|
195
195
|
}
|
|
196
|
-
const
|
|
196
|
+
const Rt = 4;
|
|
197
197
|
function st(e = [], n = "") {
|
|
198
198
|
if (!e.length) return [];
|
|
199
199
|
if (!n) return e;
|
|
200
200
|
const t = e.findIndex((i) => i === n);
|
|
201
201
|
if (t === -1) return e;
|
|
202
|
-
const
|
|
203
|
-
return [
|
|
202
|
+
const r = e[t], o = e.filter((i, s) => s !== t);
|
|
203
|
+
return [r, ...o];
|
|
204
204
|
}
|
|
205
|
-
function
|
|
205
|
+
function Te({
|
|
206
206
|
property: e = "",
|
|
207
207
|
chartType: n = "",
|
|
208
208
|
categoricalProps: t = [],
|
|
209
|
-
commentProps:
|
|
210
|
-
numericDefaultChartType:
|
|
209
|
+
commentProps: r = [],
|
|
210
|
+
numericDefaultChartType: o = "markers+line"
|
|
211
211
|
} = {}) {
|
|
212
|
-
return e ?
|
|
212
|
+
return e ? r.includes(e) ? "comment" : t.includes(e) ? "categorical" : e === "dip" ? "tadpole" : !n || n === "categorical" || n === "comment" || n === "tadpole" ? o : n : n || o;
|
|
213
213
|
}
|
|
214
|
-
function
|
|
214
|
+
function it({
|
|
215
215
|
holeIds: e = [],
|
|
216
216
|
focusedHoleId: n = "",
|
|
217
|
-
plotCount: t =
|
|
218
|
-
defaultProp:
|
|
219
|
-
categoricalProps:
|
|
217
|
+
plotCount: t = Rt,
|
|
218
|
+
defaultProp: r = "",
|
|
219
|
+
categoricalProps: o = [],
|
|
220
220
|
commentProps: i = [],
|
|
221
|
-
numericDefaultChartType:
|
|
221
|
+
numericDefaultChartType: s = "markers+line"
|
|
222
222
|
} = {}) {
|
|
223
223
|
const a = st(e, n);
|
|
224
224
|
return Array.from({ length: t }).map((l, u) => {
|
|
225
|
-
const c = a[u] || e[u] || "",
|
|
226
|
-
property:
|
|
225
|
+
const c = a[u] || e[u] || "", d = Te({
|
|
226
|
+
property: r,
|
|
227
227
|
chartType: "",
|
|
228
|
-
categoricalProps:
|
|
228
|
+
categoricalProps: o,
|
|
229
229
|
commentProps: i,
|
|
230
|
-
numericDefaultChartType:
|
|
230
|
+
numericDefaultChartType: s
|
|
231
231
|
});
|
|
232
232
|
return {
|
|
233
233
|
holeId: c,
|
|
234
|
-
property:
|
|
235
|
-
chartType:
|
|
234
|
+
property: r,
|
|
235
|
+
chartType: d
|
|
236
236
|
};
|
|
237
237
|
});
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
const n = e.flatMap((a) => a.points || []), { numericCols: t, categoricalCols:
|
|
239
|
+
function Ie(e = []) {
|
|
240
|
+
const n = e.flatMap((a) => a.points || []), { numericCols: t, categoricalCols: r, commentCols: o, byType: i } = vt(n), s = t[0] || r[0] || "";
|
|
241
241
|
return {
|
|
242
242
|
numericProps: t,
|
|
243
|
-
categoricalProps:
|
|
244
|
-
commentProps:
|
|
243
|
+
categoricalProps: r,
|
|
244
|
+
commentProps: o,
|
|
245
245
|
columnMeta: i,
|
|
246
|
-
defaultProp:
|
|
246
|
+
defaultProp: s
|
|
247
247
|
};
|
|
248
248
|
}
|
|
249
|
-
async function
|
|
250
|
-
return await
|
|
249
|
+
async function zt(e, n = null) {
|
|
250
|
+
return await Ot(e);
|
|
251
251
|
}
|
|
252
|
-
async function
|
|
253
|
-
return await
|
|
252
|
+
async function $t(e, n, t = null) {
|
|
253
|
+
return await xt(e, n);
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function kt(e = [], n = "") {
|
|
256
256
|
if (!e.length) return null;
|
|
257
|
-
const { numericProps: t, categoricalProps:
|
|
257
|
+
const { numericProps: t, categoricalProps: r, commentProps: o, columnMeta: i, defaultProp: s } = Ie(e), a = e.map((u) => u.id || u.holeId).filter(Boolean), l = it({
|
|
258
258
|
holeIds: a,
|
|
259
259
|
focusedHoleId: n,
|
|
260
260
|
plotCount: 4,
|
|
261
|
-
defaultProp:
|
|
262
|
-
categoricalProps:
|
|
263
|
-
commentProps:
|
|
261
|
+
defaultProp: s,
|
|
262
|
+
categoricalProps: r,
|
|
263
|
+
commentProps: o,
|
|
264
264
|
numericDefaultChartType: "line"
|
|
265
265
|
});
|
|
266
266
|
return {
|
|
267
267
|
holes: e,
|
|
268
268
|
numericProps: t,
|
|
269
|
-
categoricalProps:
|
|
270
|
-
commentProps:
|
|
269
|
+
categoricalProps: r,
|
|
270
|
+
commentProps: o,
|
|
271
271
|
columnMeta: i,
|
|
272
|
-
defaultProp:
|
|
272
|
+
defaultProp: s,
|
|
273
273
|
traceConfigs: l
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
|
-
async function
|
|
277
|
-
const { holes:
|
|
278
|
-
if (!
|
|
279
|
-
return
|
|
276
|
+
async function Dn(e, n = "", t = null) {
|
|
277
|
+
const { holes: r } = await Dt(e, t), o = kt(r, n);
|
|
278
|
+
if (!o) throw new Error("No valid assay intervals found.");
|
|
279
|
+
return o;
|
|
280
280
|
}
|
|
281
|
-
function
|
|
282
|
-
return new Promise((t,
|
|
281
|
+
function Rn(e, n = null) {
|
|
282
|
+
return new Promise((t, r) => {
|
|
283
283
|
J.parse(e, {
|
|
284
284
|
header: !0,
|
|
285
285
|
dynamicTyping: !0,
|
|
286
286
|
skipEmptyLines: !0,
|
|
287
|
-
complete: (
|
|
288
|
-
const i =
|
|
287
|
+
complete: (o) => {
|
|
288
|
+
const i = o.data.map((s) => Ft(s, n)).filter((s) => s[N] && Number.isFinite(s[j]) && Number.isFinite(s[W]) && Number.isFinite(s[Y]));
|
|
289
289
|
t(i);
|
|
290
290
|
},
|
|
291
|
-
error: (
|
|
291
|
+
error: (o) => r(G("parseSurveyCSV", o))
|
|
292
292
|
});
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
const t = ie(e, null, n),
|
|
295
|
+
function Ft(e, n = null) {
|
|
296
|
+
const t = ie(e, null, n), r = t[N], o = t[de] || t.project || t.project_code, i = pe(t[re]), s = pe(t[oe]), a = pe(t[j]), l = pe(t[W]), u = pe(t[Y]), c = pe(t.maxdepth);
|
|
297
297
|
return {
|
|
298
298
|
raw: t,
|
|
299
|
-
[
|
|
300
|
-
[de]:
|
|
301
|
-
[
|
|
302
|
-
[
|
|
303
|
-
[
|
|
304
|
-
[
|
|
305
|
-
[
|
|
299
|
+
[N]: r,
|
|
300
|
+
[de]: o,
|
|
301
|
+
[re]: i,
|
|
302
|
+
[oe]: s,
|
|
303
|
+
[j]: a,
|
|
304
|
+
[W]: l,
|
|
305
|
+
[Y]: u,
|
|
306
306
|
maxdepth: c,
|
|
307
307
|
// Legacy field names for backwards compatibility
|
|
308
|
-
project_code:
|
|
308
|
+
project_code: o,
|
|
309
309
|
latitude: i,
|
|
310
|
-
longitude:
|
|
310
|
+
longitude: s,
|
|
311
311
|
surveydepth: a
|
|
312
312
|
};
|
|
313
313
|
}
|
|
314
|
-
const
|
|
314
|
+
const pe = (e) => {
|
|
315
315
|
const n = Number(e);
|
|
316
316
|
return Number.isFinite(n) ? n : void 0;
|
|
317
317
|
};
|
|
318
|
-
function
|
|
319
|
-
var u, c,
|
|
318
|
+
function zn(e, n) {
|
|
319
|
+
var u, c, d, m;
|
|
320
320
|
const t = /* @__PURE__ */ new Map();
|
|
321
321
|
e.forEach((f) => {
|
|
322
|
-
const
|
|
323
|
-
if (!
|
|
324
|
-
const
|
|
325
|
-
t.has(
|
|
322
|
+
const y = (f[N] || f.holeId || f.id || "").toString().trim();
|
|
323
|
+
if (!y) return;
|
|
324
|
+
const h = y.toLowerCase();
|
|
325
|
+
t.has(h) || t.set(h, f);
|
|
326
326
|
});
|
|
327
|
-
const
|
|
327
|
+
const r = ((u = e[0]) == null ? void 0 : u.lat) ?? ((c = e[0]) == null ? void 0 : c[re]) ?? 0, o = ((d = e[0]) == null ? void 0 : d.lng) ?? ((m = e[0]) == null ? void 0 : m[oe]) ?? 0, i = 111132, s = 111320 * Math.cos(r * Math.PI / 180), a = /* @__PURE__ */ new Map();
|
|
328
328
|
n.forEach((f) => {
|
|
329
|
-
const
|
|
330
|
-
if (!
|
|
331
|
-
const
|
|
332
|
-
a.has(
|
|
329
|
+
const y = (f[N] || "").toString().trim();
|
|
330
|
+
if (!y) return;
|
|
331
|
+
const h = y.toLowerCase();
|
|
332
|
+
a.has(h) || a.set(h, []), a.get(h).push(f);
|
|
333
333
|
});
|
|
334
334
|
const l = [];
|
|
335
|
-
return a.forEach((f,
|
|
336
|
-
const
|
|
337
|
-
if (!
|
|
338
|
-
const b = f.filter((
|
|
335
|
+
return a.forEach((f, y) => {
|
|
336
|
+
const h = t.get(y);
|
|
337
|
+
if (!h) return;
|
|
338
|
+
const b = f.filter((_) => Number.isFinite(_[j] ?? _.surveydepth)).sort((_, R) => (_[j] ?? _.surveydepth) - (R[j] ?? R.surveydepth));
|
|
339
339
|
if (!b.length) return;
|
|
340
|
-
const
|
|
341
|
-
let
|
|
342
|
-
for (let
|
|
343
|
-
const
|
|
344
|
-
if (!
|
|
345
|
-
|
|
346
|
-
x:
|
|
347
|
-
y:
|
|
340
|
+
const g = h.lat ?? h[re], A = h.lng ?? h[oe], P = 111132, U = 111320 * Math.cos(g * Math.PI / 180), $ = (A - o) * s, k = (g - r) * i, O = [];
|
|
341
|
+
let D = 0, S = 0, p = 0;
|
|
342
|
+
for (let _ = 0; _ < b.length; _ += 1) {
|
|
343
|
+
const R = b[_], x = b[_ - 1], T = R[j] ?? R.surveydepth, v = R[Y] ?? R.azimuth, z = R[W] ?? R.dip;
|
|
344
|
+
if (!x) {
|
|
345
|
+
O.push({
|
|
346
|
+
x: $ + D,
|
|
347
|
+
y: k + S,
|
|
348
348
|
z: 0,
|
|
349
|
-
md:
|
|
350
|
-
azimuth:
|
|
351
|
-
dip:
|
|
349
|
+
md: T,
|
|
350
|
+
azimuth: v,
|
|
351
|
+
dip: z
|
|
352
352
|
});
|
|
353
353
|
continue;
|
|
354
354
|
}
|
|
355
|
-
const F =
|
|
356
|
-
if (
|
|
357
|
-
const
|
|
358
|
-
Math.sin(
|
|
359
|
-
), me = be > 1e-6 ? 2 / be * Math.tan(be / 2) : 1,
|
|
360
|
-
|
|
361
|
-
x:
|
|
362
|
-
y:
|
|
355
|
+
const F = x[j] ?? x.surveydepth, C = x[Y] ?? x.azimuth, B = x[W] ?? x.dip, V = T - F;
|
|
356
|
+
if (V <= 0) continue;
|
|
357
|
+
const w = Be(B), q = Be(z), X = $e(C), ae = $e(v), be = Math.acos(
|
|
358
|
+
Math.sin(w) * Math.sin(q) * Math.cos(X - ae) + Math.cos(w) * Math.cos(q)
|
|
359
|
+
), me = be > 1e-6 ? 2 / be * Math.tan(be / 2) : 1, Pe = 0.5 * V * (Math.sin(w) * Math.cos(X) + Math.sin(q) * Math.cos(ae)) * me, fe = 0.5 * V * (Math.sin(w) * Math.sin(X) + Math.sin(q) * Math.sin(ae)) * me, _t = 0.5 * V * (Math.cos(w) + Math.cos(q)) * me;
|
|
360
|
+
D += Pe, S += fe, p += _t, O.push({
|
|
361
|
+
x: $ + D,
|
|
362
|
+
y: k + S,
|
|
363
363
|
z: -p,
|
|
364
364
|
// render with z up; depth down
|
|
365
|
-
md:
|
|
366
|
-
azimuth:
|
|
367
|
-
dip:
|
|
365
|
+
md: T,
|
|
366
|
+
azimuth: v,
|
|
367
|
+
dip: z
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
const
|
|
371
|
-
...
|
|
372
|
-
lat:
|
|
373
|
-
lng:
|
|
370
|
+
const I = O.map((_) => ({
|
|
371
|
+
..._,
|
|
372
|
+
lat: g + _.y / P,
|
|
373
|
+
lng: A + _.x / U
|
|
374
374
|
}));
|
|
375
375
|
l.push({
|
|
376
|
-
id:
|
|
377
|
-
project:
|
|
378
|
-
points:
|
|
379
|
-
collar:
|
|
376
|
+
id: h[N] || h.holeId || y,
|
|
377
|
+
project: h[de] || h.project_id || h.project || "",
|
|
378
|
+
points: I,
|
|
379
|
+
collar: h
|
|
380
380
|
});
|
|
381
381
|
}), l;
|
|
382
382
|
}
|
|
383
|
-
const
|
|
384
|
-
const n = Number(e), t = 90 + (Number.isFinite(n) ? n : 0),
|
|
385
|
-
return
|
|
383
|
+
const $e = (e) => e * Math.PI / 180, Be = (e) => {
|
|
384
|
+
const n = Number(e), t = 90 + (Number.isFinite(n) ? n : 0), r = Math.min(180, Math.max(0, t));
|
|
385
|
+
return $e(r);
|
|
386
386
|
};
|
|
387
387
|
function te(e, n = void 0) {
|
|
388
388
|
const t = Number(e);
|
|
389
389
|
return Number.isFinite(t) ? t : n;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
391
|
+
function Ve(e) {
|
|
392
392
|
return e == null ? "" : `${e}`.trim();
|
|
393
393
|
}
|
|
394
394
|
function Ce(e = [], n = null) {
|
|
395
|
-
const t = n || "hole_id",
|
|
396
|
-
if (!
|
|
397
|
-
throw
|
|
395
|
+
const t = n || "hole_id", o = [t, "hole_id", "holeId", "id"].find((i) => e.some((s) => Ve(s == null ? void 0 : s[i])));
|
|
396
|
+
if (!o)
|
|
397
|
+
throw G("canonicalizeHoleIdRows", new Error(`hole id column '${t}' not found`));
|
|
398
398
|
return {
|
|
399
|
-
aliasCol:
|
|
399
|
+
aliasCol: o,
|
|
400
400
|
rows: e.map((i) => ({
|
|
401
401
|
...i,
|
|
402
|
-
hole_id:
|
|
402
|
+
hole_id: Ve(i == null ? void 0 : i[o])
|
|
403
403
|
}))
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function je(e) {
|
|
407
407
|
return Number(e) * Math.PI / 180;
|
|
408
408
|
}
|
|
409
409
|
function xe(e, n) {
|
|
410
|
-
const t =
|
|
411
|
-
return { ca:
|
|
410
|
+
const t = je(e), r = je(n), o = Math.cos(r) * Math.sin(t), i = Math.cos(r) * Math.cos(t), s = Math.sin(r) * -1;
|
|
411
|
+
return { ca: o, cb: i, cc: s };
|
|
412
412
|
}
|
|
413
|
-
function
|
|
414
|
-
const
|
|
413
|
+
function wt(e, n, t, r, o, i = "minimum_curvature") {
|
|
414
|
+
const s = xe(n, t), a = xe(r, o);
|
|
415
415
|
if (i === "tangential")
|
|
416
416
|
return {
|
|
417
|
-
dx: e *
|
|
418
|
-
dy: e *
|
|
419
|
-
dz: e *
|
|
417
|
+
dx: e * s.ca,
|
|
418
|
+
dy: e * s.cb,
|
|
419
|
+
dz: e * s.cc,
|
|
420
420
|
azimuth: n,
|
|
421
421
|
dip: t
|
|
422
422
|
};
|
|
423
423
|
if (i === "balanced_tangential") {
|
|
424
|
-
const
|
|
424
|
+
const d = 0.5 * (n + r), m = 0.5 * (t + o), f = xe(d, m);
|
|
425
425
|
return {
|
|
426
426
|
dx: e * f.ca,
|
|
427
427
|
dy: e * f.cb,
|
|
428
428
|
dz: e * f.cc,
|
|
429
|
-
azimuth:
|
|
430
|
-
dip:
|
|
429
|
+
azimuth: d,
|
|
430
|
+
dip: m
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
|
-
const l =
|
|
433
|
+
const l = s.ca * a.ca + s.cb * a.cb + s.cc * a.cc, u = Math.acos(Math.max(-1, Math.min(1, l))), c = u > 1e-6 ? 2 * Math.tan(u / 2) / u : 1;
|
|
434
434
|
return {
|
|
435
|
-
dx: 0.5 * e * (
|
|
436
|
-
dy: 0.5 * e * (
|
|
437
|
-
dz: 0.5 * e * (
|
|
438
|
-
azimuth:
|
|
439
|
-
dip:
|
|
435
|
+
dx: 0.5 * e * (s.ca + a.ca) * c,
|
|
436
|
+
dy: 0.5 * e * (s.cb + a.cb) * c,
|
|
437
|
+
dz: 0.5 * e * (s.cc + a.cc) * c,
|
|
438
|
+
azimuth: r,
|
|
439
|
+
dip: o
|
|
440
440
|
};
|
|
441
441
|
}
|
|
442
|
-
function
|
|
442
|
+
function Fe(e = [], n = [], t = {}) {
|
|
443
443
|
const {
|
|
444
|
-
step:
|
|
445
|
-
holeIdCol:
|
|
444
|
+
step: r = 1,
|
|
445
|
+
holeIdCol: o = null,
|
|
446
446
|
method: i = "minimum_curvature"
|
|
447
|
-
} = t,
|
|
447
|
+
} = t, s = Number.isFinite(Number(r)) && Number(r) > 0 ? Number(r) : 1, a = Ce(e, o), l = Ce(n, o || a.aliasCol);
|
|
448
448
|
if (!a.rows.length || !l.rows.length) return [];
|
|
449
449
|
const u = /* @__PURE__ */ new Map();
|
|
450
|
-
a.rows.forEach((
|
|
451
|
-
!
|
|
450
|
+
a.rows.forEach((m) => {
|
|
451
|
+
!m.hole_id || u.has(m.hole_id) || u.set(m.hole_id, m);
|
|
452
452
|
});
|
|
453
453
|
const c = /* @__PURE__ */ new Map();
|
|
454
|
-
l.rows.forEach((
|
|
455
|
-
|
|
454
|
+
l.rows.forEach((m) => {
|
|
455
|
+
m.hole_id && (c.has(m.hole_id) || c.set(m.hole_id, []), c.get(m.hole_id).push(m));
|
|
456
456
|
});
|
|
457
|
-
const
|
|
458
|
-
return c.forEach((
|
|
459
|
-
const
|
|
460
|
-
if (!
|
|
461
|
-
const
|
|
462
|
-
...
|
|
463
|
-
from: te(
|
|
464
|
-
azimuth: te(
|
|
465
|
-
dip: te(
|
|
466
|
-
})).filter((
|
|
467
|
-
if (!
|
|
468
|
-
let b = te(
|
|
469
|
-
const
|
|
457
|
+
const d = [];
|
|
458
|
+
return c.forEach((m, f) => {
|
|
459
|
+
const y = u.get(f);
|
|
460
|
+
if (!y) return;
|
|
461
|
+
const h = [...m].map((O) => ({
|
|
462
|
+
...O,
|
|
463
|
+
from: te(O.from),
|
|
464
|
+
azimuth: te(O.azimuth),
|
|
465
|
+
dip: te(O.dip)
|
|
466
|
+
})).filter((O) => Number.isFinite(O.from) && Number.isFinite(O.azimuth) && Number.isFinite(O.dip)).sort((O, D) => O.from - D.from);
|
|
467
|
+
if (!h.length) return;
|
|
468
|
+
let b = te(y.x, 0), g = te(y.y, 0), A = te(y.z, 0), P = h[0].from;
|
|
469
|
+
const U = h[0].azimuth, $ = h[0].dip, k = {
|
|
470
470
|
hole_id: f,
|
|
471
|
-
md:
|
|
471
|
+
md: P,
|
|
472
472
|
x: b,
|
|
473
|
-
y:
|
|
474
|
-
z:
|
|
475
|
-
azimuth:
|
|
476
|
-
dip:
|
|
473
|
+
y: g,
|
|
474
|
+
z: A,
|
|
475
|
+
azimuth: U,
|
|
476
|
+
dip: $
|
|
477
477
|
};
|
|
478
|
-
a.aliasCol !== "hole_id" &&
|
|
479
|
-
for (let
|
|
480
|
-
const
|
|
481
|
-
if (
|
|
482
|
-
const
|
|
483
|
-
for (let
|
|
484
|
-
|
|
485
|
-
const
|
|
486
|
-
b +=
|
|
487
|
-
const
|
|
478
|
+
a.aliasCol !== "hole_id" && y[a.aliasCol] !== void 0 && (k[a.aliasCol] = y[a.aliasCol]), d.push(k);
|
|
479
|
+
for (let O = 0; O < h.length - 1; O += 1) {
|
|
480
|
+
const D = h[O], S = h[O + 1], p = D.from, _ = S.from - p;
|
|
481
|
+
if (_ <= 0) continue;
|
|
482
|
+
const R = Math.max(1, Math.ceil(_ / s)), x = _ / R;
|
|
483
|
+
for (let T = 0; T < R; T += 1) {
|
|
484
|
+
P += x;
|
|
485
|
+
const v = (P - p) / _, z = D.azimuth + v * (S.azimuth - D.azimuth), F = D.dip + v * (S.dip - D.dip), C = wt(x, D.azimuth, D.dip, S.azimuth, S.dip, i);
|
|
486
|
+
b += C.dx, g += C.dy, A += C.dz;
|
|
487
|
+
const B = {
|
|
488
488
|
hole_id: f,
|
|
489
|
-
md:
|
|
489
|
+
md: P,
|
|
490
490
|
x: b,
|
|
491
|
-
y:
|
|
492
|
-
z:
|
|
493
|
-
azimuth: i === "minimum_curvature" ?
|
|
494
|
-
dip: i === "minimum_curvature" ? F :
|
|
491
|
+
y: g,
|
|
492
|
+
z: A,
|
|
493
|
+
azimuth: i === "minimum_curvature" ? z : C.azimuth,
|
|
494
|
+
dip: i === "minimum_curvature" ? F : C.dip
|
|
495
495
|
};
|
|
496
|
-
a.aliasCol !== "hole_id" &&
|
|
496
|
+
a.aliasCol !== "hole_id" && y[a.aliasCol] !== void 0 && (B[a.aliasCol] = y[a.aliasCol]), d.push(B);
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
|
-
}),
|
|
499
|
+
}), d;
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
return
|
|
501
|
+
function Ht(e, n, t = {}) {
|
|
502
|
+
return Fe(e, n, { ...t, method: "minimum_curvature" });
|
|
503
503
|
}
|
|
504
|
-
function
|
|
505
|
-
return
|
|
504
|
+
function $n(e, n, t = {}) {
|
|
505
|
+
return Fe(e, n, { ...t, method: "tangential" });
|
|
506
506
|
}
|
|
507
|
-
function
|
|
508
|
-
return
|
|
507
|
+
function kn(e, n, t = {}) {
|
|
508
|
+
return Fe(e, n, { ...t, method: "balanced_tangential" });
|
|
509
509
|
}
|
|
510
|
-
function
|
|
511
|
-
return
|
|
510
|
+
function Fn(e, n, t = {}) {
|
|
511
|
+
return Ht(e, n, t);
|
|
512
512
|
}
|
|
513
|
-
function
|
|
513
|
+
function Gt(e, n) {
|
|
514
514
|
if (!e.length || !Number.isFinite(n)) return null;
|
|
515
|
-
let t = null,
|
|
516
|
-
for (let
|
|
517
|
-
const i = e[
|
|
518
|
-
if (!Number.isFinite(
|
|
519
|
-
const a = Math.abs(
|
|
520
|
-
a <
|
|
515
|
+
let t = null, r = 1 / 0;
|
|
516
|
+
for (let o = 0; o < e.length; o += 1) {
|
|
517
|
+
const i = e[o], s = te(i.md);
|
|
518
|
+
if (!Number.isFinite(s)) continue;
|
|
519
|
+
const a = Math.abs(s - n);
|
|
520
|
+
a < r && (r = a, t = i);
|
|
521
521
|
}
|
|
522
522
|
return t;
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
const
|
|
526
|
-
if (!
|
|
527
|
-
const
|
|
524
|
+
function wn(e = [], n = [], t = {}) {
|
|
525
|
+
const r = t.holeIdCol || "hole_id", o = Ce(e, r), i = Ce(n, r);
|
|
526
|
+
if (!o.rows.length || !i.rows.length) return [...o.rows];
|
|
527
|
+
const s = /* @__PURE__ */ new Map();
|
|
528
528
|
return i.rows.forEach((a) => {
|
|
529
|
-
a.hole_id && (
|
|
530
|
-
}),
|
|
531
|
-
|
|
532
|
-
}),
|
|
529
|
+
a.hole_id && (s.has(a.hole_id) || s.set(a.hole_id, []), s.get(a.hole_id).push(a));
|
|
530
|
+
}), s.forEach((a, l) => {
|
|
531
|
+
s.set(l, [...a].sort((u, c) => te(u.md, 0) - te(c.md, 0)));
|
|
532
|
+
}), o.rows.map((a) => {
|
|
533
533
|
const l = te(a.from), u = te(a.to), c = Number.isFinite(l) && Number.isFinite(u) ? 0.5 * (l + u) : void 0;
|
|
534
534
|
if (!a.hole_id || !Number.isFinite(c)) return { ...a };
|
|
535
|
-
const
|
|
536
|
-
if (!
|
|
537
|
-
const
|
|
535
|
+
const d = Gt(s.get(a.hole_id) || [], c);
|
|
536
|
+
if (!d) return { ...a };
|
|
537
|
+
const m = { ...a };
|
|
538
538
|
return ["md", "x", "y", "z", "azimuth", "dip"].forEach((f) => {
|
|
539
|
-
|
|
540
|
-
}),
|
|
539
|
+
d[f] !== void 0 && (Object.prototype.hasOwnProperty.call(m, f) ? m[`${f}_trace`] = d[f] : m[f] = d[f]);
|
|
540
|
+
}), m;
|
|
541
541
|
});
|
|
542
542
|
}
|
|
543
|
-
function
|
|
544
|
-
return new Promise((t,
|
|
543
|
+
function Hn(e, n = null) {
|
|
544
|
+
return new Promise((t, r) => {
|
|
545
545
|
J.parse(e, {
|
|
546
546
|
header: !0,
|
|
547
547
|
dynamicTyping: !0,
|
|
548
548
|
skipEmptyLines: !0,
|
|
549
|
-
complete: (
|
|
549
|
+
complete: (o) => {
|
|
550
550
|
const i = /* @__PURE__ */ new Map();
|
|
551
|
-
|
|
552
|
-
const u = ie(a, null, n), c = u[
|
|
553
|
-
!
|
|
551
|
+
o.data.forEach((a, l) => {
|
|
552
|
+
const u = ie(a, null, n), c = u[N], d = c !== void 0 ? `${c}`.trim() : "", m = u[he] ?? u.x, f = u[ge] ?? u.y, y = u[Ae] ?? u.z, h = u.order ?? l;
|
|
553
|
+
!d || m === null || m === void 0 || f === null || f === void 0 || y === null || y === void 0 || (i.has(d) || i.set(d, []), i.get(d).push({
|
|
554
554
|
...u,
|
|
555
|
-
holeId:
|
|
556
|
-
order:
|
|
557
|
-
x: Number(
|
|
555
|
+
holeId: d,
|
|
556
|
+
order: h,
|
|
557
|
+
x: Number(m) ?? 0,
|
|
558
558
|
y: Number(f) ?? 0,
|
|
559
|
-
z: Number(
|
|
559
|
+
z: Number(y) ?? 0
|
|
560
560
|
}));
|
|
561
561
|
});
|
|
562
|
-
const
|
|
562
|
+
const s = Array.from(i.entries()).map(([a, l]) => ({
|
|
563
563
|
id: a,
|
|
564
564
|
points: l.sort((u, c) => u.order - c.order).map((u) => ({
|
|
565
565
|
...u,
|
|
@@ -568,13 +568,13 @@ function On(e, n = null) {
|
|
|
568
568
|
z: Number(u.z) || 0
|
|
569
569
|
}))
|
|
570
570
|
}));
|
|
571
|
-
t({ holes:
|
|
571
|
+
t({ holes: s });
|
|
572
572
|
},
|
|
573
|
-
error: (
|
|
573
|
+
error: (o) => r(G("parseDrillholesCSV", o))
|
|
574
574
|
});
|
|
575
575
|
});
|
|
576
576
|
}
|
|
577
|
-
function
|
|
577
|
+
function ye(e) {
|
|
578
578
|
return e ? Array.isArray(e) ? [...e] : [] : [];
|
|
579
579
|
}
|
|
580
580
|
function Z(e) {
|
|
@@ -583,311 +583,311 @@ function Z(e) {
|
|
|
583
583
|
}
|
|
584
584
|
function Ne(e = [], n = []) {
|
|
585
585
|
const t = [...e];
|
|
586
|
-
return t.sort((
|
|
586
|
+
return t.sort((r, o) => {
|
|
587
587
|
for (let i = 0; i < n.length; i += 1) {
|
|
588
|
-
const
|
|
588
|
+
const s = n[i], a = r == null ? void 0 : r[s], l = o == null ? void 0 : o[s];
|
|
589
589
|
if (a !== l)
|
|
590
590
|
return a == null ? 1 : l == null ? -1 : typeof a == "number" && typeof l == "number" ? a - l : `${a}`.localeCompare(`${l}`);
|
|
591
591
|
}
|
|
592
592
|
return 0;
|
|
593
593
|
}), t;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function Ut(e = [], n = "Intervals") {
|
|
596
596
|
if (!e.length) return;
|
|
597
|
-
const t = Ne(e, [
|
|
598
|
-
t.forEach((
|
|
599
|
-
const i = `${(
|
|
600
|
-
if (!i || !Number.isFinite(
|
|
601
|
-
const l =
|
|
602
|
-
if (Number.isFinite(l) &&
|
|
603
|
-
throw
|
|
597
|
+
const t = Ne(e, [N, L, M]), r = /* @__PURE__ */ new Map();
|
|
598
|
+
t.forEach((o) => {
|
|
599
|
+
const i = `${(o == null ? void 0 : o[N]) ?? ""}`.trim(), s = Number(o == null ? void 0 : o[L]), a = Number(o == null ? void 0 : o[M]);
|
|
600
|
+
if (!i || !Number.isFinite(s) || !Number.isFinite(a)) return;
|
|
601
|
+
const l = r.get(i);
|
|
602
|
+
if (Number.isFinite(l) && s < l)
|
|
603
|
+
throw G(
|
|
604
604
|
"validateNoOverlappingIntervals",
|
|
605
|
-
new Error(`${n} intervals overlap for hole '${i}': from=${
|
|
605
|
+
new Error(`${n} intervals overlap for hole '${i}': from=${s} is less than previous to=${l}`)
|
|
606
606
|
);
|
|
607
|
-
|
|
607
|
+
r.set(i, a);
|
|
608
608
|
});
|
|
609
609
|
}
|
|
610
|
-
function
|
|
611
|
-
return new Promise((t,
|
|
610
|
+
function Bt(e, n = {}) {
|
|
611
|
+
return new Promise((t, r) => {
|
|
612
612
|
J.parse(e, {
|
|
613
613
|
header: !0,
|
|
614
614
|
dynamicTyping: !0,
|
|
615
615
|
skipEmptyLines: !0,
|
|
616
616
|
...n,
|
|
617
|
-
complete: (
|
|
618
|
-
error: (
|
|
617
|
+
complete: (o) => t(Array.isArray(o == null ? void 0 : o.data) ? o.data : []),
|
|
618
|
+
error: (o) => r(G("loadTable(csv)", o))
|
|
619
619
|
});
|
|
620
620
|
});
|
|
621
621
|
}
|
|
622
|
-
function
|
|
623
|
-
return e.map((
|
|
622
|
+
function Vt(e = [], n = null, t = null) {
|
|
623
|
+
return e.map((r) => ie(r, n, t));
|
|
624
624
|
}
|
|
625
625
|
async function Me(e, n = {}) {
|
|
626
626
|
const {
|
|
627
627
|
kind: t = "csv",
|
|
628
|
-
columnMap:
|
|
629
|
-
sourceColumnMap:
|
|
628
|
+
columnMap: r = null,
|
|
629
|
+
sourceColumnMap: o = null,
|
|
630
630
|
papaParseConfig: i = {}
|
|
631
631
|
} = n;
|
|
632
|
-
let
|
|
632
|
+
let s;
|
|
633
633
|
if (Array.isArray(e))
|
|
634
|
-
|
|
634
|
+
s = ye(e);
|
|
635
635
|
else if (t === "csv")
|
|
636
|
-
|
|
637
|
-
else throw t === "parquet" || t === "sql" ?
|
|
638
|
-
return
|
|
636
|
+
s = await Bt(e, i);
|
|
637
|
+
else throw t === "parquet" || t === "sql" ? G("loadTable", new Error(`Unsupported kind in JS runtime: ${t}`)) : G("loadTable", new Error(`Unsupported kind: ${t}`));
|
|
638
|
+
return Vt(s, r, o);
|
|
639
639
|
}
|
|
640
|
-
async function
|
|
640
|
+
async function Gn(e, n = {}) {
|
|
641
641
|
const {
|
|
642
642
|
crs: t = null,
|
|
643
|
-
sourceColumnMap:
|
|
644
|
-
keepAll:
|
|
643
|
+
sourceColumnMap: r = null,
|
|
644
|
+
keepAll: o = !0,
|
|
645
645
|
...i
|
|
646
|
-
} = n,
|
|
647
|
-
if (!
|
|
648
|
-
throw
|
|
649
|
-
const l =
|
|
646
|
+
} = n, s = await Me(e, { ...i, sourceColumnMap: r });
|
|
647
|
+
if (!s.some((m) => N in m))
|
|
648
|
+
throw G("loadCollars", new Error(`Collar table missing column: ${N}`));
|
|
649
|
+
const l = s.some((m) => he in m && ge in m), u = s.some((m) => re in m && oe in m);
|
|
650
650
|
if (!l && !u)
|
|
651
|
-
throw
|
|
652
|
-
const c =
|
|
653
|
-
const f = { ...
|
|
654
|
-
if (
|
|
655
|
-
const
|
|
656
|
-
f[
|
|
651
|
+
throw G("loadCollars", new Error("Collar table missing coordinate columns (need easting/northing or latitude/longitude)"));
|
|
652
|
+
const c = s.map((m) => {
|
|
653
|
+
const f = { ...m };
|
|
654
|
+
if (N in f) {
|
|
655
|
+
const y = f[N];
|
|
656
|
+
f[N] = y == null ? "" : `${y}`.trim();
|
|
657
657
|
}
|
|
658
|
-
return
|
|
658
|
+
return re in f && (f[re] = Z(f[re])), oe in f && (f[oe] = Z(f[oe])), Ae in f && (f[Ae] = Z(f[Ae])), he in f && (f[he] = Z(f[he])), ge in f && (f[ge] = Z(f[ge])), !("datasource_hole_id" in f) && N in f && (f.datasource_hole_id = f[N]), f;
|
|
659
659
|
});
|
|
660
|
-
if (!c.every((
|
|
661
|
-
throw
|
|
660
|
+
if (!c.every((m) => !(!m[N] || u && (!Number.isFinite(m[re]) || !Number.isFinite(m[oe])) || l && !u && (!Number.isFinite(m[he]) || !Number.isFinite(m[ge])))))
|
|
661
|
+
throw G("loadCollars", new Error("Collar table has missing required values"));
|
|
662
662
|
return c;
|
|
663
663
|
}
|
|
664
|
-
async function
|
|
664
|
+
async function Un(e, n = {}) {
|
|
665
665
|
const {
|
|
666
666
|
sourceColumnMap: t = null,
|
|
667
|
-
keepAll:
|
|
668
|
-
...
|
|
669
|
-
} = n, i = await Me(e, { ...
|
|
670
|
-
for (const u of
|
|
671
|
-
if (!i.some((
|
|
672
|
-
throw
|
|
667
|
+
keepAll: r = !0,
|
|
668
|
+
...o
|
|
669
|
+
} = n, i = await Me(e, { ...o, sourceColumnMap: t }), s = [N, j, Y, W];
|
|
670
|
+
for (const u of s)
|
|
671
|
+
if (!i.some((d) => u in d))
|
|
672
|
+
throw G("loadSurveys", new Error(`Survey table missing column: ${u}`));
|
|
673
673
|
const a = i.map((u) => {
|
|
674
674
|
const c = { ...u };
|
|
675
|
-
if (
|
|
676
|
-
const
|
|
677
|
-
c[
|
|
675
|
+
if (N in c) {
|
|
676
|
+
const d = c[N];
|
|
677
|
+
c[N] = d == null ? "" : `${d}`.trim();
|
|
678
678
|
}
|
|
679
|
-
return
|
|
679
|
+
return j in c && (c[j] = Z(c[j])), M in c && (c[M] = Z(c[M])), Y in c && (c[Y] = Z(c[Y])), W in c && (c[W] = Z(c[W])), c;
|
|
680
680
|
});
|
|
681
|
-
if (!a.every((u) => !(!u[
|
|
682
|
-
throw
|
|
683
|
-
return Ne(a, [
|
|
681
|
+
if (!a.every((u) => !(!u[N] || !Number.isFinite(u[j]) || !Number.isFinite(u[Y]) || !Number.isFinite(u[W]))))
|
|
682
|
+
throw G("loadSurveys", new Error("Survey table has missing required values"));
|
|
683
|
+
return Ne(a, [N, j]);
|
|
684
684
|
}
|
|
685
|
-
async function
|
|
685
|
+
async function Bn(e, n = {}) {
|
|
686
686
|
const {
|
|
687
687
|
sourceColumnMap: t = null,
|
|
688
|
-
keepAll:
|
|
689
|
-
...
|
|
690
|
-
} = n, i = await Me(e, { ...
|
|
691
|
-
for (const u of
|
|
692
|
-
if (!i.some((
|
|
693
|
-
throw
|
|
688
|
+
keepAll: r = !0,
|
|
689
|
+
...o
|
|
690
|
+
} = n, i = await Me(e, { ...o, sourceColumnMap: t }), s = [N, L, M];
|
|
691
|
+
for (const u of s)
|
|
692
|
+
if (!i.some((d) => u in d))
|
|
693
|
+
throw G("loadAssays", new Error(`Assay table missing column: ${u}`));
|
|
694
694
|
const a = i.map((u) => {
|
|
695
695
|
const c = { ...u };
|
|
696
|
-
if (
|
|
697
|
-
const
|
|
698
|
-
c[
|
|
696
|
+
if (N in c) {
|
|
697
|
+
const d = c[N];
|
|
698
|
+
c[N] = d == null ? "" : `${d}`.trim();
|
|
699
699
|
}
|
|
700
|
-
return
|
|
700
|
+
return L in c && (c[L] = Z(c[L])), M in c && (c[M] = Z(c[M])), L in c && M in c && Number.isFinite(c[L]) && Number.isFinite(c[M]) && (c[ve] = 0.5 * (c[L] + c[M])), c;
|
|
701
701
|
});
|
|
702
|
-
if (!a.every((u) => !(!u[
|
|
703
|
-
throw
|
|
704
|
-
return Ne(a, [
|
|
702
|
+
if (!a.every((u) => !(!u[N] || !Number.isFinite(u[L]) || !Number.isFinite(u[M]) || !(u[M] > u[L]))))
|
|
703
|
+
throw G("loadAssays", new Error("Assay table has missing required values"));
|
|
704
|
+
return Ne(a, [N, L, M]);
|
|
705
705
|
}
|
|
706
|
-
async function
|
|
706
|
+
async function Vn(e, n = {}) {
|
|
707
707
|
const {
|
|
708
708
|
sourceColumnMap: t = null,
|
|
709
|
-
keepAll:
|
|
710
|
-
...
|
|
711
|
-
} = n, i = await Me(e, { ...
|
|
712
|
-
for (const c of
|
|
713
|
-
if (!i.some((
|
|
714
|
-
throw
|
|
709
|
+
keepAll: r = !0,
|
|
710
|
+
...o
|
|
711
|
+
} = n, i = await Me(e, { ...o, sourceColumnMap: t }), s = [N, L, M];
|
|
712
|
+
for (const c of s)
|
|
713
|
+
if (!i.some((m) => c in m))
|
|
714
|
+
throw G("loadGeology", new Error(`Geology table missing column: ${c}`));
|
|
715
715
|
const a = i.map((c) => {
|
|
716
|
-
const
|
|
717
|
-
if (
|
|
718
|
-
const
|
|
719
|
-
|
|
716
|
+
const d = { ...c };
|
|
717
|
+
if (N in d) {
|
|
718
|
+
const y = d[N];
|
|
719
|
+
d[N] = y == null ? "" : `${y}`.trim();
|
|
720
720
|
}
|
|
721
|
-
|
|
722
|
-
const
|
|
723
|
-
return !
|
|
721
|
+
L in d && (d[L] = Z(d[L])), M in d && (d[M] = Z(d[M])), L in d && M in d && Number.isFinite(d[L]) && Number.isFinite(d[M]) && (d[M] === d[L] && (d[L] = Math.round(d[L] * 1e3) / 1e3, d[M] = d[L] + 1e-3), d[ve] = 0.5 * (d[L] + d[M]));
|
|
722
|
+
const m = d[le] !== void 0 && d[le] !== null && `${d[le]}`.trim() !== "", f = d[ce] !== void 0 && d[ce] !== null && `${d[ce]}`.trim() !== "";
|
|
723
|
+
return !m && f && (d[le] = d[ce]), m && !f && (d[ce] = d[le]), d;
|
|
724
724
|
});
|
|
725
|
-
if (!a.every((c) => !(!c[
|
|
726
|
-
throw
|
|
725
|
+
if (!a.every((c) => !(!c[N] || !Number.isFinite(c[L]) || !Number.isFinite(c[M]) || !(c[M] > c[L]))))
|
|
726
|
+
throw G("loadGeology", new Error("Geology table has missing or invalid interval values"));
|
|
727
727
|
if (!a.some((c) => {
|
|
728
|
-
const
|
|
729
|
-
return
|
|
728
|
+
const d = c[le], m = c[ce];
|
|
729
|
+
return d != null && `${d}`.trim() !== "" || m != null && `${m}`.trim() !== "";
|
|
730
730
|
}))
|
|
731
|
-
throw
|
|
732
|
-
if (
|
|
733
|
-
const c = new Set(Object.keys(
|
|
731
|
+
throw G("loadGeology", new Error(`Geology table missing categorical columns: ${le} or ${ce}`));
|
|
732
|
+
if (Ut(a, "Geology"), !r) {
|
|
733
|
+
const c = new Set(Object.keys(Et));
|
|
734
734
|
return Ne(
|
|
735
|
-
a.map((
|
|
736
|
-
[
|
|
735
|
+
a.map((d) => Object.fromEntries(Object.entries(d).filter(([m]) => c.has(m)))),
|
|
736
|
+
[N, L, M]
|
|
737
737
|
);
|
|
738
738
|
}
|
|
739
|
-
return Ne(a, [
|
|
739
|
+
return Ne(a, [N, L, M]);
|
|
740
740
|
}
|
|
741
|
-
function
|
|
742
|
-
const
|
|
741
|
+
function jn(e = [], n = [], t = {}) {
|
|
742
|
+
const r = Array.isArray(t.onCols) && t.onCols.length ? t.onCols : [N];
|
|
743
743
|
if (!n.length) return [...e];
|
|
744
|
-
const
|
|
745
|
-
return n.forEach((
|
|
746
|
-
i.set(
|
|
747
|
-
}), e.map((
|
|
748
|
-
const a = i.get(
|
|
749
|
-
if (!a) return { ...
|
|
750
|
-
const l = { ...
|
|
744
|
+
const o = (s) => r.map((a) => `${(s == null ? void 0 : s[a]) ?? ""}`).join("|"), i = /* @__PURE__ */ new Map();
|
|
745
|
+
return n.forEach((s) => {
|
|
746
|
+
i.set(o(s), s);
|
|
747
|
+
}), e.map((s) => {
|
|
748
|
+
const a = i.get(o(s));
|
|
749
|
+
if (!a) return { ...s };
|
|
750
|
+
const l = { ...s };
|
|
751
751
|
return Object.entries(a).forEach(([u, c]) => {
|
|
752
|
-
|
|
752
|
+
r.includes(u) || (Object.prototype.hasOwnProperty.call(l, u) ? l[`${u}_trace`] = c : l[u] = c);
|
|
753
753
|
}), l;
|
|
754
754
|
});
|
|
755
755
|
}
|
|
756
|
-
function
|
|
757
|
-
return n == null ? [...e] : e.length ? e.some((
|
|
756
|
+
function Yn(e = [], n = null) {
|
|
757
|
+
return n == null ? [...e] : e.length ? e.some((r) => de in r) ? e.filter((r) => (r == null ? void 0 : r[de]) === n) : [...e] : [];
|
|
758
758
|
}
|
|
759
|
-
function
|
|
759
|
+
function Wn(e = [], n = []) {
|
|
760
760
|
return e.map((t) => {
|
|
761
|
-
const
|
|
762
|
-
return n.forEach((
|
|
763
|
-
if (!(
|
|
764
|
-
const i = Z(
|
|
765
|
-
|
|
766
|
-
}),
|
|
761
|
+
const r = { ...t };
|
|
762
|
+
return n.forEach((o) => {
|
|
763
|
+
if (!(o in r)) return;
|
|
764
|
+
const i = Z(r[o]);
|
|
765
|
+
r[o] = i;
|
|
766
|
+
}), r;
|
|
767
767
|
});
|
|
768
768
|
}
|
|
769
|
-
function
|
|
769
|
+
function qn({
|
|
770
770
|
collars: e = [],
|
|
771
771
|
surveys: n = [],
|
|
772
772
|
assays: t = [],
|
|
773
|
-
geology:
|
|
774
|
-
structures:
|
|
773
|
+
geology: r = [],
|
|
774
|
+
structures: o = [],
|
|
775
775
|
metadata: i = {}
|
|
776
776
|
} = {}) {
|
|
777
777
|
return {
|
|
778
|
-
collars:
|
|
779
|
-
surveys:
|
|
780
|
-
assays:
|
|
781
|
-
geology:
|
|
782
|
-
structures:
|
|
778
|
+
collars: ye(e),
|
|
779
|
+
surveys: ye(n),
|
|
780
|
+
assays: ye(t),
|
|
781
|
+
geology: ye(r),
|
|
782
|
+
structures: ye(o),
|
|
783
783
|
metadata: i || {}
|
|
784
784
|
};
|
|
785
785
|
}
|
|
786
786
|
const we = (e, n = null) => ie(e, null, n);
|
|
787
|
-
function
|
|
787
|
+
function jt(e) {
|
|
788
788
|
if (!e.length) return null;
|
|
789
|
-
const n = e[0], t =
|
|
790
|
-
return t ? "interval" :
|
|
789
|
+
const n = e[0], t = L in n && M in n, r = j in n && !t;
|
|
790
|
+
return t ? "interval" : r ? "point" : null;
|
|
791
791
|
}
|
|
792
|
-
function
|
|
792
|
+
function se(e) {
|
|
793
793
|
const n = Number(e);
|
|
794
794
|
return Number.isFinite(n) ? n : null;
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
const n = e[
|
|
796
|
+
function at(e) {
|
|
797
|
+
const n = e[N] !== void 0 ? `${e[N]}`.trim() : "";
|
|
798
798
|
if (!n) return null;
|
|
799
|
-
const t =
|
|
799
|
+
const t = se(e[j]);
|
|
800
800
|
return t === null ? null : {
|
|
801
|
-
[
|
|
802
|
-
[
|
|
803
|
-
[
|
|
804
|
-
[
|
|
801
|
+
[N]: n,
|
|
802
|
+
[j]: t,
|
|
803
|
+
[W]: se(e[W]),
|
|
804
|
+
[Y]: se(e[Y]),
|
|
805
805
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
806
806
|
...e
|
|
807
807
|
};
|
|
808
808
|
}
|
|
809
|
-
function
|
|
810
|
-
const n = e[
|
|
809
|
+
function lt(e) {
|
|
810
|
+
const n = e[N] !== void 0 ? `${e[N]}`.trim() : "";
|
|
811
811
|
if (!n) return null;
|
|
812
|
-
const t =
|
|
813
|
-
if (t === null ||
|
|
814
|
-
const
|
|
812
|
+
const t = se(e[L]), r = se(e[M]);
|
|
813
|
+
if (t === null || r === null || r <= t) return null;
|
|
814
|
+
const o = 0.5 * (t + r);
|
|
815
815
|
return {
|
|
816
|
-
[
|
|
817
|
-
[
|
|
818
|
-
[M]:
|
|
819
|
-
mid:
|
|
820
|
-
[
|
|
821
|
-
[
|
|
816
|
+
[N]: n,
|
|
817
|
+
[L]: t,
|
|
818
|
+
[M]: r,
|
|
819
|
+
mid: o,
|
|
820
|
+
[W]: se(e[W]),
|
|
821
|
+
[Y]: se(e[Y]),
|
|
822
822
|
classification: e.classification != null ? `${e.classification}` : null,
|
|
823
823
|
comments: e.comments != null ? `${e.comments}` : null,
|
|
824
824
|
...e
|
|
825
825
|
};
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Xn(e) {
|
|
828
828
|
const n = [], t = [];
|
|
829
|
-
for (const
|
|
830
|
-
const
|
|
831
|
-
i !== null && (i < 0 || i > 90) &&
|
|
829
|
+
for (const r of e) {
|
|
830
|
+
const o = [], i = se(r[W]), s = se(r[Y]);
|
|
831
|
+
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 ? t.push({ row: r, message: o.join("; ") }) : n.push(r);
|
|
832
832
|
}
|
|
833
833
|
return { valid: n, errors: t };
|
|
834
834
|
}
|
|
835
|
-
function
|
|
836
|
-
return new Promise((t,
|
|
837
|
-
const
|
|
835
|
+
function Kn(e, n = null) {
|
|
836
|
+
return new Promise((t, r) => {
|
|
837
|
+
const o = {
|
|
838
838
|
header: !0,
|
|
839
839
|
dynamicTyping: !0,
|
|
840
840
|
skipEmptyLines: !0,
|
|
841
841
|
complete: (i) => {
|
|
842
|
-
const
|
|
842
|
+
const s = [];
|
|
843
843
|
for (const a of i.data) {
|
|
844
|
-
const l = we(a, n), u =
|
|
845
|
-
u &&
|
|
844
|
+
const l = we(a, n), u = at(l);
|
|
845
|
+
u && s.push(u);
|
|
846
846
|
}
|
|
847
|
-
t(
|
|
847
|
+
t(s);
|
|
848
848
|
},
|
|
849
|
-
error: (i) =>
|
|
849
|
+
error: (i) => r(G("parseStructuralPointsCSV", i))
|
|
850
850
|
};
|
|
851
851
|
typeof e == "string" && !e.startsWith("data:") && e.includes(`
|
|
852
|
-
`) ? J.parse(e,
|
|
852
|
+
`) ? J.parse(e, o) : J.parse(e, o);
|
|
853
853
|
});
|
|
854
854
|
}
|
|
855
|
-
function
|
|
856
|
-
return new Promise((t,
|
|
855
|
+
function Zn(e, n = null) {
|
|
856
|
+
return new Promise((t, r) => {
|
|
857
857
|
J.parse(e, {
|
|
858
858
|
header: !0,
|
|
859
859
|
dynamicTyping: !0,
|
|
860
860
|
skipEmptyLines: !0,
|
|
861
|
-
complete: (
|
|
861
|
+
complete: (o) => {
|
|
862
862
|
const i = [];
|
|
863
|
-
for (const
|
|
864
|
-
const a = we(
|
|
863
|
+
for (const s of o.data) {
|
|
864
|
+
const a = we(s, n), l = lt(a);
|
|
865
865
|
l && i.push(l);
|
|
866
866
|
}
|
|
867
867
|
t(i);
|
|
868
868
|
},
|
|
869
|
-
error: (
|
|
869
|
+
error: (o) => r(G("parseStructuralIntervalsCSV", o))
|
|
870
870
|
});
|
|
871
871
|
});
|
|
872
872
|
}
|
|
873
|
-
function
|
|
873
|
+
function Yt(e, n = N) {
|
|
874
874
|
const t = /* @__PURE__ */ new Map();
|
|
875
|
-
for (const
|
|
876
|
-
const
|
|
877
|
-
|
|
875
|
+
for (const r of e) {
|
|
876
|
+
const o = r[n] != null ? String(r[n]).trim() : "";
|
|
877
|
+
o && (t.has(o) || t.set(o, { holeId: o, points: [] }), t.get(o).points.push(r));
|
|
878
878
|
}
|
|
879
879
|
return Array.from(t.values());
|
|
880
880
|
}
|
|
881
|
-
function
|
|
882
|
-
return new Promise((t,
|
|
881
|
+
function Wt(e, n = null) {
|
|
882
|
+
return new Promise((t, r) => {
|
|
883
883
|
J.parse(e, {
|
|
884
884
|
header: !0,
|
|
885
885
|
dynamicTyping: !0,
|
|
886
886
|
skipEmptyLines: !0,
|
|
887
|
-
complete: (
|
|
888
|
-
const i =
|
|
889
|
-
if (!
|
|
890
|
-
|
|
887
|
+
complete: (o) => {
|
|
888
|
+
const i = o.data.map((l) => we(l, n)), s = jt(i);
|
|
889
|
+
if (!s) {
|
|
890
|
+
r(G(
|
|
891
891
|
"parseStructuralCSV",
|
|
892
892
|
new Error("Structural CSV requires either 'depth' (point) or 'from'/'to' (interval) columns")
|
|
893
893
|
));
|
|
@@ -895,283 +895,283 @@ function Gt(e, n = null) {
|
|
|
895
895
|
}
|
|
896
896
|
const a = [];
|
|
897
897
|
for (const l of i) {
|
|
898
|
-
const u =
|
|
898
|
+
const u = s === "interval" ? lt(l) : at(l);
|
|
899
899
|
u && a.push(u);
|
|
900
900
|
}
|
|
901
|
-
t({ schema:
|
|
901
|
+
t({ schema: s, rows: a });
|
|
902
902
|
},
|
|
903
|
-
error: (
|
|
903
|
+
error: (o) => r(G("parseStructuralCSV", o))
|
|
904
904
|
});
|
|
905
905
|
});
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function qt(e) {
|
|
908
908
|
return new Promise((n) => {
|
|
909
909
|
J.parse(e, {
|
|
910
910
|
header: !0,
|
|
911
911
|
dynamicTyping: !0,
|
|
912
912
|
skipEmptyLines: !0,
|
|
913
913
|
complete: (t) => {
|
|
914
|
-
const
|
|
914
|
+
const r = /* @__PURE__ */ new Map();
|
|
915
915
|
for (const i of t.data) {
|
|
916
|
-
const
|
|
916
|
+
const s = ie(i), a = s[N] != null ? `${s[N]}`.trim() : "";
|
|
917
917
|
if (!a) continue;
|
|
918
|
-
const l = Number(
|
|
918
|
+
const l = Number(s[L]), u = Number(s[M]);
|
|
919
919
|
if (!Number.isFinite(l) || !Number.isFinite(u) || u <= l) continue;
|
|
920
|
-
const c = (l + u) / 2, { [
|
|
920
|
+
const c = (l + u) / 2, { [W]: d, [Y]: m, ...f } = s, y = {
|
|
921
921
|
...f,
|
|
922
|
-
[
|
|
923
|
-
[
|
|
922
|
+
[N]: a,
|
|
923
|
+
[L]: l,
|
|
924
924
|
[M]: u,
|
|
925
|
-
[
|
|
926
|
-
[
|
|
925
|
+
[ve]: c,
|
|
926
|
+
[j]: c,
|
|
927
927
|
// unified depth field for y-axis rendering
|
|
928
928
|
_source: "assay"
|
|
929
929
|
};
|
|
930
|
-
|
|
930
|
+
r.has(a) || r.set(a, []), r.get(a).push(y);
|
|
931
931
|
}
|
|
932
|
-
const
|
|
932
|
+
const o = Array.from(r.entries()).map(([i, s]) => ({
|
|
933
933
|
holeId: i,
|
|
934
|
-
points:
|
|
934
|
+
points: s.sort((a, l) => a[L] - l[L])
|
|
935
935
|
}));
|
|
936
|
-
n(
|
|
936
|
+
n(o);
|
|
937
937
|
}
|
|
938
938
|
});
|
|
939
939
|
});
|
|
940
940
|
}
|
|
941
|
-
function
|
|
941
|
+
function Xt(e) {
|
|
942
942
|
return new Promise((n) => {
|
|
943
943
|
J.parse(e, {
|
|
944
944
|
header: !0,
|
|
945
945
|
dynamicTyping: !0,
|
|
946
946
|
skipEmptyLines: !0,
|
|
947
947
|
complete: (t) => {
|
|
948
|
-
const
|
|
949
|
-
for (const
|
|
950
|
-
const i = ie(
|
|
951
|
-
if (!
|
|
952
|
-
const a = Number(i[
|
|
948
|
+
const r = /* @__PURE__ */ new Map();
|
|
949
|
+
for (const o of t.data) {
|
|
950
|
+
const i = ie(o), s = (i[N] ?? "").toString().trim();
|
|
951
|
+
if (!s) continue;
|
|
952
|
+
const a = Number(i[L]), l = Number(i[M]);
|
|
953
953
|
if (!Number.isFinite(a) || !Number.isFinite(l) || l <= a) continue;
|
|
954
|
-
const u = (a + l) / 2, { [
|
|
955
|
-
...
|
|
956
|
-
[
|
|
957
|
-
[
|
|
954
|
+
const u = (a + l) / 2, { [W]: c, [Y]: d, ...m } = i, f = {
|
|
955
|
+
...m,
|
|
956
|
+
[N]: s,
|
|
957
|
+
[L]: a,
|
|
958
958
|
[M]: l,
|
|
959
|
-
[
|
|
960
|
-
[
|
|
959
|
+
[ve]: u,
|
|
960
|
+
[j]: u,
|
|
961
961
|
_source: "geology"
|
|
962
962
|
};
|
|
963
|
-
|
|
963
|
+
r.has(s) || r.set(s, []), r.get(s).push(f);
|
|
964
964
|
}
|
|
965
965
|
n({
|
|
966
|
-
holes: Array.from(
|
|
967
|
-
holeId:
|
|
968
|
-
points: i.sort((
|
|
966
|
+
holes: Array.from(r.entries()).map(([o, i]) => ({
|
|
967
|
+
holeId: o,
|
|
968
|
+
points: i.sort((s, a) => s[L] - a[L])
|
|
969
969
|
}))
|
|
970
970
|
});
|
|
971
971
|
}
|
|
972
972
|
});
|
|
973
973
|
});
|
|
974
974
|
}
|
|
975
|
-
async function
|
|
976
|
-
const [
|
|
977
|
-
e ?
|
|
978
|
-
n ?
|
|
979
|
-
({ rows: a }) =>
|
|
975
|
+
async function Jn({ assayCsv: e, structuralCsv: n, geologyCsv: t } = {}) {
|
|
976
|
+
const [r, o, i] = await Promise.all([
|
|
977
|
+
e ? qt(e) : Promise.resolve([]),
|
|
978
|
+
n ? Wt(n).then(
|
|
979
|
+
({ rows: a }) => Yt(a.map((l) => ({ ...l, _source: "structural" })))
|
|
980
980
|
) : Promise.resolve([]),
|
|
981
|
-
t ?
|
|
982
|
-
]),
|
|
983
|
-
for (const a of [...
|
|
981
|
+
t ? Xt(t).then(({ holes: a }) => a) : Promise.resolve([])
|
|
982
|
+
]), s = new Map(r.map((a) => [a.holeId, { ...a, points: [...a.points] }]));
|
|
983
|
+
for (const a of [...o, ...i]) {
|
|
984
984
|
const l = a.holeId;
|
|
985
985
|
if (l)
|
|
986
|
-
if (
|
|
987
|
-
const u =
|
|
988
|
-
|
|
986
|
+
if (s.has(l)) {
|
|
987
|
+
const u = s.get(l);
|
|
988
|
+
s.set(l, { ...u, points: [...u.points, ...a.points || []] });
|
|
989
989
|
} else
|
|
990
|
-
|
|
990
|
+
s.set(l, a);
|
|
991
991
|
}
|
|
992
|
-
return { holes: Array.from(
|
|
992
|
+
return { holes: Array.from(s.values()) };
|
|
993
993
|
}
|
|
994
|
-
function
|
|
995
|
-
const i =
|
|
994
|
+
function Qn(e, n, t, r, o = {}) {
|
|
995
|
+
const i = o.fromCol || "from", s = o.toCol || "to", a = o.holeCol || "hole_id";
|
|
996
996
|
if (!e || !e.length) return [];
|
|
997
997
|
const l = {};
|
|
998
998
|
for (const c of e) {
|
|
999
|
-
const
|
|
1000
|
-
|
|
999
|
+
const d = c[a];
|
|
1000
|
+
d != null && (l[d] || (l[d] = []), l[d].push(c));
|
|
1001
1001
|
}
|
|
1002
1002
|
const u = [];
|
|
1003
|
-
for (const [c,
|
|
1004
|
-
const f = [...
|
|
1005
|
-
const
|
|
1006
|
-
return Number.isFinite(
|
|
1003
|
+
for (const [c, d] of Object.entries(l)) {
|
|
1004
|
+
const f = [...d].sort((g, A) => Number(g[i]) - Number(A[i])).filter((g) => {
|
|
1005
|
+
const A = Number(g[n]);
|
|
1006
|
+
return Number.isFinite(A) && A >= t;
|
|
1007
1007
|
});
|
|
1008
1008
|
if (!f.length) continue;
|
|
1009
|
-
const
|
|
1010
|
-
let
|
|
1011
|
-
for (const
|
|
1012
|
-
const
|
|
1013
|
-
b === null || Math.abs(
|
|
1009
|
+
const y = [];
|
|
1010
|
+
let h = [], b = null;
|
|
1011
|
+
for (const g of f) {
|
|
1012
|
+
const A = Number(g[i]), P = Number(g[s]);
|
|
1013
|
+
b === null || Math.abs(A - b) > 1e-6 ? (h.length && y.push(h), h = [g]) : h.push(g), b = P;
|
|
1014
1014
|
}
|
|
1015
|
-
|
|
1016
|
-
for (const
|
|
1017
|
-
const
|
|
1018
|
-
if (
|
|
1019
|
-
let
|
|
1020
|
-
for (const p of
|
|
1021
|
-
const
|
|
1022
|
-
|
|
1015
|
+
h.length && y.push(h);
|
|
1016
|
+
for (const g of y) {
|
|
1017
|
+
const A = Number(g[0][i]), P = Number(g[g.length - 1][s]), U = P - A;
|
|
1018
|
+
if (U < r) continue;
|
|
1019
|
+
let $ = 0, k = 0;
|
|
1020
|
+
for (const p of g) {
|
|
1021
|
+
const I = Number(p[n]), _ = Number(p[s]) - Number(p[i]);
|
|
1022
|
+
$ += I * _, k += _;
|
|
1023
1023
|
}
|
|
1024
|
-
const
|
|
1024
|
+
const O = $ / k, D = g.length, S = `${U.toFixed(1)} m @ ${O.toFixed(2)} ${n}`;
|
|
1025
1025
|
u.push({
|
|
1026
1026
|
[a]: c,
|
|
1027
1027
|
assay_field: n,
|
|
1028
|
-
[i]:
|
|
1029
|
-
[
|
|
1030
|
-
length:
|
|
1031
|
-
avg_grade:
|
|
1032
|
-
n_samples:
|
|
1033
|
-
label:
|
|
1028
|
+
[i]: A,
|
|
1029
|
+
[s]: P,
|
|
1030
|
+
length: U,
|
|
1031
|
+
avg_grade: O,
|
|
1032
|
+
n_samples: D,
|
|
1033
|
+
label: S
|
|
1034
1034
|
});
|
|
1035
1035
|
}
|
|
1036
1036
|
}
|
|
1037
1037
|
return u;
|
|
1038
1038
|
}
|
|
1039
|
-
const
|
|
1040
|
-
function
|
|
1041
|
-
if (e[
|
|
1042
|
-
const
|
|
1043
|
-
if (Number.isFinite(
|
|
1039
|
+
const ct = ["depth", "md", "measured_depth", "dept", "z"];
|
|
1040
|
+
function Kt(e) {
|
|
1041
|
+
if (e[j] !== void 0) {
|
|
1042
|
+
const r = Number(e[j]);
|
|
1043
|
+
if (Number.isFinite(r)) return r;
|
|
1044
1044
|
}
|
|
1045
|
-
for (const
|
|
1046
|
-
if (e[
|
|
1047
|
-
const
|
|
1048
|
-
if (Number.isFinite(
|
|
1045
|
+
for (const r of ct)
|
|
1046
|
+
if (e[r] !== void 0) {
|
|
1047
|
+
const o = Number(e[r]);
|
|
1048
|
+
if (Number.isFinite(o)) return o;
|
|
1049
1049
|
}
|
|
1050
|
-
const n = Number(e[
|
|
1050
|
+
const n = Number(e[L]), t = Number(e[M]);
|
|
1051
1051
|
return Number.isFinite(n) && Number.isFinite(t) && t >= n ? (n + t) / 2 : null;
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1053
|
+
function Zt(e) {
|
|
1054
1054
|
if (e.length === 0) return [];
|
|
1055
|
-
const n = /* @__PURE__ */ new Set([
|
|
1056
|
-
return Object.keys(e[0]).filter((
|
|
1057
|
-
let
|
|
1055
|
+
const n = /* @__PURE__ */ new Set([N, j, L, M, ve, ...ct]);
|
|
1056
|
+
return Object.keys(e[0]).filter((r) => !n.has(r)).filter((r) => {
|
|
1057
|
+
let o = 0;
|
|
1058
1058
|
for (const i of e) {
|
|
1059
|
-
const
|
|
1060
|
-
Number.isFinite(
|
|
1059
|
+
const s = Number(i[r]);
|
|
1060
|
+
Number.isFinite(s) && o++;
|
|
1061
1061
|
}
|
|
1062
|
-
return
|
|
1062
|
+
return o / e.length > 0.5;
|
|
1063
1063
|
});
|
|
1064
1064
|
}
|
|
1065
|
-
function
|
|
1066
|
-
const
|
|
1065
|
+
function er(e, n = null) {
|
|
1066
|
+
const r = J.parse(e, {
|
|
1067
1067
|
header: !0,
|
|
1068
1068
|
skipEmptyLines: !0,
|
|
1069
1069
|
dynamicTyping: !1
|
|
1070
1070
|
}).data || [];
|
|
1071
|
-
if (
|
|
1072
|
-
const
|
|
1073
|
-
for (const l of
|
|
1074
|
-
const u = l[
|
|
1071
|
+
if (r.length === 0) return [];
|
|
1072
|
+
const o = r.map((l) => ie(l, null, n)), i = Zt(o), s = /* @__PURE__ */ new Map();
|
|
1073
|
+
for (const l of o) {
|
|
1074
|
+
const u = l[N] != null ? `${l[N]}`.trim() : "";
|
|
1075
1075
|
if (!u) continue;
|
|
1076
|
-
const c =
|
|
1077
|
-
c === null || c < 0 || (
|
|
1076
|
+
const c = Kt(l);
|
|
1077
|
+
c === null || c < 0 || (s.has(u) || s.set(u, []), s.get(u).push({ depth: c, row: l }));
|
|
1078
1078
|
}
|
|
1079
1079
|
const a = [];
|
|
1080
|
-
for (const [l, u] of
|
|
1081
|
-
u.sort((
|
|
1080
|
+
for (const [l, u] of s) {
|
|
1081
|
+
u.sort((d, m) => d.depth - m.depth);
|
|
1082
1082
|
const c = {};
|
|
1083
|
-
for (const
|
|
1084
|
-
const
|
|
1085
|
-
for (const { depth:
|
|
1086
|
-
const b = Number(
|
|
1087
|
-
Number.isFinite(b) && b !==
|
|
1083
|
+
for (const d of i) {
|
|
1084
|
+
const m = [], f = [];
|
|
1085
|
+
for (const { depth: y, row: h } of u) {
|
|
1086
|
+
const b = Number(h[d]);
|
|
1087
|
+
Number.isFinite(b) && b !== et && (m.push(y), f.push(b));
|
|
1088
1088
|
}
|
|
1089
|
-
|
|
1089
|
+
m.length >= 2 && (c[d] = { depths: m, values: f });
|
|
1090
1090
|
}
|
|
1091
1091
|
Object.keys(c).length > 0 && a.push({ holeId: l, channels: c });
|
|
1092
1092
|
}
|
|
1093
1093
|
return a;
|
|
1094
1094
|
}
|
|
1095
|
-
function
|
|
1096
|
-
const
|
|
1097
|
-
for (const { holeId:
|
|
1098
|
-
const
|
|
1099
|
-
if (!
|
|
1100
|
-
const { depths: a, values: l } = i[
|
|
1101
|
-
|
|
1095
|
+
function tr(e, n = null, t = {}) {
|
|
1096
|
+
const r = [];
|
|
1097
|
+
for (const { holeId: o, channels: i } of e) {
|
|
1098
|
+
const s = n && i[n] ? n : Object.keys(i)[0];
|
|
1099
|
+
if (!s) continue;
|
|
1100
|
+
const { depths: a, values: l } = i[s];
|
|
1101
|
+
r.push({ holeId: o, depths: a, values: l, options: t });
|
|
1102
1102
|
}
|
|
1103
|
-
return
|
|
1103
|
+
return r;
|
|
1104
1104
|
}
|
|
1105
|
-
function
|
|
1105
|
+
function ut(e) {
|
|
1106
1106
|
const n = e.indexOf(".");
|
|
1107
1107
|
if (n < 0) return null;
|
|
1108
|
-
const t = e.slice(0, n).trim().toUpperCase(),
|
|
1108
|
+
const t = e.slice(0, n).trim().toUpperCase(), r = e.slice(n + 1), o = r.match(/^(\S*)\s*(.*)/s), i = o ? o[1] : "", s = o ? o[2] : r, a = s.lastIndexOf(":"), l = a >= 0 ? s.slice(0, a).trim() : s.trim(), u = a >= 0 ? s.slice(a + 1).trim() : "";
|
|
1109
1109
|
return { mnem: t, unit: i, value: l, description: u };
|
|
1110
1110
|
}
|
|
1111
|
-
function
|
|
1111
|
+
function Jt(e) {
|
|
1112
1112
|
const n = [];
|
|
1113
1113
|
let t = null;
|
|
1114
|
-
for (const
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1114
|
+
for (const r of e.split(/\r?\n/)) {
|
|
1115
|
+
const o = r.trimEnd();
|
|
1116
|
+
o.startsWith("~") ? (t = { type: o.slice(1, 2).toUpperCase(), lines: [] }, n.push(t)) : t && t.lines.push(o);
|
|
1117
1117
|
}
|
|
1118
1118
|
return n;
|
|
1119
1119
|
}
|
|
1120
|
-
function
|
|
1120
|
+
function Ye(e = []) {
|
|
1121
1121
|
const n = {};
|
|
1122
1122
|
for (const t of e) {
|
|
1123
|
-
const
|
|
1124
|
-
if (!
|
|
1125
|
-
const
|
|
1126
|
-
|
|
1123
|
+
const r = t.trimStart();
|
|
1124
|
+
if (!r || r.startsWith("#")) continue;
|
|
1125
|
+
const o = ut(t);
|
|
1126
|
+
o && (n[o.mnem] = o);
|
|
1127
1127
|
}
|
|
1128
1128
|
return n;
|
|
1129
1129
|
}
|
|
1130
|
-
function
|
|
1131
|
-
var
|
|
1132
|
-
const t =
|
|
1133
|
-
if (!
|
|
1134
|
-
const a =
|
|
1130
|
+
function nr(e, n = {}) {
|
|
1131
|
+
var g, A, P, U, $, k, O, D, S;
|
|
1132
|
+
const t = Jt(e), r = t.find((p) => p.type === "V"), o = t.find((p) => p.type === "W"), i = t.find((p) => p.type === "C"), s = t.find((p) => p.type === "A");
|
|
1133
|
+
if (!s) return [];
|
|
1134
|
+
const a = Ye(r == null ? void 0 : r.lines), l = Ye(o == null ? void 0 : o.lines), u = [];
|
|
1135
1135
|
for (const p of (i == null ? void 0 : i.lines) ?? []) {
|
|
1136
|
-
const
|
|
1137
|
-
if (!
|
|
1138
|
-
const
|
|
1139
|
-
|
|
1136
|
+
const I = p.trimStart();
|
|
1137
|
+
if (!I || I.startsWith("#")) continue;
|
|
1138
|
+
const _ = ut(p);
|
|
1139
|
+
_ && u.push(_);
|
|
1140
1140
|
}
|
|
1141
|
-
(((
|
|
1141
|
+
(((A = (g = a.WRAP) == null ? void 0 : g.value) == null ? void 0 : A.trim().toUpperCase()) ?? "NO") === "YES" && console.warn(
|
|
1142
1142
|
"parseLasFile: WRAP YES is not supported. Data rows may be read incorrectly."
|
|
1143
1143
|
);
|
|
1144
|
-
const
|
|
1145
|
-
let
|
|
1146
|
-
if ((
|
|
1144
|
+
const d = n.holeId ?? (((U = (P = l.WELL) == null ? void 0 : P.value) == null ? void 0 : U.trim()) || null) ?? (((k = ($ = l.UWI) == null ? void 0 : $.value) == null ? void 0 : k.trim()) || null) ?? (((D = (O = l.API) == null ? void 0 : O.value) == null ? void 0 : D.trim()) || null) ?? "unknown";
|
|
1145
|
+
let m = et;
|
|
1146
|
+
if ((S = l.NULL) != null && S.value) {
|
|
1147
1147
|
const p = Number(l.NULL.value);
|
|
1148
|
-
Number.isFinite(p) && (
|
|
1148
|
+
Number.isFinite(p) && (m = p);
|
|
1149
1149
|
}
|
|
1150
|
-
if (n.nullSentinel !== void 0 && (
|
|
1151
|
-
const f = u.slice(1),
|
|
1152
|
-
for (const { mnem: p, unit:
|
|
1153
|
-
|
|
1154
|
-
const
|
|
1150
|
+
if (n.nullSentinel !== void 0 && (m = n.nullSentinel), u.length === 0) return [];
|
|
1151
|
+
const f = u.slice(1), y = {};
|
|
1152
|
+
for (const { mnem: p, unit: I } of f)
|
|
1153
|
+
y[p.toLowerCase()] = I;
|
|
1154
|
+
const h = {};
|
|
1155
1155
|
for (const { mnem: p } of f)
|
|
1156
|
-
|
|
1157
|
-
for (const p of
|
|
1158
|
-
const
|
|
1159
|
-
if (!
|
|
1160
|
-
const
|
|
1161
|
-
if (
|
|
1162
|
-
const
|
|
1163
|
-
if (!(!Number.isFinite(
|
|
1164
|
-
for (let
|
|
1165
|
-
const
|
|
1166
|
-
Number.isFinite(
|
|
1156
|
+
h[p.toLowerCase()] = { depths: [], values: [] };
|
|
1157
|
+
for (const p of s.lines) {
|
|
1158
|
+
const I = p.trimStart();
|
|
1159
|
+
if (!I || I.startsWith("#")) continue;
|
|
1160
|
+
const _ = I.split(/\s+/);
|
|
1161
|
+
if (_.length < 2) continue;
|
|
1162
|
+
const R = Number(_[0]);
|
|
1163
|
+
if (!(!Number.isFinite(R) || R === m))
|
|
1164
|
+
for (let x = 0; x < f.length; x++) {
|
|
1165
|
+
const T = f[x].mnem.toLowerCase(), v = Number(_[x + 1]);
|
|
1166
|
+
Number.isFinite(v) && v !== m && (h[T].depths.push(R), h[T].values.push(v));
|
|
1167
1167
|
}
|
|
1168
1168
|
}
|
|
1169
1169
|
const b = {};
|
|
1170
|
-
for (const [p,
|
|
1171
|
-
|
|
1172
|
-
return Object.keys(b).length === 0 ? [] : [{ holeId:
|
|
1170
|
+
for (const [p, I] of Object.entries(h))
|
|
1171
|
+
I.depths.length >= 2 && (b[p] = I);
|
|
1172
|
+
return Object.keys(b).length === 0 ? [] : [{ holeId: d, units: y, channels: b }];
|
|
1173
1173
|
}
|
|
1174
|
-
const
|
|
1174
|
+
const dt = [
|
|
1175
1175
|
"#0f172a",
|
|
1176
1176
|
"#1e3a5f",
|
|
1177
1177
|
"#7c3aed",
|
|
@@ -1182,25 +1182,26 @@ const ct = [
|
|
|
1182
1182
|
"#db2777",
|
|
1183
1183
|
"#65a30d",
|
|
1184
1184
|
"#9333ea"
|
|
1185
|
-
],
|
|
1186
|
-
function
|
|
1185
|
+
], Qt = { l: 42, r: 4, t: 4, b: 36 }, We = 10, qe = 11, en = 6;
|
|
1186
|
+
function mt(e = {}) {
|
|
1187
1187
|
return {
|
|
1188
1188
|
...e,
|
|
1189
|
-
margin:
|
|
1189
|
+
margin: Qt,
|
|
1190
1190
|
autosize: !0,
|
|
1191
1191
|
width: void 0,
|
|
1192
1192
|
xaxis: {
|
|
1193
1193
|
...e.xaxis || {},
|
|
1194
1194
|
tickfont: {
|
|
1195
1195
|
...e.xaxis && e.xaxis.tickfont || {},
|
|
1196
|
-
size:
|
|
1196
|
+
size: We
|
|
1197
1197
|
},
|
|
1198
1198
|
title: {
|
|
1199
1199
|
...e.xaxis && e.xaxis.title || {},
|
|
1200
1200
|
font: {
|
|
1201
1201
|
...e.xaxis && e.xaxis.title && e.xaxis.title.font || {},
|
|
1202
|
-
size:
|
|
1203
|
-
}
|
|
1202
|
+
size: qe
|
|
1203
|
+
},
|
|
1204
|
+
standoff: (e.xaxis && e.xaxis.title && e.xaxis.title.standoff) ?? en
|
|
1204
1205
|
}
|
|
1205
1206
|
},
|
|
1206
1207
|
yaxis: {
|
|
@@ -1208,67 +1209,67 @@ function ut(e = {}) {
|
|
|
1208
1209
|
automargin: !0,
|
|
1209
1210
|
tickfont: {
|
|
1210
1211
|
...e.yaxis && e.yaxis.tickfont || {},
|
|
1211
|
-
size:
|
|
1212
|
+
size: We
|
|
1212
1213
|
},
|
|
1213
1214
|
title: {
|
|
1214
1215
|
...e.yaxis && e.yaxis.title || {},
|
|
1215
1216
|
font: {
|
|
1216
1217
|
...e.yaxis && e.yaxis.title && e.yaxis.title.font || {},
|
|
1217
|
-
size:
|
|
1218
|
+
size: qe
|
|
1218
1219
|
}
|
|
1219
1220
|
}
|
|
1220
1221
|
}
|
|
1221
1222
|
};
|
|
1222
1223
|
}
|
|
1223
|
-
function
|
|
1224
|
+
function tn(e, {
|
|
1224
1225
|
tailScale: n = 5,
|
|
1225
1226
|
colorBy: t = null,
|
|
1226
|
-
palette:
|
|
1227
|
-
depthCol:
|
|
1228
|
-
dipCol: i =
|
|
1229
|
-
azCol:
|
|
1227
|
+
palette: r = dt,
|
|
1228
|
+
depthCol: o = j,
|
|
1229
|
+
dipCol: i = W,
|
|
1230
|
+
azCol: s = Y,
|
|
1230
1231
|
template: a = void 0
|
|
1231
1232
|
} = {}) {
|
|
1232
1233
|
const l = e.filter(
|
|
1233
|
-
(
|
|
1234
|
+
(h) => h[o] != null && h[i] != null && h[s] != null
|
|
1234
1235
|
);
|
|
1235
1236
|
if (!l.length)
|
|
1236
1237
|
return { data: [], layout: {} };
|
|
1237
1238
|
const u = {};
|
|
1238
|
-
t && [...new Set(l.map((b) => b[t]).filter((b) => b != null))].sort().forEach((b,
|
|
1239
|
-
u[b] =
|
|
1239
|
+
t && [...new Set(l.map((b) => b[t]).filter((b) => b != null))].sort().forEach((b, g) => {
|
|
1240
|
+
u[b] = r[g % r.length];
|
|
1240
1241
|
});
|
|
1241
|
-
const c = /* @__PURE__ */ new Map(),
|
|
1242
|
-
for (const
|
|
1243
|
-
const b = Number(
|
|
1244
|
-
c.has(
|
|
1245
|
-
const
|
|
1246
|
-
|
|
1247
|
-
const
|
|
1248
|
-
|
|
1242
|
+
const c = /* @__PURE__ */ new Map(), d = [];
|
|
1243
|
+
for (const h of l) {
|
|
1244
|
+
const b = Number(h[o]), g = Number(h[i]), A = Number(h[s]), P = t ? h[t] ?? "_default" : "_default", U = t ? u[P] ?? "#0f172a" : "#0f172a";
|
|
1245
|
+
c.has(P) || c.set(P, { xs: [], ys: [], dips: [], azs: [], color: U });
|
|
1246
|
+
const $ = c.get(P);
|
|
1247
|
+
$.xs.push(g), $.ys.push(b), $.dips.push(g), $.azs.push(A);
|
|
1248
|
+
const k = A * Math.PI / 180, O = n * (Math.abs(g) / 90), D = Math.sin(k) * O, S = Math.cos(k) * O;
|
|
1249
|
+
d.push({
|
|
1249
1250
|
type: "line",
|
|
1250
|
-
x0:
|
|
1251
|
+
x0: g,
|
|
1251
1252
|
y0: b,
|
|
1252
|
-
x1:
|
|
1253
|
-
y1: b +
|
|
1254
|
-
line: { color:
|
|
1253
|
+
x1: g + D,
|
|
1254
|
+
y1: b + S,
|
|
1255
|
+
line: { color: U, width: 2 }
|
|
1255
1256
|
});
|
|
1256
1257
|
}
|
|
1257
|
-
const
|
|
1258
|
-
for (const [
|
|
1259
|
-
|
|
1258
|
+
const m = [], f = t && c.size > 1;
|
|
1259
|
+
for (const [h, b] of c.entries())
|
|
1260
|
+
m.push({
|
|
1260
1261
|
type: "scatter",
|
|
1261
1262
|
x: b.xs,
|
|
1262
1263
|
y: b.ys,
|
|
1263
1264
|
mode: "markers",
|
|
1264
|
-
name:
|
|
1265
|
+
name: h !== "_default" ? String(h) : void 0,
|
|
1265
1266
|
marker: { size: 8, color: b.color },
|
|
1266
|
-
showlegend: f &&
|
|
1267
|
-
customdata: b.dips.map((
|
|
1267
|
+
showlegend: f && h !== "_default",
|
|
1268
|
+
customdata: b.dips.map((g, A) => [g, b.azs[A]]),
|
|
1268
1269
|
hovertemplate: "Depth: %{y}<br>Dip: %{customdata[0]}<br>Az: %{customdata[1]}<extra></extra>"
|
|
1269
1270
|
});
|
|
1270
|
-
return { data:
|
|
1271
|
-
shapes:
|
|
1271
|
+
return { data: m, layout: {
|
|
1272
|
+
shapes: d,
|
|
1272
1273
|
height: 400,
|
|
1273
1274
|
margin: { l: 40, r: 10, t: 10, b: 40 },
|
|
1274
1275
|
xaxis: {
|
|
@@ -1280,38 +1281,38 @@ function Xt(e, {
|
|
|
1280
1281
|
},
|
|
1281
1282
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1282
1283
|
showlegend: !!f,
|
|
1283
|
-
template: a !== void 0 ? a :
|
|
1284
|
+
template: a !== void 0 ? a : ke
|
|
1284
1285
|
} };
|
|
1285
1286
|
}
|
|
1286
|
-
function
|
|
1287
|
+
function rr(e, {
|
|
1287
1288
|
labelCol: n = "structure_type",
|
|
1288
|
-
palette: t =
|
|
1289
|
-
fromCol:
|
|
1290
|
-
toCol:
|
|
1289
|
+
palette: t = dt,
|
|
1290
|
+
fromCol: r = L,
|
|
1291
|
+
toCol: o = M,
|
|
1291
1292
|
template: i = void 0
|
|
1292
1293
|
} = {}) {
|
|
1293
|
-
const
|
|
1294
|
-
const f =
|
|
1294
|
+
const s = e.filter((m) => m[r] != null && m[o] != null && Number(m[o]) > Number(m[r])).filter((m) => {
|
|
1295
|
+
const f = m[n];
|
|
1295
1296
|
if (f == null) return !1;
|
|
1296
|
-
const
|
|
1297
|
-
return
|
|
1298
|
-
}).map((
|
|
1299
|
-
if (!
|
|
1297
|
+
const y = String(f).trim();
|
|
1298
|
+
return y !== "" && !/^(nan|null|none)$/i.test(y);
|
|
1299
|
+
}).map((m) => ({ from: Number(m[r]), to: Number(m[o]), label: String(m[n]).trim() })).sort((m, f) => m.from - f.from);
|
|
1300
|
+
if (!s.length)
|
|
1300
1301
|
return { data: [], layout: {} };
|
|
1301
1302
|
const a = [], l = [], u = [];
|
|
1302
|
-
return
|
|
1303
|
+
return s.forEach((m, f) => {
|
|
1303
1304
|
a.push({
|
|
1304
1305
|
type: "rect",
|
|
1305
1306
|
xref: "x",
|
|
1306
1307
|
yref: "y",
|
|
1307
1308
|
x0: 0,
|
|
1308
1309
|
x1: 1,
|
|
1309
|
-
y0:
|
|
1310
|
-
y1:
|
|
1310
|
+
y0: m.from,
|
|
1311
|
+
y1: m.to,
|
|
1311
1312
|
fillcolor: t[f % t.length],
|
|
1312
1313
|
line: { width: 0 },
|
|
1313
1314
|
layer: "below"
|
|
1314
|
-
}), l.push(0.5 * (
|
|
1315
|
+
}), l.push(0.5 * (m.from + m.to)), u.push(m.label);
|
|
1315
1316
|
}), { data: [{
|
|
1316
1317
|
type: "scatter",
|
|
1317
1318
|
x: Array(u.length).fill(0.5),
|
|
@@ -1321,504 +1322,673 @@ function Wn(e, {
|
|
|
1321
1322
|
textposition: "middle center",
|
|
1322
1323
|
showlegend: !1,
|
|
1323
1324
|
hoverinfo: "text"
|
|
1324
|
-
}], layout:
|
|
1325
|
+
}], layout: mt({
|
|
1325
1326
|
shapes: a,
|
|
1326
1327
|
height: 400,
|
|
1327
1328
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1328
1329
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1329
1330
|
showlegend: !1,
|
|
1330
|
-
template: i !== void 0 ? i :
|
|
1331
|
+
template: i !== void 0 ? i : ke
|
|
1331
1332
|
}) };
|
|
1332
1333
|
}
|
|
1333
1334
|
function Xe(e, n) {
|
|
1334
1335
|
if (!e) return "";
|
|
1335
|
-
const t = String(e).trim().split(/\s+/),
|
|
1336
|
-
let
|
|
1336
|
+
const t = String(e).trim().split(/\s+/), r = [];
|
|
1337
|
+
let o = "";
|
|
1337
1338
|
for (const i of t)
|
|
1338
|
-
|
|
1339
|
-
return
|
|
1339
|
+
o && o.length + 1 + i.length > n ? (r.push(o), o = i) : o = o ? `${o} ${i}` : i;
|
|
1340
|
+
return o && r.push(o), r.join("<br>");
|
|
1340
1341
|
}
|
|
1341
|
-
function
|
|
1342
|
+
function nn(e, {
|
|
1342
1343
|
commentCol: n = "comments",
|
|
1343
|
-
fromCol: t =
|
|
1344
|
-
toCol:
|
|
1345
|
-
bgColor:
|
|
1344
|
+
fromCol: t = L,
|
|
1345
|
+
toCol: r = M,
|
|
1346
|
+
bgColor: o = "#f1f5f9",
|
|
1346
1347
|
borderColor: i = "#cbd5e1",
|
|
1347
|
-
textColor:
|
|
1348
|
+
textColor: s = "#1e293b",
|
|
1348
1349
|
charsPerLine: a = 18,
|
|
1349
1350
|
template: l = void 0
|
|
1350
1351
|
} = {}) {
|
|
1351
|
-
const u = e.filter((
|
|
1352
|
-
const
|
|
1353
|
-
return { from: Number(
|
|
1354
|
-
}).sort((
|
|
1352
|
+
const u = e.filter((g) => g[t] != null && g[r] != null && Number(g[r]) > Number(g[t])).map((g) => {
|
|
1353
|
+
const A = g[n], P = A != null && String(A).trim() !== "" && String(A) !== "null" ? String(A).trim() : "";
|
|
1354
|
+
return { from: Number(g[t]), to: Number(g[r]), comment: P };
|
|
1355
|
+
}).sort((g, A) => g.from - A.from);
|
|
1355
1356
|
if (!u.length)
|
|
1356
1357
|
return { data: [], layout: {} };
|
|
1357
|
-
const c = [],
|
|
1358
|
-
for (const
|
|
1359
|
-
const
|
|
1358
|
+
const c = [], d = [], m = [], f = [], y = [];
|
|
1359
|
+
for (const g of u) {
|
|
1360
|
+
const A = 0.5 * (g.from + g.to), P = !!g.comment;
|
|
1360
1361
|
c.push({
|
|
1361
1362
|
type: "rect",
|
|
1362
1363
|
xref: "x",
|
|
1363
1364
|
yref: "y",
|
|
1364
1365
|
x0: 0,
|
|
1365
1366
|
x1: 1,
|
|
1366
|
-
y0:
|
|
1367
|
-
y1:
|
|
1368
|
-
fillcolor:
|
|
1367
|
+
y0: g.from,
|
|
1368
|
+
y1: g.to,
|
|
1369
|
+
fillcolor: P ? o : "rgba(0,0,0,0)",
|
|
1369
1370
|
line: { color: i, width: 1 },
|
|
1370
1371
|
layer: "below"
|
|
1371
|
-
}),
|
|
1372
|
+
}), P && (d.push(0.5), m.push(A), f.push(Xe(g.comment, a)), y.push(`${g.from.toFixed(3)}–${g.to.toFixed(3)} m<br>${Xe(g.comment, 40)}`));
|
|
1372
1373
|
}
|
|
1373
|
-
return { data:
|
|
1374
|
+
return { data: d.length ? [{
|
|
1374
1375
|
type: "scatter",
|
|
1375
|
-
x:
|
|
1376
|
-
y:
|
|
1376
|
+
x: d,
|
|
1377
|
+
y: m,
|
|
1377
1378
|
mode: "text",
|
|
1378
1379
|
text: f,
|
|
1379
1380
|
textposition: "middle center",
|
|
1380
|
-
textfont: { color:
|
|
1381
|
-
hovertext:
|
|
1381
|
+
textfont: { color: s, size: 10 },
|
|
1382
|
+
hovertext: y,
|
|
1382
1383
|
hoverinfo: "text",
|
|
1383
1384
|
showlegend: !1
|
|
1384
|
-
}] : [], layout:
|
|
1385
|
+
}] : [], layout: mt({
|
|
1385
1386
|
shapes: c,
|
|
1386
1387
|
height: 400,
|
|
1387
1388
|
xaxis: { range: [0, 1], visible: !1, fixedrange: !0 },
|
|
1388
1389
|
yaxis: { title: "Depth (m)", autorange: "reversed" },
|
|
1389
1390
|
showlegend: !1,
|
|
1390
|
-
template: l !== void 0 ? l :
|
|
1391
|
+
template: l !== void 0 ? l : ke
|
|
1391
1392
|
}) };
|
|
1392
1393
|
}
|
|
1393
|
-
function
|
|
1394
|
+
function or(e, {
|
|
1394
1395
|
symbolSize: n = 10,
|
|
1395
1396
|
xCol: t = "easting",
|
|
1396
|
-
yCol:
|
|
1397
|
+
yCol: r = "northing"
|
|
1397
1398
|
} = {}) {
|
|
1398
|
-
const
|
|
1399
|
-
if (
|
|
1400
|
-
const l = (a - 90 + 360) % 360, u = l * Math.PI / 180, c = a * Math.PI / 180,
|
|
1399
|
+
const o = e[t] != null ? Number(e[t]) : null, i = e[r] != null ? Number(e[r]) : null, s = e[W] != null ? Number(e[W]) : null, a = e[Y] != null ? Number(e[Y]) : null;
|
|
1400
|
+
if (o === null || i === null || s === null || a === null) return null;
|
|
1401
|
+
const l = (a - 90 + 360) % 360, u = l * Math.PI / 180, c = a * Math.PI / 180, d = n * Math.sin(u), m = n * Math.cos(u), f = n * 0.4 * (s / 90), y = f * Math.sin(c), h = f * Math.cos(c);
|
|
1401
1402
|
return {
|
|
1402
1403
|
strike: l,
|
|
1403
|
-
dipValue:
|
|
1404
|
-
x:
|
|
1404
|
+
dipValue: s,
|
|
1405
|
+
x: o,
|
|
1405
1406
|
y: i,
|
|
1406
|
-
strikeX0:
|
|
1407
|
-
strikeY0: i -
|
|
1408
|
-
strikeX1:
|
|
1409
|
-
strikeY1: i +
|
|
1410
|
-
tickX1:
|
|
1411
|
-
tickY1: i +
|
|
1407
|
+
strikeX0: o - d,
|
|
1408
|
+
strikeY0: i - m,
|
|
1409
|
+
strikeX1: o + d,
|
|
1410
|
+
strikeY1: i + m,
|
|
1411
|
+
tickX1: o + y,
|
|
1412
|
+
tickY1: i + h
|
|
1412
1413
|
};
|
|
1413
1414
|
}
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1415
|
+
function rn({
|
|
1416
|
+
holeId: e,
|
|
1417
|
+
hole: n,
|
|
1418
|
+
holeOptions: t,
|
|
1419
|
+
property: r,
|
|
1420
|
+
propertyOptions: o,
|
|
1421
|
+
displayType: i,
|
|
1422
|
+
points: s,
|
|
1423
|
+
renderError: a
|
|
1424
|
+
}) {
|
|
1425
|
+
if (a)
|
|
1426
|
+
return { kind: "placeholder", text: `Plot error: ${a}` };
|
|
1427
|
+
const l = t || [];
|
|
1428
|
+
if (!e)
|
|
1429
|
+
return l.length === 0 ? { kind: "placeholder", text: "No holes loaded" } : { kind: "placeholder", text: "Select a hole" };
|
|
1430
|
+
if (!n)
|
|
1431
|
+
return { kind: "placeholder", text: `Loading ${e}…` };
|
|
1432
|
+
const u = o || [];
|
|
1433
|
+
return r ? !(i === ze) && !(i === tt) && (s || []).length === 0 ? { kind: "placeholder", text: `No values for ${r} in hole ${e}` } : { kind: "chart" } : u.length === 0 ? { kind: "placeholder", text: `No properties available for hole ${e}` } : { kind: "placeholder", text: "Select a property" };
|
|
1434
|
+
}
|
|
1435
|
+
function ft(e, n) {
|
|
1436
|
+
if (typeof n == "function") return n(e);
|
|
1437
|
+
if (!(typeof n != "string" || !n) && !(e == null || typeof e != "object"))
|
|
1438
|
+
return e[n];
|
|
1439
|
+
}
|
|
1440
|
+
function on(e, n) {
|
|
1441
|
+
const t = [], r = /* @__PURE__ */ new Set();
|
|
1442
|
+
for (const o of e || []) {
|
|
1443
|
+
const i = ft(o, n);
|
|
1444
|
+
i == null || i === "" || r.has(i) || (r.add(i), t.push(i));
|
|
1445
|
+
}
|
|
1446
|
+
return t;
|
|
1447
|
+
}
|
|
1448
|
+
function sn(e, n, t) {
|
|
1449
|
+
return t == null || t === "" ? e || [] : (e || []).filter((r) => ft(r, n) === t);
|
|
1450
|
+
}
|
|
1451
|
+
function an({
|
|
1452
|
+
chartOptions: e,
|
|
1453
|
+
showHoleSelect: n,
|
|
1454
|
+
showPropertySelect: t,
|
|
1455
|
+
showChartTypeSelect: r
|
|
1456
|
+
}) {
|
|
1457
|
+
return {
|
|
1458
|
+
hole: n !== !1,
|
|
1459
|
+
property: t !== !1,
|
|
1460
|
+
chartType: r !== !1 && (e || []).length > 1
|
|
1461
|
+
};
|
|
1419
1462
|
}
|
|
1420
|
-
|
|
1421
|
-
|
|
1463
|
+
const pt = "markers+line";
|
|
1464
|
+
function ln(e, n) {
|
|
1465
|
+
var r;
|
|
1466
|
+
const t = nt(e);
|
|
1467
|
+
return t.some((o) => o.value === n) ? n : ((r = t[0]) == null ? void 0 : r.value) || pt;
|
|
1468
|
+
}
|
|
1469
|
+
function Ke(e) {
|
|
1470
|
+
const n = typeof e == "string" ? e : e.holeId, t = typeof e == "string" ? e : e.label || e.holeId;
|
|
1471
|
+
return [n, t];
|
|
1472
|
+
}
|
|
1473
|
+
function Ze(e) {
|
|
1474
|
+
const n = typeof e == "string" ? e : e.value, t = typeof e == "string" ? e : e.label ?? e.value;
|
|
1475
|
+
return [n, t];
|
|
1476
|
+
}
|
|
1477
|
+
function cn({ selector: e, holeOptions: n, selectedHoleId: t, onConfigChange: r }) {
|
|
1478
|
+
const o = (e == null ? void 0 : e.kind) || "hole";
|
|
1479
|
+
if (o === "field") {
|
|
1480
|
+
const s = e.value ?? "", a = e.options || [], l = e.label || "Selection";
|
|
1481
|
+
return /* @__PURE__ */ H(
|
|
1482
|
+
"select",
|
|
1483
|
+
{
|
|
1484
|
+
className: "plot-select plot-select--field",
|
|
1485
|
+
value: s,
|
|
1486
|
+
onChange: (u) => e.onChange && e.onChange(u.target.value),
|
|
1487
|
+
disabled: a.length === 0,
|
|
1488
|
+
"aria-label": l,
|
|
1489
|
+
children: [
|
|
1490
|
+
a.length === 0 && /* @__PURE__ */ E("option", { value: "", children: "—" }),
|
|
1491
|
+
!s && a.length > 0 && /* @__PURE__ */ E("option", { value: "", disabled: !0, hidden: !0, children: `Select ${l.toLowerCase()}` }),
|
|
1492
|
+
a.map((u) => {
|
|
1493
|
+
const [c, d] = Ze(u);
|
|
1494
|
+
return /* @__PURE__ */ E("option", { value: c, children: d }, c);
|
|
1495
|
+
})
|
|
1496
|
+
]
|
|
1497
|
+
}
|
|
1498
|
+
);
|
|
1499
|
+
}
|
|
1500
|
+
if (o === "group+hole") {
|
|
1501
|
+
const s = e.groupBy, a = e.groupValue ?? "", l = e.groupLabel || "Group", u = e.groupOptions || on(n, s), c = sn(n, s, a);
|
|
1502
|
+
return /* @__PURE__ */ H(Ct, { children: [
|
|
1503
|
+
/* @__PURE__ */ H(
|
|
1504
|
+
"select",
|
|
1505
|
+
{
|
|
1506
|
+
className: "plot-select plot-select--group",
|
|
1507
|
+
value: a,
|
|
1508
|
+
onChange: (d) => e.onGroupChange && e.onGroupChange(d.target.value),
|
|
1509
|
+
disabled: u.length === 0,
|
|
1510
|
+
"aria-label": l,
|
|
1511
|
+
children: [
|
|
1512
|
+
u.length === 0 && /* @__PURE__ */ H("option", { value: "", children: [
|
|
1513
|
+
"No ",
|
|
1514
|
+
l.toLowerCase(),
|
|
1515
|
+
"s"
|
|
1516
|
+
] }),
|
|
1517
|
+
!a && u.length > 0 && /* @__PURE__ */ E("option", { value: "", disabled: !0, hidden: !0, children: `Select ${l.toLowerCase()}` }),
|
|
1518
|
+
u.map((d) => {
|
|
1519
|
+
const [m, f] = Ze(d);
|
|
1520
|
+
return /* @__PURE__ */ E("option", { value: m, children: f }, m);
|
|
1521
|
+
})
|
|
1522
|
+
]
|
|
1523
|
+
}
|
|
1524
|
+
),
|
|
1525
|
+
/* @__PURE__ */ H(
|
|
1526
|
+
"select",
|
|
1527
|
+
{
|
|
1528
|
+
className: "plot-select plot-select--hole",
|
|
1529
|
+
value: t,
|
|
1530
|
+
onChange: (d) => r && r({ holeId: d.target.value }),
|
|
1531
|
+
disabled: c.length === 0,
|
|
1532
|
+
"aria-label": "Hole",
|
|
1533
|
+
children: [
|
|
1534
|
+
c.length === 0 && /* @__PURE__ */ E("option", { value: "", children: "No holes" }),
|
|
1535
|
+
!t && c.length > 0 && /* @__PURE__ */ E("option", { value: "", disabled: !0, hidden: !0, children: "Select a hole" }),
|
|
1536
|
+
c.map((d) => {
|
|
1537
|
+
const [m, f] = Ke(d);
|
|
1538
|
+
return /* @__PURE__ */ E("option", { value: m, children: f }, m);
|
|
1539
|
+
})
|
|
1540
|
+
]
|
|
1541
|
+
}
|
|
1542
|
+
)
|
|
1543
|
+
] });
|
|
1544
|
+
}
|
|
1545
|
+
const i = n.length > 0;
|
|
1546
|
+
return /* @__PURE__ */ H(
|
|
1547
|
+
"select",
|
|
1548
|
+
{
|
|
1549
|
+
className: "plot-select plot-select--hole",
|
|
1550
|
+
value: t,
|
|
1551
|
+
onChange: (s) => r && r({ holeId: s.target.value }),
|
|
1552
|
+
disabled: !i,
|
|
1553
|
+
"aria-label": "Hole",
|
|
1554
|
+
children: [
|
|
1555
|
+
!i && /* @__PURE__ */ E("option", { value: "", children: "No holes loaded" }),
|
|
1556
|
+
!t && i && /* @__PURE__ */ E("option", { value: "", disabled: !0, hidden: !0, children: "Select a hole" }),
|
|
1557
|
+
n.map((s) => {
|
|
1558
|
+
const [a, l] = Ke(s);
|
|
1559
|
+
return /* @__PURE__ */ E("option", { value: a, children: l }, a);
|
|
1560
|
+
})
|
|
1561
|
+
]
|
|
1562
|
+
}
|
|
1563
|
+
);
|
|
1564
|
+
}
|
|
1565
|
+
function sr({
|
|
1566
|
+
config: e,
|
|
1567
|
+
graph: n,
|
|
1568
|
+
holeOptions: t = [],
|
|
1569
|
+
propertyOptions: r = [],
|
|
1570
|
+
onConfigChange: o,
|
|
1571
|
+
template: i,
|
|
1572
|
+
showHoleSelect: s = !0,
|
|
1573
|
+
showPropertySelect: a = !0,
|
|
1574
|
+
showChartTypeSelect: l = !0,
|
|
1575
|
+
holeSelector: u
|
|
1576
|
+
}) {
|
|
1577
|
+
const c = _e(null), d = n == null ? void 0 : n.hole, m = (n == null ? void 0 : n.points) || [], f = (e == null ? void 0 : e.property) || "", y = (e == null ? void 0 : e.chartType) || pt, h = (e == null ? void 0 : e.holeId) || "", b = (n == null ? void 0 : n.displayType) || (n != null && n.isComment ? ze : n != null && n.isCategorical ? Ue : At), g = nt(b), A = ln(b, y), [P, U] = K(""), $ = rn({
|
|
1578
|
+
holeId: h,
|
|
1579
|
+
hole: d,
|
|
1580
|
+
holeOptions: t,
|
|
1581
|
+
property: f,
|
|
1582
|
+
propertyOptions: r,
|
|
1583
|
+
displayType: b,
|
|
1584
|
+
points: m,
|
|
1585
|
+
renderError: P
|
|
1586
|
+
}), k = $.kind !== "chart", O = an({
|
|
1587
|
+
chartOptions: g,
|
|
1588
|
+
showHoleSelect: s,
|
|
1589
|
+
showPropertySelect: a,
|
|
1590
|
+
showChartTypeSelect: l
|
|
1591
|
+
}), D = r.length > 0;
|
|
1422
1592
|
return ne(() => {
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
let
|
|
1593
|
+
if ($.kind !== "chart") return;
|
|
1594
|
+
const S = c.current;
|
|
1595
|
+
if (!S) return;
|
|
1596
|
+
const p = b === ze, I = b === tt;
|
|
1597
|
+
let _;
|
|
1428
1598
|
try {
|
|
1429
|
-
|
|
1430
|
-
points:
|
|
1431
|
-
isCategorical:
|
|
1432
|
-
property:
|
|
1433
|
-
chartType:
|
|
1599
|
+
p ? _ = nn(m, { commentCol: f, fromCol: "from", toCol: "to" }) : I ? _ = tn(m) : _ = St({
|
|
1600
|
+
points: m,
|
|
1601
|
+
isCategorical: b === Ue,
|
|
1602
|
+
property: f,
|
|
1603
|
+
chartType: A,
|
|
1434
1604
|
template: i
|
|
1435
1605
|
});
|
|
1436
|
-
} catch (
|
|
1437
|
-
console.error("Plot build error",
|
|
1606
|
+
} catch (x) {
|
|
1607
|
+
console.error("Plot build error", x), U((x == null ? void 0 : x.message) || "Plot build error");
|
|
1438
1608
|
return;
|
|
1439
1609
|
}
|
|
1440
|
-
if ((!(
|
|
1610
|
+
if ((!(_ != null && _.data) || _.data.length === 0) && !p)
|
|
1441
1611
|
return;
|
|
1442
|
-
const
|
|
1612
|
+
const R = {
|
|
1443
1613
|
displayModeBar: !0,
|
|
1444
1614
|
responsive: !0,
|
|
1445
1615
|
useResizeHandler: !0,
|
|
1446
1616
|
modeBarButtonsToRemove: ["select2d", "lasso2d", "autoScale2d"]
|
|
1447
1617
|
};
|
|
1448
1618
|
try {
|
|
1449
|
-
|
|
1450
|
-
|
|
1619
|
+
U(""), Ee.react(S, _.data, _.layout, R), requestAnimationFrame(() => {
|
|
1620
|
+
S && S.parentElement && Ee.Plots.resize(S);
|
|
1451
1621
|
});
|
|
1452
|
-
} catch (
|
|
1453
|
-
console.error("Plot render error",
|
|
1622
|
+
} catch (x) {
|
|
1623
|
+
console.error("Plot render error", x), U((x == null ? void 0 : x.message) || "Plot render error");
|
|
1454
1624
|
}
|
|
1455
1625
|
return () => {
|
|
1456
|
-
if (
|
|
1626
|
+
if (S)
|
|
1457
1627
|
try {
|
|
1458
|
-
|
|
1459
|
-
} catch (
|
|
1460
|
-
console.warn("Plot purge error",
|
|
1628
|
+
Ee.purge(S);
|
|
1629
|
+
} catch (x) {
|
|
1630
|
+
console.warn("Plot purge error", x);
|
|
1461
1631
|
}
|
|
1462
1632
|
};
|
|
1463
|
-
}, [
|
|
1464
|
-
const
|
|
1465
|
-
if (!
|
|
1466
|
-
const
|
|
1633
|
+
}, [$.kind, d, f, A, b, m, i]), ne(() => {
|
|
1634
|
+
const S = c.current;
|
|
1635
|
+
if (!S || typeof ResizeObserver > "u") return;
|
|
1636
|
+
const p = new ResizeObserver(() => {
|
|
1467
1637
|
try {
|
|
1468
|
-
|
|
1469
|
-
} catch (
|
|
1470
|
-
console.warn("Plot resize error",
|
|
1638
|
+
S && S.data && Ee.Plots.resize(S);
|
|
1639
|
+
} catch (I) {
|
|
1640
|
+
console.warn("Plot resize error", I);
|
|
1471
1641
|
}
|
|
1472
1642
|
});
|
|
1473
|
-
return
|
|
1474
|
-
}, []),
|
|
1475
|
-
"
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
)
|
|
1643
|
+
return p.observe(S), () => p.disconnect();
|
|
1644
|
+
}, [$.kind]), /* @__PURE__ */ H("div", { className: `plot-card${k ? " empty" : ""}`, children: [
|
|
1645
|
+
/* @__PURE__ */ H("header", { className: "plot-card__controls", children: [
|
|
1646
|
+
O.hole && /* @__PURE__ */ E("div", { className: "plot-title", children: cn({
|
|
1647
|
+
selector: u,
|
|
1648
|
+
holeOptions: t,
|
|
1649
|
+
selectedHoleId: h,
|
|
1650
|
+
onConfigChange: o
|
|
1651
|
+
}) }),
|
|
1652
|
+
(O.property || O.chartType) && /* @__PURE__ */ H("div", { className: "plot-controls column", children: [
|
|
1653
|
+
O.property && /* @__PURE__ */ H(
|
|
1654
|
+
"select",
|
|
1655
|
+
{
|
|
1656
|
+
className: "plot-select plot-select--property",
|
|
1657
|
+
value: f,
|
|
1658
|
+
onChange: (S) => o && o({ property: S.target.value }),
|
|
1659
|
+
disabled: !D,
|
|
1660
|
+
"aria-label": "Property",
|
|
1661
|
+
children: [
|
|
1662
|
+
!D && /* @__PURE__ */ E("option", { value: "", children: "—" }),
|
|
1663
|
+
!f && D && /* @__PURE__ */ E("option", { value: "", disabled: !0, hidden: !0, children: "Select a property" }),
|
|
1664
|
+
r.map((S) => /* @__PURE__ */ E("option", { value: S, children: S }, S))
|
|
1665
|
+
]
|
|
1666
|
+
}
|
|
1667
|
+
),
|
|
1668
|
+
O.chartType && /* @__PURE__ */ E(
|
|
1669
|
+
"select",
|
|
1670
|
+
{
|
|
1671
|
+
className: "plot-select plot-select--chart-type",
|
|
1672
|
+
value: A,
|
|
1673
|
+
onChange: (S) => o && o({ chartType: S.target.value }),
|
|
1674
|
+
"aria-label": "Chart type",
|
|
1675
|
+
children: g.map((S) => /* @__PURE__ */ E("option", { value: S.value, children: S.label }, S.value))
|
|
1676
|
+
}
|
|
1677
|
+
)
|
|
1678
|
+
] })
|
|
1509
1679
|
] }),
|
|
1510
|
-
/* @__PURE__ */
|
|
1680
|
+
/* @__PURE__ */ E("div", { className: "plot-card__body", children: $.kind === "chart" ? /* @__PURE__ */ E("div", { className: "plotly-chart", ref: c }) : /* @__PURE__ */ E("div", { className: "placeholder", children: $.text }) })
|
|
1511
1681
|
] });
|
|
1512
1682
|
}
|
|
1513
|
-
function
|
|
1683
|
+
function Je(e, n) {
|
|
1514
1684
|
if (!(n != null && n.length)) return e;
|
|
1515
|
-
const t = new Map(e.map((
|
|
1516
|
-
for (const
|
|
1517
|
-
const
|
|
1518
|
-
if (
|
|
1519
|
-
if (t.has(
|
|
1520
|
-
const i = t.get(
|
|
1521
|
-
t.set(
|
|
1685
|
+
const t = new Map(e.map((r) => [r.id || r.holeId, { ...r }]));
|
|
1686
|
+
for (const r of n) {
|
|
1687
|
+
const o = r.id || r.holeId;
|
|
1688
|
+
if (o)
|
|
1689
|
+
if (t.has(o)) {
|
|
1690
|
+
const i = t.get(o);
|
|
1691
|
+
t.set(o, { ...i, points: [...i.points || [], ...r.points || []] });
|
|
1522
1692
|
} else
|
|
1523
|
-
t.set(
|
|
1693
|
+
t.set(o, r);
|
|
1524
1694
|
}
|
|
1525
1695
|
return Array.from(t.values());
|
|
1526
1696
|
}
|
|
1527
|
-
function
|
|
1697
|
+
function un(e, n) {
|
|
1528
1698
|
if (!e || !n) return [];
|
|
1529
|
-
const t = /* @__PURE__ */ new Set(),
|
|
1530
|
-
for (const
|
|
1531
|
-
const i = Number(
|
|
1532
|
-
if (!Number.isFinite(i) || !Number.isFinite(
|
|
1533
|
-
const a = `${i}-${
|
|
1534
|
-
t.has(a) || (t.add(a),
|
|
1699
|
+
const t = /* @__PURE__ */ new Set(), r = [];
|
|
1700
|
+
for (const o of e.points || []) {
|
|
1701
|
+
const i = Number(o.from ?? o.samp_from ?? o.depth_from ?? o.from_depth), s = Number(o.to ?? o.samp_to ?? o.depth_to ?? o.to_depth);
|
|
1702
|
+
if (!Number.isFinite(i) || !Number.isFinite(s) || s <= i) continue;
|
|
1703
|
+
const a = `${i}-${s}`;
|
|
1704
|
+
t.has(a) || (t.add(a), r.push({ from: i, to: s, [n]: o[n] ?? "" }));
|
|
1535
1705
|
}
|
|
1536
|
-
return
|
|
1706
|
+
return r;
|
|
1537
1707
|
}
|
|
1538
|
-
function
|
|
1708
|
+
function ir({
|
|
1539
1709
|
initialFocusedHoleId: e = "",
|
|
1540
1710
|
sourceFile: n = null,
|
|
1541
1711
|
extraHoles: t = [],
|
|
1542
|
-
plotCount:
|
|
1712
|
+
plotCount: r = 4
|
|
1543
1713
|
} = {}) {
|
|
1544
|
-
const [
|
|
1714
|
+
const [o, i] = K([]), [s, a] = K([]), [l, u] = K([]), [c, d] = K([]), [m, f] = K([]), [y, h] = K({}), [b, g] = K(""), [A, P] = K([]), [U, $] = K(""), [k, O] = K(e || ""), [D, S] = K([]), p = _e(null);
|
|
1545
1715
|
ne(() => {
|
|
1546
|
-
!n || p.current === n || (p.current = n,
|
|
1547
|
-
if (!
|
|
1548
|
-
const
|
|
1549
|
-
a(
|
|
1550
|
-
holeIds:
|
|
1551
|
-
focusedHoleId:
|
|
1552
|
-
plotCount:
|
|
1716
|
+
!n || p.current === n || (p.current = n, zt(n).then((T) => {
|
|
1717
|
+
if (!T) return;
|
|
1718
|
+
const v = Array.from(new Map(T.map((z) => [z.holeId, z])).values());
|
|
1719
|
+
a(v), P(it({
|
|
1720
|
+
holeIds: v.map((z) => z.holeId),
|
|
1721
|
+
focusedHoleId: k,
|
|
1722
|
+
plotCount: r,
|
|
1553
1723
|
defaultProp: "",
|
|
1554
1724
|
categoricalProps: c,
|
|
1555
|
-
commentProps:
|
|
1725
|
+
commentProps: m,
|
|
1556
1726
|
numericDefaultChartType: "markers+line"
|
|
1557
1727
|
}));
|
|
1558
|
-
}).catch((
|
|
1559
|
-
console.info("Assay metadata load skipped:",
|
|
1728
|
+
}).catch((T) => {
|
|
1729
|
+
console.info("Assay metadata load skipped:", T.message);
|
|
1560
1730
|
}));
|
|
1561
|
-
}, [n,
|
|
1731
|
+
}, [n, k, r, c, m]), ne(() => {
|
|
1562
1732
|
if (!(t != null && t.length)) return;
|
|
1563
|
-
const
|
|
1564
|
-
a((
|
|
1565
|
-
const
|
|
1566
|
-
return F.length ? [...
|
|
1733
|
+
const T = t.map((v) => ({ holeId: v.id || v.holeId })).filter((v) => v.holeId);
|
|
1734
|
+
a((v) => {
|
|
1735
|
+
const z = new Set(v.map((C) => C.holeId)), F = T.filter((C) => !z.has(C.holeId));
|
|
1736
|
+
return F.length ? [...v, ...F] : v;
|
|
1567
1737
|
});
|
|
1568
1738
|
}, [t]), ne(() => {
|
|
1569
|
-
|
|
1570
|
-
}, [
|
|
1571
|
-
if (!
|
|
1572
|
-
|
|
1739
|
+
$((T) => T && T.startsWith("Loading ") && T.includes(" for hole ") ? T : "");
|
|
1740
|
+
}, [A]), ne(() => {
|
|
1741
|
+
if (!s.length) {
|
|
1742
|
+
P([]);
|
|
1573
1743
|
return;
|
|
1574
1744
|
}
|
|
1575
|
-
const
|
|
1576
|
-
|
|
1577
|
-
var
|
|
1578
|
-
const
|
|
1579
|
-
property:
|
|
1580
|
-
chartType:
|
|
1745
|
+
const T = st(s.map((v) => v.holeId), k);
|
|
1746
|
+
P((v) => Array.from({ length: r }).map((F, C) => {
|
|
1747
|
+
var X;
|
|
1748
|
+
const B = v[C] || {}, V = s.some((ae) => ae.holeId === B.holeId) ? B.holeId : T[C] || ((X = s[C]) == null ? void 0 : X.holeId) || "", w = B.property || b, q = Te({
|
|
1749
|
+
property: w,
|
|
1750
|
+
chartType: B.chartType,
|
|
1581
1751
|
categoricalProps: c,
|
|
1582
|
-
commentProps:
|
|
1752
|
+
commentProps: m,
|
|
1583
1753
|
numericDefaultChartType: "markers+line"
|
|
1584
1754
|
});
|
|
1585
|
-
return { holeId:
|
|
1755
|
+
return { holeId: V, property: w, chartType: q };
|
|
1586
1756
|
}));
|
|
1587
|
-
}, [
|
|
1757
|
+
}, [s, k, b, c, m, r]), ne(() => {
|
|
1588
1758
|
if (!n) return;
|
|
1589
|
-
|
|
1590
|
-
const
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
const
|
|
1594
|
-
[...
|
|
1759
|
+
A.map((v) => v.holeId).filter(Boolean).forEach((v) => {
|
|
1760
|
+
const z = o.some((C) => (C.id || C.holeId) === v), F = D.includes(v);
|
|
1761
|
+
z || F || (S((C) => [...C, v]), $t(n, v).then((C) => {
|
|
1762
|
+
S((B) => B.filter((V) => V !== v)), C && i((B) => {
|
|
1763
|
+
const V = Je(
|
|
1764
|
+
[...B.filter((q) => (q.id || q.holeId) !== v), C],
|
|
1595
1765
|
t
|
|
1596
|
-
),
|
|
1597
|
-
return u(
|
|
1598
|
-
...
|
|
1599
|
-
property:
|
|
1600
|
-
chartType:
|
|
1601
|
-
property:
|
|
1602
|
-
chartType:
|
|
1603
|
-
categoricalProps:
|
|
1604
|
-
commentProps:
|
|
1766
|
+
), w = Ie(V);
|
|
1767
|
+
return u(w.numericProps), d(w.categoricalProps), f(w.commentProps), h(w.columnMeta), !b && w.defaultProp && (g(w.defaultProp), P((q) => q.map((X) => ({
|
|
1768
|
+
...X,
|
|
1769
|
+
property: X.property || w.defaultProp,
|
|
1770
|
+
chartType: Te({
|
|
1771
|
+
property: X.property || w.defaultProp,
|
|
1772
|
+
chartType: X.chartType,
|
|
1773
|
+
categoricalProps: w.categoricalProps,
|
|
1774
|
+
commentProps: w.commentProps,
|
|
1605
1775
|
numericDefaultChartType: "markers+line"
|
|
1606
1776
|
})
|
|
1607
|
-
})))),
|
|
1777
|
+
})))), V;
|
|
1608
1778
|
});
|
|
1609
|
-
}).catch((
|
|
1610
|
-
console.error(
|
|
1779
|
+
}).catch((C) => {
|
|
1780
|
+
console.error(C), S((B) => B.filter((V) => V !== v)), $(C.message || `Error loading hole ${v}`);
|
|
1611
1781
|
}));
|
|
1612
1782
|
});
|
|
1613
|
-
}, [
|
|
1614
|
-
t != null && t.length && i((
|
|
1615
|
-
if (!
|
|
1616
|
-
const F =
|
|
1617
|
-
return u(F.numericProps),
|
|
1783
|
+
}, [A, n, o, D, b, t]), ne(() => {
|
|
1784
|
+
t != null && t.length && i((T) => {
|
|
1785
|
+
if (!T.length) {
|
|
1786
|
+
const F = Ie(t);
|
|
1787
|
+
return u(F.numericProps), d(F.categoricalProps), f(F.commentProps), h(F.columnMeta), !b && F.defaultProp && g(F.defaultProp), t;
|
|
1618
1788
|
}
|
|
1619
|
-
const
|
|
1620
|
-
return u(
|
|
1789
|
+
const v = Je(T, t), z = Ie(v);
|
|
1790
|
+
return u(z.numericProps), d(z.categoricalProps), f(z.commentProps), h(z.columnMeta), !b && z.defaultProp && g(z.defaultProp), v;
|
|
1621
1791
|
});
|
|
1622
1792
|
}, [t]);
|
|
1623
|
-
const
|
|
1624
|
-
() => [...l, ...c, ...
|
|
1625
|
-
[l, c,
|
|
1626
|
-
),
|
|
1627
|
-
() =>
|
|
1628
|
-
[
|
|
1629
|
-
),
|
|
1630
|
-
const
|
|
1631
|
-
return Array.from({ length:
|
|
1632
|
-
const F =
|
|
1633
|
-
let
|
|
1634
|
-
|
|
1635
|
-
const
|
|
1793
|
+
const I = ee(
|
|
1794
|
+
() => [...l, ...c, ...m],
|
|
1795
|
+
[l, c, m]
|
|
1796
|
+
), _ = ee(
|
|
1797
|
+
() => s.map((T) => ({ holeId: T.holeId, label: T.holeId })).sort((T, v) => T.label.localeCompare(v.label)),
|
|
1798
|
+
[s]
|
|
1799
|
+
), R = ee(() => {
|
|
1800
|
+
const T = [...l, ...c, ...m];
|
|
1801
|
+
return Array.from({ length: r }).map((v, z) => {
|
|
1802
|
+
const F = A[z] || {}, C = o.find((fe) => (fe.id || fe.holeId) === F.holeId) || null, B = C ? T.filter((fe) => Tt(C, fe)) : T;
|
|
1803
|
+
let V = F.property || b;
|
|
1804
|
+
C && !B.includes(V) && (V = B[0] || V);
|
|
1805
|
+
const w = m.includes(V), q = !w && c.includes(V), X = !w && !q && V === "dip", ae = w ? "comment" : X ? "tadpole" : q ? "categorical" : "numeric", be = X ? "tadpole" : F.chartType || (w ? "comment" : q ? "categorical" : "markers+line"), me = F.holeId || (C == null ? void 0 : C.id) || (C == null ? void 0 : C.holeId) || "", Pe = X ? (C == null ? void 0 : C.points) || [] : w ? un(C, V) : It(C, V, q);
|
|
1636
1806
|
return {
|
|
1637
|
-
config: { holeId: me, property:
|
|
1638
|
-
hole:
|
|
1639
|
-
loading:
|
|
1807
|
+
config: { holeId: me, property: V, chartType: be },
|
|
1808
|
+
hole: C,
|
|
1809
|
+
loading: D.includes(F.holeId),
|
|
1640
1810
|
isCategorical: q,
|
|
1641
|
-
isComment:
|
|
1642
|
-
isTadpole:
|
|
1811
|
+
isComment: w,
|
|
1812
|
+
isTadpole: X,
|
|
1643
1813
|
displayType: ae,
|
|
1644
|
-
points:
|
|
1645
|
-
propertyOptions:
|
|
1814
|
+
points: Pe,
|
|
1815
|
+
propertyOptions: B,
|
|
1646
1816
|
label: me
|
|
1647
1817
|
};
|
|
1648
1818
|
});
|
|
1649
|
-
}, [
|
|
1650
|
-
|
|
1651
|
-
const F = [...
|
|
1652
|
-
return
|
|
1653
|
-
property:
|
|
1654
|
-
chartType:
|
|
1819
|
+
}, [A, o, b, c, m, D, r, l]), x = (T, v) => {
|
|
1820
|
+
P((z) => {
|
|
1821
|
+
const F = [...z], B = { ...F[T] || {}, ...v };
|
|
1822
|
+
return v.property && (B.chartType = Te({
|
|
1823
|
+
property: v.property,
|
|
1824
|
+
chartType: B.chartType,
|
|
1655
1825
|
categoricalProps: c,
|
|
1656
|
-
commentProps:
|
|
1826
|
+
commentProps: m,
|
|
1657
1827
|
numericDefaultChartType: "markers+line"
|
|
1658
|
-
})), F[
|
|
1828
|
+
})), F[T] = B, F;
|
|
1659
1829
|
});
|
|
1660
1830
|
};
|
|
1661
1831
|
return {
|
|
1662
|
-
error:
|
|
1663
|
-
focusedHoleId:
|
|
1664
|
-
setFocusedHoleId:
|
|
1665
|
-
setError:
|
|
1666
|
-
holeCount:
|
|
1832
|
+
error: U,
|
|
1833
|
+
focusedHoleId: k,
|
|
1834
|
+
setFocusedHoleId: O,
|
|
1835
|
+
setError: $,
|
|
1836
|
+
holeCount: s.length,
|
|
1667
1837
|
numericProps: l,
|
|
1668
1838
|
categoricalProps: c,
|
|
1669
|
-
commentProps:
|
|
1670
|
-
columnMeta:
|
|
1671
|
-
propertyOptions:
|
|
1672
|
-
labeledHoleOptions:
|
|
1673
|
-
traceGraphs:
|
|
1674
|
-
handleConfigChange:
|
|
1839
|
+
commentProps: m,
|
|
1840
|
+
columnMeta: y,
|
|
1841
|
+
propertyOptions: I,
|
|
1842
|
+
labeledHoleOptions: _,
|
|
1843
|
+
traceGraphs: R,
|
|
1844
|
+
handleConfigChange: x
|
|
1675
1845
|
};
|
|
1676
1846
|
}
|
|
1677
|
-
function
|
|
1847
|
+
function ht(e) {
|
|
1678
1848
|
return Array.isArray(e) ? e : [];
|
|
1679
1849
|
}
|
|
1680
|
-
function
|
|
1850
|
+
function De(e) {
|
|
1681
1851
|
const n = Number(e);
|
|
1682
1852
|
return Number.isFinite(n) ? n : void 0;
|
|
1683
1853
|
}
|
|
1684
|
-
function
|
|
1854
|
+
function gt(e = {}) {
|
|
1685
1855
|
return {
|
|
1686
1856
|
...e,
|
|
1687
|
-
x:
|
|
1688
|
-
y:
|
|
1689
|
-
z:
|
|
1857
|
+
x: De(e.x),
|
|
1858
|
+
y: De(e.y),
|
|
1859
|
+
z: De(e.z)
|
|
1690
1860
|
};
|
|
1691
1861
|
}
|
|
1692
|
-
function
|
|
1693
|
-
const [
|
|
1694
|
-
return
|
|
1862
|
+
function dn(e = [], n = [0, 0], t = 0) {
|
|
1863
|
+
const [r, o] = n, i = Number(t) * Math.PI / 180, s = Math.cos(i), a = Math.sin(i);
|
|
1864
|
+
return ht(e).map(gt).map((l) => {
|
|
1695
1865
|
if (!Number.isFinite(l.x) || !Number.isFinite(l.y)) return { ...l };
|
|
1696
|
-
const u = l.x -
|
|
1866
|
+
const u = l.x - r, c = l.y - o;
|
|
1697
1867
|
return {
|
|
1698
1868
|
...l,
|
|
1699
|
-
along: u * a + c *
|
|
1700
|
-
across: u *
|
|
1869
|
+
along: u * a + c * s,
|
|
1870
|
+
across: u * s - c * a
|
|
1701
1871
|
};
|
|
1702
1872
|
});
|
|
1703
1873
|
}
|
|
1704
|
-
function
|
|
1705
|
-
const
|
|
1706
|
-
return !Number.isFinite(i) || i <= 0 ?
|
|
1874
|
+
function mn(e = [], n = [0, 0], t = 0, r = 50) {
|
|
1875
|
+
const o = dn(e, n, t), i = 0.5 * Number(r || 0);
|
|
1876
|
+
return !Number.isFinite(i) || i <= 0 ? o : o.filter((s) => Number.isFinite(s.across) && Math.abs(s.across) <= i);
|
|
1707
1877
|
}
|
|
1708
|
-
function
|
|
1709
|
-
let
|
|
1878
|
+
function ar(e = [], n = null, t = null) {
|
|
1879
|
+
let r = ht(e).map(gt);
|
|
1710
1880
|
if (Array.isArray(n) && n.length === 2) {
|
|
1711
|
-
const [
|
|
1712
|
-
|
|
1881
|
+
const [o, i] = n;
|
|
1882
|
+
r = r.filter((s) => Number.isFinite(s.z) && s.z <= Number(o) && s.z >= Number(i));
|
|
1713
1883
|
}
|
|
1714
|
-
return t && (
|
|
1715
|
-
...r,
|
|
1716
|
-
color_value: r == null ? void 0 : r[t]
|
|
1717
|
-
}))), s;
|
|
1718
|
-
}
|
|
1719
|
-
function Jn(e = [], n = [0, 0], t = 0, s = 50, r = null) {
|
|
1720
|
-
let i = tn(e, n, t, s);
|
|
1721
|
-
return r && (i = i.map((o) => ({
|
|
1884
|
+
return t && (r = r.map((o) => ({
|
|
1722
1885
|
...o,
|
|
1723
|
-
color_value: o == null ? void 0 : o[
|
|
1886
|
+
color_value: o == null ? void 0 : o[t]
|
|
1887
|
+
}))), r;
|
|
1888
|
+
}
|
|
1889
|
+
function lr(e = [], n = [0, 0], t = 0, r = 50, o = null) {
|
|
1890
|
+
let i = mn(e, n, t, r);
|
|
1891
|
+
return o && (i = i.map((s) => ({
|
|
1892
|
+
...s,
|
|
1893
|
+
color_value: s == null ? void 0 : s[o]
|
|
1724
1894
|
}))), i;
|
|
1725
1895
|
}
|
|
1726
1896
|
function He(e) {
|
|
1727
1897
|
return Array.isArray(e) ? e : [];
|
|
1728
1898
|
}
|
|
1729
|
-
function
|
|
1899
|
+
function Ge(e = {}) {
|
|
1730
1900
|
return e.hole_id ?? e.holeId ?? e.id;
|
|
1731
1901
|
}
|
|
1732
1902
|
function ue(e, n = void 0) {
|
|
1733
1903
|
const t = Number(e);
|
|
1734
1904
|
return Number.isFinite(t) ? t : n;
|
|
1735
1905
|
}
|
|
1736
|
-
function
|
|
1906
|
+
function cr(e = [], n = null) {
|
|
1737
1907
|
const t = /* @__PURE__ */ new Map();
|
|
1738
|
-
He(e).forEach((
|
|
1739
|
-
const i =
|
|
1908
|
+
He(e).forEach((o) => {
|
|
1909
|
+
const i = Ge(o);
|
|
1740
1910
|
if (i == null || `${i}`.trim() === "") return;
|
|
1741
|
-
const
|
|
1742
|
-
t.has(
|
|
1911
|
+
const s = `${i}`;
|
|
1912
|
+
t.has(s) || t.set(s, []), t.get(s).push(o);
|
|
1743
1913
|
});
|
|
1744
|
-
const
|
|
1745
|
-
return t.forEach((
|
|
1746
|
-
const
|
|
1914
|
+
const r = [];
|
|
1915
|
+
return t.forEach((o, i) => {
|
|
1916
|
+
const s = [...o].sort((l, u) => ue(l.md, 0) - ue(u.md, 0)), a = {
|
|
1747
1917
|
hole_id: i,
|
|
1748
|
-
x:
|
|
1749
|
-
y:
|
|
1750
|
-
z:
|
|
1918
|
+
x: s.map((l) => ue(l.x, 0)),
|
|
1919
|
+
y: s.map((l) => ue(l.y, 0)),
|
|
1920
|
+
z: s.map((l) => ue(l.z, 0)),
|
|
1751
1921
|
color: null
|
|
1752
1922
|
};
|
|
1753
|
-
n && (a.color =
|
|
1754
|
-
}),
|
|
1755
|
-
}
|
|
1756
|
-
function
|
|
1757
|
-
return He(e).map((
|
|
1758
|
-
hole_id:
|
|
1759
|
-
from:
|
|
1760
|
-
to:
|
|
1923
|
+
n && (a.color = s.map((l) => l == null ? void 0 : l[n])), r.push(a);
|
|
1924
|
+
}), r;
|
|
1925
|
+
}
|
|
1926
|
+
function ur(e = [], n = 1, t = null) {
|
|
1927
|
+
return He(e).map((r) => ({
|
|
1928
|
+
hole_id: Ge(r),
|
|
1929
|
+
from: r == null ? void 0 : r.from,
|
|
1930
|
+
to: r == null ? void 0 : r.to,
|
|
1761
1931
|
radius: n,
|
|
1762
|
-
color: t ?
|
|
1763
|
-
value: t ?
|
|
1932
|
+
color: t ? r == null ? void 0 : r[t] : null,
|
|
1933
|
+
value: t ? r == null ? void 0 : r[t] : null
|
|
1764
1934
|
}));
|
|
1765
1935
|
}
|
|
1766
|
-
function
|
|
1936
|
+
function dr(e = [], n = null) {
|
|
1767
1937
|
return n ? He(e).filter((t) => Object.prototype.hasOwnProperty.call(t || {}, n)).map((t) => ({
|
|
1768
|
-
hole_id:
|
|
1938
|
+
hole_id: Ge(t),
|
|
1769
1939
|
label: t == null ? void 0 : t[n],
|
|
1770
1940
|
depth: 0.5 * (ue(t == null ? void 0 : t.from, 0) + ue(t == null ? void 0 : t.to, 0))
|
|
1771
1941
|
})) : [];
|
|
1772
1942
|
}
|
|
1773
|
-
function
|
|
1943
|
+
function mr({
|
|
1774
1944
|
controlMode: e = "orbit",
|
|
1775
1945
|
onToggleFly: n = () => {
|
|
1776
1946
|
},
|
|
1777
1947
|
onRecenter: t = () => {
|
|
1778
1948
|
},
|
|
1779
|
-
onLookDown:
|
|
1949
|
+
onLookDown: r = () => {
|
|
1780
1950
|
},
|
|
1781
|
-
onFit:
|
|
1951
|
+
onFit: o = () => {
|
|
1782
1952
|
},
|
|
1783
1953
|
darkBackground: i = !1,
|
|
1784
|
-
onToggleDarkBackground:
|
|
1954
|
+
onToggleDarkBackground: s = () => {
|
|
1785
1955
|
}
|
|
1786
1956
|
}) {
|
|
1787
|
-
return /* @__PURE__ */
|
|
1788
|
-
/* @__PURE__ */
|
|
1789
|
-
/* @__PURE__ */
|
|
1790
|
-
/* @__PURE__ */
|
|
1791
|
-
/* @__PURE__ */
|
|
1792
|
-
/* @__PURE__ */
|
|
1793
|
-
/* @__PURE__ */
|
|
1957
|
+
return /* @__PURE__ */ H("div", { className: "baselode-3d-controls", children: [
|
|
1958
|
+
/* @__PURE__ */ E("button", { type: "button", className: "ghost-button", onClick: t, children: "Recenter to (0,0,0)" }),
|
|
1959
|
+
/* @__PURE__ */ E("button", { type: "button", className: "ghost-button", onClick: r, children: "Look down" }),
|
|
1960
|
+
/* @__PURE__ */ E("button", { type: "button", className: "ghost-button", onClick: o, children: "Fit to scene" }),
|
|
1961
|
+
/* @__PURE__ */ E("button", { type: "button", className: "ghost-button", onClick: n, children: e === "orbit" ? "Enable fly controls" : "Disable fly controls" }),
|
|
1962
|
+
/* @__PURE__ */ H("label", { className: "baselode-3d-controls-checkbox", children: [
|
|
1963
|
+
/* @__PURE__ */ E(
|
|
1794
1964
|
"input",
|
|
1795
1965
|
{
|
|
1796
1966
|
type: "checkbox",
|
|
1797
1967
|
checked: i,
|
|
1798
|
-
onChange:
|
|
1968
|
+
onChange: s
|
|
1799
1969
|
}
|
|
1800
1970
|
),
|
|
1801
1971
|
"Dark background"
|
|
1802
1972
|
] })
|
|
1803
1973
|
] });
|
|
1804
1974
|
}
|
|
1805
|
-
function
|
|
1975
|
+
function fr({
|
|
1806
1976
|
properties: e = [],
|
|
1807
1977
|
selectedProperty: n = "",
|
|
1808
1978
|
onPropertyChange: t = () => {
|
|
1809
1979
|
},
|
|
1810
|
-
opacity:
|
|
1811
|
-
onOpacityChange:
|
|
1980
|
+
opacity: r = 0.85,
|
|
1981
|
+
onOpacityChange: o = () => {
|
|
1812
1982
|
},
|
|
1813
1983
|
propertyStats: i = null,
|
|
1814
|
-
clickedBlock:
|
|
1984
|
+
clickedBlock: s = null,
|
|
1815
1985
|
onPopupClose: a = () => {
|
|
1816
1986
|
}
|
|
1817
1987
|
}) {
|
|
1818
1988
|
var l, u;
|
|
1819
|
-
return /* @__PURE__ */
|
|
1820
|
-
/* @__PURE__ */
|
|
1821
|
-
/* @__PURE__ */
|
|
1989
|
+
return /* @__PURE__ */ H("div", { className: "bm-widget", children: [
|
|
1990
|
+
/* @__PURE__ */ E("label", { className: "bm-widget__label", htmlFor: "bm-property-select", children: "Color by" }),
|
|
1991
|
+
/* @__PURE__ */ H(
|
|
1822
1992
|
"select",
|
|
1823
1993
|
{
|
|
1824
1994
|
id: "bm-property-select",
|
|
@@ -1826,34 +1996,34 @@ function ss({
|
|
|
1826
1996
|
value: n,
|
|
1827
1997
|
onChange: (c) => t(c.target.value),
|
|
1828
1998
|
children: [
|
|
1829
|
-
e.length === 0 && /* @__PURE__ */
|
|
1830
|
-
e.map((c) => /* @__PURE__ */
|
|
1999
|
+
e.length === 0 && /* @__PURE__ */ E("option", { value: "", children: "— no attributes —" }),
|
|
2000
|
+
e.map((c) => /* @__PURE__ */ E("option", { value: c, children: c }, c))
|
|
1831
2001
|
]
|
|
1832
2002
|
}
|
|
1833
2003
|
),
|
|
1834
|
-
i && i.type === "numeric" && /* @__PURE__ */
|
|
1835
|
-
/* @__PURE__ */
|
|
1836
|
-
/* @__PURE__ */
|
|
1837
|
-
/* @__PURE__ */
|
|
2004
|
+
i && i.type === "numeric" && /* @__PURE__ */ H("div", { className: "bm-widget__scale", children: [
|
|
2005
|
+
/* @__PURE__ */ E("span", { className: "bm-widget__scale-label bm-widget__scale-label--min", children: ((l = i.min) == null ? void 0 : l.toFixed(2)) ?? "—" }),
|
|
2006
|
+
/* @__PURE__ */ E("div", { className: "bm-widget__scale-bar" }),
|
|
2007
|
+
/* @__PURE__ */ E("span", { className: "bm-widget__scale-label bm-widget__scale-label--max", children: ((u = i.max) == null ? void 0 : u.toFixed(2)) ?? "—" })
|
|
1838
2008
|
] }),
|
|
1839
|
-
i && i.type === "categorical" && /* @__PURE__ */
|
|
1840
|
-
const
|
|
1841
|
-
return /* @__PURE__ */
|
|
2009
|
+
i && i.type === "categorical" && /* @__PURE__ */ E("div", { className: "bm-widget__categories", children: (i.categories || []).map((c, d) => {
|
|
2010
|
+
const m = Math.round(d / Math.max(i.categories.length, 1) * 360);
|
|
2011
|
+
return /* @__PURE__ */ E(
|
|
1842
2012
|
"span",
|
|
1843
2013
|
{
|
|
1844
2014
|
className: "bm-widget__category-chip",
|
|
1845
|
-
style: { background: `hsl(${
|
|
2015
|
+
style: { background: `hsl(${m},70%,50%)` },
|
|
1846
2016
|
children: c
|
|
1847
2017
|
},
|
|
1848
2018
|
c
|
|
1849
2019
|
);
|
|
1850
2020
|
}) }),
|
|
1851
|
-
/* @__PURE__ */
|
|
2021
|
+
/* @__PURE__ */ H("label", { className: "bm-widget__label", htmlFor: "bm-opacity-slider", children: [
|
|
1852
2022
|
"Opacity (",
|
|
1853
|
-
Math.round(
|
|
2023
|
+
Math.round(r * 100),
|
|
1854
2024
|
"%)"
|
|
1855
2025
|
] }),
|
|
1856
|
-
/* @__PURE__ */
|
|
2026
|
+
/* @__PURE__ */ E(
|
|
1857
2027
|
"input",
|
|
1858
2028
|
{
|
|
1859
2029
|
id: "bm-opacity-slider",
|
|
@@ -1862,14 +2032,14 @@ function ss({
|
|
|
1862
2032
|
min: "0",
|
|
1863
2033
|
max: "1",
|
|
1864
2034
|
step: "0.01",
|
|
1865
|
-
value:
|
|
1866
|
-
onChange: (c) =>
|
|
2035
|
+
value: r,
|
|
2036
|
+
onChange: (c) => o(parseFloat(c.target.value))
|
|
1867
2037
|
}
|
|
1868
2038
|
),
|
|
1869
|
-
|
|
1870
|
-
/* @__PURE__ */
|
|
1871
|
-
/* @__PURE__ */
|
|
1872
|
-
/* @__PURE__ */
|
|
2039
|
+
s && /* @__PURE__ */ H("div", { className: "bm-widget__popup", children: [
|
|
2040
|
+
/* @__PURE__ */ H("div", { className: "bm-widget__popup-header", children: [
|
|
2041
|
+
/* @__PURE__ */ E("span", { children: "Block attributes" }),
|
|
2042
|
+
/* @__PURE__ */ E(
|
|
1873
2043
|
"button",
|
|
1874
2044
|
{
|
|
1875
2045
|
type: "button",
|
|
@@ -1880,163 +2050,163 @@ function ss({
|
|
|
1880
2050
|
}
|
|
1881
2051
|
)
|
|
1882
2052
|
] }),
|
|
1883
|
-
/* @__PURE__ */
|
|
1884
|
-
/* @__PURE__ */
|
|
1885
|
-
/* @__PURE__ */
|
|
2053
|
+
/* @__PURE__ */ E("table", { className: "bm-widget__popup-table", children: /* @__PURE__ */ E("tbody", { children: Object.entries(s).map(([c, d]) => /* @__PURE__ */ H("tr", { children: [
|
|
2054
|
+
/* @__PURE__ */ E("th", { children: c }),
|
|
2055
|
+
/* @__PURE__ */ E("td", { children: d == null ? "—" : String(d) })
|
|
1886
2056
|
] }, c)) }) })
|
|
1887
2057
|
] })
|
|
1888
2058
|
] });
|
|
1889
2059
|
}
|
|
1890
|
-
const
|
|
2060
|
+
const fn = [
|
|
1891
2061
|
{ minZoom: 0, lodKey: "thumb" },
|
|
1892
2062
|
{ minZoom: 4, lodKey: "medium" },
|
|
1893
2063
|
{ minZoom: 7, lodKey: "full" }
|
|
1894
|
-
],
|
|
1895
|
-
function
|
|
2064
|
+
], yt = 50;
|
|
2065
|
+
function pn(e, n, t = fn) {
|
|
1896
2066
|
var i;
|
|
1897
|
-
const
|
|
1898
|
-
if (!
|
|
2067
|
+
const r = e.lod_urls;
|
|
2068
|
+
if (!r || typeof r != "object" || Array.isArray(r))
|
|
1899
2069
|
return e.image_url || "";
|
|
1900
|
-
let
|
|
1901
|
-
for (const
|
|
1902
|
-
n >=
|
|
1903
|
-
return
|
|
2070
|
+
let o = ((i = t[0]) == null ? void 0 : i.lodKey) ?? "thumb";
|
|
2071
|
+
for (const s of t)
|
|
2072
|
+
n >= s.minZoom && (o = s.lodKey);
|
|
2073
|
+
return r[o] || e.image_url || "";
|
|
1904
2074
|
}
|
|
1905
|
-
function
|
|
2075
|
+
function hn(e) {
|
|
1906
2076
|
return [...e].sort((n, t) => (n.from_depth ?? 0) - (t.from_depth ?? 0));
|
|
1907
2077
|
}
|
|
1908
|
-
function
|
|
2078
|
+
function gn(e) {
|
|
1909
2079
|
const n = {};
|
|
1910
2080
|
for (const t of e) {
|
|
1911
|
-
const
|
|
1912
|
-
n[
|
|
2081
|
+
const r = t.photo_set != null && t.photo_set !== "" ? String(t.photo_set) : "default";
|
|
2082
|
+
n[r] || (n[r] = []), n[r].push(t);
|
|
1913
2083
|
}
|
|
1914
2084
|
return n;
|
|
1915
2085
|
}
|
|
1916
|
-
function
|
|
1917
|
-
const
|
|
1918
|
-
if (e >= n || t <= 0) return
|
|
1919
|
-
const
|
|
1920
|
-
for (let
|
|
1921
|
-
const a = Math.round(
|
|
1922
|
-
|
|
2086
|
+
function yn(e, n, t = 10) {
|
|
2087
|
+
const r = [];
|
|
2088
|
+
if (e >= n || t <= 0) return r;
|
|
2089
|
+
const o = Math.ceil(e / t) * t, i = t * 1e-9;
|
|
2090
|
+
for (let s = o; s <= n + i; s += t) {
|
|
2091
|
+
const a = Math.round(s * 1e6) / 1e6;
|
|
2092
|
+
r.push({ depth: a, label: `${a} m` });
|
|
1923
2093
|
}
|
|
1924
|
-
return
|
|
2094
|
+
return r;
|
|
1925
2095
|
}
|
|
1926
|
-
function
|
|
2096
|
+
function bn(e) {
|
|
1927
2097
|
return e >= 9 ? 1 : e >= 7 ? 2 : e >= 5 ? 5 : e >= 3 ? 10 : 20;
|
|
1928
2098
|
}
|
|
1929
|
-
function
|
|
2099
|
+
function bt(e) {
|
|
1930
2100
|
return `tray_${String(e).padStart(3, "0")}.jpg`;
|
|
1931
2101
|
}
|
|
1932
|
-
function
|
|
1933
|
-
const
|
|
2102
|
+
function _n(e, n, t, r, o = "Tray Images", i = bt) {
|
|
2103
|
+
const s = (t ?? "").replace(/\/$/, ""), a = (r ?? "").replace(/\/$/, "");
|
|
1934
2104
|
return n.map((l, u) => {
|
|
1935
|
-
const c = l.filename ?? i(u),
|
|
2105
|
+
const c = l.filename ?? i(u), d = l.photoSet ?? o;
|
|
1936
2106
|
return {
|
|
1937
2107
|
hole_id: e,
|
|
1938
2108
|
from_depth: l.fromDepth,
|
|
1939
2109
|
to_depth: l.toDepth,
|
|
1940
|
-
photo_set:
|
|
1941
|
-
image_url: `${
|
|
2110
|
+
photo_set: d,
|
|
2111
|
+
image_url: `${s}/${c}`,
|
|
1942
2112
|
lod_urls: {
|
|
1943
|
-
thumb: `${
|
|
2113
|
+
thumb: `${s}/${c}`,
|
|
1944
2114
|
full: `${a}/${c}`
|
|
1945
2115
|
}
|
|
1946
2116
|
};
|
|
1947
2117
|
});
|
|
1948
2118
|
}
|
|
1949
|
-
function
|
|
1950
|
-
const
|
|
1951
|
-
return Math.max(1, Math.round(e * t *
|
|
2119
|
+
function pr(e, n, t = yt) {
|
|
2120
|
+
const r = n / 5;
|
|
2121
|
+
return Math.max(1, Math.round(e * t * r));
|
|
1952
2122
|
}
|
|
1953
|
-
const
|
|
1954
|
-
function
|
|
2123
|
+
const Re = 5, Qe = 1.12, Nn = 0.05, vn = 40;
|
|
2124
|
+
function En({
|
|
1955
2125
|
photos: e = [],
|
|
1956
2126
|
holeId: n = "",
|
|
1957
2127
|
initialZoom: t = 5,
|
|
1958
|
-
transform:
|
|
1959
|
-
onTransformChange:
|
|
2128
|
+
transform: r,
|
|
2129
|
+
onTransformChange: o
|
|
1960
2130
|
}) {
|
|
1961
|
-
const [i,
|
|
2131
|
+
const [i, s] = K({ scale: 1, tx: 0, ty: 0 }), a = r ?? i, l = _e(a);
|
|
1962
2132
|
l.current = a;
|
|
1963
|
-
const u =
|
|
2133
|
+
const u = Oe(
|
|
1964
2134
|
(p) => {
|
|
1965
|
-
const
|
|
1966
|
-
|
|
2135
|
+
const I = typeof p == "function" ? p(l.current) : p;
|
|
2136
|
+
o ? o(I) : s(I);
|
|
1967
2137
|
},
|
|
1968
|
-
[
|
|
1969
|
-
), [c,
|
|
2138
|
+
[o]
|
|
2139
|
+
), [c, d] = K(!1), m = _e(null), f = _e(null), y = ee(() => hn(e), [e]), h = ee(() => gn(y), [y]), b = ee(() => {
|
|
1970
2140
|
const p = /* @__PURE__ */ new Set();
|
|
1971
|
-
for (const
|
|
1972
|
-
const
|
|
1973
|
-
p.add(
|
|
2141
|
+
for (const I of e) {
|
|
2142
|
+
const _ = I.photo_set != null && I.photo_set !== "" ? String(I.photo_set) : "default";
|
|
2143
|
+
p.add(_);
|
|
1974
2144
|
}
|
|
1975
2145
|
return [...p];
|
|
1976
|
-
}, [e]), { minDepth:
|
|
1977
|
-
if (!
|
|
1978
|
-
const p =
|
|
2146
|
+
}, [e]), { minDepth: g, maxDepth: A } = ee(() => {
|
|
2147
|
+
if (!y.length) return { minDepth: 0, maxDepth: 0 };
|
|
2148
|
+
const p = y.map((I) => I.to_depth ?? I.from_depth ?? 0);
|
|
1979
2149
|
return {
|
|
1980
|
-
minDepth:
|
|
2150
|
+
minDepth: y[0].from_depth ?? 0,
|
|
1981
2151
|
maxDepth: Math.max(...p)
|
|
1982
2152
|
};
|
|
1983
|
-
}, [
|
|
1984
|
-
() => Math.max(1, Math.round((
|
|
1985
|
-
[
|
|
1986
|
-
),
|
|
1987
|
-
const p =
|
|
1988
|
-
return
|
|
1989
|
-
}, [
|
|
2153
|
+
}, [y]), P = yt * Re / 5, U = ee(
|
|
2154
|
+
() => Math.max(1, Math.round((A - g) * P)),
|
|
2155
|
+
[g, A, P]
|
|
2156
|
+
), $ = ee(() => {
|
|
2157
|
+
const p = bn(Re);
|
|
2158
|
+
return yn(g, A, p);
|
|
2159
|
+
}, [g, A]), k = 540 * Re / 5, O = ee(
|
|
1990
2160
|
() => Math.max(1, Math.min(10, Math.round(t * a.scale))),
|
|
1991
2161
|
[t, a.scale]
|
|
1992
|
-
),
|
|
2162
|
+
), D = Oe((p) => {
|
|
1993
2163
|
p.preventDefault();
|
|
1994
|
-
const
|
|
1995
|
-
u((
|
|
1996
|
-
const
|
|
2164
|
+
const I = p.deltaY < 0 ? Qe : 1 / Qe, _ = f.current.getBoundingClientRect(), R = p.clientX - _.left, x = p.clientY - _.top;
|
|
2165
|
+
u((T) => {
|
|
2166
|
+
const v = Math.max(Nn, Math.min(vn, T.scale * I)), z = v / T.scale;
|
|
1997
2167
|
return {
|
|
1998
|
-
scale:
|
|
1999
|
-
tx:
|
|
2000
|
-
ty:
|
|
2168
|
+
scale: v,
|
|
2169
|
+
tx: R - (R - T.tx) * z,
|
|
2170
|
+
ty: x - (x - T.ty) * z
|
|
2001
2171
|
};
|
|
2002
2172
|
});
|
|
2003
2173
|
}, [u]);
|
|
2004
2174
|
ne(() => {
|
|
2005
2175
|
const p = f.current;
|
|
2006
2176
|
if (p)
|
|
2007
|
-
return p.addEventListener("wheel",
|
|
2008
|
-
}, [
|
|
2009
|
-
const
|
|
2010
|
-
p.button === 0 && (p.preventDefault(),
|
|
2177
|
+
return p.addEventListener("wheel", D, { passive: !1 }), () => p.removeEventListener("wheel", D);
|
|
2178
|
+
}, [D]);
|
|
2179
|
+
const S = Oe((p) => {
|
|
2180
|
+
p.button === 0 && (p.preventDefault(), m.current = {
|
|
2011
2181
|
x: p.clientX,
|
|
2012
2182
|
y: p.clientY,
|
|
2013
2183
|
tx: l.current.tx,
|
|
2014
2184
|
ty: l.current.ty
|
|
2015
|
-
},
|
|
2185
|
+
}, d(!0));
|
|
2016
2186
|
}, []);
|
|
2017
2187
|
return ne(() => {
|
|
2018
|
-
const p = (
|
|
2019
|
-
if (!
|
|
2020
|
-
const { tx:
|
|
2021
|
-
u((
|
|
2022
|
-
...
|
|
2023
|
-
tx:
|
|
2024
|
-
ty:
|
|
2188
|
+
const p = (_) => {
|
|
2189
|
+
if (!m.current) return;
|
|
2190
|
+
const { tx: R, ty: x, x: T, y: v } = m.current;
|
|
2191
|
+
u((z) => ({
|
|
2192
|
+
...z,
|
|
2193
|
+
tx: R + (_.clientX - T),
|
|
2194
|
+
ty: x + (_.clientY - v)
|
|
2025
2195
|
}));
|
|
2026
|
-
},
|
|
2027
|
-
|
|
2196
|
+
}, I = () => {
|
|
2197
|
+
m.current = null, d(!1);
|
|
2028
2198
|
};
|
|
2029
|
-
return window.addEventListener("mousemove", p), window.addEventListener("mouseup",
|
|
2030
|
-
window.removeEventListener("mousemove", p), window.removeEventListener("mouseup",
|
|
2199
|
+
return window.addEventListener("mousemove", p), window.addEventListener("mouseup", I), () => {
|
|
2200
|
+
window.removeEventListener("mousemove", p), window.removeEventListener("mouseup", I);
|
|
2031
2201
|
};
|
|
2032
|
-
}, [u]), /* @__PURE__ */
|
|
2033
|
-
/* @__PURE__ */
|
|
2034
|
-
n && /* @__PURE__ */
|
|
2035
|
-
/* @__PURE__ */
|
|
2202
|
+
}, [u]), /* @__PURE__ */ H("div", { className: "core-photo-table", children: [
|
|
2203
|
+
/* @__PURE__ */ H("div", { className: "core-photo-controls", children: [
|
|
2204
|
+
n && /* @__PURE__ */ E("span", { className: "core-photo-hole-id", children: n }),
|
|
2205
|
+
/* @__PURE__ */ H("span", { className: "core-photo-zoom-label", children: [
|
|
2036
2206
|
Math.round(a.scale * 100),
|
|
2037
2207
|
"%"
|
|
2038
2208
|
] }),
|
|
2039
|
-
/* @__PURE__ */
|
|
2209
|
+
/* @__PURE__ */ E(
|
|
2040
2210
|
"button",
|
|
2041
2211
|
{
|
|
2042
2212
|
className: "core-photo-zoom-btn",
|
|
@@ -2047,88 +2217,88 @@ function mn({
|
|
|
2047
2217
|
}
|
|
2048
2218
|
)
|
|
2049
2219
|
] }),
|
|
2050
|
-
e.length > 0 && /* @__PURE__ */
|
|
2051
|
-
/* @__PURE__ */
|
|
2052
|
-
b.map((p) => /* @__PURE__ */
|
|
2220
|
+
e.length > 0 && /* @__PURE__ */ H("div", { className: "core-photo-col-headers", children: [
|
|
2221
|
+
/* @__PURE__ */ E("div", { className: "core-photo-ruler-spacer" }),
|
|
2222
|
+
b.map((p) => /* @__PURE__ */ E(
|
|
2053
2223
|
"div",
|
|
2054
2224
|
{
|
|
2055
2225
|
className: "core-photo-set-header",
|
|
2056
|
-
style: { width:
|
|
2226
|
+
style: { width: k },
|
|
2057
2227
|
children: p
|
|
2058
2228
|
},
|
|
2059
2229
|
p
|
|
2060
2230
|
))
|
|
2061
2231
|
] }),
|
|
2062
|
-
e.length === 0 ? /* @__PURE__ */
|
|
2232
|
+
e.length === 0 ? /* @__PURE__ */ E("div", { className: "core-photo-empty", children: "No photos to display." }) : /* @__PURE__ */ E(
|
|
2063
2233
|
"div",
|
|
2064
2234
|
{
|
|
2065
2235
|
className: `core-photo-scroll${c ? " is-dragging" : ""}`,
|
|
2066
2236
|
ref: f,
|
|
2067
|
-
onMouseDown:
|
|
2068
|
-
children: /* @__PURE__ */
|
|
2237
|
+
onMouseDown: S,
|
|
2238
|
+
children: /* @__PURE__ */ H(
|
|
2069
2239
|
"div",
|
|
2070
2240
|
{
|
|
2071
2241
|
className: "core-photo-inner",
|
|
2072
2242
|
style: {
|
|
2073
|
-
height:
|
|
2243
|
+
height: U,
|
|
2074
2244
|
transform: `translate(${a.tx}px, ${a.ty}px) scale(${a.scale})`,
|
|
2075
2245
|
transformOrigin: "0 0"
|
|
2076
2246
|
},
|
|
2077
2247
|
children: [
|
|
2078
|
-
/* @__PURE__ */
|
|
2248
|
+
/* @__PURE__ */ E(
|
|
2079
2249
|
"div",
|
|
2080
2250
|
{
|
|
2081
2251
|
className: "core-photo-depth-ruler",
|
|
2082
|
-
style: { height:
|
|
2083
|
-
children:
|
|
2252
|
+
style: { height: U },
|
|
2253
|
+
children: $.map(({ depth: p, label: I }) => /* @__PURE__ */ E(
|
|
2084
2254
|
"div",
|
|
2085
2255
|
{
|
|
2086
2256
|
className: "core-photo-depth-marker",
|
|
2087
2257
|
style: {
|
|
2088
|
-
top: Math.round((p -
|
|
2258
|
+
top: Math.round((p - g) * P)
|
|
2089
2259
|
},
|
|
2090
|
-
children:
|
|
2260
|
+
children: I
|
|
2091
2261
|
},
|
|
2092
2262
|
p
|
|
2093
2263
|
))
|
|
2094
2264
|
}
|
|
2095
2265
|
),
|
|
2096
|
-
b.map((p) => /* @__PURE__ */
|
|
2266
|
+
b.map((p) => /* @__PURE__ */ E(
|
|
2097
2267
|
"div",
|
|
2098
2268
|
{
|
|
2099
2269
|
className: "core-photo-col-body",
|
|
2100
|
-
style: { height:
|
|
2101
|
-
children:
|
|
2102
|
-
const
|
|
2103
|
-
(
|
|
2104
|
-
),
|
|
2270
|
+
style: { height: U, width: k },
|
|
2271
|
+
children: h[p].map((I) => {
|
|
2272
|
+
const _ = I.from_depth ?? 0, R = I.to_depth ?? _, x = Math.round(
|
|
2273
|
+
(_ - g) * P
|
|
2274
|
+
), T = Math.max(
|
|
2105
2275
|
2,
|
|
2106
|
-
Math.round((
|
|
2107
|
-
),
|
|
2108
|
-
return /* @__PURE__ */
|
|
2276
|
+
Math.round((R - _) * P)
|
|
2277
|
+
), v = pn(I, O);
|
|
2278
|
+
return /* @__PURE__ */ H(
|
|
2109
2279
|
"div",
|
|
2110
2280
|
{
|
|
2111
2281
|
className: "core-photo-item",
|
|
2112
|
-
style: { top:
|
|
2113
|
-
title: `${
|
|
2282
|
+
style: { top: x, height: T, width: k },
|
|
2283
|
+
title: `${_}–${R} m`,
|
|
2114
2284
|
children: [
|
|
2115
|
-
|
|
2285
|
+
v ? /* @__PURE__ */ E(
|
|
2116
2286
|
"img",
|
|
2117
2287
|
{
|
|
2118
|
-
src:
|
|
2119
|
-
alt: `Core ${
|
|
2288
|
+
src: v,
|
|
2289
|
+
alt: `Core ${_}–${R} m`,
|
|
2120
2290
|
loading: "lazy"
|
|
2121
2291
|
}
|
|
2122
|
-
) : /* @__PURE__ */
|
|
2123
|
-
|
|
2124
|
-
|
|
2292
|
+
) : /* @__PURE__ */ E("div", { className: "core-photo-no-image" }),
|
|
2293
|
+
T >= 18 && /* @__PURE__ */ H("span", { className: "core-photo-item-label", children: [
|
|
2294
|
+
_,
|
|
2125
2295
|
"–",
|
|
2126
|
-
|
|
2296
|
+
R,
|
|
2127
2297
|
" m"
|
|
2128
2298
|
] })
|
|
2129
2299
|
]
|
|
2130
2300
|
},
|
|
2131
|
-
`${
|
|
2301
|
+
`${I.hole_id ?? ""}-${_}-${R}-${p}`
|
|
2132
2302
|
);
|
|
2133
2303
|
})
|
|
2134
2304
|
},
|
|
@@ -2141,33 +2311,33 @@ function mn({
|
|
|
2141
2311
|
)
|
|
2142
2312
|
] });
|
|
2143
2313
|
}
|
|
2144
|
-
function
|
|
2314
|
+
function hr({
|
|
2145
2315
|
holeId: e = "",
|
|
2146
2316
|
trays: n = [],
|
|
2147
2317
|
thumbBaseUrl: t = "",
|
|
2148
|
-
fullBaseUrl:
|
|
2149
|
-
photoSet:
|
|
2150
|
-
getFilename: i =
|
|
2151
|
-
initialZoom:
|
|
2318
|
+
fullBaseUrl: r = "",
|
|
2319
|
+
photoSet: o = "Tray Images",
|
|
2320
|
+
getFilename: i = bt,
|
|
2321
|
+
initialZoom: s = 5,
|
|
2152
2322
|
transform: a,
|
|
2153
2323
|
onTransformChange: l
|
|
2154
2324
|
}) {
|
|
2155
2325
|
const u = ee(
|
|
2156
|
-
() =>
|
|
2157
|
-
[e, n, t,
|
|
2326
|
+
() => _n(e, n, t, r, o, i),
|
|
2327
|
+
[e, n, t, r, o, i]
|
|
2158
2328
|
);
|
|
2159
|
-
return /* @__PURE__ */
|
|
2160
|
-
|
|
2329
|
+
return /* @__PURE__ */ E(
|
|
2330
|
+
En,
|
|
2161
2331
|
{
|
|
2162
2332
|
photos: u,
|
|
2163
2333
|
holeId: e,
|
|
2164
|
-
initialZoom:
|
|
2334
|
+
initialZoom: s,
|
|
2165
2335
|
transform: a,
|
|
2166
2336
|
onTransformChange: l
|
|
2167
2337
|
}
|
|
2168
2338
|
);
|
|
2169
2339
|
}
|
|
2170
|
-
function
|
|
2340
|
+
function gr(e) {
|
|
2171
2341
|
const n = typeof e == "string" ? JSON.parse(e) : e;
|
|
2172
2342
|
if (n.schema_version !== "1.0")
|
|
2173
2343
|
throw new Error(
|
|
@@ -2175,18 +2345,18 @@ function is(e) {
|
|
|
2175
2345
|
);
|
|
2176
2346
|
if (!Array.isArray(n.blocks))
|
|
2177
2347
|
throw new Error('"blocks" must be a JSON array.');
|
|
2178
|
-
const t = n.blocks.map((
|
|
2179
|
-
if (
|
|
2180
|
-
if (
|
|
2181
|
-
if (!Array.isArray(
|
|
2182
|
-
if (!Array.isArray(
|
|
2348
|
+
const t = n.blocks.map((r, o) => {
|
|
2349
|
+
if (r.id == null) throw new Error(`Block at index ${o} is missing required field "id".`);
|
|
2350
|
+
if (r.name == null) throw new Error(`Block "${r.id}" is missing required field "name".`);
|
|
2351
|
+
if (!Array.isArray(r.vertices)) throw new Error(`Block "${r.id}" is missing required field "vertices".`);
|
|
2352
|
+
if (!Array.isArray(r.triangles)) throw new Error(`Block "${r.id}" is missing required field "triangles".`);
|
|
2183
2353
|
return {
|
|
2184
|
-
id:
|
|
2185
|
-
name:
|
|
2186
|
-
vertices:
|
|
2187
|
-
triangles:
|
|
2188
|
-
attributes:
|
|
2189
|
-
material:
|
|
2354
|
+
id: r.id,
|
|
2355
|
+
name: r.name,
|
|
2356
|
+
vertices: r.vertices,
|
|
2357
|
+
triangles: r.triangles,
|
|
2358
|
+
attributes: r.attributes ?? {},
|
|
2359
|
+
material: r.material ?? {}
|
|
2190
2360
|
};
|
|
2191
2361
|
});
|
|
2192
2362
|
return {
|
|
@@ -2195,244 +2365,244 @@ function is(e) {
|
|
|
2195
2365
|
blocks: t
|
|
2196
2366
|
};
|
|
2197
2367
|
}
|
|
2198
|
-
function
|
|
2368
|
+
function An(e) {
|
|
2199
2369
|
const n = new Q.BufferGeometry(), t = new Float32Array(e.vertices.length * 3);
|
|
2200
|
-
e.vertices.forEach(([
|
|
2201
|
-
t[a * 3] =
|
|
2370
|
+
e.vertices.forEach(([o, i, s], a) => {
|
|
2371
|
+
t[a * 3] = o, t[a * 3 + 1] = i, t[a * 3 + 2] = s;
|
|
2202
2372
|
}), n.setAttribute("position", new Q.BufferAttribute(t, 3));
|
|
2203
|
-
const
|
|
2204
|
-
return e.triangles.forEach(([
|
|
2205
|
-
|
|
2206
|
-
}), n.setIndex(new Q.BufferAttribute(
|
|
2373
|
+
const r = new Uint32Array(e.triangles.length * 3);
|
|
2374
|
+
return e.triangles.forEach(([o, i, s], a) => {
|
|
2375
|
+
r[a * 3] = o, r[a * 3 + 1] = i, r[a * 3 + 2] = s;
|
|
2376
|
+
}), n.setIndex(new Q.BufferAttribute(r, 1)), n;
|
|
2207
2377
|
}
|
|
2208
|
-
function
|
|
2209
|
-
const { defaultOpacity:
|
|
2378
|
+
function yr(e, n, t = {}) {
|
|
2379
|
+
const { defaultOpacity: r = 1 } = t, o = new Q.Group();
|
|
2210
2380
|
return n.blocks.forEach((i) => {
|
|
2211
|
-
var
|
|
2212
|
-
const
|
|
2381
|
+
var h, b;
|
|
2382
|
+
const s = An(i), a = ((h = i.material) == null ? void 0 : h.color) ?? "#888888", l = ((b = i.material) == null ? void 0 : b.opacity) ?? r, u = l < 1, c = new Q.MeshStandardMaterial({
|
|
2213
2383
|
color: new Q.Color(a),
|
|
2214
2384
|
opacity: l,
|
|
2215
2385
|
transparent: u,
|
|
2216
2386
|
side: Q.DoubleSide,
|
|
2217
2387
|
flatShading: !0
|
|
2218
|
-
}),
|
|
2219
|
-
|
|
2388
|
+
}), d = new Q.Mesh(s, c);
|
|
2389
|
+
d.userData = {
|
|
2220
2390
|
id: i.id,
|
|
2221
2391
|
attributes: i.attributes
|
|
2222
2392
|
};
|
|
2223
|
-
const
|
|
2224
|
-
|
|
2225
|
-
}), e.add(
|
|
2393
|
+
const m = new Q.EdgesGeometry(s, 15), f = new Q.LineBasicMaterial({ color: "#ffffbb", linewidth: 1 }), y = new Q.LineSegments(m, f);
|
|
2394
|
+
y.visible = !1, d.add(y), o.add(d);
|
|
2395
|
+
}), e.add(o), o;
|
|
2226
2396
|
}
|
|
2227
2397
|
export {
|
|
2228
|
-
|
|
2229
|
-
|
|
2230
|
-
|
|
2231
|
-
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
|
|
2398
|
+
Nr as ALPHA,
|
|
2399
|
+
vr as ASSAY_COLOR_PALETTE_10,
|
|
2400
|
+
Lt as ASSAY_NON_VALUE_FIELDS,
|
|
2401
|
+
Y as AZIMUTH,
|
|
2402
|
+
Er as BASELODE_COLORWAY,
|
|
2403
|
+
Ar as BASELODE_DARK,
|
|
2404
|
+
Sr as BASELODE_DARK_TEMPLATE,
|
|
2405
|
+
Tr as BASELODE_DARK_TEMPLATE_NAME,
|
|
2406
|
+
Ir as BASELODE_DATA_MODEL_DRILL_ASSAY,
|
|
2407
|
+
Cr as BASELODE_DATA_MODEL_DRILL_COLLAR,
|
|
2408
|
+
Et as BASELODE_DATA_MODEL_DRILL_GEOLOGY,
|
|
2409
|
+
Lr as BASELODE_DATA_MODEL_DRILL_SURVEY,
|
|
2410
|
+
Mr as BASELODE_DATA_MODEL_GEOPHYSICS,
|
|
2411
|
+
Pr as BASELODE_DATA_MODEL_STRUCTURAL_POINT,
|
|
2412
|
+
Or as BASELODE_DATA_MODEL_SURFACE_SAMPLE,
|
|
2413
|
+
xr as BASELODE_LIGHT,
|
|
2414
|
+
Dr as BASELODE_LIGHT_TEMPLATE,
|
|
2415
|
+
Rr as BASELODE_LIGHT_TEMPLATE_NAME,
|
|
2416
|
+
ke as BASELODE_TEMPLATE,
|
|
2417
|
+
zr as BASELODE_TEMPLATE_NAME,
|
|
2418
|
+
yt as BASE_PIXELS_PER_METRE,
|
|
2419
|
+
$r as BETA,
|
|
2420
|
+
kr as BUILTIN_COLOUR_MAPS,
|
|
2421
|
+
mr as Baselode3DControls,
|
|
2422
|
+
Fr as Baselode3DScene,
|
|
2423
|
+
fr as BlockModelWidget,
|
|
2424
|
+
wr as CHART_OPTIONS,
|
|
2425
|
+
Hr as COLLAR_ID,
|
|
2426
|
+
Gr as COMMENTS,
|
|
2427
|
+
Ur as COMMENT_COLUMN_NAMES,
|
|
2428
|
+
Br as COMMODITY_COLOURS,
|
|
2429
|
+
Vr as CRS,
|
|
2430
|
+
En as CorePhotoTable,
|
|
2431
|
+
hr as CorePhotoViewer,
|
|
2432
|
+
jr as DATASOURCE,
|
|
2433
|
+
Yr as DATASOURCE_HOLE_ID,
|
|
2434
|
+
Wr as DATASOURCE_SAMPLE_ID,
|
|
2435
|
+
qr as DATASOURCE_SURFACE_SAMPLE_ID,
|
|
2436
|
+
Xr as DATE_END,
|
|
2437
|
+
Kr as DATE_START,
|
|
2438
|
+
Zr as DEFAULT_COLUMN_MAP,
|
|
2439
|
+
fn as DEFAULT_LOD_BREAKPOINTS,
|
|
2440
|
+
j as DEPTH,
|
|
2441
|
+
W as DIP,
|
|
2442
|
+
Ue as DISPLAY_CATEGORICAL,
|
|
2443
|
+
ze as DISPLAY_COMMENT,
|
|
2444
|
+
Jr as DISPLAY_HIDDEN,
|
|
2445
|
+
At as DISPLAY_NUMERIC,
|
|
2446
|
+
tt as DISPLAY_TADPOLE,
|
|
2447
|
+
he as EASTING,
|
|
2448
|
+
Ae as ELEVATION,
|
|
2449
|
+
Qr as ERROR_COLOR,
|
|
2450
|
+
eo as EXTRA,
|
|
2451
|
+
to as FALLBACK_COLOUR,
|
|
2452
|
+
no as FOV_MAX_DEG,
|
|
2453
|
+
ro as FOV_MIN_DEG,
|
|
2454
|
+
L as FROM,
|
|
2285
2455
|
le as GEOLOGY_CODE,
|
|
2286
2456
|
ce as GEOLOGY_DESCRIPTION,
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
2291
|
-
|
|
2292
|
-
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2298
|
-
|
|
2299
|
-
|
|
2457
|
+
oo as GEOPHYSICS_NULL,
|
|
2458
|
+
et as GEOPHYSICS_NULL_SENTINEL,
|
|
2459
|
+
so as HIDDEN_COLUMNS,
|
|
2460
|
+
N as HOLE_ID,
|
|
2461
|
+
io as HOLE_TYPE,
|
|
2462
|
+
re as LATITUDE,
|
|
2463
|
+
ao as LITHOLOGY_COLOURS,
|
|
2464
|
+
oe as LONGITUDE,
|
|
2465
|
+
lo as MAX_DEPTH,
|
|
2466
|
+
ve as MID,
|
|
2467
|
+
ge as NORTHING,
|
|
2468
|
+
co as NUMERIC_LINE_COLOR,
|
|
2469
|
+
uo as NUMERIC_MARKER_COLOR,
|
|
2300
2470
|
de as PROJECT_ID,
|
|
2301
|
-
|
|
2302
|
-
|
|
2303
|
-
|
|
2304
|
-
|
|
2305
|
-
|
|
2306
|
-
|
|
2307
|
-
|
|
2308
|
-
|
|
2309
|
-
|
|
2471
|
+
mo as REPORT_NUMBER,
|
|
2472
|
+
fo as SAMPLE_ID,
|
|
2473
|
+
po as STRIKE,
|
|
2474
|
+
ho as STRIP_LOG_DEFAULT_COLOR,
|
|
2475
|
+
go as STRIP_LOG_DEFAULT_LATERAL_OFFSET,
|
|
2476
|
+
yo as STRIP_LOG_DEFAULT_PANEL_WIDTH,
|
|
2477
|
+
bo as SURFACE_SAMPLE_ID,
|
|
2478
|
+
_o as SURFACE_SAMPLE_TYPE,
|
|
2479
|
+
No as SURVEY_TYPE,
|
|
2310
2480
|
M as TO,
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2314
|
-
|
|
2315
|
-
|
|
2316
|
-
|
|
2317
|
-
|
|
2318
|
-
|
|
2319
|
-
|
|
2320
|
-
|
|
2321
|
-
|
|
2322
|
-
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
|
|
2326
|
-
|
|
2327
|
-
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2358
|
-
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2481
|
+
sr as TracePlot,
|
|
2482
|
+
yr as addGradeBlocksToScene,
|
|
2483
|
+
vo as addRasterOverlay,
|
|
2484
|
+
Eo as alphaBetaToNormal,
|
|
2485
|
+
dr as annotationsFromIntervals,
|
|
2486
|
+
qn as assembleDataset,
|
|
2487
|
+
wn as attachAssayPositions,
|
|
2488
|
+
kn as balancedTangentialDesurvey,
|
|
2489
|
+
kt as buildAssayState,
|
|
2490
|
+
Ao as buildCategoricalStripLogConfig,
|
|
2491
|
+
nn as buildCommentsConfig,
|
|
2492
|
+
yn as buildDepthMarkers,
|
|
2493
|
+
So as buildEqualRangeColorScale,
|
|
2494
|
+
It as buildIntervalPoints,
|
|
2495
|
+
St as buildPlotConfig,
|
|
2496
|
+
or as buildStrikeDipSymbol,
|
|
2497
|
+
To as buildStripLogGroup,
|
|
2498
|
+
Io as buildStripLogLinePoints,
|
|
2499
|
+
Co as buildStructuralDiscs,
|
|
2500
|
+
rr as buildStructuralStripConfig,
|
|
2501
|
+
tn as buildTadpoleConfig,
|
|
2502
|
+
Fn as buildTraces,
|
|
2503
|
+
_n as buildTrayPhotos,
|
|
2504
|
+
Lo as buildViewSignature,
|
|
2505
|
+
Mo as calculateBlockVolume,
|
|
2506
|
+
Po as calculatePropertyStats,
|
|
2507
|
+
vt as classifyColumns,
|
|
2508
|
+
Oo as clearRasterOverlays,
|
|
2509
|
+
xo as clearStripLogs,
|
|
2510
|
+
Wn as coerceNumeric,
|
|
2511
|
+
Do as computeStructuralPositions,
|
|
2512
|
+
Ro as createRasterOverlay,
|
|
2513
|
+
zo as defaultChartType,
|
|
2514
|
+
bt as defaultTrayFilename,
|
|
2515
|
+
pr as depthIntervalToPixels,
|
|
2516
|
+
bn as depthMarkerInterval,
|
|
2517
|
+
Ie as deriveAssayProps,
|
|
2518
|
+
zn as desurveyTraces,
|
|
2519
|
+
$o as dipAzimuthToNormal,
|
|
2520
|
+
ko as dolly,
|
|
2521
|
+
Fo as emitViewChangeIfNeeded,
|
|
2522
|
+
wo as filterBlocks,
|
|
2523
|
+
Yn as filterByProject,
|
|
2524
|
+
Ho as fitCameraToBounds,
|
|
2525
|
+
Go as focusOnLastBounds,
|
|
2526
|
+
tr as geophysicsToStripLogs,
|
|
2527
|
+
Uo as getBlockStats,
|
|
2528
|
+
Bo as getCategoryHexColor,
|
|
2529
|
+
nt as getChartOptions,
|
|
2530
|
+
Vo as getColorForValue,
|
|
2531
|
+
jo as getColour,
|
|
2532
|
+
Yo as getEqualRangeBinIndex,
|
|
2533
|
+
Wo as getEqualRangeColor,
|
|
2534
|
+
qo as getHoleVerticalExtent,
|
|
2535
|
+
Xo as getRasterOverlay,
|
|
2536
|
+
Ko as getViewState,
|
|
2537
|
+
An as gradeBlockToThreeGeometry,
|
|
2538
|
+
gn as groupPhotosBySet,
|
|
2539
|
+
Yt as groupRowsByHole,
|
|
2540
|
+
Tt as holeHasData,
|
|
2541
|
+
Zo as interpolateTrace,
|
|
2542
|
+
ur as intervalsAsTubes,
|
|
2543
|
+
jn as joinAssaysToTraces,
|
|
2544
|
+
Jo as listRasterOverlays,
|
|
2545
|
+
Dn as loadAssayFile,
|
|
2546
|
+
$t as loadAssayHole,
|
|
2547
|
+
zt as loadAssayMetadata,
|
|
2548
|
+
Bn as loadAssays,
|
|
2549
|
+
Qo as loadBlockModelMetadata,
|
|
2550
|
+
Gn as loadCollars,
|
|
2551
|
+
Vn as loadGeology,
|
|
2552
|
+
gr as loadGradeBlocksFromJson,
|
|
2553
|
+
Un as loadSurveys,
|
|
2384
2554
|
Me as loadTable,
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2555
|
+
es as logDataInfo,
|
|
2556
|
+
ts as logDataWarning,
|
|
2557
|
+
ns as lookDown,
|
|
2558
|
+
Ht as minimumCurvatureDesurvey,
|
|
2559
|
+
rs as normalizeBlockRow,
|
|
2560
|
+
os as normalizeBounds,
|
|
2561
|
+
On as normalizeCsvRow,
|
|
2562
|
+
Se as normalizeFieldName,
|
|
2563
|
+
ss as normalizeStripLogOptions,
|
|
2564
|
+
is as pan,
|
|
2565
|
+
qt as parseAssayCsvTextToHoles,
|
|
2566
|
+
xt as parseAssayHole,
|
|
2567
|
+
Pn as parseAssayHoleIds,
|
|
2568
|
+
Ot as parseAssayHoleIdsWithAssays,
|
|
2569
|
+
Dt as parseAssaysCSV,
|
|
2570
|
+
as as parseBlockModelCSV,
|
|
2571
|
+
Hn as parseDrillholesCSV,
|
|
2572
|
+
Xt as parseGeologyCsvText,
|
|
2573
|
+
er as parseGeophysicsCSV,
|
|
2574
|
+
nr as parseLasFile,
|
|
2575
|
+
Wt as parseStructuralCSV,
|
|
2576
|
+
Zn as parseStructuralIntervalsCSV,
|
|
2577
|
+
Kn as parseStructuralPointsCSV,
|
|
2578
|
+
Rn as parseSurveyCSV,
|
|
2579
|
+
Jn as parseUnifiedDataset,
|
|
2580
|
+
xn as pickFirstPresent,
|
|
2581
|
+
ar as planView,
|
|
2582
|
+
dn as projectTraceToSection,
|
|
2583
|
+
ls as recenterCameraToOrigin,
|
|
2584
|
+
cs as removeRasterOverlay,
|
|
2415
2585
|
st as reorderHoleIds,
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2586
|
+
us as resolveColourMap,
|
|
2587
|
+
lr as sectionView,
|
|
2588
|
+
mn as sectionWindow,
|
|
2589
|
+
pn as selectPhotoLodUrl,
|
|
2590
|
+
ds as setControlMode,
|
|
2591
|
+
ms as setFov,
|
|
2592
|
+
fs as setRasterOverlayElevation,
|
|
2593
|
+
ps as setRasterOverlayOpacity,
|
|
2594
|
+
hs as setRasterOverlayVisibility,
|
|
2595
|
+
gs as setStripLogs,
|
|
2596
|
+
ys as setViewState,
|
|
2597
|
+
Qn as significantIntercepts,
|
|
2598
|
+
hn as sortPhotosByDepth,
|
|
2429
2599
|
ie as standardizeColumns,
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2600
|
+
Mn as standardizeRowArray,
|
|
2601
|
+
$n as tangentialDesurvey,
|
|
2602
|
+
bs as toError,
|
|
2603
|
+
cr as tracesAsSegments,
|
|
2604
|
+
ir as useDrillholeTraceGrid,
|
|
2605
|
+
Xn as validateStructuralPoints,
|
|
2606
|
+
G as withDataErrorContext
|
|
2437
2607
|
};
|
|
2438
2608
|
//# sourceMappingURL=baselode.js.map
|