@solid-labs/fab-one-widget 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createContext as mo, Component as xo, useCallback as
|
|
3
|
-
import { useFrame as
|
|
4
|
-
import { Html as
|
|
1
|
+
import { jsxs as S, jsx as i, Fragment as Ie } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as mo, Component as xo, useCallback as re, useMemo as Y, useState as I, memo as bo, useEffect as q, useRef as ae, forwardRef as yo, createElement as bn } from "react";
|
|
3
|
+
import { useFrame as Mn, useThree as kn, Canvas as wo } from "@react-three/fiber";
|
|
4
|
+
import { Html as Ge, Line as we, OrbitControls as Fn } from "@react-three/drei";
|
|
5
5
|
import * as j from "three";
|
|
6
|
-
import { Plane as
|
|
7
|
-
import { create as
|
|
8
|
-
import { OBJLoader as
|
|
6
|
+
import { Plane as vt, Vector3 as k, Box3 as Pn, Line3 as Ln, Raycaster as So } from "three";
|
|
7
|
+
import { create as vo } from "zustand";
|
|
8
|
+
import { OBJLoader as Dn } from "three/examples/jsm/loaders/OBJLoader.js";
|
|
9
9
|
import { STLLoader as Co } from "three/examples/jsm/loaders/STLLoader.js";
|
|
10
10
|
import { MeshBVH as Ct } from "three-mesh-bvh";
|
|
11
|
-
let Hr, yt, Fr,
|
|
11
|
+
let Hr, yt, Fr, On;
|
|
12
12
|
let __tla = (async () => {
|
|
13
13
|
const zo = {
|
|
14
14
|
showDragDrop: true,
|
|
@@ -28,7 +28,7 @@ let __tla = (async () => {
|
|
|
28
28
|
showNavigation: false,
|
|
29
29
|
showToolbar: false,
|
|
30
30
|
showSaveButton: false
|
|
31
|
-
}, Mo = mo(zo), Gt =
|
|
31
|
+
}, Mo = mo(zo), Gt = vo((t, r) => ({
|
|
32
32
|
landmarkPoints: [],
|
|
33
33
|
isAligned: false,
|
|
34
34
|
isCut: false,
|
|
@@ -97,45 +97,45 @@ let __tla = (async () => {
|
|
|
97
97
|
const D = r[z * 3] * o, B = r[z * 3 + 1] * o, $ = r[z * 3 + 2] * o;
|
|
98
98
|
D < e && (e = D), D > f && (f = D), B < h && (h = B), B > u && (u = B), $ < d && (d = $), $ > g && (g = $);
|
|
99
99
|
}
|
|
100
|
-
const M = (e + f) * 0.5, p = (h + u) * 0.5, b = (d + g) * 0.5, m = f - e + 1e-6, P = u - h + 1e-6, y = g - d + 1e-6, F = m * 0.5, A = P * 0.5,
|
|
100
|
+
const M = (e + f) * 0.5, p = (h + u) * 0.5, b = (d + g) * 0.5, m = f - e + 1e-6, P = u - h + 1e-6, y = g - d + 1e-6, F = m * 0.5, A = P * 0.5, v = y * 0.5, C = Math.min(128, Math.max(16, Math.round(Math.cbrt(a)))), L = m / C, T = P / C, E = y / C, w = /* @__PURE__ */ new Map();
|
|
101
101
|
for (let z = 0; z < a; z++) {
|
|
102
|
-
const D = r[z * 3] * o - M, B = r[z * 3 + 1] * o - p, $ = r[z * 3 + 2] * o - b, ee = Math.min(C - 1, Math.max(0, Math.floor((D + F) / L))),
|
|
103
|
-
let
|
|
104
|
-
|
|
102
|
+
const D = r[z * 3] * o - M, B = r[z * 3 + 1] * o - p, $ = r[z * 3 + 2] * o - b, ee = Math.min(C - 1, Math.max(0, Math.floor((D + F) / L))), ie = Math.min(C - 1, Math.max(0, Math.floor((B + A) / T))), ce = Math.min(C - 1, Math.max(0, Math.floor(($ + v) / E))), U = ee * C * C + ie * C + ce;
|
|
103
|
+
let ne = w.get(U);
|
|
104
|
+
ne || (ne = [], w.set(U, ne)), ne.push(z);
|
|
105
105
|
}
|
|
106
106
|
for (let z = 0; z < l; z++) {
|
|
107
|
-
const D = s.getX(z), B = s.getY(z), $ = s.getZ(z), ee = Math.min(C - 1, Math.max(0, Math.floor((D + F) / L))),
|
|
108
|
-
let U = 1 / 0,
|
|
107
|
+
const D = s.getX(z), B = s.getY(z), $ = s.getZ(z), ee = Math.min(C - 1, Math.max(0, Math.floor((D + F) / L))), ie = Math.min(C - 1, Math.max(0, Math.floor((B + A) / T))), ce = Math.min(C - 1, Math.max(0, Math.floor(($ + v) / E)));
|
|
108
|
+
let U = 1 / 0, ne = 0;
|
|
109
109
|
for (let J = 0; J <= C && U > 0; J++) {
|
|
110
110
|
for (let Z = -J; Z <= J; Z++) for (let ge = -J; ge <= J; ge++) for (let de = -J; de <= J; de++) {
|
|
111
111
|
if (J > 0 && Math.abs(Z) < J && Math.abs(ge) < J && Math.abs(de) < J) continue;
|
|
112
|
-
const he = ee + Z,
|
|
113
|
-
if (he < 0 || he >= C ||
|
|
114
|
-
const O = w.get(he * C * C +
|
|
112
|
+
const he = ee + Z, Se = ie + ge, te = ce + de;
|
|
113
|
+
if (he < 0 || he >= C || Se < 0 || Se >= C || te < 0 || te >= C) continue;
|
|
114
|
+
const O = w.get(he * C * C + Se * C + te);
|
|
115
115
|
if (O) for (const X of O) {
|
|
116
|
-
const Q = r[X * 3] * o - M, ue = r[X * 3 + 1] * o - p, fe = r[X * 3 + 2] * o - b,
|
|
117
|
-
|
|
116
|
+
const Q = r[X * 3] * o - M, ue = r[X * 3 + 1] * o - p, fe = r[X * 3 + 2] * o - b, oe = (D - Q) ** 2 + (B - ue) ** 2 + ($ - fe) ** 2;
|
|
117
|
+
oe < U && (U = oe, ne = X);
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
if (U < 1 / 0) break;
|
|
121
121
|
}
|
|
122
|
-
c[z * 3] = n[
|
|
122
|
+
c[z * 3] = n[ne * 3], c[z * 3 + 1] = n[ne * 3 + 1], c[z * 3 + 2] = n[ne * 3 + 2];
|
|
123
123
|
}
|
|
124
124
|
t.setAttribute("color", new j.Float32BufferAttribute(c, 3));
|
|
125
125
|
}
|
|
126
|
-
const
|
|
126
|
+
const yn = {
|
|
127
127
|
debug: 0,
|
|
128
128
|
info: 1,
|
|
129
129
|
warn: 2,
|
|
130
130
|
error: 3
|
|
131
131
|
};
|
|
132
|
-
let
|
|
132
|
+
let _n = "warn", Rn = null;
|
|
133
133
|
const ye = {
|
|
134
134
|
setLevel(t) {
|
|
135
|
-
|
|
135
|
+
_n = t;
|
|
136
136
|
},
|
|
137
137
|
setHandler(t) {
|
|
138
|
-
|
|
138
|
+
Rn = t;
|
|
139
139
|
},
|
|
140
140
|
debug(t, r, n) {
|
|
141
141
|
mt("debug", t, r, n);
|
|
@@ -151,7 +151,7 @@ let __tla = (async () => {
|
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
function mt(t, r, n, o) {
|
|
154
|
-
if (
|
|
154
|
+
if (yn[t] < yn[_n]) return;
|
|
155
155
|
const s = `[${r}]`, l = o !== void 0 ? [
|
|
156
156
|
s,
|
|
157
157
|
n,
|
|
@@ -174,9 +174,9 @@ let __tla = (async () => {
|
|
|
174
174
|
console.error(...l);
|
|
175
175
|
break;
|
|
176
176
|
}
|
|
177
|
-
|
|
177
|
+
Rn == null ? void 0 : Rn(t, r, n, o);
|
|
178
178
|
}
|
|
179
|
-
function
|
|
179
|
+
function St(t) {
|
|
180
180
|
const r = t.getAttribute("position"), n = new Float32Array(r.array), o = t.getIndex();
|
|
181
181
|
if (o) return {
|
|
182
182
|
positions: n,
|
|
@@ -189,7 +189,7 @@ let __tla = (async () => {
|
|
|
189
189
|
indices: l
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
function
|
|
192
|
+
function Wn(t, r) {
|
|
193
193
|
const n = new j.BufferGeometry();
|
|
194
194
|
return n.setAttribute("position", new j.Float32BufferAttribute(t, 3)), n.setIndex(new j.BufferAttribute(r, 1)), n.computeVertexNormals(), n;
|
|
195
195
|
}
|
|
@@ -197,12 +197,12 @@ let __tla = (async () => {
|
|
|
197
197
|
try {
|
|
198
198
|
const o = Po(t);
|
|
199
199
|
n == null ? void 0 : n("Parsing mesh...");
|
|
200
|
-
const l = new
|
|
200
|
+
const l = new Dn().parse(t);
|
|
201
201
|
let c = null;
|
|
202
202
|
if (l.traverse((m) => {
|
|
203
203
|
m.isMesh && !c && (c = m.geometry);
|
|
204
204
|
}), !c) return null;
|
|
205
|
-
const { positions: a, indices: e } =
|
|
205
|
+
const { positions: a, indices: e } = St(c);
|
|
206
206
|
if (a.length < 9 || e.length < 3) return ye.warn("wasm", `Mesh too small: positions=${a.length} indices=${e.length}`), null;
|
|
207
207
|
for (let m = 0; m < Math.min(a.length, 300); m++) if (!isFinite(a[m])) return ye.error("wasm", `Invalid position data: NaN/Infinity at index ${m}`), null;
|
|
208
208
|
const h = a.length / 3;
|
|
@@ -211,7 +211,7 @@ let __tla = (async () => {
|
|
|
211
211
|
const d = r.preprocess_mesh(a, e, 10, 1e-4, 500), f = d.positions(), u = d.indices(), g = d.unit_converted(), M = d.detected_unit(), p = d.log();
|
|
212
212
|
if (ye.debug("wasm", "preprocess result", p), f.length === 0) return null;
|
|
213
213
|
n == null ? void 0 : n("Building geometry...");
|
|
214
|
-
const b =
|
|
214
|
+
const b = Wn(f, u);
|
|
215
215
|
if (o) {
|
|
216
216
|
const m = g ? 1e3 : 1;
|
|
217
217
|
Lo(b, o.positions, o.colors, m);
|
|
@@ -227,7 +227,7 @@ let __tla = (async () => {
|
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
function _o(t) {
|
|
230
|
-
const n = new
|
|
230
|
+
const n = new Dn().parse(t);
|
|
231
231
|
let o = null;
|
|
232
232
|
return n.traverse((s) => {
|
|
233
233
|
s.isMesh && !o && (o = s.geometry);
|
|
@@ -252,12 +252,12 @@ let __tla = (async () => {
|
|
|
252
252
|
for (const o of t) (n.length === 0 || n[n.length - 1].distanceTo(o) > r) && n.push(o.clone());
|
|
253
253
|
return n.length > 2 && n[0].distanceTo(n[n.length - 1]) > r && n.push(n[0].clone()), n;
|
|
254
254
|
}
|
|
255
|
-
function
|
|
255
|
+
function Ke(t) {
|
|
256
256
|
let r = 0;
|
|
257
257
|
for (let n = 0; n < t.length - 1; n++) r += t[n].distanceTo(t[n + 1]);
|
|
258
258
|
return r;
|
|
259
259
|
}
|
|
260
|
-
function
|
|
260
|
+
function In(t, r = 1e-3, n = false) {
|
|
261
261
|
if (!t.length) return [];
|
|
262
262
|
const o = /* @__PURE__ */ new Map(), s = (f) => {
|
|
263
263
|
const u = Ro(f, r);
|
|
@@ -290,8 +290,8 @@ let __tla = (async () => {
|
|
|
290
290
|
}
|
|
291
291
|
if (!c.length) return [];
|
|
292
292
|
if (n) {
|
|
293
|
-
c.sort((g, M) =>
|
|
294
|
-
const f =
|
|
293
|
+
c.sort((g, M) => Ke(M) - Ke(g));
|
|
294
|
+
const f = Ke(c[0]), u = c.filter((g) => Ke(g) >= f * 0.3);
|
|
295
295
|
return u[u.length - 1] ?? c[0];
|
|
296
296
|
}
|
|
297
297
|
const a = c.filter((f) => f.length >= 3 && f[0].distanceTo(f[f.length - 1]) < r * 10), e = a.length > 0 ? a : c;
|
|
@@ -306,8 +306,8 @@ let __tla = (async () => {
|
|
|
306
306
|
}
|
|
307
307
|
return h;
|
|
308
308
|
}
|
|
309
|
-
function
|
|
310
|
-
const s = new
|
|
309
|
+
function wn(t, r, n, o = false) {
|
|
310
|
+
const s = new vt(new k(0, 1, 0), -n), l = [], c = new Pn();
|
|
311
311
|
c.setFromBufferAttribute(r.getAttribute("position"));
|
|
312
312
|
const a = {
|
|
313
313
|
linePoints: [],
|
|
@@ -315,7 +315,7 @@ let __tla = (async () => {
|
|
|
315
315
|
rightmostPoint: new k(0, n, 0)
|
|
316
316
|
};
|
|
317
317
|
if (!s.intersectsBox(c)) return a;
|
|
318
|
-
const e = new
|
|
318
|
+
const e = new Ln(), h = new k();
|
|
319
319
|
t.shapecast({
|
|
320
320
|
intersectsBounds: (p) => s.intersectsBox(p),
|
|
321
321
|
intersectsTriangle: (p) => {
|
|
@@ -326,9 +326,9 @@ let __tla = (async () => {
|
|
|
326
326
|
});
|
|
327
327
|
}
|
|
328
328
|
});
|
|
329
|
-
const d =
|
|
329
|
+
const d = In(l, Vt, o);
|
|
330
330
|
if (d.length < 2) return a;
|
|
331
|
-
const f =
|
|
331
|
+
const f = Ke(d);
|
|
332
332
|
let u = -1 / 0, g = new k(0, n, 0);
|
|
333
333
|
for (const p of d) p.x > u && (u = p.x, g = p.clone());
|
|
334
334
|
const M = d.length > 2 && d[0].distanceTo(d[d.length - 1]) < Vt * 10;
|
|
@@ -339,22 +339,22 @@ let __tla = (async () => {
|
|
|
339
339
|
isClosed: M
|
|
340
340
|
};
|
|
341
341
|
}
|
|
342
|
-
function
|
|
343
|
-
const s =
|
|
342
|
+
function je(t, r, n, o = false) {
|
|
343
|
+
const s = wn(t, r, n, o);
|
|
344
344
|
if (s.isClosed && s.linePoints.length >= 3) return s;
|
|
345
345
|
ye.debug("slice", `y=${n.toFixed(2)} failed (pts=${s.linePoints.length}, closed=${s.isClosed}), retrying...`);
|
|
346
346
|
let l = s;
|
|
347
347
|
for (const c of Fo) {
|
|
348
|
-
const a =
|
|
348
|
+
const a = wn(t, r, n + c, o);
|
|
349
349
|
if (a.isClosed && a.linePoints.length >= 3) return ye.debug("slice", `y=${n.toFixed(2)} recovered with offset ${c > 0 ? "+" : ""}${c}mm (pts=${a.linePoints.length}, len=${a.lineLength.toFixed(1)}mm)`), a;
|
|
350
350
|
a.linePoints.length > l.linePoints.length && (l = a);
|
|
351
351
|
}
|
|
352
352
|
return ye.warn("slice", `y=${n.toFixed(2)} all retries exhausted (pts=${l.linePoints.length}, closed=${l.isClosed})`), l;
|
|
353
353
|
}
|
|
354
354
|
function Io(t, r, n, o) {
|
|
355
|
-
const s = new
|
|
355
|
+
const s = new vt().setFromNormalAndCoplanarPoint(o.clone().normalize(), n), l = new Pn();
|
|
356
356
|
if (l.setFromBufferAttribute(r.getAttribute("position")), !s.intersectsBox(l)) return 0;
|
|
357
|
-
const c = [], a = new
|
|
357
|
+
const c = [], a = new Ln(), e = new k();
|
|
358
358
|
t.shapecast({
|
|
359
359
|
intersectsBounds: (d) => s.intersectsBox(d),
|
|
360
360
|
intersectsTriangle: (d) => {
|
|
@@ -365,8 +365,8 @@ let __tla = (async () => {
|
|
|
365
365
|
});
|
|
366
366
|
}
|
|
367
367
|
});
|
|
368
|
-
const h =
|
|
369
|
-
return
|
|
368
|
+
const h = In(c, Vt);
|
|
369
|
+
return Ke(h);
|
|
370
370
|
}
|
|
371
371
|
function jt(t) {
|
|
372
372
|
return new Ct(t, {
|
|
@@ -390,7 +390,7 @@ let __tla = (async () => {
|
|
|
390
390
|
};
|
|
391
391
|
const a = new Ct(t, {
|
|
392
392
|
maxLeafTris: zt
|
|
393
|
-
}), e =
|
|
393
|
+
}), e = je(a, t, r);
|
|
394
394
|
if (e.lineLength === 0) return {
|
|
395
395
|
valid: false,
|
|
396
396
|
reason: "No circumference at green point \u2014 mesh may be empty at that height"
|
|
@@ -400,7 +400,7 @@ let __tla = (async () => {
|
|
|
400
400
|
valid: true,
|
|
401
401
|
reason: ""
|
|
402
402
|
};
|
|
403
|
-
const d =
|
|
403
|
+
const d = je(a, t, h);
|
|
404
404
|
if (e.lineLength > 0 && d.lineLength > 0) {
|
|
405
405
|
const u = e.lineLength / d.lineLength;
|
|
406
406
|
if (u < 0.5) return {
|
|
@@ -410,7 +410,7 @@ let __tla = (async () => {
|
|
|
410
410
|
}
|
|
411
411
|
const f = r - o * 2;
|
|
412
412
|
if (f > n) {
|
|
413
|
-
const u =
|
|
413
|
+
const u = je(a, t, f);
|
|
414
414
|
if (d.lineLength > 0 && u.lineLength > 0) {
|
|
415
415
|
const g = d.lineLength / u.lineLength;
|
|
416
416
|
if (g < 0.5) return {
|
|
@@ -447,8 +447,8 @@ let __tla = (async () => {
|
|
|
447
447
|
}
|
|
448
448
|
const fe = e[0].clone();
|
|
449
449
|
a.translate(-fe.x, -fe.y, -fe.z), e = e.map((V) => new k(V.x - fe.x, V.y - fe.y, V.z - fe.z)), a.computeVertexNormals(), a.computeBoundingBox();
|
|
450
|
-
const
|
|
451
|
-
e.push(
|
|
450
|
+
const oe = new k(e[0].x, e[0].y, e[0].z);
|
|
451
|
+
e.push(oe), o.addLandmarkPoint({
|
|
452
452
|
faceIndex: -1,
|
|
453
453
|
vertexIndices: [
|
|
454
454
|
0,
|
|
@@ -456,9 +456,9 @@ let __tla = (async () => {
|
|
|
456
456
|
2
|
|
457
457
|
],
|
|
458
458
|
position: {
|
|
459
|
-
x:
|
|
460
|
-
y:
|
|
461
|
-
z:
|
|
459
|
+
x: oe.x,
|
|
460
|
+
y: oe.y,
|
|
461
|
+
z: oe.z
|
|
462
462
|
},
|
|
463
463
|
barycentricCoords: {
|
|
464
464
|
u: 0.33,
|
|
@@ -474,7 +474,7 @@ let __tla = (async () => {
|
|
|
474
474
|
a.computeBoundingBox(), a.boundingBox.getSize(G), o.setModelSize(Math.max(G.x, G.y, G.z)), s.dispose();
|
|
475
475
|
return;
|
|
476
476
|
}
|
|
477
|
-
const { positions: f, indices: u } =
|
|
477
|
+
const { positions: f, indices: u } = St(a), g = new Float32Array([
|
|
478
478
|
h.x,
|
|
479
479
|
h.y,
|
|
480
480
|
h.z
|
|
@@ -496,10 +496,10 @@ let __tla = (async () => {
|
|
|
496
496
|
F[0],
|
|
497
497
|
F[1],
|
|
498
498
|
F[2]
|
|
499
|
-
]),
|
|
500
|
-
let C =
|
|
501
|
-
const E =
|
|
502
|
-
ye.info(Me, "Alignment complete",
|
|
499
|
+
]), v = c.align_to_origin(f, g, M, A);
|
|
500
|
+
let C = v.positions(), L = v.mpt(), T = v.origin();
|
|
501
|
+
const E = v.transform();
|
|
502
|
+
ye.info(Me, "Alignment complete", v.details());
|
|
503
503
|
const w = [
|
|
504
504
|
E[3],
|
|
505
505
|
E[4],
|
|
@@ -518,22 +518,22 @@ let __tla = (async () => {
|
|
|
518
518
|
o.onStatus("Generating measurement points...");
|
|
519
519
|
const D = c.subdivide_origin_to_plane(new Float32Array(T), new Float32Array(L), z);
|
|
520
520
|
ye.debug(Me, `Subdivide: ${D.count()} pts, spacing=${D.spacing().toFixed(1)}mm`);
|
|
521
|
-
const B = D.points(), $ = D.count(), ee = 2,
|
|
522
|
-
for (let O = ee; O < $ -
|
|
521
|
+
const B = D.points(), $ = D.count(), ee = 2, ie = 1, ce = [];
|
|
522
|
+
for (let O = ee; O < $ - ie; O++) ce.push(B[O * 3 + 1]);
|
|
523
523
|
o.onStatus("Computing cross-sections...");
|
|
524
524
|
let U = [];
|
|
525
525
|
if (ce.length >= 2) {
|
|
526
526
|
const X = (b ? c.batch_cross_sections_y_inner.bind(c) : c.batch_cross_sections_y.bind(c))(C, u, new Float32Array(ce), 10);
|
|
527
527
|
ye.debug(Me, "Batch (subdivision)", X.details());
|
|
528
528
|
const Q = X.all_loop_points(), ue = X.offsets(), fe = X.circumferences();
|
|
529
|
-
for (let
|
|
530
|
-
const G = ue[
|
|
531
|
-
if (V <= G || fe[
|
|
529
|
+
for (let oe = 0; oe < ue.length - 1; oe++) {
|
|
530
|
+
const G = ue[oe], V = ue[oe + 1];
|
|
531
|
+
if (V <= G || fe[oe] <= 0) continue;
|
|
532
532
|
const ke = (V - G) / 3;
|
|
533
533
|
if (ke < 3) continue;
|
|
534
|
-
let Ae = 0,
|
|
535
|
-
for (let ze = G; ze < V; ze += 3) Ae += Q[ze],
|
|
536
|
-
U.push(Ae / ke,
|
|
534
|
+
let Ae = 0, Xe = 0, me = 0;
|
|
535
|
+
for (let ze = G; ze < V; ze += 3) Ae += Q[ze], Xe += Q[ze + 1], me += Q[ze + 2];
|
|
536
|
+
U.push(Ae / ke, Xe / ke, me / ke);
|
|
537
537
|
}
|
|
538
538
|
}
|
|
539
539
|
if (U.length >= 6) {
|
|
@@ -541,8 +541,8 @@ let __tla = (async () => {
|
|
|
541
541
|
const O = c.refine_alignment(new Float32Array(U), C, new Float32Array(T), new Float32Array(L));
|
|
542
542
|
ye.info(Me, "Refinement complete", O.details()), C = O.positions(), L = O.mpt(), T = O.origin();
|
|
543
543
|
}
|
|
544
|
-
const
|
|
545
|
-
|
|
544
|
+
const ne = a.getAttribute("color"), J = Wn(C, u);
|
|
545
|
+
ne && J.setAttribute("color", ne), a.dispose(), a = J, t.geometry = a, a.computeVertexNormals(), a.computeBoundingBox(), e[0] = new k(T[0], T[1], T[2]), e[1] = new k(L[0], L[1], L[2]), o.onStatus("Setting blue point...");
|
|
546
546
|
const Z = new k(e[0].x, e[0].y, e[0].z);
|
|
547
547
|
e.push(Z), o.addLandmarkPoint({
|
|
548
548
|
faceIndex: -1,
|
|
@@ -569,10 +569,10 @@ let __tla = (async () => {
|
|
|
569
569
|
const ge = a.boundingBox, de = new k();
|
|
570
570
|
ge.getSize(de), o.setModelSize(Math.max(de.x, de.y, de.z)), o.setCut(true), o.setAdjustedStartY(null), o.setAdjustedEndY(null), o.setOriginalEndY(e[1].y + 2 * wt), o.onStatus("Computing final measurements...");
|
|
571
571
|
{
|
|
572
|
-
const O =
|
|
572
|
+
const O = St(a), X = e[1].y, Q = e[0].y;
|
|
573
573
|
let ue = 1 / 0, fe = -1 / 0;
|
|
574
|
-
const
|
|
575
|
-
for (let me = 1; me <
|
|
574
|
+
const oe = O.positions;
|
|
575
|
+
for (let me = 1; me < oe.length; me += 3) oe[me] < ue && (ue = oe[me]), oe[me] > fe && (fe = oe[me]);
|
|
576
576
|
const G = 25.4, V = [];
|
|
577
577
|
V.push(X);
|
|
578
578
|
for (let me = 1; me <= 2; me++) {
|
|
@@ -583,7 +583,7 @@ let __tla = (async () => {
|
|
|
583
583
|
V.sort((me, ze) => me - ze), ye.info(Me, `Horizontal slices: ${V.length} Y planes, range ${(_b = V[0]) == null ? void 0 : _b.toFixed(1)} \u2192 ${(_c = V[V.length - 1]) == null ? void 0 : _c.toFixed(1)} mm`);
|
|
584
584
|
const Ae = (b ? c.batch_cross_sections_y_inner.bind(c) : c.batch_cross_sections_y.bind(c))(O.positions, O.indices, new Float32Array(V), 10);
|
|
585
585
|
ye.info(Me, `Horizontal slices (${b ? "inner" : "outer"}): ${Ae.count()}/${V.length} valid`), ye.debug(Me, "Slice details", Ae.details());
|
|
586
|
-
const
|
|
586
|
+
const Xe = {
|
|
587
587
|
yValues: V,
|
|
588
588
|
circumferences: Array.from(Ae.circumferences()),
|
|
589
589
|
allLoopPoints: new Float32Array(Ae.all_loop_points()),
|
|
@@ -591,10 +591,10 @@ let __tla = (async () => {
|
|
|
591
591
|
mptY: X,
|
|
592
592
|
originY: Q
|
|
593
593
|
};
|
|
594
|
-
(_d = o.setWasmSlices) == null ? void 0 : _d.call(o,
|
|
594
|
+
(_d = o.setWasmSlices) == null ? void 0 : _d.call(o, Xe);
|
|
595
595
|
}
|
|
596
596
|
o.onStatus("Validating results...");
|
|
597
|
-
const he = e[1].y,
|
|
597
|
+
const he = e[1].y, Se = e[0].y, te = Bo(a, he, Se, n);
|
|
598
598
|
te.valid || ye.warn(Me, `Validation: ${te.reason}`), o.setClippedReferenceGeometry ? (s.computeVertexNormals(), o.setClippedReferenceGeometry(s)) : s.dispose();
|
|
599
599
|
} catch (a) {
|
|
600
600
|
ye.error(Me, "Processing failed", a), o.setError(a instanceof Error ? a.message : "Failed to process mesh."), s.dispose();
|
|
@@ -619,7 +619,7 @@ let __tla = (async () => {
|
|
|
619
619
|
console.error("[ErrorBoundary] Caught error:", r, n.componentStack);
|
|
620
620
|
}
|
|
621
621
|
render() {
|
|
622
|
-
return this.state.error ? this.props.fallback ? this.props.fallback(this.state.error, this.reset) :
|
|
622
|
+
return this.state.error ? this.props.fallback ? this.props.fallback(this.state.error, this.reset) : S("div", {
|
|
623
623
|
style: {
|
|
624
624
|
display: "flex",
|
|
625
625
|
flexDirection: "column",
|
|
@@ -667,7 +667,7 @@ let __tla = (async () => {
|
|
|
667
667
|
}) : this.props.children;
|
|
668
668
|
}
|
|
669
669
|
}
|
|
670
|
-
const $o = ({ message: t, onDismiss: r }) =>
|
|
670
|
+
const $o = ({ message: t, onDismiss: r }) => S("div", {
|
|
671
671
|
style: {
|
|
672
672
|
position: "absolute",
|
|
673
673
|
top: 16,
|
|
@@ -684,7 +684,7 @@ let __tla = (async () => {
|
|
|
684
684
|
gap: 12
|
|
685
685
|
},
|
|
686
686
|
children: [
|
|
687
|
-
|
|
687
|
+
S("div", {
|
|
688
688
|
style: {
|
|
689
689
|
flex: 1
|
|
690
690
|
},
|
|
@@ -720,7 +720,7 @@ let __tla = (async () => {
|
|
|
720
720
|
children: "x"
|
|
721
721
|
})
|
|
722
722
|
]
|
|
723
|
-
}),
|
|
723
|
+
}), Sn = ({ message: t }) => S("div", {
|
|
724
724
|
style: {
|
|
725
725
|
position: "absolute",
|
|
726
726
|
top: 0,
|
|
@@ -767,7 +767,7 @@ let __tla = (async () => {
|
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
769
|
const Ho = ({ mesh: t, maxPoints: r = 2, meshColor: n = "#c8c8c8", meshOpacity: o = 1, frontFaceOnly: s = false, doubleShellTransparency: l = false }) => {
|
|
770
|
-
const { addLandmarkPoint: c, landmarkPoints: a } = Gt(), e =
|
|
770
|
+
const { addLandmarkPoint: c, landmarkPoints: a } = Gt(), e = re((g) => {
|
|
771
771
|
if (a.length >= r) return;
|
|
772
772
|
g.stopPropagation();
|
|
773
773
|
const M = g.intersections[0], p = M == null ? void 0 : M.faceIndex;
|
|
@@ -783,9 +783,9 @@ let __tla = (async () => {
|
|
|
783
783
|
p * 3 + 1,
|
|
784
784
|
p * 3 + 2
|
|
785
785
|
];
|
|
786
|
-
const y = b.getAttribute("position"), F = new k().fromBufferAttribute(y, P[0]), A = new k().fromBufferAttribute(y, P[1]),
|
|
787
|
-
F.applyMatrix4(t.matrixWorld), A.applyMatrix4(t.matrixWorld),
|
|
788
|
-
const C = M.point, L = Oo(C, F, A,
|
|
786
|
+
const y = b.getAttribute("position"), F = new k().fromBufferAttribute(y, P[0]), A = new k().fromBufferAttribute(y, P[1]), v = new k().fromBufferAttribute(y, P[2]);
|
|
787
|
+
F.applyMatrix4(t.matrixWorld), A.applyMatrix4(t.matrixWorld), v.applyMatrix4(t.matrixWorld);
|
|
788
|
+
const C = M.point, L = Oo(C, F, A, v), T = {
|
|
789
789
|
faceIndex: p,
|
|
790
790
|
vertexIndices: P,
|
|
791
791
|
position: {
|
|
@@ -828,7 +828,7 @@ let __tla = (async () => {
|
|
|
828
828
|
});
|
|
829
829
|
}, No = ({ point: t, index: r, markerSize: n, color: o, label: s }) => {
|
|
830
830
|
const [l, c] = I(false);
|
|
831
|
-
return
|
|
831
|
+
return S("mesh", {
|
|
832
832
|
position: [
|
|
833
833
|
t.position.x,
|
|
834
834
|
t.position.y,
|
|
@@ -847,7 +847,7 @@ let __tla = (async () => {
|
|
|
847
847
|
i("meshBasicMaterial", {
|
|
848
848
|
color: o
|
|
849
849
|
}),
|
|
850
|
-
l && i(
|
|
850
|
+
l && i(Ge, {
|
|
851
851
|
center: true,
|
|
852
852
|
style: {
|
|
853
853
|
pointerEvents: "none"
|
|
@@ -888,7 +888,7 @@ let __tla = (async () => {
|
|
|
888
888
|
}, e))
|
|
889
889
|
});
|
|
890
890
|
};
|
|
891
|
-
function
|
|
891
|
+
function Bn(t) {
|
|
892
892
|
return Y(() => t ? new Ct(t, {
|
|
893
893
|
maxLeafTris: zt
|
|
894
894
|
}) : null, [
|
|
@@ -898,14 +898,14 @@ let __tla = (async () => {
|
|
|
898
898
|
const vn = (t, r) => {
|
|
899
899
|
const n = Math.abs(t - r);
|
|
900
900
|
return n <= 7 ? "#8BC34A" : n <= 20 ? "#FFC107" : "#FF5722";
|
|
901
|
-
},
|
|
902
|
-
if (t <= 7) return
|
|
901
|
+
}, Cn = new j.Color("#8BC34A"), zn = new j.Color("#FFC107"), jo = new j.Color("#FF5722"), Go = (t) => {
|
|
902
|
+
if (t <= 7) return Cn.clone();
|
|
903
903
|
if (t <= 20) {
|
|
904
904
|
const n = (t - 7) / 13;
|
|
905
|
-
return
|
|
905
|
+
return Cn.clone().lerp(zn, n);
|
|
906
906
|
}
|
|
907
907
|
const r = Math.min((t - 20) / 20, 1);
|
|
908
|
-
return
|
|
908
|
+
return zn.clone().lerp(jo, r);
|
|
909
909
|
}, Xo = (t, r) => {
|
|
910
910
|
const n = t.length, o = new Float32Array(n * 2 * 3), s = new Float32Array(n * 2 * 3), l = [];
|
|
911
911
|
for (let e = 0; e < n; e++) {
|
|
@@ -927,7 +927,7 @@ let __tla = (async () => {
|
|
|
927
927
|
});
|
|
928
928
|
return new j.Mesh(c, a);
|
|
929
929
|
}, Yo = ({ bvh: t, geometry: r, yPosition: n, color: o = "#00ff00", labelX: s, onDataChange: l, displayUnit: c = "mm", useInnerSurface: a = false, formValue: e, lineWidth: h = 1.5, wasmLoopPoints: d, wasmCircumference: f }) => {
|
|
930
|
-
const u = Y(() => d && f != null ? null :
|
|
930
|
+
const u = Y(() => d && f != null ? null : je(t, r, n, a), [
|
|
931
931
|
t,
|
|
932
932
|
r,
|
|
933
933
|
n,
|
|
@@ -936,8 +936,8 @@ let __tla = (async () => {
|
|
|
936
936
|
f
|
|
937
937
|
]), g = d ?? (u == null ? void 0 : u.linePoints) ?? [], M = f ?? (u == null ? void 0 : u.lineLength) ?? 0, p = Y(() => {
|
|
938
938
|
if (e == null || e === 0 || M <= 0 || g.length < 2) return null;
|
|
939
|
-
const y = e / M, F = g.reduce((
|
|
940
|
-
return g.map((
|
|
939
|
+
const y = e / M, F = g.reduce((v, C) => v + C.x, 0) / g.length, A = g.reduce((v, C) => v + C.z, 0) / g.length;
|
|
940
|
+
return g.map((v) => new k(F + (v.x - F) * y, v.y, A + (v.z - A) * y));
|
|
941
941
|
}, [
|
|
942
942
|
g,
|
|
943
943
|
M,
|
|
@@ -976,24 +976,24 @@ let __tla = (async () => {
|
|
|
976
976
|
M,
|
|
977
977
|
n,
|
|
978
978
|
l
|
|
979
|
-
]),
|
|
979
|
+
]), Mn(({ camera: y }) => {
|
|
980
980
|
if (!m.current || g.length < 2) return;
|
|
981
981
|
const F = new k();
|
|
982
982
|
y.getWorldDirection(F);
|
|
983
983
|
const A = new k(F.x, 0, F.z);
|
|
984
984
|
if (A.lengthSq() < 1e-8) return;
|
|
985
985
|
A.normalize();
|
|
986
|
-
const
|
|
986
|
+
const v = new k().crossVectors(A, new k(0, 1, 0)).normalize();
|
|
987
987
|
let C = -1 / 0, L = g[0];
|
|
988
988
|
for (const z of g) {
|
|
989
|
-
const D =
|
|
989
|
+
const D = v.x * z.x + v.z * z.z;
|
|
990
990
|
D > C && (C = D, L = z);
|
|
991
991
|
}
|
|
992
|
-
const T = s * 0.35, E = new k(L.x +
|
|
992
|
+
const T = s * 0.35, E = new k(L.x + v.x * T, n, L.z + v.z * T);
|
|
993
993
|
m.current.position.copy(E);
|
|
994
994
|
const w = P.geometry.getAttribute("position");
|
|
995
995
|
w.setXYZ(0, L.x, L.y, L.z), w.setXYZ(1, E.x, E.y, E.z), w.needsUpdate = true;
|
|
996
|
-
}), g.length < 2 ? null :
|
|
996
|
+
}), g.length < 2 ? null : S("group", {
|
|
997
997
|
renderOrder: 10,
|
|
998
998
|
children: [
|
|
999
999
|
i(we, {
|
|
@@ -1028,7 +1028,7 @@ let __tla = (async () => {
|
|
|
1028
1028
|
}),
|
|
1029
1029
|
i("group", {
|
|
1030
1030
|
ref: m,
|
|
1031
|
-
children: i(
|
|
1031
|
+
children: i(Ge, {
|
|
1032
1032
|
zIndexRange: [
|
|
1033
1033
|
100,
|
|
1034
1034
|
0
|
|
@@ -1037,7 +1037,7 @@ let __tla = (async () => {
|
|
|
1037
1037
|
pointerEvents: "none",
|
|
1038
1038
|
transform: "translateY(-50%)"
|
|
1039
1039
|
},
|
|
1040
|
-
children:
|
|
1040
|
+
children: S("div", {
|
|
1041
1041
|
style: {
|
|
1042
1042
|
display: "flex",
|
|
1043
1043
|
alignItems: "stretch",
|
|
@@ -1047,7 +1047,7 @@ let __tla = (async () => {
|
|
|
1047
1047
|
whiteSpace: "nowrap"
|
|
1048
1048
|
},
|
|
1049
1049
|
children: [
|
|
1050
|
-
|
|
1050
|
+
S("div", {
|
|
1051
1051
|
style: {
|
|
1052
1052
|
display: "flex",
|
|
1053
1053
|
alignItems: "center",
|
|
@@ -1079,7 +1079,7 @@ let __tla = (async () => {
|
|
|
1079
1079
|
}),
|
|
1080
1080
|
e != null && e !== 0 && M > 0 && (() => {
|
|
1081
1081
|
const y = M - e, F = y > 0.5 ? "\u25B2" : y < -0.5 ? "\u25BC" : "", A = vn(M, e);
|
|
1082
|
-
return
|
|
1082
|
+
return S("div", {
|
|
1083
1083
|
style: {
|
|
1084
1084
|
display: "flex",
|
|
1085
1085
|
alignItems: "center",
|
|
@@ -1098,7 +1098,7 @@ let __tla = (async () => {
|
|
|
1098
1098
|
},
|
|
1099
1099
|
children: F
|
|
1100
1100
|
}),
|
|
1101
|
-
|
|
1101
|
+
S("span", {
|
|
1102
1102
|
style: {
|
|
1103
1103
|
fontSize: 13,
|
|
1104
1104
|
color: A,
|
|
@@ -1110,7 +1110,7 @@ let __tla = (async () => {
|
|
|
1110
1110
|
c === "inch" ? (y / 25.4).toFixed(2) : y.toFixed(1)
|
|
1111
1111
|
]
|
|
1112
1112
|
}),
|
|
1113
|
-
|
|
1113
|
+
S("span", {
|
|
1114
1114
|
style: {
|
|
1115
1115
|
fontSize: 11,
|
|
1116
1116
|
color: "rgba(255,255,255,0.4)",
|
|
@@ -1131,7 +1131,7 @@ let __tla = (async () => {
|
|
|
1131
1131
|
]
|
|
1132
1132
|
});
|
|
1133
1133
|
}, Zo = bo(Yo), Ko = ({ mesh: t, startY: r, endY: n, spacing: o, modelSize: s, onMeasurementsChange: l, reverseOrder: c = false, displayUnit: a = "mm", useInnerSurface: e = false, formMeasurements: h, originY: d, wasmSlices: f }) => {
|
|
1134
|
-
const u = ae(/* @__PURE__ */ new Map()), g = t.geometry, M =
|
|
1134
|
+
const u = ae(/* @__PURE__ */ new Map()), g = t.geometry, M = Bn(g), p = Y(() => {
|
|
1135
1135
|
if (f) {
|
|
1136
1136
|
let C = [
|
|
1137
1137
|
...f.yValues
|
|
@@ -1146,8 +1146,8 @@ let __tla = (async () => {
|
|
|
1146
1146
|
return c ? C.sort((L, T) => T - L) : C.sort((L, T) => L - T), C;
|
|
1147
1147
|
}
|
|
1148
1148
|
const A = [];
|
|
1149
|
-
if (c) for (let
|
|
1150
|
-
else for (let
|
|
1149
|
+
if (c) for (let v = n; v >= r; v -= o) A.push(v);
|
|
1150
|
+
else for (let v = r; v <= n; v += o) A.push(v);
|
|
1151
1151
|
return A;
|
|
1152
1152
|
}, [
|
|
1153
1153
|
r,
|
|
@@ -1157,12 +1157,12 @@ let __tla = (async () => {
|
|
|
1157
1157
|
f
|
|
1158
1158
|
]), b = Y(() => {
|
|
1159
1159
|
if (!f) return null;
|
|
1160
|
-
const A = /* @__PURE__ */ new Map(), { allLoopPoints:
|
|
1160
|
+
const A = /* @__PURE__ */ new Map(), { allLoopPoints: v, offsets: C, yValues: L } = f;
|
|
1161
1161
|
for (let T = 0; T < C.length - 1; T++) {
|
|
1162
1162
|
const E = C[T], w = C[T + 1];
|
|
1163
1163
|
if (w <= E) continue;
|
|
1164
1164
|
const z = [];
|
|
1165
|
-
for (let D = E; D < w; D += 3) z.push(new k(
|
|
1165
|
+
for (let D = E; D < w; D += 3) z.push(new k(v[D], v[D + 1], v[D + 2]));
|
|
1166
1166
|
z.length >= 3 && A.set(L[T], z);
|
|
1167
1167
|
}
|
|
1168
1168
|
return A;
|
|
@@ -1171,7 +1171,7 @@ let __tla = (async () => {
|
|
|
1171
1171
|
]), m = Y(() => {
|
|
1172
1172
|
if (!f) return null;
|
|
1173
1173
|
const A = /* @__PURE__ */ new Map();
|
|
1174
|
-
for (let
|
|
1174
|
+
for (let v = 0; v < f.yValues.length; v++) A.set(f.yValues[v], f.circumferences[v]);
|
|
1175
1175
|
return A;
|
|
1176
1176
|
}, [
|
|
1177
1177
|
f
|
|
@@ -1182,9 +1182,9 @@ let __tla = (async () => {
|
|
|
1182
1182
|
p
|
|
1183
1183
|
]), q(() => {
|
|
1184
1184
|
if (!m || !l) return;
|
|
1185
|
-
const A = p.filter((
|
|
1186
|
-
yPosition:
|
|
1187
|
-
originalValue: m.get(
|
|
1185
|
+
const A = p.filter((v) => (m.get(v) ?? 0) > 0).map((v) => ({
|
|
1186
|
+
yPosition: v,
|
|
1187
|
+
originalValue: m.get(v) ?? 0,
|
|
1188
1188
|
modifiedValue: null
|
|
1189
1189
|
}));
|
|
1190
1190
|
l(A);
|
|
@@ -1195,27 +1195,27 @@ let __tla = (async () => {
|
|
|
1195
1195
|
]);
|
|
1196
1196
|
const P = [
|
|
1197
1197
|
"#5B9BD5"
|
|
1198
|
-
], y = s * ko, F =
|
|
1198
|
+
], y = s * ko, F = re((A) => {
|
|
1199
1199
|
if (m) return;
|
|
1200
1200
|
u.current.set(A.yPosition, A);
|
|
1201
|
-
const
|
|
1202
|
-
l == null ? void 0 : l(
|
|
1201
|
+
const v = Array.from(u.current.values()).sort((C, L) => c ? L.yPosition - C.yPosition : C.yPosition - L.yPosition);
|
|
1202
|
+
l == null ? void 0 : l(v);
|
|
1203
1203
|
}, [
|
|
1204
1204
|
l,
|
|
1205
1205
|
c,
|
|
1206
1206
|
m
|
|
1207
1207
|
]);
|
|
1208
1208
|
return M ? i(Ie, {
|
|
1209
|
-
children: p.map((A,
|
|
1209
|
+
children: p.map((A, v) => i(Zo, {
|
|
1210
1210
|
bvh: M,
|
|
1211
1211
|
geometry: g,
|
|
1212
1212
|
yPosition: A,
|
|
1213
|
-
color: d != null && Math.abs(A - d) < o * 0.5 ? "#44ff44" : P[
|
|
1213
|
+
color: d != null && Math.abs(A - d) < o * 0.5 ? "#44ff44" : P[v % P.length],
|
|
1214
1214
|
labelX: y,
|
|
1215
1215
|
onDataChange: F,
|
|
1216
1216
|
displayUnit: a,
|
|
1217
1217
|
useInnerSurface: e,
|
|
1218
|
-
formValue: h == null ? void 0 : h[
|
|
1218
|
+
formValue: h == null ? void 0 : h[v],
|
|
1219
1219
|
lineWidth: d != null && Math.abs(A - d) < o * 0.5 ? 4 : 1.5,
|
|
1220
1220
|
wasmLoopPoints: b == null ? void 0 : b.get(A),
|
|
1221
1221
|
wasmCircumference: m == null ? void 0 : m.get(A)
|
|
@@ -1229,20 +1229,20 @@ let __tla = (async () => {
|
|
|
1229
1229
|
const c = t.geometry;
|
|
1230
1230
|
c.computeBoundingBox();
|
|
1231
1231
|
const a = s ?? ((_a = c.boundingBox) == null ? void 0 : _a.min.y) ?? 0, e = r - a, h = n * 0.4, d = n * 0.03, f = ae(null);
|
|
1232
|
-
|
|
1232
|
+
Mn(({ camera: v }) => {
|
|
1233
1233
|
if (!f.current) return;
|
|
1234
1234
|
const C = new k();
|
|
1235
|
-
|
|
1235
|
+
v.getWorldDirection(C);
|
|
1236
1236
|
const L = new k(C.x, 0, C.z);
|
|
1237
1237
|
if (L.lengthSq() < 1e-8) return;
|
|
1238
1238
|
L.normalize();
|
|
1239
1239
|
const T = new k().crossVectors(new k(0, 1, 0), L).normalize();
|
|
1240
1240
|
f.current.position.set(T.x * h, 0, T.z * h);
|
|
1241
|
-
const E =
|
|
1241
|
+
const E = v.position.x - f.current.position.x, w = v.position.z - f.current.position.z;
|
|
1242
1242
|
f.current.rotation.y = Math.atan2(E, w);
|
|
1243
1243
|
});
|
|
1244
1244
|
const u = new k(0, r, 0), g = new k(0, a, 0), M = new k(0, (r + a) / 2, 0), p = new k(-d, r, 0), b = new k(d, r, 0), m = new k(-d, a, 0), P = new k(d, a, 0), y = l != null && l > 0, F = y ? e - l : 0, A = y ? qo(e, l) : "#fff";
|
|
1245
|
-
return
|
|
1245
|
+
return S("group", {
|
|
1246
1246
|
ref: f,
|
|
1247
1247
|
children: [
|
|
1248
1248
|
i(we, {
|
|
@@ -1271,7 +1271,7 @@ let __tla = (async () => {
|
|
|
1271
1271
|
}),
|
|
1272
1272
|
i("mesh", {
|
|
1273
1273
|
position: M,
|
|
1274
|
-
children: i(
|
|
1274
|
+
children: i(Ge, {
|
|
1275
1275
|
center: true,
|
|
1276
1276
|
style: {
|
|
1277
1277
|
pointerEvents: "none"
|
|
@@ -1280,7 +1280,7 @@ let __tla = (async () => {
|
|
|
1280
1280
|
0,
|
|
1281
1281
|
0
|
|
1282
1282
|
],
|
|
1283
|
-
children:
|
|
1283
|
+
children: S("div", {
|
|
1284
1284
|
style: {
|
|
1285
1285
|
display: "flex",
|
|
1286
1286
|
flexDirection: "column",
|
|
@@ -1291,7 +1291,7 @@ let __tla = (async () => {
|
|
|
1291
1291
|
pointerEvents: "none"
|
|
1292
1292
|
},
|
|
1293
1293
|
children: [
|
|
1294
|
-
|
|
1294
|
+
S("div", {
|
|
1295
1295
|
style: {
|
|
1296
1296
|
padding: "4px 8px",
|
|
1297
1297
|
backgroundColor: "rgba(0, 0, 0, 0.75)",
|
|
@@ -1308,7 +1308,7 @@ let __tla = (async () => {
|
|
|
1308
1308
|
o === "inch" ? "in" : "mm"
|
|
1309
1309
|
]
|
|
1310
1310
|
}),
|
|
1311
|
-
y &&
|
|
1311
|
+
y && S("div", {
|
|
1312
1312
|
style: {
|
|
1313
1313
|
display: "flex",
|
|
1314
1314
|
alignItems: "center",
|
|
@@ -1329,7 +1329,7 @@ let __tla = (async () => {
|
|
|
1329
1329
|
},
|
|
1330
1330
|
children: F > 0.5 ? "\u25B2" : "\u25BC"
|
|
1331
1331
|
}),
|
|
1332
|
-
|
|
1332
|
+
S("span", {
|
|
1333
1333
|
style: {
|
|
1334
1334
|
fontSize: 13,
|
|
1335
1335
|
color: A,
|
|
@@ -1341,7 +1341,7 @@ let __tla = (async () => {
|
|
|
1341
1341
|
o === "inch" ? (F / 25.4).toFixed(2) : F.toFixed(1)
|
|
1342
1342
|
]
|
|
1343
1343
|
}),
|
|
1344
|
-
|
|
1344
|
+
S("span", {
|
|
1345
1345
|
style: {
|
|
1346
1346
|
fontSize: 11,
|
|
1347
1347
|
color: "rgba(255,255,255,0.4)",
|
|
@@ -1361,10 +1361,10 @@ let __tla = (async () => {
|
|
|
1361
1361
|
]
|
|
1362
1362
|
});
|
|
1363
1363
|
}, Jo = ({ modelSize: t, isAligned: r, isCut: n, mesh: o, viewMode: s, sliceY: l, landmarkCount: c = 0, measurementGeometry: a, fitYMin: e, fitYMax: h, resetCameraToFrontRef: d }) => {
|
|
1364
|
-
const { set: f, size: u, camera: g, invalidate: M } =
|
|
1364
|
+
const { set: f, size: u, camera: g, invalidate: M } = kn(), p = ae(false), b = ae(s), m = ae(new k()), P = ae(null), y = ae(c), F = ae(r), A = ae(n), v = ae(a), C = ae({
|
|
1365
1365
|
min: e,
|
|
1366
1366
|
max: h
|
|
1367
|
-
}), L = ae(0), T =
|
|
1367
|
+
}), L = ae(0), T = re(() => {
|
|
1368
1368
|
if (!o || t <= 0) return null;
|
|
1369
1369
|
const w = a ?? o.geometry;
|
|
1370
1370
|
w.computeBoundingBox();
|
|
@@ -1376,21 +1376,21 @@ let __tla = (async () => {
|
|
|
1376
1376
|
if ($) {
|
|
1377
1377
|
const ge = e, de = h, he = w.getAttribute("position");
|
|
1378
1378
|
if (he) {
|
|
1379
|
-
const
|
|
1379
|
+
const Se = he.array, te = (de - ge) * 0.08;
|
|
1380
1380
|
let O = 1 / 0, X = -1 / 0, Q = ge - te, ue = de + te, fe = false;
|
|
1381
|
-
for (let
|
|
1382
|
-
const G =
|
|
1381
|
+
for (let oe = 0; oe < he.count; oe++) {
|
|
1382
|
+
const G = Se[oe * 3 + 1];
|
|
1383
1383
|
if (G < ge - te || G > de + te) continue;
|
|
1384
|
-
const V =
|
|
1384
|
+
const V = Se[oe * 3];
|
|
1385
1385
|
V < O && (O = V), V > X && (X = V), fe = true;
|
|
1386
1386
|
}
|
|
1387
1387
|
fe && (D.set((O + X) / 2, (Q + ue) / 2, 0), B.set(X - O, ue - Q, 0));
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
m.current.copy(B);
|
|
1391
|
-
const ee = u.width / u.height,
|
|
1391
|
+
const ee = u.width / u.height, ie = 1.35, ce = $ ? 1.15 : 1.6, U = Math.max(B.y * ce, B.x * ie / ee), ne = U * ee, J = D.y - B.y * 0.05;
|
|
1392
1392
|
L.current = J;
|
|
1393
|
-
const Z = new j.OrthographicCamera(-
|
|
1393
|
+
const Z = new j.OrthographicCamera(-ne / 2, ne / 2, U / 2, -U / 2, 0.1, t * 10);
|
|
1394
1394
|
return Z.position.set(0, J, t * 2), Z.lookAt(0, J, 0), Z;
|
|
1395
1395
|
}, [
|
|
1396
1396
|
o,
|
|
@@ -1415,9 +1415,9 @@ let __tla = (async () => {
|
|
|
1415
1415
|
f,
|
|
1416
1416
|
M
|
|
1417
1417
|
]);
|
|
1418
|
-
const E =
|
|
1419
|
-
const z = w.position.clone(), D = z.length(), B = Math.atan2(z.x, z.z), $ = Math.acos(z.y / D),
|
|
1420
|
-
w.position.set(D * Math.sin($) * Math.sin(
|
|
1418
|
+
const E = re((w) => {
|
|
1419
|
+
const z = w.position.clone(), D = z.length(), B = Math.atan2(z.x, z.z), $ = Math.acos(z.y / D), ie = B + 0.02;
|
|
1420
|
+
w.position.set(D * Math.sin($) * Math.sin(ie), D * Math.cos($), D * Math.sin($) * Math.cos(ie)), w.lookAt(0, 0, 0), w.updateMatrixWorld(true), M();
|
|
1421
1421
|
}, [
|
|
1422
1422
|
M
|
|
1423
1423
|
]);
|
|
@@ -1444,8 +1444,8 @@ let __tla = (async () => {
|
|
|
1444
1444
|
g,
|
|
1445
1445
|
E
|
|
1446
1446
|
]), q(() => {
|
|
1447
|
-
const w = F.current !== r, z = A.current !== n, D = !
|
|
1448
|
-
if (F.current = r, A.current = n,
|
|
1447
|
+
const w = F.current !== r, z = A.current !== n, D = !v.current && !!a, B = (C.current.min == null || C.current.max == null) && e != null && h != null;
|
|
1448
|
+
if (F.current = r, A.current = n, v.current = a, C.current = {
|
|
1449
1449
|
min: e,
|
|
1450
1450
|
max: h
|
|
1451
1451
|
}, !w && !z && !D && !B || !r || s !== "3D") return;
|
|
@@ -1469,19 +1469,19 @@ let __tla = (async () => {
|
|
|
1469
1469
|
if (s === "2D" && l != null) {
|
|
1470
1470
|
P.current = g;
|
|
1471
1471
|
const z = o.geometry, D = z.getAttribute("position"), B = D.array, $ = t * 0.15;
|
|
1472
|
-
let ee = 1 / 0,
|
|
1472
|
+
let ee = 1 / 0, ie = -1 / 0, ce = 1 / 0, U = -1 / 0, ne = false;
|
|
1473
1473
|
for (let Q = 0; Q < D.count; Q++) if (Math.abs(B[Q * 3 + 1] - l) < $) {
|
|
1474
1474
|
const ue = B[Q * 3], fe = B[Q * 3 + 2];
|
|
1475
|
-
ue < ee && (ee = ue), ue >
|
|
1475
|
+
ue < ee && (ee = ue), ue > ie && (ie = ue), fe < ce && (ce = fe), fe > U && (U = fe), ne = true;
|
|
1476
1476
|
}
|
|
1477
|
-
if (!
|
|
1477
|
+
if (!ne) {
|
|
1478
1478
|
z.computeBoundingBox();
|
|
1479
1479
|
const Q = z.boundingBox;
|
|
1480
|
-
ee = Q.min.x,
|
|
1480
|
+
ee = Q.min.x, ie = Q.max.x, ce = Q.min.z, U = Q.max.z;
|
|
1481
1481
|
}
|
|
1482
|
-
const J = (ee +
|
|
1482
|
+
const J = (ee + ie) / 2, Z = (ce + U) / 2, ge = u.width / u.height, de = 1.4, he = (ie - ee) * de, Se = (U - ce) * de;
|
|
1483
1483
|
let te, O;
|
|
1484
|
-
he /
|
|
1484
|
+
he / Se > ge ? (te = he, O = he / ge) : (O = Se, te = Se * ge);
|
|
1485
1485
|
const X = new j.OrthographicCamera(-te / 2, te / 2, O / 2, -O / 2, 0.1, t * 10);
|
|
1486
1486
|
X.position.set(J, l + t * 2, Z), X.up.set(0, 0, -1), X.lookAt(J, l, Z), f({
|
|
1487
1487
|
camera: X
|
|
@@ -1512,19 +1512,19 @@ let __tla = (async () => {
|
|
|
1512
1512
|
if (s === "2D") {
|
|
1513
1513
|
if (!o || l == null) return;
|
|
1514
1514
|
const z = o.geometry, D = z.getAttribute("position"), B = D.array, $ = t * 0.15;
|
|
1515
|
-
let ee = 1 / 0,
|
|
1515
|
+
let ee = 1 / 0, ie = -1 / 0, ce = 1 / 0, U = -1 / 0, ne = false;
|
|
1516
1516
|
for (let te = 0; te < D.count; te++) if (Math.abs(B[te * 3 + 1] - l) < $) {
|
|
1517
1517
|
const O = B[te * 3], X = B[te * 3 + 2];
|
|
1518
|
-
O < ee && (ee = O), O >
|
|
1518
|
+
O < ee && (ee = O), O > ie && (ie = O), X < ce && (ce = X), X > U && (U = X), ne = true;
|
|
1519
1519
|
}
|
|
1520
|
-
if (!
|
|
1520
|
+
if (!ne) {
|
|
1521
1521
|
z.computeBoundingBox();
|
|
1522
1522
|
const te = z.boundingBox;
|
|
1523
|
-
ee = te.min.x,
|
|
1523
|
+
ee = te.min.x, ie = te.max.x, ce = te.min.z, U = te.max.z;
|
|
1524
1524
|
}
|
|
1525
|
-
const J = u.width / u.height, Z = 1.4, ge = (
|
|
1526
|
-
let he,
|
|
1527
|
-
ge / de > J ? (he = ge,
|
|
1525
|
+
const J = u.width / u.height, Z = 1.4, ge = (ie - ee) * Z, de = (U - ce) * Z;
|
|
1526
|
+
let he, Se;
|
|
1527
|
+
ge / de > J ? (he = ge, Se = ge / J) : (Se = de, he = de * J), w.left = -he / 2, w.right = he / 2, w.top = Se / 2, w.bottom = -Se / 2;
|
|
1528
1528
|
} else {
|
|
1529
1529
|
const z = m.current, D = u.width / u.height, B = Math.max(z.y, z.x / D) * 1.6, $ = B * D;
|
|
1530
1530
|
w.left = -$ / 2, w.right = $ / 2, w.top = B / 2, w.bottom = -B / 2;
|
|
@@ -1543,7 +1543,7 @@ let __tla = (async () => {
|
|
|
1543
1543
|
const n = t.geometry;
|
|
1544
1544
|
n.computeBoundingBox();
|
|
1545
1545
|
const o = new k();
|
|
1546
|
-
return (_a = n.boundingBox) == null ? void 0 : _a.getCenter(o), i(
|
|
1546
|
+
return (_a = n.boundingBox) == null ? void 0 : _a.getCenter(o), i(Fn, {
|
|
1547
1547
|
enableDamping: false,
|
|
1548
1548
|
enablePan: false,
|
|
1549
1549
|
minPolarAngle: Math.PI * 0.15,
|
|
@@ -1557,7 +1557,7 @@ let __tla = (async () => {
|
|
|
1557
1557
|
o.z
|
|
1558
1558
|
]
|
|
1559
1559
|
});
|
|
1560
|
-
}, er = ({ wasAutoScaled: t, onDismiss: r }) =>
|
|
1560
|
+
}, er = ({ wasAutoScaled: t, onDismiss: r }) => S("div", {
|
|
1561
1561
|
style: {
|
|
1562
1562
|
position: "absolute",
|
|
1563
1563
|
top: 16,
|
|
@@ -1601,7 +1601,7 @@ let __tla = (async () => {
|
|
|
1601
1601
|
}), tr = ({ isDoubleShell: t, onDismiss: r }) => (q(() => {
|
|
1602
1602
|
const n = setTimeout(r, 1e4);
|
|
1603
1603
|
return () => clearTimeout(n);
|
|
1604
|
-
}, []),
|
|
1604
|
+
}, []), S("div", {
|
|
1605
1605
|
style: {
|
|
1606
1606
|
position: "absolute",
|
|
1607
1607
|
top: 64,
|
|
@@ -1647,22 +1647,22 @@ let __tla = (async () => {
|
|
|
1647
1647
|
maxLeafTris: zt
|
|
1648
1648
|
}), [
|
|
1649
1649
|
c
|
|
1650
|
-
]), e = Y(() =>
|
|
1650
|
+
]), e = Y(() => je(a, c, n), [
|
|
1651
1651
|
a,
|
|
1652
1652
|
c,
|
|
1653
1653
|
n
|
|
1654
|
-
]), h = Y(() => new
|
|
1654
|
+
]), h = Y(() => new vt(new k(0, -1, 0), r), [
|
|
1655
1655
|
r
|
|
1656
1656
|
]), { mlLine: d, apLine: f, mlWidth: u, apWidth: g } = Y(() => {
|
|
1657
1657
|
let b = null, m = null, P = 0, y = 0;
|
|
1658
1658
|
if (e.linePoints.length >= 2) {
|
|
1659
|
-
let F = e.linePoints[0], A = e.linePoints[0],
|
|
1660
|
-
for (const L of e.linePoints) L.x < F.x && (F = L), L.x > A.x && (A = L), L.z <
|
|
1659
|
+
let F = e.linePoints[0], A = e.linePoints[0], v = e.linePoints[0], C = e.linePoints[0];
|
|
1660
|
+
for (const L of e.linePoints) L.x < F.x && (F = L), L.x > A.x && (A = L), L.z < v.z && (v = L), L.z > C.z && (C = L);
|
|
1661
1661
|
b = [
|
|
1662
1662
|
new k(F.x, n, F.z),
|
|
1663
1663
|
new k(A.x, n, A.z)
|
|
1664
1664
|
], m = [
|
|
1665
|
-
new k(
|
|
1665
|
+
new k(v.x, n, v.z),
|
|
1666
1666
|
new k(C.x, n, C.z)
|
|
1667
1667
|
], P = b[0].distanceTo(b[1]), y = m[0].distanceTo(m[1]);
|
|
1668
1668
|
}
|
|
@@ -1676,7 +1676,7 @@ let __tla = (async () => {
|
|
|
1676
1676
|
e,
|
|
1677
1677
|
n
|
|
1678
1678
|
]), M = (b) => l === "inch" ? (b / 25.4).toFixed(2) : b.toFixed(1), p = l === "inch" ? "in" : "mm";
|
|
1679
|
-
return
|
|
1679
|
+
return S(Ie, {
|
|
1680
1680
|
children: [
|
|
1681
1681
|
i("mesh", {
|
|
1682
1682
|
geometry: t.geometry,
|
|
@@ -1699,7 +1699,7 @@ let __tla = (async () => {
|
|
|
1699
1699
|
depthWrite: false,
|
|
1700
1700
|
transparent: true
|
|
1701
1701
|
}),
|
|
1702
|
-
d &&
|
|
1702
|
+
d && S(Ie, {
|
|
1703
1703
|
children: [
|
|
1704
1704
|
i(we, {
|
|
1705
1705
|
points: d,
|
|
@@ -1709,7 +1709,7 @@ let __tla = (async () => {
|
|
|
1709
1709
|
depthWrite: false,
|
|
1710
1710
|
transparent: true
|
|
1711
1711
|
}),
|
|
1712
|
-
i(
|
|
1712
|
+
i(Ge, {
|
|
1713
1713
|
position: [
|
|
1714
1714
|
d[0].x,
|
|
1715
1715
|
n,
|
|
@@ -1726,7 +1726,7 @@ let __tla = (async () => {
|
|
|
1726
1726
|
backgroundColor: "rgba(0,0,0,0.75)",
|
|
1727
1727
|
borderRadius: 3
|
|
1728
1728
|
},
|
|
1729
|
-
children:
|
|
1729
|
+
children: S("span", {
|
|
1730
1730
|
style: {
|
|
1731
1731
|
fontSize: 12,
|
|
1732
1732
|
color: "#ff8800",
|
|
@@ -1743,7 +1743,7 @@ let __tla = (async () => {
|
|
|
1743
1743
|
})
|
|
1744
1744
|
]
|
|
1745
1745
|
}),
|
|
1746
|
-
f &&
|
|
1746
|
+
f && S(Ie, {
|
|
1747
1747
|
children: [
|
|
1748
1748
|
i(we, {
|
|
1749
1749
|
points: f,
|
|
@@ -1753,7 +1753,7 @@ let __tla = (async () => {
|
|
|
1753
1753
|
depthWrite: false,
|
|
1754
1754
|
transparent: true
|
|
1755
1755
|
}),
|
|
1756
|
-
i(
|
|
1756
|
+
i(Ge, {
|
|
1757
1757
|
position: [
|
|
1758
1758
|
Math.max(f[0].x, f[1].x) + o * 0.02,
|
|
1759
1759
|
n,
|
|
@@ -1770,7 +1770,7 @@ let __tla = (async () => {
|
|
|
1770
1770
|
backgroundColor: "rgba(0,0,0,0.75)",
|
|
1771
1771
|
borderRadius: 3
|
|
1772
1772
|
},
|
|
1773
|
-
children:
|
|
1773
|
+
children: S("span", {
|
|
1774
1774
|
style: {
|
|
1775
1775
|
fontSize: 12,
|
|
1776
1776
|
color: "#ff00ff",
|
|
@@ -1790,7 +1790,7 @@ let __tla = (async () => {
|
|
|
1790
1790
|
]
|
|
1791
1791
|
});
|
|
1792
1792
|
}, or = ({ mesh: t, yPosition: r, onYChange: n, minY: o, maxY: s, modelSize: l, color: c, hoverColor: a, dragColor: e, label: h, onDragStart: d, onDragEnd: f }) => {
|
|
1793
|
-
const [u, g] = I(false), [M, p] = I(false), { camera: b, gl: m } =
|
|
1793
|
+
const [u, g] = I(false), [M, p] = I(false), { camera: b, gl: m } = kn(), P = ae(0), y = ae(null), F = t.geometry, A = Bn(F), v = Y(() => A ? je(A, F, r) : {
|
|
1794
1794
|
linePoints: [],
|
|
1795
1795
|
lineLength: 0,
|
|
1796
1796
|
rightmostPoint: new k()
|
|
@@ -1798,22 +1798,22 @@ let __tla = (async () => {
|
|
|
1798
1798
|
A,
|
|
1799
1799
|
F,
|
|
1800
1800
|
r
|
|
1801
|
-
]), C =
|
|
1802
|
-
const ee = m.domElement.getBoundingClientRect(),
|
|
1803
|
-
U.setFromCamera(new j.Vector2(
|
|
1804
|
-
const
|
|
1805
|
-
return U.ray.intersectPlane($,
|
|
1801
|
+
]), C = re((D, B, $) => {
|
|
1802
|
+
const ee = m.domElement.getBoundingClientRect(), ie = (D - ee.left) / ee.width * 2 - 1, ce = -((B - ee.top) / ee.height) * 2 + 1, U = new So();
|
|
1803
|
+
U.setFromCamera(new j.Vector2(ie, ce), b);
|
|
1804
|
+
const ne = new k();
|
|
1805
|
+
return U.ray.intersectPlane($, ne) ? ne.y : null;
|
|
1806
1806
|
}, [
|
|
1807
1807
|
b,
|
|
1808
1808
|
m
|
|
1809
|
-
]), L =
|
|
1809
|
+
]), L = re((D) => {
|
|
1810
1810
|
const B = new k();
|
|
1811
1811
|
b.getWorldDirection(B), B.y = 0, B.lengthSq() < 1e-6 && B.set(0, 0, 1), B.normalize();
|
|
1812
1812
|
const $ = B.multiplyScalar(-1);
|
|
1813
|
-
return new
|
|
1813
|
+
return new vt().setFromNormalAndCoplanarPoint($, new k(0, D, 0));
|
|
1814
1814
|
}, [
|
|
1815
1815
|
b
|
|
1816
|
-
]), T =
|
|
1816
|
+
]), T = re((D) => {
|
|
1817
1817
|
D.stopPropagation(), g(true), m.domElement.style.cursor = "ns-resize";
|
|
1818
1818
|
const B = L(r);
|
|
1819
1819
|
y.current = B;
|
|
@@ -1825,7 +1825,7 @@ let __tla = (async () => {
|
|
|
1825
1825
|
L,
|
|
1826
1826
|
C,
|
|
1827
1827
|
d
|
|
1828
|
-
]), E =
|
|
1828
|
+
]), E = re((D) => {
|
|
1829
1829
|
if (!u || !y.current) return;
|
|
1830
1830
|
const B = C(D.clientX, D.clientY, y.current);
|
|
1831
1831
|
if (B == null) return;
|
|
@@ -1837,19 +1837,19 @@ let __tla = (async () => {
|
|
|
1837
1837
|
n,
|
|
1838
1838
|
o,
|
|
1839
1839
|
s
|
|
1840
|
-
]), w =
|
|
1840
|
+
]), w = re((D) => {
|
|
1841
1841
|
g(false), m.domElement.style.cursor = "auto", y.current = null, D.target.releasePointerCapture(D.pointerId), f == null ? void 0 : f();
|
|
1842
1842
|
}, [
|
|
1843
1843
|
m,
|
|
1844
1844
|
f
|
|
1845
1845
|
]);
|
|
1846
|
-
if (
|
|
1846
|
+
if (v.linePoints.length < 2) return null;
|
|
1847
1847
|
const z = u ? e : M ? a : c;
|
|
1848
|
-
return
|
|
1848
|
+
return S("group", {
|
|
1849
1849
|
renderOrder: 10,
|
|
1850
1850
|
children: [
|
|
1851
1851
|
i(we, {
|
|
1852
|
-
points:
|
|
1852
|
+
points: v.linePoints,
|
|
1853
1853
|
color: z,
|
|
1854
1854
|
lineWidth: u ? 6 : M ? 5 : 4,
|
|
1855
1855
|
depthTest: false,
|
|
@@ -1868,11 +1868,11 @@ let __tla = (async () => {
|
|
|
1868
1868
|
}),
|
|
1869
1869
|
(M || u) && i("mesh", {
|
|
1870
1870
|
position: [
|
|
1871
|
-
|
|
1871
|
+
v.rightmostPoint.x + l * 0.15,
|
|
1872
1872
|
r,
|
|
1873
1873
|
0
|
|
1874
1874
|
],
|
|
1875
|
-
children: i(
|
|
1875
|
+
children: i(Ge, {
|
|
1876
1876
|
center: true,
|
|
1877
1877
|
children: i("div", {
|
|
1878
1878
|
style: {
|
|
@@ -1901,7 +1901,7 @@ let __tla = (async () => {
|
|
|
1901
1901
|
"color"
|
|
1902
1902
|
], sr = yo(function(t, r) {
|
|
1903
1903
|
var n = t.color, o = n === void 0 ? "currentColor" : n, s = rr(t, ir);
|
|
1904
|
-
return
|
|
1904
|
+
return bn("svg", Object.assign({
|
|
1905
1905
|
width: "15",
|
|
1906
1906
|
height: "15",
|
|
1907
1907
|
viewBox: "0 0 15 15",
|
|
@@ -1909,14 +1909,14 @@ let __tla = (async () => {
|
|
|
1909
1909
|
xmlns: "http://www.w3.org/2000/svg"
|
|
1910
1910
|
}, s, {
|
|
1911
1911
|
ref: r
|
|
1912
|
-
}),
|
|
1912
|
+
}), bn("path", {
|
|
1913
1913
|
d: "M7.5 2C7.77614 2 8 2.22386 8 2.5L8 11.2929L11.1464 8.14645C11.3417 7.95118 11.6583 7.95118 11.8536 8.14645C12.0488 8.34171 12.0488 8.65829 11.8536 8.85355L7.85355 12.8536C7.75979 12.9473 7.63261 13 7.5 13C7.36739 13 7.24021 12.9473 7.14645 12.8536L3.14645 8.85355C2.95118 8.65829 2.95118 8.34171 3.14645 8.14645C3.34171 7.95118 3.65829 7.95118 3.85355 8.14645L7 11.2929L7 2.5C7 2.22386 7.22386 2 7.5 2Z",
|
|
1914
1914
|
fill: o,
|
|
1915
1915
|
fillRule: "evenodd",
|
|
1916
1916
|
clipRule: "evenodd"
|
|
1917
1917
|
}));
|
|
1918
1918
|
});
|
|
1919
|
-
const
|
|
1919
|
+
const An = {
|
|
1920
1920
|
padding: "8px 20px",
|
|
1921
1921
|
borderRadius: 4,
|
|
1922
1922
|
fontSize: 14,
|
|
@@ -1962,7 +1962,7 @@ let __tla = (async () => {
|
|
|
1962
1962
|
return g.forEach((z, D) => {
|
|
1963
1963
|
e[D] != null && e[D] !== 0 && (w[z] = e[D].toFixed(1));
|
|
1964
1964
|
}), w;
|
|
1965
|
-
}), [m, P] = I(h && h > 0 ? h.toFixed(1) : ""), [y, F] = I(""), [A,
|
|
1965
|
+
}), [m, P] = I(h && h > 0 ? h.toFixed(1) : ""), [y, F] = I(""), [A, v] = I(""), C = Y(() => g.map((w) => {
|
|
1966
1966
|
const z = p[w];
|
|
1967
1967
|
return z != null && z !== "" && !isNaN(parseFloat(z)) ? parseFloat(z) : 0;
|
|
1968
1968
|
}), [
|
|
@@ -1995,7 +1995,7 @@ let __tla = (async () => {
|
|
|
1995
1995
|
t,
|
|
1996
1996
|
y,
|
|
1997
1997
|
A
|
|
1998
|
-
]), T =
|
|
1998
|
+
]), T = re(() => {
|
|
1999
1999
|
if (!L) return;
|
|
2000
2000
|
const w = m !== "" && !isNaN(parseFloat(m)) ? parseFloat(m) : 0, z = y !== "" && !isNaN(parseFloat(y)) ? parseFloat(y) : void 0, D = A !== "" && !isNaN(parseFloat(A)) ? parseFloat(A) : void 0;
|
|
2001
2001
|
s({
|
|
@@ -2011,7 +2011,7 @@ let __tla = (async () => {
|
|
|
2011
2011
|
y,
|
|
2012
2012
|
A,
|
|
2013
2013
|
s
|
|
2014
|
-
]), E =
|
|
2014
|
+
]), E = re(() => {
|
|
2015
2015
|
const w = {};
|
|
2016
2016
|
g.forEach((z, D) => {
|
|
2017
2017
|
const B = n[D];
|
|
@@ -2025,7 +2025,7 @@ let __tla = (async () => {
|
|
|
2025
2025
|
n,
|
|
2026
2026
|
o
|
|
2027
2027
|
]);
|
|
2028
|
-
return
|
|
2028
|
+
return S("div", {
|
|
2029
2029
|
style: {
|
|
2030
2030
|
display: "flex",
|
|
2031
2031
|
flexDirection: "column",
|
|
@@ -2034,7 +2034,7 @@ let __tla = (async () => {
|
|
|
2034
2034
|
fontFamily: "system-ui, sans-serif"
|
|
2035
2035
|
},
|
|
2036
2036
|
children: [
|
|
2037
|
-
|
|
2037
|
+
S("div", {
|
|
2038
2038
|
style: {
|
|
2039
2039
|
padding: "20px 22px 16px",
|
|
2040
2040
|
backgroundColor: "#fff",
|
|
@@ -2045,7 +2045,7 @@ let __tla = (async () => {
|
|
|
2045
2045
|
flexShrink: 0
|
|
2046
2046
|
},
|
|
2047
2047
|
children: [
|
|
2048
|
-
|
|
2048
|
+
S("div", {
|
|
2049
2049
|
style: {
|
|
2050
2050
|
display: "flex",
|
|
2051
2051
|
alignItems: "center",
|
|
@@ -2079,7 +2079,7 @@ let __tla = (async () => {
|
|
|
2079
2079
|
})
|
|
2080
2080
|
]
|
|
2081
2081
|
}),
|
|
2082
|
-
|
|
2082
|
+
S("div", {
|
|
2083
2083
|
style: {
|
|
2084
2084
|
display: "flex",
|
|
2085
2085
|
alignItems: "center",
|
|
@@ -2096,7 +2096,7 @@ let __tla = (async () => {
|
|
|
2096
2096
|
boxShadow: "0 0 0 3px rgba(12, 67, 173, 0.13)"
|
|
2097
2097
|
}
|
|
2098
2098
|
}),
|
|
2099
|
-
|
|
2099
|
+
S("div", {
|
|
2100
2100
|
style: {
|
|
2101
2101
|
fontSize: 17,
|
|
2102
2102
|
fontWeight: 600,
|
|
@@ -2111,7 +2111,7 @@ let __tla = (async () => {
|
|
|
2111
2111
|
})
|
|
2112
2112
|
]
|
|
2113
2113
|
}),
|
|
2114
|
-
|
|
2114
|
+
S("div", {
|
|
2115
2115
|
style: {
|
|
2116
2116
|
fontSize: 13,
|
|
2117
2117
|
color: "rgba(0,0,0,0.6)",
|
|
@@ -2134,7 +2134,7 @@ let __tla = (async () => {
|
|
|
2134
2134
|
i("button", {
|
|
2135
2135
|
onClick: E,
|
|
2136
2136
|
style: {
|
|
2137
|
-
...
|
|
2137
|
+
...An,
|
|
2138
2138
|
backgroundColor: "#fff",
|
|
2139
2139
|
border: "2px solid rgb(12, 67, 173)",
|
|
2140
2140
|
color: "rgb(12, 67, 173)",
|
|
@@ -2143,7 +2143,7 @@ let __tla = (async () => {
|
|
|
2143
2143
|
fontSize: 12,
|
|
2144
2144
|
width: "100%"
|
|
2145
2145
|
},
|
|
2146
|
-
children:
|
|
2146
|
+
children: S("span", {
|
|
2147
2147
|
style: {
|
|
2148
2148
|
display: "flex",
|
|
2149
2149
|
alignItems: "center",
|
|
@@ -2163,7 +2163,7 @@ let __tla = (async () => {
|
|
|
2163
2163
|
})
|
|
2164
2164
|
]
|
|
2165
2165
|
}),
|
|
2166
|
-
|
|
2166
|
+
S("div", {
|
|
2167
2167
|
style: {
|
|
2168
2168
|
flex: 1,
|
|
2169
2169
|
minHeight: 0,
|
|
@@ -2190,7 +2190,7 @@ let __tla = (async () => {
|
|
|
2190
2190
|
},
|
|
2191
2191
|
children: g.map((w, z) => {
|
|
2192
2192
|
const D = M.has(w), B = !!p[w];
|
|
2193
|
-
return
|
|
2193
|
+
return S("div", {
|
|
2194
2194
|
style: {
|
|
2195
2195
|
display: "flex",
|
|
2196
2196
|
flexDirection: "column",
|
|
@@ -2198,7 +2198,7 @@ let __tla = (async () => {
|
|
|
2198
2198
|
minWidth: 0
|
|
2199
2199
|
},
|
|
2200
2200
|
children: [
|
|
2201
|
-
|
|
2201
|
+
S("label", {
|
|
2202
2202
|
style: {
|
|
2203
2203
|
fontSize: 11,
|
|
2204
2204
|
fontWeight: 500,
|
|
@@ -2241,7 +2241,7 @@ let __tla = (async () => {
|
|
|
2241
2241
|
}, z);
|
|
2242
2242
|
})
|
|
2243
2243
|
}),
|
|
2244
|
-
t === "AK" &&
|
|
2244
|
+
t === "AK" && S(Ie, {
|
|
2245
2245
|
children: [
|
|
2246
2246
|
i("div", {
|
|
2247
2247
|
style: {
|
|
@@ -2252,7 +2252,7 @@ let __tla = (async () => {
|
|
|
2252
2252
|
},
|
|
2253
2253
|
children: "Perineum"
|
|
2254
2254
|
}),
|
|
2255
|
-
|
|
2255
|
+
S("div", {
|
|
2256
2256
|
style: {
|
|
2257
2257
|
display: "grid",
|
|
2258
2258
|
gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))",
|
|
@@ -2260,7 +2260,7 @@ let __tla = (async () => {
|
|
|
2260
2260
|
marginBottom: 20
|
|
2261
2261
|
},
|
|
2262
2262
|
children: [
|
|
2263
|
-
|
|
2263
|
+
S("div", {
|
|
2264
2264
|
style: {
|
|
2265
2265
|
display: "flex",
|
|
2266
2266
|
flexDirection: "column",
|
|
@@ -2268,7 +2268,7 @@ let __tla = (async () => {
|
|
|
2268
2268
|
minWidth: 0
|
|
2269
2269
|
},
|
|
2270
2270
|
children: [
|
|
2271
|
-
|
|
2271
|
+
S("label", {
|
|
2272
2272
|
style: {
|
|
2273
2273
|
fontSize: 11,
|
|
2274
2274
|
fontWeight: 500,
|
|
@@ -2302,7 +2302,7 @@ let __tla = (async () => {
|
|
|
2302
2302
|
})
|
|
2303
2303
|
]
|
|
2304
2304
|
}),
|
|
2305
|
-
|
|
2305
|
+
S("div", {
|
|
2306
2306
|
style: {
|
|
2307
2307
|
display: "flex",
|
|
2308
2308
|
flexDirection: "column",
|
|
@@ -2310,7 +2310,7 @@ let __tla = (async () => {
|
|
|
2310
2310
|
minWidth: 0
|
|
2311
2311
|
},
|
|
2312
2312
|
children: [
|
|
2313
|
-
|
|
2313
|
+
S("label", {
|
|
2314
2314
|
style: {
|
|
2315
2315
|
fontSize: 11,
|
|
2316
2316
|
fontWeight: 500,
|
|
@@ -2332,7 +2332,7 @@ let __tla = (async () => {
|
|
|
2332
2332
|
type: "number",
|
|
2333
2333
|
step: "0.1",
|
|
2334
2334
|
value: A,
|
|
2335
|
-
onChange: (w) =>
|
|
2335
|
+
onChange: (w) => v(w.target.value),
|
|
2336
2336
|
style: {
|
|
2337
2337
|
...xt,
|
|
2338
2338
|
padding: "6px 8px",
|
|
@@ -2363,7 +2363,7 @@ let __tla = (async () => {
|
|
|
2363
2363
|
gridTemplateColumns: "repeat(auto-fill, minmax(180px, 1fr))",
|
|
2364
2364
|
gap: 10
|
|
2365
2365
|
},
|
|
2366
|
-
children:
|
|
2366
|
+
children: S("div", {
|
|
2367
2367
|
style: {
|
|
2368
2368
|
display: "flex",
|
|
2369
2369
|
flexDirection: "column",
|
|
@@ -2413,7 +2413,7 @@ let __tla = (async () => {
|
|
|
2413
2413
|
onClick: T,
|
|
2414
2414
|
disabled: !L,
|
|
2415
2415
|
style: {
|
|
2416
|
-
...
|
|
2416
|
+
...An,
|
|
2417
2417
|
backgroundColor: L ? "rgb(12, 67, 173)" : "#e0e0e0",
|
|
2418
2418
|
border: "none",
|
|
2419
2419
|
color: L ? "#fff" : "#9e9e9e",
|
|
@@ -2452,14 +2452,14 @@ let __tla = (async () => {
|
|
|
2452
2452
|
boxSizing: "border-box",
|
|
2453
2453
|
fontFamily: "system-ui, sans-serif"
|
|
2454
2454
|
}, dr = ({ onSkip: t, onCancel: r }) => {
|
|
2455
|
-
const [n, o] = I("confirm"), [s, l] = I(null), [c, a] = I(""), e =
|
|
2455
|
+
const [n, o] = I("confirm"), [s, l] = I(null), [c, a] = I(""), e = re(() => {
|
|
2456
2456
|
o("reasons");
|
|
2457
|
-
}, []), h =
|
|
2457
|
+
}, []), h = re(() => {
|
|
2458
2458
|
n === "reasons" ? (o("confirm"), l(null), a("")) : r();
|
|
2459
2459
|
}, [
|
|
2460
2460
|
n,
|
|
2461
2461
|
r
|
|
2462
|
-
]), d = s != null && (s !== "Other" || c.trim() !== ""), f =
|
|
2462
|
+
]), d = s != null && (s !== "Other" || c.trim() !== ""), f = re(() => {
|
|
2463
2463
|
!d || !s || t(s === "Other" ? `Other: ${c.trim()}` : s);
|
|
2464
2464
|
}, [
|
|
2465
2465
|
d,
|
|
@@ -2480,7 +2480,7 @@ let __tla = (async () => {
|
|
|
2480
2480
|
zIndex: 9999,
|
|
2481
2481
|
fontFamily: "system-ui, sans-serif"
|
|
2482
2482
|
},
|
|
2483
|
-
children:
|
|
2483
|
+
children: S("div", {
|
|
2484
2484
|
style: {
|
|
2485
2485
|
backgroundColor: "#fff",
|
|
2486
2486
|
borderRadius: 12,
|
|
@@ -2488,7 +2488,7 @@ let __tla = (async () => {
|
|
|
2488
2488
|
boxShadow: "0 24px 38px 3px rgba(0,0,0,0.14)"
|
|
2489
2489
|
},
|
|
2490
2490
|
children: [
|
|
2491
|
-
|
|
2491
|
+
S("div", {
|
|
2492
2492
|
style: {
|
|
2493
2493
|
padding: "24px 24px 0"
|
|
2494
2494
|
},
|
|
@@ -2511,7 +2511,7 @@ let __tla = (async () => {
|
|
|
2511
2511
|
})
|
|
2512
2512
|
]
|
|
2513
2513
|
}),
|
|
2514
|
-
|
|
2514
|
+
S("div", {
|
|
2515
2515
|
style: {
|
|
2516
2516
|
padding: "20px 24px",
|
|
2517
2517
|
display: "flex",
|
|
@@ -2522,7 +2522,7 @@ let __tla = (async () => {
|
|
|
2522
2522
|
[
|
|
2523
2523
|
...ar,
|
|
2524
2524
|
"Other"
|
|
2525
|
-
].map((u) =>
|
|
2525
|
+
].map((u) => S("label", {
|
|
2526
2526
|
style: {
|
|
2527
2527
|
display: "flex",
|
|
2528
2528
|
alignItems: "center",
|
|
@@ -2576,7 +2576,7 @@ let __tla = (async () => {
|
|
|
2576
2576
|
})
|
|
2577
2577
|
]
|
|
2578
2578
|
}),
|
|
2579
|
-
|
|
2579
|
+
S("div", {
|
|
2580
2580
|
style: {
|
|
2581
2581
|
display: "flex",
|
|
2582
2582
|
justifyContent: "flex-end",
|
|
@@ -2624,7 +2624,7 @@ let __tla = (async () => {
|
|
|
2624
2624
|
zIndex: 9999,
|
|
2625
2625
|
fontFamily: "system-ui, sans-serif"
|
|
2626
2626
|
},
|
|
2627
|
-
children:
|
|
2627
|
+
children: S("div", {
|
|
2628
2628
|
style: {
|
|
2629
2629
|
backgroundColor: "#fff",
|
|
2630
2630
|
borderRadius: 8,
|
|
@@ -2650,7 +2650,7 @@ let __tla = (async () => {
|
|
|
2650
2650
|
},
|
|
2651
2651
|
children: "Your measurements will be submitted without comparing to the scan. Are you sure?"
|
|
2652
2652
|
}),
|
|
2653
|
-
|
|
2653
|
+
S("div", {
|
|
2654
2654
|
style: {
|
|
2655
2655
|
display: "flex",
|
|
2656
2656
|
justifyContent: "flex-end",
|
|
@@ -2683,18 +2683,18 @@ let __tla = (async () => {
|
|
|
2683
2683
|
})
|
|
2684
2684
|
});
|
|
2685
2685
|
};
|
|
2686
|
-
function
|
|
2686
|
+
function En(t, r, n) {
|
|
2687
2687
|
const o = t.getAttribute("position"), s = n - r;
|
|
2688
2688
|
if (s < 1) return null;
|
|
2689
2689
|
const l = 30, c = s / l, a = [];
|
|
2690
2690
|
for (let b = 0; b < l; b++) {
|
|
2691
2691
|
const m = r + b * c, P = r + (b + 1) * c;
|
|
2692
|
-
let y = 0, F = 0, A = 0,
|
|
2692
|
+
let y = 0, F = 0, A = 0, v = 0;
|
|
2693
2693
|
for (let C = 0; C < o.count; C++) {
|
|
2694
2694
|
const L = o.getY(C);
|
|
2695
|
-
L >= m && L < P && (y += o.getX(C), F += L, A += o.getZ(C),
|
|
2695
|
+
L >= m && L < P && (y += o.getX(C), F += L, A += o.getZ(C), v++);
|
|
2696
2696
|
}
|
|
2697
|
-
|
|
2697
|
+
v > 20 && a.push(new k(y / v, F / v, A / v));
|
|
2698
2698
|
}
|
|
2699
2699
|
if (a.length < 5) return null;
|
|
2700
2700
|
const e = new k();
|
|
@@ -2728,7 +2728,7 @@ let __tla = (async () => {
|
|
|
2728
2728
|
"#44cc44",
|
|
2729
2729
|
"#4488ff"
|
|
2730
2730
|
];
|
|
2731
|
-
function
|
|
2731
|
+
function Tn(t) {
|
|
2732
2732
|
const r = t.getAttribute("position"), n = r.count, o = new k();
|
|
2733
2733
|
for (let p = 0; p < n; p++) o.x += r.getX(p), o.y += r.getY(p), o.z += r.getZ(p);
|
|
2734
2734
|
o.divideScalar(n);
|
|
@@ -2758,13 +2758,13 @@ let __tla = (async () => {
|
|
|
2758
2758
|
for (let p = 0; p < 3; p++) {
|
|
2759
2759
|
let b = new k(1 + p * 0.1, 1 - p * 0.1, 0.5 + p * 0.3).normalize(), m = 0;
|
|
2760
2760
|
for (let P = 0; P < 100; P++) {
|
|
2761
|
-
const y = u[0][0] * b.x + u[0][1] * b.y + u[0][2] * b.z, F = u[1][0] * b.x + u[1][1] * b.y + u[1][2] * b.z, A = u[2][0] * b.x + u[2][1] * b.y + u[2][2] * b.z,
|
|
2762
|
-
if (m =
|
|
2763
|
-
if (
|
|
2764
|
-
b =
|
|
2761
|
+
const y = u[0][0] * b.x + u[0][1] * b.y + u[0][2] * b.z, F = u[1][0] * b.x + u[1][1] * b.y + u[1][2] * b.z, A = u[2][0] * b.x + u[2][1] * b.y + u[2][2] * b.z, v = new k(y, F, A);
|
|
2762
|
+
if (m = v.length(), m < 1e-12) break;
|
|
2763
|
+
if (v.divideScalar(m), b.distanceTo(v) < 1e-10) {
|
|
2764
|
+
b = v;
|
|
2765
2765
|
break;
|
|
2766
2766
|
}
|
|
2767
|
-
b =
|
|
2767
|
+
b = v;
|
|
2768
2768
|
}
|
|
2769
2769
|
d.push(b.clone()), f.push(m);
|
|
2770
2770
|
for (let P = 0; P < 3; P++) for (let y = 0; y < 3; y++) {
|
|
@@ -2792,7 +2792,7 @@ let __tla = (async () => {
|
|
|
2792
2792
|
let b = 1 / 0, m = -1 / 0;
|
|
2793
2793
|
const P = d[p];
|
|
2794
2794
|
for (let y = 0; y < n; y++) {
|
|
2795
|
-
const F = r.getX(y) - g.x, A = r.getY(y) - g.y,
|
|
2795
|
+
const F = r.getX(y) - g.x, A = r.getY(y) - g.y, v = r.getZ(y) - g.z, C = F * P.x + A * P.y + v * P.z;
|
|
2796
2796
|
C < b && (b = C), C > m && (m = C);
|
|
2797
2797
|
}
|
|
2798
2798
|
M[p] = (m - b) / 2;
|
|
@@ -2899,7 +2899,7 @@ let __tla = (async () => {
|
|
|
2899
2899
|
}, [
|
|
2900
2900
|
n
|
|
2901
2901
|
]), s = o < 1 ? "#44ff44" : o < 5 ? "#ffcc00" : "#ff4444";
|
|
2902
|
-
return
|
|
2902
|
+
return S("group", {
|
|
2903
2903
|
children: [
|
|
2904
2904
|
i(we, {
|
|
2905
2905
|
points: [
|
|
@@ -2909,7 +2909,7 @@ let __tla = (async () => {
|
|
|
2909
2909
|
color: s,
|
|
2910
2910
|
lineWidth: 3
|
|
2911
2911
|
}),
|
|
2912
|
-
|
|
2912
|
+
S("mesh", {
|
|
2913
2913
|
position: t,
|
|
2914
2914
|
children: [
|
|
2915
2915
|
i("sphereGeometry", {
|
|
@@ -2924,7 +2924,7 @@ let __tla = (async () => {
|
|
|
2924
2924
|
})
|
|
2925
2925
|
]
|
|
2926
2926
|
}),
|
|
2927
|
-
|
|
2927
|
+
S("mesh", {
|
|
2928
2928
|
position: r,
|
|
2929
2929
|
children: [
|
|
2930
2930
|
i("sphereGeometry", {
|
|
@@ -2948,7 +2948,7 @@ let __tla = (async () => {
|
|
|
2948
2948
|
let e = n - 10;
|
|
2949
2949
|
const h = new k(0, 1, 0);
|
|
2950
2950
|
for (; e > r; ) {
|
|
2951
|
-
const d = Math.min(e, n), f = Math.max(e, n), u =
|
|
2951
|
+
const d = Math.min(e, n), f = Math.max(e, n), u = En(t, d, f);
|
|
2952
2952
|
if (u) {
|
|
2953
2953
|
const g = u.dot(h), M = Math.acos(Math.min(1, Math.abs(g))) * 180 / Math.PI;
|
|
2954
2954
|
a.push({
|
|
@@ -2969,7 +2969,7 @@ let __tla = (async () => {
|
|
|
2969
2969
|
return i("group", {
|
|
2970
2970
|
children: c.map((a, e) => {
|
|
2971
2971
|
const h = (a.regionMin + a.regionMax) / 2, d = new k(0, h, 0), f = d.clone().addScaledVector(a.axis, l), u = d.clone().addScaledVector(a.axis, -l), g = e / Math.max(1, c.length - 1), M = a.angleDeg < 0.5 ? `hsl(${120 - g * 120}, 80%, 60%)` : `hsl(${40 - a.angleDeg * 2}, 90%, 55%)`;
|
|
2972
|
-
return
|
|
2972
|
+
return S("group", {
|
|
2973
2973
|
children: [
|
|
2974
2974
|
i(we, {
|
|
2975
2975
|
points: [
|
|
@@ -2998,7 +2998,7 @@ let __tla = (async () => {
|
|
|
2998
2998
|
}
|
|
2999
2999
|
function xr({ geometry: t, redY: r, greenY: n, modelSize: o }) {
|
|
3000
3000
|
const s = Y(() => {
|
|
3001
|
-
const f =
|
|
3001
|
+
const f = En(t, r, n);
|
|
3002
3002
|
if (!f) return null;
|
|
3003
3003
|
const u = f.dot(new k(0, 1, 0)), g = Math.acos(Math.min(1, Math.abs(u))) * 180 / Math.PI;
|
|
3004
3004
|
return {
|
|
@@ -3053,10 +3053,10 @@ let __tla = (async () => {
|
|
|
3053
3053
|
if (b.length < 5) return null;
|
|
3054
3054
|
const m = n - r, P = r + m * 0.3, y = r + m * 0.7, F = b.filter((L) => L.y >= P && L.y <= y);
|
|
3055
3055
|
if (F.length < 3) return null;
|
|
3056
|
-
const A = F.map((L) => L.circ).sort((L, T) => L - T),
|
|
3056
|
+
const A = F.map((L) => L.circ).sort((L, T) => L - T), v = A[Math.floor(A.length / 2)], C = Math.max(...b.map((L) => L.circ));
|
|
3057
3057
|
return {
|
|
3058
3058
|
circumferences: b,
|
|
3059
|
-
baseline:
|
|
3059
|
+
baseline: v,
|
|
3060
3060
|
maxCirc: C
|
|
3061
3061
|
};
|
|
3062
3062
|
}, [
|
|
@@ -3066,7 +3066,7 @@ let __tla = (async () => {
|
|
|
3066
3066
|
]);
|
|
3067
3067
|
if (!l) return null;
|
|
3068
3068
|
const { circumferences: c, baseline: a, maxCirc: e } = l, h = o * 0.3 / e;
|
|
3069
|
-
return
|
|
3069
|
+
return S("group", {
|
|
3070
3070
|
children: [
|
|
3071
3071
|
c.map(({ y: d, circ: f }, u) => {
|
|
3072
3072
|
const g = f / a, M = g > 1.6 ? "#ff4444" : g > 1.3 ? "#ffcc00" : "#22cc66", p = f * h;
|
|
@@ -3083,7 +3083,7 @@ let __tla = (async () => {
|
|
|
3083
3083
|
}),
|
|
3084
3084
|
(() => {
|
|
3085
3085
|
const d = a * 1.6 * h, f = c[0].y, u = c[c.length - 1].y;
|
|
3086
|
-
return
|
|
3086
|
+
return S(Ie, {
|
|
3087
3087
|
children: [
|
|
3088
3088
|
i(we, {
|
|
3089
3089
|
points: [
|
|
@@ -3123,7 +3123,7 @@ let __tla = (async () => {
|
|
|
3123
3123
|
const o = t.colors[n] ?? "#888888", s = n === t.innerIdx;
|
|
3124
3124
|
r.computeBoundingBox();
|
|
3125
3125
|
const l = new k();
|
|
3126
|
-
return r.boundingBox.getCenter(l),
|
|
3126
|
+
return r.boundingBox.getCenter(l), S("group", {
|
|
3127
3127
|
children: [
|
|
3128
3128
|
i("mesh", {
|
|
3129
3129
|
geometry: r,
|
|
@@ -3151,7 +3151,7 @@ let __tla = (async () => {
|
|
|
3151
3151
|
}),
|
|
3152
3152
|
i("group", {
|
|
3153
3153
|
position: l,
|
|
3154
|
-
children: i(
|
|
3154
|
+
children: i(Ge, {
|
|
3155
3155
|
center: true,
|
|
3156
3156
|
style: {
|
|
3157
3157
|
pointerEvents: "none"
|
|
@@ -3181,7 +3181,7 @@ let __tla = (async () => {
|
|
|
3181
3181
|
})
|
|
3182
3182
|
});
|
|
3183
3183
|
}
|
|
3184
|
-
function
|
|
3184
|
+
function Sr({ geometry: t, aoData: r }) {
|
|
3185
3185
|
const n = Y(() => {
|
|
3186
3186
|
const o = t.toNonIndexed(), s = o.getAttribute("position"), l = r.length, c = s.count, a = new Float32Array(c * 3);
|
|
3187
3187
|
for (let e = 0; e < l && e * 3 + 2 < c; e++) {
|
|
@@ -3210,8 +3210,8 @@ let __tla = (async () => {
|
|
|
3210
3210
|
})
|
|
3211
3211
|
});
|
|
3212
3212
|
}
|
|
3213
|
-
function
|
|
3214
|
-
const a = t.geometry, e = Y(() => a.getAttribute("position") ?
|
|
3213
|
+
function vr({ mesh: t, layers: r, landmarkPoints: n, componentDebug: o, aoData: s, aoGeometry: l, measurementGeometry: c }) {
|
|
3214
|
+
const a = t.geometry, e = Y(() => a.getAttribute("position") ? Tn(a) : null, [
|
|
3215
3215
|
a
|
|
3216
3216
|
]), h = Y(() => !n || n.length < 2 ? null : {
|
|
3217
3217
|
red: new k(n[1].position.x, n[1].position.y, n[1].position.z),
|
|
@@ -3219,7 +3219,7 @@ let __tla = (async () => {
|
|
|
3219
3219
|
}, [
|
|
3220
3220
|
n
|
|
3221
3221
|
]);
|
|
3222
|
-
return
|
|
3222
|
+
return S("group", {
|
|
3223
3223
|
children: [
|
|
3224
3224
|
r.pcaAxes && e && i(pr, {
|
|
3225
3225
|
pca: e
|
|
@@ -3234,7 +3234,7 @@ let __tla = (async () => {
|
|
|
3234
3234
|
r.shellComponents && o && i(wr, {
|
|
3235
3235
|
componentDebug: o
|
|
3236
3236
|
}),
|
|
3237
|
-
r.ambientOcclusion && s && s.length > 0 && i(
|
|
3237
|
+
r.ambientOcclusion && s && s.length > 0 && i(Sr, {
|
|
3238
3238
|
geometry: l ?? a,
|
|
3239
3239
|
aoData: s
|
|
3240
3240
|
}),
|
|
@@ -3278,7 +3278,7 @@ let __tla = (async () => {
|
|
|
3278
3278
|
function Cr({ mesh: t }) {
|
|
3279
3279
|
const r = t.geometry, n = Y(() => {
|
|
3280
3280
|
if (!r.getAttribute("position")) return null;
|
|
3281
|
-
const l =
|
|
3281
|
+
const l = Tn(r), c = l.axes[0], a = l.halfExtents[0] * 1.3;
|
|
3282
3282
|
return {
|
|
3283
3283
|
axis: c,
|
|
3284
3284
|
center: l.center,
|
|
@@ -3305,7 +3305,7 @@ let __tla = (async () => {
|
|
|
3305
3305
|
renderOrder: 999
|
|
3306
3306
|
});
|
|
3307
3307
|
}
|
|
3308
|
-
const
|
|
3308
|
+
const $n = [
|
|
3309
3309
|
{
|
|
3310
3310
|
key: "pcaAxes",
|
|
3311
3311
|
label: "PCA Axes (full mesh)",
|
|
@@ -3362,10 +3362,10 @@ let __tla = (async () => {
|
|
|
3362
3362
|
group: "Alignment"
|
|
3363
3363
|
}
|
|
3364
3364
|
], zr = [
|
|
3365
|
-
...new Set(
|
|
3365
|
+
...new Set($n.map((t) => t.group))
|
|
3366
3366
|
];
|
|
3367
3367
|
function Ar({ layers: t, onToggleLayer: r, isDoubleShell: n }) {
|
|
3368
|
-
return
|
|
3368
|
+
return S("div", {
|
|
3369
3369
|
style: {
|
|
3370
3370
|
position: "absolute",
|
|
3371
3371
|
top: 16,
|
|
@@ -3394,8 +3394,8 @@ let __tla = (async () => {
|
|
|
3394
3394
|
children: "Debug Layers"
|
|
3395
3395
|
}),
|
|
3396
3396
|
zr.map((o) => {
|
|
3397
|
-
const s =
|
|
3398
|
-
return s.length === 0 ? null :
|
|
3397
|
+
const s = $n.filter((l) => l.group === o && !(l.hideWhenDoubleShell && n));
|
|
3398
|
+
return s.length === 0 ? null : S("div", {
|
|
3399
3399
|
children: [
|
|
3400
3400
|
i("div", {
|
|
3401
3401
|
style: {
|
|
@@ -3409,7 +3409,7 @@ let __tla = (async () => {
|
|
|
3409
3409
|
},
|
|
3410
3410
|
children: o
|
|
3411
3411
|
}),
|
|
3412
|
-
s.map(({ key: l, label: c, color: a }) =>
|
|
3412
|
+
s.map(({ key: l, label: c, color: a }) => S("label", {
|
|
3413
3413
|
style: {
|
|
3414
3414
|
display: "flex",
|
|
3415
3415
|
alignItems: "center",
|
|
@@ -3455,7 +3455,7 @@ let __tla = (async () => {
|
|
|
3455
3455
|
});
|
|
3456
3456
|
}
|
|
3457
3457
|
const Mr = ({ config: t, spacingType: r, scanUrl: n, formMeasurements: o, onComplete: s, isDebugUser: l = false, onAnalyticsEvent: c, wasmModule: a }) => {
|
|
3458
|
-
const [e, h] = I(null), [d, f] = I(0), [u, g] = I(false), [M, p] = I(false), [b, m] = I(""), [P, y] = I("3D"), [F, A] = I(r === "AK" ? 2 : 1), [
|
|
3458
|
+
const [e, h] = I(null), [d, f] = I(0), [u, g] = I(false), [M, p] = I(false), [b, m] = I(""), [P, y] = I("3D"), [F, A] = I(r === "AK" ? 2 : 1), [v, C] = I(false), [L, T] = I(null), [E, w] = I(r ?? null), [z, D] = I("mm"), [B, $] = I(false), [ee, ie] = I(""), [ce, U] = I(false), [ne, J] = I(false), [Z, ge] = I(false), [de, he] = I(false), [Se, te] = I(null), [O, X] = I(null), [Q, ue] = I(null), [fe, oe] = I(false), [G, V] = I([]), [ke, Ae] = I(null), [Xe, me] = I(null), [ze, At] = I(null), [ot, Xt] = I(null), [Hn, Yt] = I(false), [rt, Zt] = I(null), [Mt, Fe] = I(null), [_e, Nn] = I(false), [Kt, Vn] = I(fr), [$e, qt] = I("obj"), [ve, kt] = I(o), [qe, Ft] = I(true), [it, Ue] = I(false), [Pt, Ut] = I(false), [Be, st] = I(false), Ye = ae(false), [jn, lt] = I(false), [Lt, Jt] = I(() => {
|
|
3459
3459
|
try {
|
|
3460
3460
|
return localStorage.getItem("gm_helpTipDismissed") !== "1";
|
|
3461
3461
|
} catch {
|
|
@@ -3475,21 +3475,21 @@ let __tla = (async () => {
|
|
|
3475
3475
|
}, [
|
|
3476
3476
|
Lt
|
|
3477
3477
|
]), q(() => {
|
|
3478
|
-
if (!
|
|
3478
|
+
if (!ne) return;
|
|
3479
3479
|
const x = setTimeout(() => J(false), 5e3);
|
|
3480
3480
|
return () => clearTimeout(x);
|
|
3481
3481
|
}, [
|
|
3482
|
-
|
|
3482
|
+
ne
|
|
3483
3483
|
]);
|
|
3484
|
-
const Dt = ae(null), [
|
|
3484
|
+
const Dt = ae(null), [Oe, Gn] = I(0);
|
|
3485
3485
|
q(() => {
|
|
3486
3486
|
if (!Dt.current) return;
|
|
3487
3487
|
const x = new ResizeObserver((_) => {
|
|
3488
|
-
for (const W of _)
|
|
3488
|
+
for (const W of _) Gn(W.contentRect.width);
|
|
3489
3489
|
});
|
|
3490
3490
|
return x.observe(Dt.current), () => x.disconnect();
|
|
3491
3491
|
}, []);
|
|
3492
|
-
const [
|
|
3492
|
+
const [He, Xn] = I(null), [Yn, Zn] = I(void 0), [Kn, qn] = I(void 0), [Qt] = I("#c8c8c8"), [Un] = I(1), [Ee, Jn] = I(false), [_t, en] = I([]), at = ae(null), Ne = ae(null), ct = ae(false), Qn = ae(null), Rt = ae(null), Wt = ae(null), Je = re(async (x) => {
|
|
3493
3493
|
if (!Wt.current) return;
|
|
3494
3494
|
const _ = (x == null ? void 0 : x.restoreView) ?? true;
|
|
3495
3495
|
try {
|
|
@@ -3500,39 +3500,39 @@ let __tla = (async () => {
|
|
|
3500
3500
|
We.width = pe, We.height = Pe;
|
|
3501
3501
|
const le = We.getContext("2d");
|
|
3502
3502
|
return le.drawImage(K, 0, 0), W.querySelectorAll("[style*='pointer-events']").forEach((co) => {
|
|
3503
|
-
const
|
|
3504
|
-
if (
|
|
3505
|
-
const
|
|
3506
|
-
|
|
3503
|
+
const dn = co;
|
|
3504
|
+
if (dn.hasAttribute("data-finalizing-overlay")) return;
|
|
3505
|
+
const fn = dn.querySelectorAll("div[style*='background']");
|
|
3506
|
+
fn.length !== 0 && fn.forEach((Ze) => {
|
|
3507
3507
|
var _a;
|
|
3508
|
-
const De =
|
|
3508
|
+
const De = Ze.getBoundingClientRect();
|
|
3509
3509
|
if (De.width === 0 || De.height === 0) return;
|
|
3510
|
-
let $t = 0,
|
|
3511
|
-
for (;
|
|
3512
|
-
const ht = (
|
|
3510
|
+
let $t = 0, tt = Ze;
|
|
3511
|
+
for (; tt && tt !== W; ) {
|
|
3512
|
+
const ht = (tt.style.transform || "").match(/rotate\((-?\d+)deg\)/);
|
|
3513
3513
|
if (ht) {
|
|
3514
3514
|
$t = parseFloat(ht[1]);
|
|
3515
3515
|
break;
|
|
3516
3516
|
}
|
|
3517
|
-
|
|
3517
|
+
tt = tt.parentElement;
|
|
3518
3518
|
}
|
|
3519
|
-
const
|
|
3520
|
-
le.save(), le.translate(
|
|
3521
|
-
const fo =
|
|
3519
|
+
const un = (De.left + De.width / 2 - be.left) * Re, pn = (De.top + De.height / 2 - be.top) * Le, pt = Math.abs($t) > 1, gn = (pt ? De.height : De.width) * Re, hn = (pt ? De.width : De.height) * Le;
|
|
3520
|
+
le.save(), le.translate(un, pn), pt && le.rotate($t * Math.PI / 180);
|
|
3521
|
+
const fo = Ze.style.backgroundColor || "rgba(0,0,0,0.75)";
|
|
3522
3522
|
le.fillStyle = fo;
|
|
3523
3523
|
const uo = 4 * Re;
|
|
3524
|
-
le.beginPath(), le.roundRect(-
|
|
3525
|
-
const
|
|
3526
|
-
if (
|
|
3527
|
-
const gt = window.getComputedStyle(
|
|
3524
|
+
le.beginPath(), le.roundRect(-gn / 2, -hn / 2, gn, hn, uo), le.fill();
|
|
3525
|
+
const mn = ((_a = Ze.textContent) == null ? void 0 : _a.trim()) || "";
|
|
3526
|
+
if (mn) {
|
|
3527
|
+
const gt = window.getComputedStyle(Ze), ht = parseFloat(gt.fontSize || "14") * Le;
|
|
3528
3528
|
le.font = `${gt.fontWeight || "normal"} ${ht}px monospace`, le.fillStyle = gt.color || "#fff", le.textAlign = "center", le.textBaseline = "middle";
|
|
3529
|
-
const
|
|
3530
|
-
|
|
3531
|
-
const
|
|
3532
|
-
if (
|
|
3533
|
-
const po = (
|
|
3529
|
+
const xn = Ze.querySelectorAll("span");
|
|
3530
|
+
xn.length > 0 && !pt ? xn.forEach((Ot) => {
|
|
3531
|
+
const nt = Ot.getBoundingClientRect();
|
|
3532
|
+
if (nt.width === 0) return;
|
|
3533
|
+
const po = (nt.left + nt.width / 2 - be.left) * Re - un, go = (nt.top + nt.height / 2 - be.top) * Le - pn, Ht = window.getComputedStyle(Ot), ho = parseFloat(Ht.fontSize) * Le;
|
|
3534
3534
|
le.font = `${Ht.fontWeight || "normal"} ${ho}px monospace`, le.fillStyle = Ht.color || "#fff", le.fillText(Ot.textContent || "", po, go);
|
|
3535
|
-
}) : le.fillText(
|
|
3535
|
+
}) : le.fillText(mn, 0, 0);
|
|
3536
3536
|
}
|
|
3537
3537
|
le.restore();
|
|
3538
3538
|
});
|
|
@@ -3549,13 +3549,13 @@ let __tla = (async () => {
|
|
|
3549
3549
|
} catch {
|
|
3550
3550
|
return;
|
|
3551
3551
|
}
|
|
3552
|
-
}, []), Ce =
|
|
3552
|
+
}, []), Ce = re((x) => {
|
|
3553
3553
|
const _ = /* @__PURE__ */ new Date(), W = `${String(_.getHours()).padStart(2, "0")}:${String(_.getMinutes()).padStart(2, "0")}:${String(_.getSeconds()).padStart(2, "0")}.${String(_.getMilliseconds()).padStart(3, "0")}`;
|
|
3554
3554
|
en((R) => [
|
|
3555
3555
|
...R.slice(-200),
|
|
3556
3556
|
`[${W}] ${x}`
|
|
3557
3557
|
]);
|
|
3558
|
-
}, []), { landmarkPoints: H, clearLandmarkPoints:
|
|
3558
|
+
}, []), { landmarkPoints: H, clearLandmarkPoints: eo, addLandmarkPoint: tn, removeLandmarkPoint: nn, updateLandmarkPositions: on, setAligned: rn, isAligned: se, setCut: sn, isCut: It, reset: dt } = Gt();
|
|
3559
3559
|
q(() => {
|
|
3560
3560
|
dt();
|
|
3561
3561
|
}, [
|
|
@@ -3571,9 +3571,9 @@ let __tla = (async () => {
|
|
|
3571
3571
|
l,
|
|
3572
3572
|
Ce
|
|
3573
3573
|
]), q(() => {
|
|
3574
|
-
l &&
|
|
3574
|
+
l && se && Ce("STATE: mesh aligned");
|
|
3575
3575
|
}, [
|
|
3576
|
-
|
|
3576
|
+
se,
|
|
3577
3577
|
l,
|
|
3578
3578
|
Ce
|
|
3579
3579
|
]), q(() => {
|
|
@@ -3587,7 +3587,7 @@ let __tla = (async () => {
|
|
|
3587
3587
|
}, [
|
|
3588
3588
|
_t
|
|
3589
3589
|
]);
|
|
3590
|
-
const
|
|
3590
|
+
const Ve = Y(() => Q ? new j.Mesh(Q) : null, [
|
|
3591
3591
|
Q
|
|
3592
3592
|
]);
|
|
3593
3593
|
q(() => {
|
|
@@ -3601,7 +3601,7 @@ let __tla = (async () => {
|
|
|
3601
3601
|
]);
|
|
3602
3602
|
const ut = ae(false);
|
|
3603
3603
|
q(() => {
|
|
3604
|
-
if (!
|
|
3604
|
+
if (!se || G.length === 0 || ut.current || !c) return;
|
|
3605
3605
|
ut.current = true;
|
|
3606
3606
|
const x = H.length >= 3 ? Math.abs(H[2].position.y - H[0].position.y) : null;
|
|
3607
3607
|
c("dimensions_calculated", {
|
|
@@ -3611,23 +3611,23 @@ let __tla = (async () => {
|
|
|
3611
3611
|
measurement_source: "scan_derived",
|
|
3612
3612
|
is_double_wall: Z,
|
|
3613
3613
|
is_unit_converted: false,
|
|
3614
|
-
form_measurements: (
|
|
3614
|
+
form_measurements: (ve == null ? void 0 : ve.filter((_) => _ != null)) ?? null,
|
|
3615
3615
|
scan_measurements: G.map((_) => +(_.modifiedValue ?? _.originalValue).toFixed(1)),
|
|
3616
|
-
measurement_variance:
|
|
3617
|
-
const R =
|
|
3616
|
+
measurement_variance: ve ? G.map((_, W) => {
|
|
3617
|
+
const R = ve[W];
|
|
3618
3618
|
return R == null ? null : +((_.modifiedValue ?? _.originalValue) - R).toFixed(1);
|
|
3619
3619
|
}) : null,
|
|
3620
3620
|
frontal_height: x !== null ? +x.toFixed(1) : null
|
|
3621
3621
|
});
|
|
3622
3622
|
}, [
|
|
3623
|
-
|
|
3623
|
+
se,
|
|
3624
3624
|
G
|
|
3625
3625
|
]), q(() => {
|
|
3626
|
-
a !== void 0 && (
|
|
3626
|
+
a !== void 0 && (Ne.current = a), a !== void 0 && Jn(true);
|
|
3627
3627
|
}, [
|
|
3628
3628
|
a
|
|
3629
3629
|
]);
|
|
3630
|
-
const
|
|
3630
|
+
const Qe = re((x, _) => {
|
|
3631
3631
|
x.computeBoundingBox();
|
|
3632
3632
|
const W = x.boundingBox, R = new k();
|
|
3633
3633
|
W.getCenter(R), x.translate(-R.x, -R.y, -R.z), x.computeBoundingBox();
|
|
@@ -3638,7 +3638,7 @@ let __tla = (async () => {
|
|
|
3638
3638
|
side: j.DoubleSide
|
|
3639
3639
|
}));
|
|
3640
3640
|
h(K), U(_), J(true), he(false), ct.current = false;
|
|
3641
|
-
}, []), Te =
|
|
3641
|
+
}, []), Te = re(async (x, _) => {
|
|
3642
3642
|
Fe(null);
|
|
3643
3643
|
const W = _.toLowerCase(), R = W.endsWith(".stl");
|
|
3644
3644
|
if (!W.endsWith(".obj") && !R) {
|
|
@@ -3664,17 +3664,17 @@ let __tla = (async () => {
|
|
|
3664
3664
|
N = await Nt(Pe);
|
|
3665
3665
|
}
|
|
3666
3666
|
else N = typeof x == "string" ? x : new TextDecoder().decode(x);
|
|
3667
|
-
const K = performance.now(), be =
|
|
3667
|
+
const K = performance.now(), be = Ne.current ? await Do(N, Ne.current, (pe) => {
|
|
3668
3668
|
m(pe), Ce(`PREPROCESS: ${pe}`);
|
|
3669
3669
|
}) : null;
|
|
3670
|
-
if (be) Ce(`PREPROCESS: done in ${(performance.now() - K).toFixed(0)}ms \u2014 unit=${be.detectedUnit}, scaled=${be.wasScaled}`), t.showAmputationModal && !r ? (T(be), C(true)) :
|
|
3670
|
+
if (be) Ce(`PREPROCESS: done in ${(performance.now() - K).toFixed(0)}ms \u2014 unit=${be.detectedUnit}, scaled=${be.wasScaled}`), t.showAmputationModal && !r ? (T(be), C(true)) : Qe(be.geometry, be.wasScaled);
|
|
3671
3671
|
else {
|
|
3672
3672
|
m("Using fallback loader...");
|
|
3673
3673
|
const pe = _o(N);
|
|
3674
3674
|
pe ? t.showAmputationModal && !r ? (T({
|
|
3675
3675
|
geometry: pe,
|
|
3676
3676
|
wasScaled: false
|
|
3677
|
-
}), C(true)) :
|
|
3677
|
+
}), C(true)) : Qe(pe, false) : Fe("Failed to parse the mesh.");
|
|
3678
3678
|
}
|
|
3679
3679
|
} catch (N) {
|
|
3680
3680
|
Fe(N instanceof Error ? N.message : "Failed to process the mesh file.");
|
|
@@ -3685,7 +3685,7 @@ let __tla = (async () => {
|
|
|
3685
3685
|
Ee,
|
|
3686
3686
|
t.showAmputationModal,
|
|
3687
3687
|
r,
|
|
3688
|
-
|
|
3688
|
+
Qe
|
|
3689
3689
|
]);
|
|
3690
3690
|
q(() => {
|
|
3691
3691
|
if (!n || !Ee) return;
|
|
@@ -3710,11 +3710,11 @@ let __tla = (async () => {
|
|
|
3710
3710
|
n,
|
|
3711
3711
|
Ee
|
|
3712
3712
|
]);
|
|
3713
|
-
const
|
|
3713
|
+
const to = re((x) => {
|
|
3714
3714
|
x.preventDefault(), g(true);
|
|
3715
|
-
}, []),
|
|
3715
|
+
}, []), no = re((x) => {
|
|
3716
3716
|
x.preventDefault(), g(false);
|
|
3717
|
-
}, []),
|
|
3717
|
+
}, []), oo = re(async (x) => {
|
|
3718
3718
|
if (x.preventDefault(), g(false), !Ee) {
|
|
3719
3719
|
Fe("WASM module is still loading. Please wait.");
|
|
3720
3720
|
return;
|
|
@@ -3741,35 +3741,35 @@ let __tla = (async () => {
|
|
|
3741
3741
|
}, [
|
|
3742
3742
|
Ee,
|
|
3743
3743
|
Te
|
|
3744
|
-
]),
|
|
3745
|
-
w(x), A(x === "AK" ? 2 : 1), C(false), L && (
|
|
3744
|
+
]), ro = re((x) => {
|
|
3745
|
+
w(x), A(x === "AK" ? 2 : 1), C(false), L && (Qe(L.geometry, L.wasScaled), T(null)), c == null ? void 0 : c("file_loaded", {
|
|
3746
3746
|
spacing_type: x,
|
|
3747
3747
|
file_format: $e,
|
|
3748
3748
|
is_double_wall: false
|
|
3749
3749
|
});
|
|
3750
3750
|
}, [
|
|
3751
3751
|
L,
|
|
3752
|
-
|
|
3752
|
+
Qe,
|
|
3753
3753
|
c,
|
|
3754
3754
|
$e
|
|
3755
3755
|
]);
|
|
3756
3756
|
q(() => {
|
|
3757
|
-
if (!e || H.length !== 1 || !
|
|
3757
|
+
if (!e || H.length !== 1 || !Ne.current || ct.current) return;
|
|
3758
3758
|
ct.current = true;
|
|
3759
|
-
const x = H[0], _ =
|
|
3759
|
+
const x = H[0], _ = Ne.current, W = e.geometry, { positions: R, indices: xe } = St(W), N = new Float32Array([
|
|
3760
3760
|
x.position.x,
|
|
3761
3761
|
x.position.y,
|
|
3762
3762
|
x.position.z
|
|
3763
3763
|
]), K = _.detect_shell(R, xe, N, 40), be = K.details(), pe = K.is_double_shell();
|
|
3764
|
-
Ce(`SHELL_DETECT: ${pe ? "DOUBLE" : "SINGLE"} \u2014 ${be}`), pe && (ge(true),
|
|
3764
|
+
Ce(`SHELL_DETECT: ${pe ? "DOUBLE" : "SINGLE"} \u2014 ${be}`), pe && (ge(true), oe(true), Ce(`SHELL_DETECT: double shell, thickness=${K.thickness().toFixed(1)}mm`));
|
|
3765
3765
|
}, [
|
|
3766
3766
|
e,
|
|
3767
3767
|
H,
|
|
3768
3768
|
Ce
|
|
3769
3769
|
]);
|
|
3770
|
-
const
|
|
3770
|
+
const io = re(() => {
|
|
3771
3771
|
if (!e || H.length < 2) return;
|
|
3772
|
-
$(true),
|
|
3772
|
+
$(true), ie("Please wait..."), Ce("PIPELINE: starting processing pipeline...");
|
|
3773
3773
|
const x = performance.now();
|
|
3774
3774
|
setTimeout(() => {
|
|
3775
3775
|
const _ = [
|
|
@@ -3779,7 +3779,7 @@ let __tla = (async () => {
|
|
|
3779
3779
|
];
|
|
3780
3780
|
Eo(e, _, wt, {
|
|
3781
3781
|
onStatus: (W) => {
|
|
3782
|
-
|
|
3782
|
+
ie(W), Ce(`PIPELINE: ${W}`);
|
|
3783
3783
|
},
|
|
3784
3784
|
addLandmarkPoint: tn,
|
|
3785
3785
|
removeLandmarkPoint: nn,
|
|
@@ -3799,7 +3799,7 @@ let __tla = (async () => {
|
|
|
3799
3799
|
setAdjustedEndY: At,
|
|
3800
3800
|
setError: Fe,
|
|
3801
3801
|
setDoubleShell: (W) => {
|
|
3802
|
-
ge(W),
|
|
3802
|
+
ge(W), oe(true);
|
|
3803
3803
|
},
|
|
3804
3804
|
setAoData: (W, R) => {
|
|
3805
3805
|
te(W), X(R ?? null);
|
|
@@ -3807,7 +3807,7 @@ let __tla = (async () => {
|
|
|
3807
3807
|
setInnerShellExtracted: he,
|
|
3808
3808
|
setMeasurementGeometry: ue,
|
|
3809
3809
|
setWasmSlices: Ae,
|
|
3810
|
-
wasmModule:
|
|
3810
|
+
wasmModule: Ne.current ?? void 0
|
|
3811
3811
|
}), Ce(`PIPELINE: completed in ${(performance.now() - x).toFixed(0)}ms`), ut.current = false, $(false);
|
|
3812
3812
|
}, 50);
|
|
3813
3813
|
}, [
|
|
@@ -3819,8 +3819,8 @@ let __tla = (async () => {
|
|
|
3819
3819
|
nn,
|
|
3820
3820
|
sn,
|
|
3821
3821
|
de
|
|
3822
|
-
]), Bt = ae(false),
|
|
3823
|
-
if (dt(), V([]), Ae(null), ue(null), me(null), At(null), Zt(null), Xt(null),
|
|
3822
|
+
]), Bt = ae(false), so = re(async () => {
|
|
3823
|
+
if (dt(), V([]), Ae(null), ue(null), me(null), At(null), Zt(null), Xt(null), Ue(false), Ut(false), Ft(true), ge(false), he(false), ct.current = false, Bt.current = false, ut.current = false, y("3D"), n && Ee) {
|
|
3824
3824
|
h(null);
|
|
3825
3825
|
try {
|
|
3826
3826
|
const x = await fetch(n);
|
|
@@ -3838,12 +3838,12 @@ let __tla = (async () => {
|
|
|
3838
3838
|
dt
|
|
3839
3839
|
]);
|
|
3840
3840
|
q(() => {
|
|
3841
|
-
|
|
3841
|
+
se && G.length > 0 && !Bt.current && (Bt.current = true, Ue(true));
|
|
3842
3842
|
}, [
|
|
3843
|
-
|
|
3843
|
+
se,
|
|
3844
3844
|
G.length
|
|
3845
3845
|
]);
|
|
3846
|
-
const
|
|
3846
|
+
const et = Y(() => {
|
|
3847
3847
|
var _a;
|
|
3848
3848
|
if (!e || H.length < 3) return 0;
|
|
3849
3849
|
if (Z) return Math.abs(H[0].position.y - H[2].position.y);
|
|
@@ -3855,12 +3855,12 @@ let __tla = (async () => {
|
|
|
3855
3855
|
e,
|
|
3856
3856
|
H,
|
|
3857
3857
|
Z
|
|
3858
|
-
]),
|
|
3859
|
-
|
|
3860
|
-
}, []), ln =
|
|
3861
|
-
if (!s ||
|
|
3862
|
-
|
|
3863
|
-
const _ = e ? await
|
|
3858
|
+
]), lo = re((x) => {
|
|
3859
|
+
Xn(x), kt(x.circumferences), Ft(true), Ut(true), Ue(false);
|
|
3860
|
+
}, []), ln = re(async (x) => {
|
|
3861
|
+
if (!s || Ye.current) return;
|
|
3862
|
+
Ye.current = true, Ue(false), lt(false), st(true), await new Promise((W) => requestAnimationFrame(() => requestAnimationFrame(() => W())));
|
|
3863
|
+
const _ = e ? await Je({
|
|
3864
3864
|
restoreView: false
|
|
3865
3865
|
}).catch(() => {
|
|
3866
3866
|
}) : void 0;
|
|
@@ -3872,9 +3872,9 @@ let __tla = (async () => {
|
|
|
3872
3872
|
measurementSource: "form_provided",
|
|
3873
3873
|
isDoubleWall: Z,
|
|
3874
3874
|
isUnitConverted: false,
|
|
3875
|
-
formMeasurements:
|
|
3875
|
+
formMeasurements: ve,
|
|
3876
3876
|
scanMeasurements: G,
|
|
3877
|
-
frontalHeight:
|
|
3877
|
+
frontalHeight: et,
|
|
3878
3878
|
transverseML: 0,
|
|
3879
3879
|
transverseAP: 0,
|
|
3880
3880
|
scanUrl: n,
|
|
@@ -3884,7 +3884,7 @@ let __tla = (async () => {
|
|
|
3884
3884
|
alignedGeometry: e == null ? void 0 : e.geometry
|
|
3885
3885
|
});
|
|
3886
3886
|
} finally {
|
|
3887
|
-
|
|
3887
|
+
Ye.current = false, st(false);
|
|
3888
3888
|
}
|
|
3889
3889
|
}, [
|
|
3890
3890
|
s,
|
|
@@ -3892,37 +3892,37 @@ let __tla = (async () => {
|
|
|
3892
3892
|
E,
|
|
3893
3893
|
$e,
|
|
3894
3894
|
Z,
|
|
3895
|
-
|
|
3895
|
+
ve,
|
|
3896
3896
|
G,
|
|
3897
|
-
|
|
3897
|
+
et,
|
|
3898
3898
|
n,
|
|
3899
|
-
|
|
3899
|
+
Je
|
|
3900
3900
|
]), Et = ae(null);
|
|
3901
3901
|
q(() => {
|
|
3902
|
-
if (!e || !
|
|
3902
|
+
if (!e || !se) {
|
|
3903
3903
|
Et.current = null;
|
|
3904
3904
|
return;
|
|
3905
3905
|
}
|
|
3906
|
-
const x = (
|
|
3906
|
+
const x = (Ve ?? e).geometry;
|
|
3907
3907
|
Et.current = jt(x);
|
|
3908
3908
|
}, [
|
|
3909
3909
|
e,
|
|
3910
|
-
|
|
3911
|
-
|
|
3910
|
+
se,
|
|
3911
|
+
Ve
|
|
3912
3912
|
]);
|
|
3913
|
-
const Tt =
|
|
3914
|
-
if (!s || !e || G.length === 0 || !E ||
|
|
3915
|
-
|
|
3916
|
-
const _ = await
|
|
3913
|
+
const Tt = re(async (x) => {
|
|
3914
|
+
if (!s || !e || G.length === 0 || !E || Ye.current) return;
|
|
3915
|
+
Ye.current = true, st(true), await new Promise((W) => requestAnimationFrame(() => requestAnimationFrame(() => W())));
|
|
3916
|
+
const _ = await Je({
|
|
3917
3917
|
restoreView: false
|
|
3918
3918
|
}).catch(() => {
|
|
3919
3919
|
});
|
|
3920
3920
|
try {
|
|
3921
3921
|
let W = 0, R = 0;
|
|
3922
3922
|
if (H.length >= 2) {
|
|
3923
|
-
const xe = (
|
|
3923
|
+
const xe = (Ve ?? e).geometry, K = H[0].position.y;
|
|
3924
3924
|
try {
|
|
3925
|
-
const be = Et.current ?? jt(xe), pe =
|
|
3925
|
+
const be = Et.current ?? jt(xe), pe = je(be, xe, K);
|
|
3926
3926
|
if (pe.linePoints.length >= 2) {
|
|
3927
3927
|
let Pe = pe.linePoints[0], Re = pe.linePoints[0], Le = pe.linePoints[0], We = pe.linePoints[0];
|
|
3928
3928
|
for (const le of pe.linePoints) le.x < Pe.x && (Pe = le), le.x > Re.x && (Re = le), le.z < Le.z && (Le = le), le.z > We.z && (We = le);
|
|
@@ -3938,55 +3938,55 @@ let __tla = (async () => {
|
|
|
3938
3938
|
measurementSource: x === "use_form_measurements" ? "form_provided" : "scan_derived",
|
|
3939
3939
|
isDoubleWall: Z,
|
|
3940
3940
|
isUnitConverted: false,
|
|
3941
|
-
formMeasurements:
|
|
3941
|
+
formMeasurements: ve,
|
|
3942
3942
|
scanMeasurements: G,
|
|
3943
|
-
frontalHeight: (
|
|
3943
|
+
frontalHeight: (He == null ? void 0 : He.frontalHeight) ?? et,
|
|
3944
3944
|
transverseML: W,
|
|
3945
3945
|
transverseAP: R,
|
|
3946
|
-
perineumML:
|
|
3947
|
-
perineumAP:
|
|
3946
|
+
perineumML: He == null ? void 0 : He.perineumML,
|
|
3947
|
+
perineumAP: He == null ? void 0 : He.perineumAP,
|
|
3948
3948
|
scanUrl: n,
|
|
3949
3949
|
decision: x,
|
|
3950
|
-
userEnteredMeasurements:
|
|
3950
|
+
userEnteredMeasurements: He ?? void 0,
|
|
3951
3951
|
screenshots: _,
|
|
3952
|
-
alignedGeometry: (
|
|
3952
|
+
alignedGeometry: (Ve ?? e).geometry
|
|
3953
3953
|
});
|
|
3954
3954
|
} finally {
|
|
3955
|
-
|
|
3955
|
+
Ye.current = false, st(false);
|
|
3956
3956
|
}
|
|
3957
3957
|
}, [
|
|
3958
3958
|
s,
|
|
3959
3959
|
e,
|
|
3960
|
-
|
|
3960
|
+
Ve,
|
|
3961
3961
|
G,
|
|
3962
3962
|
E,
|
|
3963
3963
|
H,
|
|
3964
3964
|
$e,
|
|
3965
3965
|
Z,
|
|
3966
|
-
|
|
3966
|
+
ve,
|
|
3967
3967
|
n,
|
|
3968
|
-
|
|
3969
|
-
|
|
3970
|
-
|
|
3971
|
-
]),
|
|
3972
|
-
if (!
|
|
3973
|
-
const x = Math.min(
|
|
3968
|
+
He,
|
|
3969
|
+
et,
|
|
3970
|
+
Je
|
|
3971
|
+
]), ao = Y(() => {
|
|
3972
|
+
if (!ve || G.length === 0) return false;
|
|
3973
|
+
const x = Math.min(ve.length, G.length);
|
|
3974
3974
|
if (x === 0) return false;
|
|
3975
3975
|
for (let _ = 0; _ < x; _++) {
|
|
3976
|
-
const W =
|
|
3976
|
+
const W = ve[_], R = G[_];
|
|
3977
3977
|
if (!R || W == null || W === 0) continue;
|
|
3978
3978
|
const xe = R.modifiedValue ?? R.originalValue;
|
|
3979
3979
|
if (Math.abs(xe - W) > 7) return false;
|
|
3980
3980
|
}
|
|
3981
3981
|
return true;
|
|
3982
3982
|
}, [
|
|
3983
|
-
|
|
3983
|
+
ve,
|
|
3984
3984
|
G
|
|
3985
|
-
]),
|
|
3986
|
-
return
|
|
3985
|
+
]), an = Oe === 0 ? 320 : Oe < 520 ? Math.max(200, Math.round(Oe * 0.42)) : Oe < 900 ? 280 : Oe < 1400 ? 340 : 400, cn = Oe < 520 ? 16 : Oe < 900 ? 20 : 24;
|
|
3986
|
+
return S(Mo.Provider, {
|
|
3987
3987
|
value: t,
|
|
3988
3988
|
children: [
|
|
3989
|
-
|
|
3989
|
+
S("div", {
|
|
3990
3990
|
style: {
|
|
3991
3991
|
flex: 1,
|
|
3992
3992
|
display: "flex",
|
|
@@ -4015,7 +4015,7 @@ let __tla = (async () => {
|
|
|
4015
4015
|
}
|
|
4016
4016
|
})
|
|
4017
4017
|
}),
|
|
4018
|
-
|
|
4018
|
+
S("div", {
|
|
4019
4019
|
style: {
|
|
4020
4020
|
flex: 1,
|
|
4021
4021
|
display: "flex",
|
|
@@ -4023,7 +4023,7 @@ let __tla = (async () => {
|
|
|
4023
4023
|
minHeight: 0
|
|
4024
4024
|
},
|
|
4025
4025
|
children: [
|
|
4026
|
-
|
|
4026
|
+
S("div", {
|
|
4027
4027
|
ref: Dt,
|
|
4028
4028
|
style: {
|
|
4029
4029
|
flex: 1,
|
|
@@ -4032,15 +4032,15 @@ let __tla = (async () => {
|
|
|
4032
4032
|
minHeight: 0
|
|
4033
4033
|
},
|
|
4034
4034
|
children: [
|
|
4035
|
-
e && !
|
|
4035
|
+
e && !se && (() => {
|
|
4036
4036
|
const x = H.length === 0 ? 1 : H.length === 1 ? 2 : 3, _ = E === "AK" ? "Perineum" : "MPT", W = x === 1 ? `Place Point at ${_}` : x === 2 ? "Place Point at Distal Most Point" : "Ready to Continue", R = x === 1 ? `Click on the model to mark the ${_}.` : x === 2 ? "Click on the model to mark the Distal Most Point." : "Both points are placed. Click Continue to process the scan.", xe = x === 1 ? "#2fbf4a" : x === 2 ? "#e53935" : "#2fbf4a", N = H.length >= 2;
|
|
4037
|
-
return
|
|
4037
|
+
return S("div", {
|
|
4038
4038
|
style: {
|
|
4039
|
-
width:
|
|
4039
|
+
width: an,
|
|
4040
4040
|
flexShrink: 0,
|
|
4041
4041
|
display: "flex",
|
|
4042
4042
|
flexDirection: "column",
|
|
4043
|
-
padding:
|
|
4043
|
+
padding: cn,
|
|
4044
4044
|
gap: 20,
|
|
4045
4045
|
fontFamily: "system-ui, sans-serif",
|
|
4046
4046
|
boxSizing: "border-box",
|
|
@@ -4050,7 +4050,7 @@ let __tla = (async () => {
|
|
|
4050
4050
|
i("style", {
|
|
4051
4051
|
children: "@keyframes gm-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(12, 67, 173, 0.45) } 50% { box-shadow: 0 0 0 6px rgba(12, 67, 173, 0) } }"
|
|
4052
4052
|
}),
|
|
4053
|
-
|
|
4053
|
+
S("div", {
|
|
4054
4054
|
style: {
|
|
4055
4055
|
position: "relative",
|
|
4056
4056
|
display: "flex",
|
|
@@ -4098,7 +4098,7 @@ let __tla = (async () => {
|
|
|
4098
4098
|
},
|
|
4099
4099
|
children: "i"
|
|
4100
4100
|
}),
|
|
4101
|
-
Lt &&
|
|
4101
|
+
Lt && S("div", {
|
|
4102
4102
|
role: "tooltip",
|
|
4103
4103
|
style: {
|
|
4104
4104
|
position: "absolute",
|
|
@@ -4138,7 +4138,7 @@ let __tla = (async () => {
|
|
|
4138
4138
|
})
|
|
4139
4139
|
]
|
|
4140
4140
|
}),
|
|
4141
|
-
|
|
4141
|
+
S("div", {
|
|
4142
4142
|
style: {
|
|
4143
4143
|
display: "flex",
|
|
4144
4144
|
alignItems: "center",
|
|
@@ -4161,7 +4161,7 @@ let __tla = (async () => {
|
|
|
4161
4161
|
transition: "background-color 200ms"
|
|
4162
4162
|
}
|
|
4163
4163
|
}, K)),
|
|
4164
|
-
|
|
4164
|
+
S("div", {
|
|
4165
4165
|
style: {
|
|
4166
4166
|
fontSize: 11,
|
|
4167
4167
|
fontWeight: 500,
|
|
@@ -4176,7 +4176,7 @@ let __tla = (async () => {
|
|
|
4176
4176
|
})
|
|
4177
4177
|
]
|
|
4178
4178
|
}),
|
|
4179
|
-
|
|
4179
|
+
S("div", {
|
|
4180
4180
|
style: {
|
|
4181
4181
|
display: "flex",
|
|
4182
4182
|
alignItems: "center",
|
|
@@ -4215,7 +4215,7 @@ let __tla = (async () => {
|
|
|
4215
4215
|
}),
|
|
4216
4216
|
i("button", {
|
|
4217
4217
|
disabled: !N,
|
|
4218
|
-
onClick:
|
|
4218
|
+
onClick: io,
|
|
4219
4219
|
style: {
|
|
4220
4220
|
marginTop: 4,
|
|
4221
4221
|
padding: "11px 14px",
|
|
@@ -4238,15 +4238,17 @@ let __tla = (async () => {
|
|
|
4238
4238
|
onClick: () => lt(true),
|
|
4239
4239
|
style: {
|
|
4240
4240
|
alignSelf: "center",
|
|
4241
|
-
|
|
4242
|
-
border: "
|
|
4243
|
-
color: Be ? "#999" : "
|
|
4244
|
-
fontSize:
|
|
4241
|
+
backgroundColor: "#fff",
|
|
4242
|
+
border: "1px solid #d0d7de",
|
|
4243
|
+
color: Be ? "#999" : "#2d333a",
|
|
4244
|
+
fontSize: 14,
|
|
4245
4245
|
fontWeight: 600,
|
|
4246
4246
|
cursor: Be ? "not-allowed" : "pointer",
|
|
4247
4247
|
fontFamily: "system-ui, sans-serif",
|
|
4248
|
-
padding: "
|
|
4249
|
-
|
|
4248
|
+
padding: "10px 16px",
|
|
4249
|
+
borderRadius: 8,
|
|
4250
|
+
boxShadow: "0 1px 3px rgba(0,0,0,0.06)",
|
|
4251
|
+
letterSpacing: "0.3px"
|
|
4250
4252
|
},
|
|
4251
4253
|
children: "Have Galileo Check My Measurements"
|
|
4252
4254
|
})
|
|
@@ -4270,12 +4272,13 @@ let __tla = (async () => {
|
|
|
4270
4272
|
]
|
|
4271
4273
|
});
|
|
4272
4274
|
})(),
|
|
4273
|
-
|
|
4275
|
+
se && it && E && i("div", {
|
|
4274
4276
|
style: {
|
|
4275
|
-
|
|
4277
|
+
width: an,
|
|
4278
|
+
flexShrink: 0,
|
|
4276
4279
|
display: "flex",
|
|
4277
4280
|
flexDirection: "column",
|
|
4278
|
-
padding:
|
|
4281
|
+
padding: cn,
|
|
4279
4282
|
boxSizing: "border-box",
|
|
4280
4283
|
minHeight: 0,
|
|
4281
4284
|
fontFamily: "system-ui, sans-serif"
|
|
@@ -4297,29 +4300,27 @@ let __tla = (async () => {
|
|
|
4297
4300
|
amputationType: E,
|
|
4298
4301
|
spacingInches: F,
|
|
4299
4302
|
scanMeasurements: G,
|
|
4300
|
-
scanFrontalHeight:
|
|
4301
|
-
onSave:
|
|
4303
|
+
scanFrontalHeight: et,
|
|
4304
|
+
onSave: lo,
|
|
4302
4305
|
onSkip: ln,
|
|
4303
|
-
onFormChange:
|
|
4304
|
-
onHeightChange:
|
|
4305
|
-
initialValues:
|
|
4306
|
-
initialFrontalHeight:
|
|
4306
|
+
onFormChange: Zn,
|
|
4307
|
+
onHeightChange: qn,
|
|
4308
|
+
initialValues: ve,
|
|
4309
|
+
initialFrontalHeight: He == null ? void 0 : He.frontalHeight
|
|
4307
4310
|
})
|
|
4308
4311
|
})
|
|
4309
4312
|
}),
|
|
4310
|
-
|
|
4313
|
+
S("div", {
|
|
4311
4314
|
ref: Wt,
|
|
4312
4315
|
style: {
|
|
4313
|
-
flex:
|
|
4314
|
-
width: ne && Oe ? 0 : void 0,
|
|
4315
|
-
visibility: ne && Oe ? "hidden" : "visible",
|
|
4316
|
+
flex: 1,
|
|
4316
4317
|
position: "relative",
|
|
4317
4318
|
minHeight: 0,
|
|
4318
4319
|
overflow: "hidden"
|
|
4319
4320
|
},
|
|
4320
|
-
onDragOver: t.showDragDrop ?
|
|
4321
|
-
onDragLeave: t.showDragDrop ?
|
|
4322
|
-
onDrop: t.showDragDrop ?
|
|
4321
|
+
onDragOver: t.showDragDrop ? to : void 0,
|
|
4322
|
+
onDragLeave: t.showDragDrop ? no : void 0,
|
|
4323
|
+
onDrop: t.showDragDrop ? oo : void 0,
|
|
4323
4324
|
children: [
|
|
4324
4325
|
t.showDragDrop && !e && !M && i("div", {
|
|
4325
4326
|
style: {
|
|
@@ -4340,7 +4341,7 @@ let __tla = (async () => {
|
|
|
4340
4341
|
fontFamily: "system-ui, sans-serif"
|
|
4341
4342
|
},
|
|
4342
4343
|
children: "Drag & Drop Files Here"
|
|
4343
|
-
}) :
|
|
4344
|
+
}) : S("div", {
|
|
4344
4345
|
style: {
|
|
4345
4346
|
textAlign: "center"
|
|
4346
4347
|
},
|
|
@@ -4378,7 +4379,7 @@ let __tla = (async () => {
|
|
|
4378
4379
|
alignItems: "center",
|
|
4379
4380
|
justifyContent: "center"
|
|
4380
4381
|
},
|
|
4381
|
-
children:
|
|
4382
|
+
children: S("div", {
|
|
4382
4383
|
style: {
|
|
4383
4384
|
textAlign: "center"
|
|
4384
4385
|
},
|
|
@@ -4408,17 +4409,17 @@ let __tla = (async () => {
|
|
|
4408
4409
|
]
|
|
4409
4410
|
})
|
|
4410
4411
|
}),
|
|
4411
|
-
M && i(
|
|
4412
|
+
M && i(Sn, {
|
|
4412
4413
|
message: b || "Processing mesh..."
|
|
4413
4414
|
}),
|
|
4414
|
-
B && i(
|
|
4415
|
+
B && i(Sn, {
|
|
4415
4416
|
message: ee
|
|
4416
4417
|
}),
|
|
4417
4418
|
Mt && i($o, {
|
|
4418
4419
|
message: Mt,
|
|
4419
4420
|
onDismiss: () => Fe(null)
|
|
4420
4421
|
}),
|
|
4421
|
-
t.showAmputationModal &&
|
|
4422
|
+
t.showAmputationModal && v && i("div", {
|
|
4422
4423
|
style: {
|
|
4423
4424
|
position: "absolute",
|
|
4424
4425
|
inset: 0,
|
|
@@ -4430,7 +4431,7 @@ let __tla = (async () => {
|
|
|
4430
4431
|
justifyContent: "center",
|
|
4431
4432
|
zIndex: 20
|
|
4432
4433
|
},
|
|
4433
|
-
children:
|
|
4434
|
+
children: S("div", {
|
|
4434
4435
|
style: {
|
|
4435
4436
|
backgroundColor: "#fff",
|
|
4436
4437
|
borderRadius: 4,
|
|
@@ -4439,7 +4440,7 @@ let __tla = (async () => {
|
|
|
4439
4440
|
fontFamily: "system-ui, sans-serif"
|
|
4440
4441
|
},
|
|
4441
4442
|
children: [
|
|
4442
|
-
|
|
4443
|
+
S("div", {
|
|
4443
4444
|
style: {
|
|
4444
4445
|
padding: "24px 24px 20px"
|
|
4445
4446
|
},
|
|
@@ -4469,7 +4470,7 @@ let __tla = (async () => {
|
|
|
4469
4470
|
children: [
|
|
4470
4471
|
"AK",
|
|
4471
4472
|
"BK"
|
|
4472
|
-
].map((x) =>
|
|
4473
|
+
].map((x) => S("label", {
|
|
4473
4474
|
onClick: () => w(x),
|
|
4474
4475
|
style: {
|
|
4475
4476
|
flex: 1,
|
|
@@ -4505,7 +4506,7 @@ let __tla = (async () => {
|
|
|
4505
4506
|
},
|
|
4506
4507
|
children: x
|
|
4507
4508
|
}),
|
|
4508
|
-
|
|
4509
|
+
S("span", {
|
|
4509
4510
|
style: {
|
|
4510
4511
|
fontSize: 13,
|
|
4511
4512
|
color: "rgba(0,0,0,0.54)"
|
|
@@ -4520,7 +4521,7 @@ let __tla = (async () => {
|
|
|
4520
4521
|
})
|
|
4521
4522
|
]
|
|
4522
4523
|
}),
|
|
4523
|
-
|
|
4524
|
+
S("div", {
|
|
4524
4525
|
style: {
|
|
4525
4526
|
display: "flex",
|
|
4526
4527
|
justifyContent: "flex-end",
|
|
@@ -4549,7 +4550,7 @@ let __tla = (async () => {
|
|
|
4549
4550
|
children: "Cancel"
|
|
4550
4551
|
}),
|
|
4551
4552
|
i("button", {
|
|
4552
|
-
onClick: () => E &&
|
|
4553
|
+
onClick: () => E && ro(E),
|
|
4553
4554
|
disabled: !E,
|
|
4554
4555
|
style: {
|
|
4555
4556
|
padding: "6px 16px",
|
|
@@ -4582,7 +4583,7 @@ let __tla = (async () => {
|
|
|
4582
4583
|
}
|
|
4583
4584
|
}),
|
|
4584
4585
|
i(To, {
|
|
4585
|
-
children:
|
|
4586
|
+
children: S(wo, {
|
|
4586
4587
|
camera: {
|
|
4587
4588
|
position: [
|
|
4588
4589
|
0,
|
|
@@ -4633,9 +4634,9 @@ let __tla = (async () => {
|
|
|
4633
4634
|
mesh: e,
|
|
4634
4635
|
maxPoints: 2,
|
|
4635
4636
|
meshColor: Qt,
|
|
4636
|
-
meshOpacity: _e ? 0.3 :
|
|
4637
|
+
meshOpacity: _e ? 0.3 : Un,
|
|
4637
4638
|
frontFaceOnly: de,
|
|
4638
|
-
doubleShellTransparency: Z &&
|
|
4639
|
+
doubleShellTransparency: Z && se
|
|
4639
4640
|
}),
|
|
4640
4641
|
e && P === "3D" && i(Vo, {
|
|
4641
4642
|
modelSize: d,
|
|
@@ -4647,39 +4648,39 @@ let __tla = (async () => {
|
|
|
4647
4648
|
}),
|
|
4648
4649
|
i(Jo, {
|
|
4649
4650
|
modelSize: d,
|
|
4650
|
-
isAligned:
|
|
4651
|
+
isAligned: se,
|
|
4651
4652
|
isCut: It,
|
|
4652
4653
|
mesh: e,
|
|
4653
4654
|
viewMode: P,
|
|
4654
|
-
sliceY:
|
|
4655
|
+
sliceY: se && H.length >= 2 ? ze ?? ot ?? H[0].position.y : void 0,
|
|
4655
4656
|
landmarkCount: H.length,
|
|
4656
4657
|
measurementGeometry: Q,
|
|
4657
|
-
fitYMin:
|
|
4658
|
-
fitYMax:
|
|
4658
|
+
fitYMin: se && H.length >= 2 ? ze ?? ot ?? void 0 : void 0,
|
|
4659
|
+
fitYMax: se && H.length >= 2 ? rt ?? H[0].position.y : void 0,
|
|
4659
4660
|
resetCameraToFrontRef: Rt
|
|
4660
4661
|
}),
|
|
4661
|
-
!
|
|
4662
|
+
!se && i(Fn, {
|
|
4662
4663
|
enableDamping: false
|
|
4663
4664
|
}),
|
|
4664
|
-
|
|
4665
|
+
se && G.length > 0 && e && P === "3D" && i(Qo, {
|
|
4665
4666
|
mesh: e,
|
|
4666
|
-
isDragging:
|
|
4667
|
+
isDragging: Hn
|
|
4667
4668
|
}),
|
|
4668
|
-
e &&
|
|
4669
|
+
e && se && H.length >= 3 && (() => {
|
|
4669
4670
|
const _ = e.geometry.getIndex();
|
|
4670
4671
|
if (!_ || _.count < 30) return null;
|
|
4671
|
-
const W = H[2], R = H[0], xe =
|
|
4672
|
+
const W = H[2], R = H[0], xe = Xe ?? W.position.y, N = ze ?? ot ?? R.position.y;
|
|
4672
4673
|
return P === "2D" ? i(nr, {
|
|
4673
|
-
mesh:
|
|
4674
|
+
mesh: Ve ?? e,
|
|
4674
4675
|
upperY: N,
|
|
4675
4676
|
originY: R.position.y,
|
|
4676
4677
|
modelSize: d,
|
|
4677
4678
|
meshColor: Qt,
|
|
4678
4679
|
displayUnit: z
|
|
4679
|
-
}) :
|
|
4680
|
+
}) : S(Ie, {
|
|
4680
4681
|
children: [
|
|
4681
4682
|
i(Ko, {
|
|
4682
|
-
mesh:
|
|
4683
|
+
mesh: Ve ?? e,
|
|
4683
4684
|
startY: xe,
|
|
4684
4685
|
endY: N,
|
|
4685
4686
|
spacing: ft,
|
|
@@ -4688,25 +4689,25 @@ let __tla = (async () => {
|
|
|
4688
4689
|
reverseOrder: true,
|
|
4689
4690
|
displayUnit: z,
|
|
4690
4691
|
useInnerSurface: Z && !de,
|
|
4691
|
-
formMeasurements:
|
|
4692
|
-
originY:
|
|
4692
|
+
formMeasurements: it ? Yn ?? ve : qe ? ve : void 0,
|
|
4693
|
+
originY: rt ?? R.position.y,
|
|
4693
4694
|
wasmSlices: ke
|
|
4694
4695
|
}),
|
|
4695
4696
|
i(Uo, {
|
|
4696
4697
|
mesh: e,
|
|
4697
|
-
greenY:
|
|
4698
|
+
greenY: rt ?? R.position.y,
|
|
4698
4699
|
modelSize: d,
|
|
4699
4700
|
displayUnit: z,
|
|
4700
4701
|
bottomY: Z ? W.position.y : void 0,
|
|
4701
|
-
formHeight:
|
|
4702
|
+
formHeight: it ? Kn : qe ? He == null ? void 0 : He.frontalHeight : void 0
|
|
4702
4703
|
}),
|
|
4703
4704
|
i(or, {
|
|
4704
4705
|
mesh: e,
|
|
4705
|
-
yPosition:
|
|
4706
|
+
yPosition: rt ?? R.position.y,
|
|
4706
4707
|
onYChange: (K) => {
|
|
4707
4708
|
Zt(K), Ae(null);
|
|
4708
4709
|
const be = K - R.position.y;
|
|
4709
|
-
At((
|
|
4710
|
+
At((ot ?? R.position.y + ft * 2) + be);
|
|
4710
4711
|
},
|
|
4711
4712
|
minY: R.position.y - ft,
|
|
4712
4713
|
maxY: R.position.y + ft,
|
|
@@ -4721,21 +4722,21 @@ let __tla = (async () => {
|
|
|
4721
4722
|
]
|
|
4722
4723
|
});
|
|
4723
4724
|
})(),
|
|
4724
|
-
e &&
|
|
4725
|
+
e && se && P === "3D" && _e && i(Cr, {
|
|
4725
4726
|
mesh: e
|
|
4726
4727
|
}),
|
|
4727
|
-
e && t.showDebug && _e && P === "3D" && i(
|
|
4728
|
+
e && t.showDebug && _e && P === "3D" && i(vr, {
|
|
4728
4729
|
mesh: e,
|
|
4729
4730
|
modelSize: d,
|
|
4730
4731
|
layers: Kt,
|
|
4731
4732
|
landmarkPoints: H,
|
|
4732
4733
|
componentDebug: null,
|
|
4733
|
-
aoData:
|
|
4734
|
+
aoData: Se,
|
|
4734
4735
|
aoGeometry: O,
|
|
4735
4736
|
measurementGeometry: Q
|
|
4736
4737
|
}),
|
|
4737
4738
|
i(kr, {
|
|
4738
|
-
screenshotFnRef:
|
|
4739
|
+
screenshotFnRef: Qn,
|
|
4739
4740
|
mesh: e,
|
|
4740
4741
|
modelSize: d,
|
|
4741
4742
|
measurementGeometry: Q
|
|
@@ -4743,7 +4744,7 @@ let __tla = (async () => {
|
|
|
4743
4744
|
]
|
|
4744
4745
|
})
|
|
4745
4746
|
}),
|
|
4746
|
-
e &&
|
|
4747
|
+
e && S("div", {
|
|
4747
4748
|
style: {
|
|
4748
4749
|
position: "absolute",
|
|
4749
4750
|
top: 16,
|
|
@@ -4753,7 +4754,7 @@ let __tla = (async () => {
|
|
|
4753
4754
|
gap: 8
|
|
4754
4755
|
},
|
|
4755
4756
|
children: [
|
|
4756
|
-
t.showStartOver &&
|
|
4757
|
+
t.showStartOver && se && i("button", {
|
|
4757
4758
|
onClick: () => window.location.reload(),
|
|
4758
4759
|
style: {
|
|
4759
4760
|
padding: "6px 16px",
|
|
@@ -4770,8 +4771,8 @@ let __tla = (async () => {
|
|
|
4770
4771
|
},
|
|
4771
4772
|
children: "Start Over"
|
|
4772
4773
|
}),
|
|
4773
|
-
!
|
|
4774
|
-
onClick:
|
|
4774
|
+
!se && H.length >= 1 && i("button", {
|
|
4775
|
+
onClick: eo,
|
|
4775
4776
|
style: {
|
|
4776
4777
|
padding: "6px 16px",
|
|
4777
4778
|
borderRadius: 4,
|
|
@@ -4787,8 +4788,8 @@ let __tla = (async () => {
|
|
|
4787
4788
|
},
|
|
4788
4789
|
children: "Reset Points"
|
|
4789
4790
|
}),
|
|
4790
|
-
|
|
4791
|
-
onClick:
|
|
4791
|
+
se && !Pt && i("button", {
|
|
4792
|
+
onClick: so,
|
|
4792
4793
|
style: {
|
|
4793
4794
|
padding: "6px 16px",
|
|
4794
4795
|
borderRadius: 4,
|
|
@@ -4808,13 +4809,13 @@ let __tla = (async () => {
|
|
|
4808
4809
|
}),
|
|
4809
4810
|
t.showDebug && _e && e && P === "3D" && i(Ar, {
|
|
4810
4811
|
layers: Kt,
|
|
4811
|
-
onToggleLayer: (x) =>
|
|
4812
|
+
onToggleLayer: (x) => Vn((_) => ({
|
|
4812
4813
|
..._,
|
|
4813
4814
|
[x]: !_[x]
|
|
4814
4815
|
})),
|
|
4815
4816
|
isDoubleShell: Z
|
|
4816
4817
|
}),
|
|
4817
|
-
|
|
4818
|
+
se && G.length > 0 && S("div", {
|
|
4818
4819
|
style: {
|
|
4819
4820
|
position: "absolute",
|
|
4820
4821
|
top: 16,
|
|
@@ -4824,7 +4825,7 @@ let __tla = (async () => {
|
|
|
4824
4825
|
zIndex: 10
|
|
4825
4826
|
},
|
|
4826
4827
|
children: [
|
|
4827
|
-
|
|
4828
|
+
S("div", {
|
|
4828
4829
|
style: {
|
|
4829
4830
|
display: "flex",
|
|
4830
4831
|
borderRadius: 6,
|
|
@@ -4864,7 +4865,7 @@ let __tla = (async () => {
|
|
|
4864
4865
|
})
|
|
4865
4866
|
]
|
|
4866
4867
|
}),
|
|
4867
|
-
|
|
4868
|
+
S("div", {
|
|
4868
4869
|
style: {
|
|
4869
4870
|
display: "flex",
|
|
4870
4871
|
borderRadius: 6,
|
|
@@ -4904,7 +4905,7 @@ let __tla = (async () => {
|
|
|
4904
4905
|
})
|
|
4905
4906
|
]
|
|
4906
4907
|
}),
|
|
4907
|
-
t.showSpacingToggle && P === "3D" &&
|
|
4908
|
+
t.showSpacingToggle && P === "3D" && S("div", {
|
|
4908
4909
|
style: {
|
|
4909
4910
|
display: "flex",
|
|
4910
4911
|
borderRadius: 6,
|
|
@@ -4944,7 +4945,7 @@ let __tla = (async () => {
|
|
|
4944
4945
|
})
|
|
4945
4946
|
]
|
|
4946
4947
|
}),
|
|
4947
|
-
P === "3D" &&
|
|
4948
|
+
P === "3D" && ve && i("div", {
|
|
4948
4949
|
style: {
|
|
4949
4950
|
display: "flex",
|
|
4950
4951
|
borderRadius: 6,
|
|
@@ -4957,9 +4958,9 @@ let __tla = (async () => {
|
|
|
4957
4958
|
style: {
|
|
4958
4959
|
padding: "6px 14px",
|
|
4959
4960
|
fontSize: 13,
|
|
4960
|
-
fontWeight:
|
|
4961
|
-
backgroundColor:
|
|
4962
|
-
color:
|
|
4961
|
+
fontWeight: qe ? 600 : 400,
|
|
4962
|
+
backgroundColor: qe ? "rgb(12, 67, 173)" : "#fff",
|
|
4963
|
+
color: qe ? "#fff" : "#666",
|
|
4963
4964
|
border: "none",
|
|
4964
4965
|
cursor: "pointer",
|
|
4965
4966
|
fontFamily: "system-ui, sans-serif"
|
|
@@ -4977,7 +4978,7 @@ let __tla = (async () => {
|
|
|
4977
4978
|
},
|
|
4978
4979
|
children: i("button", {
|
|
4979
4980
|
onClick: async () => {
|
|
4980
|
-
const x = await
|
|
4981
|
+
const x = await Je();
|
|
4981
4982
|
if (!x) return;
|
|
4982
4983
|
const _ = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), W = (R, xe) => {
|
|
4983
4984
|
const N = document.createElement("a");
|
|
@@ -5007,7 +5008,7 @@ let __tla = (async () => {
|
|
|
5007
5008
|
boxShadow: "0 2px 8px rgba(0,0,0,0.1)"
|
|
5008
5009
|
},
|
|
5009
5010
|
children: i("button", {
|
|
5010
|
-
onClick: () =>
|
|
5011
|
+
onClick: () => Nn((x) => !x),
|
|
5011
5012
|
style: {
|
|
5012
5013
|
padding: "6px 14px",
|
|
5013
5014
|
fontSize: 13,
|
|
@@ -5023,15 +5024,15 @@ let __tla = (async () => {
|
|
|
5023
5024
|
})
|
|
5024
5025
|
]
|
|
5025
5026
|
}),
|
|
5026
|
-
e &&
|
|
5027
|
+
e && ne && i(er, {
|
|
5027
5028
|
wasAutoScaled: ce,
|
|
5028
5029
|
onDismiss: () => J(false)
|
|
5029
5030
|
}),
|
|
5030
|
-
e && fe &&
|
|
5031
|
+
e && fe && se && i(tr, {
|
|
5031
5032
|
isDoubleShell: Z,
|
|
5032
|
-
onDismiss: () =>
|
|
5033
|
+
onDismiss: () => oe(false)
|
|
5033
5034
|
}),
|
|
5034
|
-
s &&
|
|
5035
|
+
s && se && i("div", {
|
|
5035
5036
|
className: "gm-action-row-container",
|
|
5036
5037
|
style: {
|
|
5037
5038
|
position: "absolute",
|
|
@@ -5042,14 +5043,13 @@ let __tla = (async () => {
|
|
|
5042
5043
|
containerType: "inline-size",
|
|
5043
5044
|
pointerEvents: "none"
|
|
5044
5045
|
},
|
|
5045
|
-
children:
|
|
5046
|
+
children: S("div", {
|
|
5046
5047
|
className: "gm-action-row",
|
|
5047
5048
|
style: {
|
|
5048
5049
|
display: "flex",
|
|
5049
|
-
|
|
5050
|
-
alignItems: "
|
|
5051
|
-
|
|
5052
|
-
gap: 12,
|
|
5050
|
+
flexDirection: "column",
|
|
5051
|
+
alignItems: "flex-end",
|
|
5052
|
+
gap: 8,
|
|
5053
5053
|
pointerEvents: "none"
|
|
5054
5054
|
},
|
|
5055
5055
|
children: [
|
|
@@ -5066,7 +5066,7 @@ let __tla = (async () => {
|
|
|
5066
5066
|
.gm-btn-ghost:hover:not(:disabled) { color: rgb(10, 55, 145); }
|
|
5067
5067
|
.gm-btn-group { pointer-events: auto; display: inline-flex; flex-wrap: wrap; gap: 8px; padding: 8px; background-color: rgba(255,255,255,0.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border: 1px solid rgba(0,0,0,0.06); border-radius: 12px; box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
|
|
5068
5068
|
@container (max-width: 720px) {
|
|
5069
|
-
.gm-action-row {
|
|
5069
|
+
.gm-action-row { align-items: stretch; gap: 8px; }
|
|
5070
5070
|
.gm-action-row > * { width: 100%; }
|
|
5071
5071
|
.gm-btn-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 8px; }
|
|
5072
5072
|
.gm-btn-group .gm-btn { width: 100%; justify-content: center; padding: 12px 14px; }
|
|
@@ -5079,26 +5079,26 @@ let __tla = (async () => {
|
|
|
5079
5079
|
}
|
|
5080
5080
|
`
|
|
5081
5081
|
}),
|
|
5082
|
-
|
|
5083
|
-
className: "gm-btn gm-btn-ghost",
|
|
5084
|
-
disabled: Be,
|
|
5085
|
-
onClick: () => lt(true),
|
|
5086
|
-
children: "Have Galileo Check My Measurements"
|
|
5087
|
-
}),
|
|
5088
|
-
v("div", {
|
|
5082
|
+
S("div", {
|
|
5089
5083
|
className: "gm-btn-group",
|
|
5090
5084
|
children: [
|
|
5091
|
-
|
|
5085
|
+
i("button", {
|
|
5086
|
+
className: "gm-btn gm-btn-secondary",
|
|
5087
|
+
disabled: Be,
|
|
5088
|
+
onClick: () => lt(true),
|
|
5089
|
+
children: "Have Galileo Check My Measurements"
|
|
5090
|
+
}),
|
|
5091
|
+
Pt && !it && i("button", {
|
|
5092
5092
|
className: "gm-btn gm-btn-secondary",
|
|
5093
|
-
onClick: () =>
|
|
5093
|
+
onClick: () => Ue(true),
|
|
5094
5094
|
children: "Edit Measurements"
|
|
5095
5095
|
}),
|
|
5096
|
-
Pt && (
|
|
5096
|
+
Pt && (ao ? i("button", {
|
|
5097
5097
|
className: "gm-btn gm-btn-primary",
|
|
5098
5098
|
disabled: Be,
|
|
5099
5099
|
onClick: () => Tt("continue"),
|
|
5100
5100
|
children: "Continue \u2192"
|
|
5101
|
-
}) :
|
|
5101
|
+
}) : S(Ie, {
|
|
5102
5102
|
children: [
|
|
5103
5103
|
i("button", {
|
|
5104
5104
|
className: "gm-btn gm-btn-secondary",
|
|
@@ -5123,7 +5123,7 @@ let __tla = (async () => {
|
|
|
5123
5123
|
})
|
|
5124
5124
|
]
|
|
5125
5125
|
}),
|
|
5126
|
-
Be &&
|
|
5126
|
+
Be && S("div", {
|
|
5127
5127
|
"data-finalizing-overlay": true,
|
|
5128
5128
|
style: {
|
|
5129
5129
|
position: "absolute",
|
|
@@ -5162,7 +5162,7 @@ let __tla = (async () => {
|
|
|
5162
5162
|
})
|
|
5163
5163
|
]
|
|
5164
5164
|
}),
|
|
5165
|
-
l && _t.length > 0 &&
|
|
5165
|
+
l && _t.length > 0 && S("div", {
|
|
5166
5166
|
style: {
|
|
5167
5167
|
height: 120,
|
|
5168
5168
|
flexShrink: 0,
|
|
@@ -5175,7 +5175,7 @@ let __tla = (async () => {
|
|
|
5175
5175
|
flexDirection: "column"
|
|
5176
5176
|
},
|
|
5177
5177
|
children: [
|
|
5178
|
-
|
|
5178
|
+
S("div", {
|
|
5179
5179
|
style: {
|
|
5180
5180
|
display: "flex",
|
|
5181
5181
|
alignItems: "center",
|
|
@@ -5195,25 +5195,25 @@ let __tla = (async () => {
|
|
|
5195
5195
|
},
|
|
5196
5196
|
children: "GALILEO DEBUG"
|
|
5197
5197
|
}),
|
|
5198
|
-
|
|
5198
|
+
S("div", {
|
|
5199
5199
|
style: {
|
|
5200
5200
|
display: "flex",
|
|
5201
5201
|
gap: 8,
|
|
5202
5202
|
alignItems: "center"
|
|
5203
5203
|
},
|
|
5204
5204
|
children: [
|
|
5205
|
-
|
|
5205
|
+
S("span", {
|
|
5206
5206
|
style: {
|
|
5207
5207
|
color: "#484f58",
|
|
5208
5208
|
fontSize: 9
|
|
5209
5209
|
},
|
|
5210
5210
|
children: [
|
|
5211
5211
|
"WASM ",
|
|
5212
|
-
|
|
5212
|
+
Ne.current ? "v2" : "N/A",
|
|
5213
5213
|
" | ",
|
|
5214
5214
|
H.length,
|
|
5215
5215
|
" pts | ",
|
|
5216
|
-
|
|
5216
|
+
se ? "aligned" : "unaligned",
|
|
5217
5217
|
" | ",
|
|
5218
5218
|
G.length,
|
|
5219
5219
|
" slices"
|
|
@@ -5259,7 +5259,7 @@ let __tla = (async () => {
|
|
|
5259
5259
|
})
|
|
5260
5260
|
]
|
|
5261
5261
|
}),
|
|
5262
|
-
|
|
5262
|
+
jn && i(dr, {
|
|
5263
5263
|
onSkip: ln,
|
|
5264
5264
|
onCancel: () => lt(false)
|
|
5265
5265
|
})
|
|
@@ -5273,7 +5273,7 @@ let __tla = (async () => {
|
|
|
5273
5273
|
t
|
|
5274
5274
|
]), null;
|
|
5275
5275
|
}
|
|
5276
|
-
|
|
5276
|
+
On = function(t) {
|
|
5277
5277
|
const r = t === "AK" ? 2 : 1, n = [];
|
|
5278
5278
|
for (let o = 2; o >= 1; o -= r) n.push(`${o}_above`);
|
|
5279
5279
|
n.push("at_ref");
|
|
@@ -5293,7 +5293,7 @@ let __tla = (async () => {
|
|
|
5293
5293
|
return n;
|
|
5294
5294
|
};
|
|
5295
5295
|
yt = function(t, r) {
|
|
5296
|
-
const n =
|
|
5296
|
+
const n = On(r), o = {};
|
|
5297
5297
|
for (let s = 0; s < Math.min(t.length, n.length); s++) {
|
|
5298
5298
|
const l = t[s];
|
|
5299
5299
|
l != null && !isNaN(l) && (o[n[s]] = l);
|
|
@@ -5302,7 +5302,7 @@ let __tla = (async () => {
|
|
|
5302
5302
|
};
|
|
5303
5303
|
Fr = function(t, r) {
|
|
5304
5304
|
if (!t) return;
|
|
5305
|
-
const o =
|
|
5305
|
+
const o = On(r).map((s) => {
|
|
5306
5306
|
const l = t[s];
|
|
5307
5307
|
return l ?? void 0;
|
|
5308
5308
|
});
|
|
@@ -5401,8 +5401,8 @@ let __tla = (async () => {
|
|
|
5401
5401
|
f = yt(e.formMeasurements, t.spacing_type);
|
|
5402
5402
|
const y = e.scanMeasurements.map((F, A) => {
|
|
5403
5403
|
var _a2;
|
|
5404
|
-
const
|
|
5405
|
-
return
|
|
5404
|
+
const v = (_a2 = e.formMeasurements) == null ? void 0 : _a2[A];
|
|
5405
|
+
return v == null || isNaN(v) ? null : +((F.modifiedValue ?? F.originalValue) - v).toFixed(1);
|
|
5406
5406
|
});
|
|
5407
5407
|
u = yt(y, t.spacing_type);
|
|
5408
5408
|
}
|
|
@@ -5481,5 +5481,5 @@ export {
|
|
|
5481
5481
|
__tla,
|
|
5482
5482
|
yt as a,
|
|
5483
5483
|
Fr as c,
|
|
5484
|
-
|
|
5484
|
+
On as g
|
|
5485
5485
|
};
|