quantum-component-library 1.4.49 → 1.4.50-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs +1 -1
- package/dist/components.js +1564 -1282
- package/dist/{dnd-core-vendor-gqRN0Czq.cjs → dnd-core-vendor-BtUZf9Ev.cjs} +1 -1
- package/dist/{dnd-core-vendor-CEbjUoFs.js → dnd-core-vendor-DLG1XK6O.js} +2 -2
- package/dist/generated/gql.d.ts +12 -2
- package/dist/generated/graphql.d.ts +69 -9
- package/dist/generated-graphql.cjs +1 -1
- package/dist/generated-graphql.js +60 -57
- package/dist/generated.cjs +1 -1
- package/dist/generated.js +45 -43
- package/dist/graphql/fragments/reports.d.ts +2 -0
- package/dist/{graphql-_vGi4u4K.js → graphql-BIKiRJ8I.js} +35 -16
- package/dist/{graphql-Ce2MNCsk.cjs → graphql-BhVmuiCG.cjs} +33 -16
- package/dist/{graphql-vendor-AFHxLsy8.cjs → graphql-vendor-BYC3nhzS.cjs} +1 -1
- package/dist/{graphql-vendor-hJezYUeG.js → graphql-vendor-N74bYJtL.js} +1 -1
- package/dist/hooks.cjs +1 -1
- package/dist/hooks.js +126 -74
- package/dist/index.cjs +1 -1
- package/dist/index.js +133 -131
- package/dist/lib/hooks/index.d.ts +1 -0
- package/dist/lib/hooks/use-all-part-parameters.d.ts +9 -0
- package/dist/lib/services/human.d.ts +2 -1
- package/dist/lib/types/parameters.d.ts +3 -0
- package/dist/{lodash-vendor-CF0pV_0E.cjs → lodash-vendor-C3e6C_PJ.cjs} +1 -1
- package/dist/{lodash-vendor-apNdTTav.js → lodash-vendor-l9HldpVa.js} +1 -1
- package/dist/{other-D9ROT7p0.js → other-DE6uy3y4.js} +3 -3
- package/dist/{other-DyoApG-9.cjs → other-q0es350N.cjs} +1 -1
- package/dist/providers.cjs +1 -1
- package/dist/providers.js +1 -1
- package/dist/quantum-component-library.css +1 -1
- package/dist/{react-dnd-vendor-BCrg2QCX.js → react-dnd-vendor-BDOGawvX.js} +2 -2
- package/dist/{react-dnd-vendor-PwwXhPmK.cjs → react-dnd-vendor-BGRUqrp9.cjs} +1 -1
- package/dist/{react-select-vendor-BxbsY5Z-.js → react-select-vendor-C3wpaSL1.js} +1 -1
- package/dist/{react-select-vendor-BeWvSe2q.cjs → react-select-vendor-CZ69mhgt.cjs} +1 -1
- package/dist/services-human-CGLf7B6Q.cjs +1 -0
- package/dist/{services-human-B98qxeuS.js → services-human-CI19qLdG.js} +165 -157
- package/dist/services.cjs +1 -1
- package/dist/services.js +29 -28
- package/dist/types.cjs +1 -1
- package/dist/types.js +53 -53
- package/dist/{utils-conversion-CWypeWsT.cjs → utils-conversion-sLq5wEdq.cjs} +1 -1
- package/dist/{utils-conversion-ChFbq8I2.js → utils-conversion-zKwO4dYF.js} +1 -1
- package/dist/{utils-parameters-BBFuBK2B.js → utils-parameters-DkefNhWo.js} +4 -4
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +2 -2
- package/dist/{vendor-BOD7IxCS.js → vendor--D-cya0B.js} +1 -1
- package/dist/{vendor-IPtJZCbx.cjs → vendor-jpI6KZW2.cjs} +1 -1
- package/package.json +1 -1
- package/dist/services-human-CnvSTmoF.cjs +0 -1
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { axes as
|
|
1
|
+
import { axes as x, planes as w, AngleDataSource as l, limbAngle as F, jointAngle as b } from "./types.js";
|
|
2
|
+
import { SensorLocation as n } from "./generated-graphql.js";
|
|
2
3
|
import { r as p } from "./services-rom-omMeC-vQ.js";
|
|
3
4
|
import "./moment-vendor-DMLRxgRE.js";
|
|
4
|
-
import { m as
|
|
5
|
+
import { m as h } from "./utils-memo-DtXdOqCT.js";
|
|
5
6
|
import { c as L } from "./utils-text-CN3zLiZ7.js";
|
|
6
|
-
const
|
|
7
|
+
const o = {
|
|
7
8
|
LeftFoot: "Left Foot",
|
|
8
9
|
RightFoot: "Right Foot",
|
|
9
10
|
LeftShank: "Left Shank",
|
|
@@ -22,7 +23,7 @@ const i = {
|
|
|
22
23
|
RightUpperArm: "Right Upper Arm",
|
|
23
24
|
LeftForearm: "Left Forearm",
|
|
24
25
|
RightForearm: "Right Forearm"
|
|
25
|
-
},
|
|
26
|
+
}, i = {
|
|
26
27
|
LeftAnkle: "Left Ankle",
|
|
27
28
|
RightAnkle: "Right Ankle",
|
|
28
29
|
LeftKnee: "Left Knee",
|
|
@@ -37,7 +38,7 @@ const i = {
|
|
|
37
38
|
LeftElbow: "Left Elbow",
|
|
38
39
|
RightElbow: "Right Elbow",
|
|
39
40
|
Neck: "Neck"
|
|
40
|
-
},
|
|
41
|
+
}, te = {
|
|
41
42
|
LeftFoot: ["LeftAnkle"],
|
|
42
43
|
RightFoot: ["RightAnkle"],
|
|
43
44
|
LeftShank: ["LeftKnee", "LeftAnkle"],
|
|
@@ -56,7 +57,7 @@ const i = {
|
|
|
56
57
|
RightUpperArm: ["RightShoulder", "RightElbow"],
|
|
57
58
|
LeftForearm: ["LeftElbow"],
|
|
58
59
|
RightForearm: ["RightElbow"]
|
|
59
|
-
},
|
|
60
|
+
}, k = {
|
|
60
61
|
LeftAnkle: ["LeftFoot", "LeftShank"],
|
|
61
62
|
RightAnkle: ["RightFoot", "RightShank"],
|
|
62
63
|
LeftKnee: ["LeftShank", "LeftThigh"],
|
|
@@ -71,84 +72,84 @@ const i = {
|
|
|
71
72
|
LeftElbow: ["LeftUpperArm", "LeftForearm"],
|
|
72
73
|
RightElbow: ["RightUpperArm", "RightForearm"],
|
|
73
74
|
Neck: ["Head", "UpperBack"]
|
|
74
|
-
},
|
|
75
|
-
{ id: "LeftFoot", name:
|
|
76
|
-
{ id: "RightFoot", name:
|
|
77
|
-
{ id: "LeftShank", name:
|
|
78
|
-
{ id: "RightShank", name:
|
|
79
|
-
{ id: "LeftThigh", name:
|
|
80
|
-
{ id: "RightThigh", name:
|
|
75
|
+
}, S = () => [
|
|
76
|
+
{ id: "LeftFoot", name: o.LeftFoot },
|
|
77
|
+
{ id: "RightFoot", name: o.RightFoot },
|
|
78
|
+
{ id: "LeftShank", name: o.LeftShank },
|
|
79
|
+
{ id: "RightShank", name: o.RightShank },
|
|
80
|
+
{ id: "LeftThigh", name: o.LeftThigh },
|
|
81
|
+
{ id: "RightThigh", name: o.RightThigh },
|
|
81
82
|
// { id: 'LeftPelvis', name: limbNames.LeftPelvis },
|
|
82
83
|
// { id: 'RightPelvis', name: limbNames.RightPelvis },
|
|
83
|
-
{ id: "LowerBack", name:
|
|
84
|
-
{ id: "CenterBack", name:
|
|
85
|
-
{ id: "UpperBack", name:
|
|
86
|
-
{ id: "Head", name:
|
|
84
|
+
{ id: "LowerBack", name: o.LowerBack },
|
|
85
|
+
{ id: "CenterBack", name: o.CenterBack },
|
|
86
|
+
{ id: "UpperBack", name: o.UpperBack },
|
|
87
|
+
{ id: "Head", name: o.Head },
|
|
87
88
|
// { id: 'LeftClavicle', name: limbNames.LeftClavicle },
|
|
88
89
|
// { id: 'RightClavicle', name: limbNames.RightClavicle },
|
|
89
|
-
{ id: "LeftUpperArm", name:
|
|
90
|
-
{ id: "RightUpperArm", name:
|
|
91
|
-
{ id: "LeftForearm", name:
|
|
92
|
-
{ id: "RightForearm", name:
|
|
93
|
-
],
|
|
94
|
-
{ id: "LeftAnkle", name:
|
|
95
|
-
{ id: "RightAnkle", name:
|
|
96
|
-
{ id: "LeftKnee", name:
|
|
97
|
-
{ id: "RightKnee", name:
|
|
98
|
-
{ id: "LeftHip", name:
|
|
99
|
-
{ id: "RightHip", name:
|
|
100
|
-
{ id: "NavalSpine", name:
|
|
101
|
-
{ id: "ChestSpine", name:
|
|
102
|
-
{ id: "TotalSpine", name:
|
|
103
|
-
{ id: "LeftShoulder", name:
|
|
104
|
-
{ id: "RightShoulder", name:
|
|
105
|
-
{ id: "LeftElbow", name:
|
|
106
|
-
{ id: "RightElbow", name:
|
|
107
|
-
{ id: "Neck", name:
|
|
108
|
-
],
|
|
109
|
-
{ id: "LeftAnkle", name:
|
|
110
|
-
{ id: "RightAnkle", name:
|
|
111
|
-
{ id: "LeftKnee", name:
|
|
112
|
-
{ id: "RightKnee", name:
|
|
113
|
-
{ id: "LeftHip", name:
|
|
114
|
-
{ id: "RightHip", name:
|
|
115
|
-
{ id: "NavalSpine", name:
|
|
116
|
-
{ id: "ChestSpine", name:
|
|
117
|
-
{ id: "TotalSpine", name:
|
|
118
|
-
{ id: "LeftShoulder", name:
|
|
119
|
-
{ id: "RightShoulder", name:
|
|
90
|
+
{ id: "LeftUpperArm", name: o.LeftUpperArm },
|
|
91
|
+
{ id: "RightUpperArm", name: o.RightUpperArm },
|
|
92
|
+
{ id: "LeftForearm", name: o.LeftForearm },
|
|
93
|
+
{ id: "RightForearm", name: o.RightForearm }
|
|
94
|
+
], ae = (t) => S().filter((e) => t.find((a) => a == e.id)), v = () => [
|
|
95
|
+
{ id: "LeftAnkle", name: i.LeftAnkle },
|
|
96
|
+
{ id: "RightAnkle", name: i.RightAnkle },
|
|
97
|
+
{ id: "LeftKnee", name: i.LeftKnee },
|
|
98
|
+
{ id: "RightKnee", name: i.RightKnee },
|
|
99
|
+
{ id: "LeftHip", name: i.LeftHip },
|
|
100
|
+
{ id: "RightHip", name: i.RightHip },
|
|
101
|
+
{ id: "NavalSpine", name: i.NavalSpine },
|
|
102
|
+
{ id: "ChestSpine", name: i.ChestSpine },
|
|
103
|
+
{ id: "TotalSpine", name: i.TotalSpine },
|
|
104
|
+
{ id: "LeftShoulder", name: i.LeftShoulder },
|
|
105
|
+
{ id: "RightShoulder", name: i.RightShoulder },
|
|
106
|
+
{ id: "LeftElbow", name: i.LeftElbow },
|
|
107
|
+
{ id: "RightElbow", name: i.RightElbow },
|
|
108
|
+
{ id: "Neck", name: i.Neck }
|
|
109
|
+
], T = () => [
|
|
110
|
+
{ id: "LeftAnkle", name: i.LeftAnkle },
|
|
111
|
+
{ id: "RightAnkle", name: i.RightAnkle },
|
|
112
|
+
{ id: "LeftKnee", name: i.LeftKnee },
|
|
113
|
+
{ id: "RightKnee", name: i.RightKnee },
|
|
114
|
+
{ id: "LeftHip", name: i.LeftHip },
|
|
115
|
+
{ id: "RightHip", name: i.RightHip },
|
|
116
|
+
{ id: "NavalSpine", name: i.NavalSpine },
|
|
117
|
+
{ id: "ChestSpine", name: i.ChestSpine },
|
|
118
|
+
{ id: "TotalSpine", name: i.TotalSpine },
|
|
119
|
+
{ id: "LeftShoulder", name: i.LeftShoulder },
|
|
120
|
+
{ id: "RightShoulder", name: i.RightShoulder },
|
|
120
121
|
// TODO: Left & Right elbow hidden while validation is being done
|
|
121
122
|
// { id: 'LeftElbow', name: jointNames.LeftElbow },
|
|
122
123
|
// { id: 'RightElbow', name: jointNames.RightElbow },
|
|
123
|
-
{ id: "Neck", name:
|
|
124
|
+
{ id: "Neck", name: i.Neck }
|
|
124
125
|
], E = () => [
|
|
125
|
-
{ id: "LeftAnkle", name:
|
|
126
|
-
{ id: "RightAnkle", name:
|
|
127
|
-
{ id: "LeftKnee", name:
|
|
128
|
-
{ id: "RightKnee", name:
|
|
129
|
-
{ id: "LeftHip", name:
|
|
130
|
-
{ id: "RightHip", name:
|
|
131
|
-
{ id: "TotalSpine", name:
|
|
132
|
-
{ id: "LeftShoulder", name:
|
|
133
|
-
{ id: "RightShoulder", name:
|
|
134
|
-
{ id: "LeftElbow", name:
|
|
135
|
-
{ id: "RightElbow", name:
|
|
136
|
-
{ id: "Neck", name:
|
|
137
|
-
],
|
|
138
|
-
{ id: "Head", name:
|
|
139
|
-
{ id: "LeftThigh", name:
|
|
140
|
-
{ id: "RightThigh", name:
|
|
141
|
-
{ id: "LeftShank", name:
|
|
142
|
-
{ id: "RightShank", name:
|
|
143
|
-
{ id: "LeftFoot", name:
|
|
144
|
-
{ id: "RightFoot", name:
|
|
145
|
-
{ id: "LowerBack", name:
|
|
146
|
-
{ id: "UpperBack", name:
|
|
147
|
-
{ id: "LeftUpperArm", name:
|
|
148
|
-
{ id: "RightUpperArm", name:
|
|
149
|
-
{ id: "LeftForearm", name:
|
|
150
|
-
{ id: "RightForearm", name:
|
|
151
|
-
],
|
|
126
|
+
{ id: "LeftAnkle", name: i.LeftAnkle },
|
|
127
|
+
{ id: "RightAnkle", name: i.RightAnkle },
|
|
128
|
+
{ id: "LeftKnee", name: i.LeftKnee },
|
|
129
|
+
{ id: "RightKnee", name: i.RightKnee },
|
|
130
|
+
{ id: "LeftHip", name: i.LeftHip },
|
|
131
|
+
{ id: "RightHip", name: i.RightHip },
|
|
132
|
+
{ id: "TotalSpine", name: i.TotalSpine },
|
|
133
|
+
{ id: "LeftShoulder", name: i.LeftShoulder },
|
|
134
|
+
{ id: "RightShoulder", name: i.RightShoulder },
|
|
135
|
+
{ id: "LeftElbow", name: i.LeftElbow },
|
|
136
|
+
{ id: "RightElbow", name: i.RightElbow },
|
|
137
|
+
{ id: "Neck", name: i.Neck }
|
|
138
|
+
], ne = () => [
|
|
139
|
+
{ id: "Head", name: o.Head },
|
|
140
|
+
{ id: "LeftThigh", name: o.LeftThigh },
|
|
141
|
+
{ id: "RightThigh", name: o.RightThigh },
|
|
142
|
+
{ id: "LeftShank", name: o.LeftShank },
|
|
143
|
+
{ id: "RightShank", name: o.RightShank },
|
|
144
|
+
{ id: "LeftFoot", name: o.LeftFoot },
|
|
145
|
+
{ id: "RightFoot", name: o.RightFoot },
|
|
146
|
+
{ id: "LowerBack", name: o.LowerBack },
|
|
147
|
+
{ id: "UpperBack", name: o.UpperBack },
|
|
148
|
+
{ id: "LeftUpperArm", name: o.LeftUpperArm },
|
|
149
|
+
{ id: "RightUpperArm", name: o.RightUpperArm },
|
|
150
|
+
{ id: "LeftForearm", name: o.LeftForearm },
|
|
151
|
+
{ id: "RightForearm", name: o.RightForearm }
|
|
152
|
+
], ie = (t) => T().filter((a) => k[a.id].every((s) => t.includes(s))), se = (t) => E().filter((a) => k[a.id].every((s) => t.includes(s))), U = (t, e, a) => {
|
|
152
153
|
if (a)
|
|
153
154
|
return ["frontal", "sagittal", "transverse"];
|
|
154
155
|
switch (t) {
|
|
@@ -157,16 +158,16 @@ const i = {
|
|
|
157
158
|
return ["sagittal"];
|
|
158
159
|
case "LeftAnkle":
|
|
159
160
|
case "RightAnkle":
|
|
160
|
-
return e && e ==
|
|
161
|
+
return e && e == l.Pose ? ["sagittal"] : ["frontal", "sagittal"];
|
|
161
162
|
case "TotalSpine":
|
|
162
|
-
return e && e ==
|
|
163
|
+
return e && e == l.Pose ? ["frontal"] : ["frontal", "sagittal", "transverse"];
|
|
163
164
|
case "LeftElbow":
|
|
164
165
|
case "RightElbow":
|
|
165
|
-
return e && e ==
|
|
166
|
+
return e && e == l.Pose ? ["sagittal"] : ["frontal", "sagittal", "transverse"];
|
|
166
167
|
}
|
|
167
|
-
return e && e ==
|
|
168
|
+
return e && e == l.Pose ? ["frontal", "sagittal"] : ["frontal", "sagittal", "transverse"];
|
|
168
169
|
}, P = (t, e) => {
|
|
169
|
-
if (e ===
|
|
170
|
+
if (e === l.Sensor)
|
|
170
171
|
return ["frontal", "sagittal", "transverse"];
|
|
171
172
|
switch (t) {
|
|
172
173
|
case "Head":
|
|
@@ -188,7 +189,7 @@ const i = {
|
|
|
188
189
|
return ["frontal", "sagittal"];
|
|
189
190
|
}
|
|
190
191
|
return [];
|
|
191
|
-
}, H =
|
|
192
|
+
}, H = h(
|
|
192
193
|
(t, e, a) => {
|
|
193
194
|
switch (t) {
|
|
194
195
|
case "LeftAnkle":
|
|
@@ -248,7 +249,7 @@ const i = {
|
|
|
248
249
|
}
|
|
249
250
|
return null;
|
|
250
251
|
}
|
|
251
|
-
),
|
|
252
|
+
), B = h(
|
|
252
253
|
(t, e, a) => {
|
|
253
254
|
switch (t) {
|
|
254
255
|
case "LeftAnkle":
|
|
@@ -308,7 +309,7 @@ const i = {
|
|
|
308
309
|
}
|
|
309
310
|
return null;
|
|
310
311
|
}
|
|
311
|
-
), u =
|
|
312
|
+
), u = h(
|
|
312
313
|
(t, e, a) => {
|
|
313
314
|
switch (t) {
|
|
314
315
|
case "LowerBack":
|
|
@@ -347,7 +348,7 @@ const i = {
|
|
|
347
348
|
return null;
|
|
348
349
|
}
|
|
349
350
|
}
|
|
350
|
-
),
|
|
351
|
+
), N = h(
|
|
351
352
|
(t, e, a) => {
|
|
352
353
|
switch (t) {
|
|
353
354
|
case "LowerBack":
|
|
@@ -386,7 +387,7 @@ const i = {
|
|
|
386
387
|
return null;
|
|
387
388
|
}
|
|
388
389
|
}
|
|
389
|
-
),
|
|
390
|
+
), re = h(
|
|
390
391
|
(t, e) => {
|
|
391
392
|
switch (t) {
|
|
392
393
|
case "LeftAnkle":
|
|
@@ -440,7 +441,7 @@ const i = {
|
|
|
440
441
|
}
|
|
441
442
|
return { min: -10, max: 10 };
|
|
442
443
|
}
|
|
443
|
-
),
|
|
444
|
+
), oe = h(
|
|
444
445
|
(t, e) => {
|
|
445
446
|
switch (t) {
|
|
446
447
|
case "LeftFoot":
|
|
@@ -513,7 +514,7 @@ const i = {
|
|
|
513
514
|
}
|
|
514
515
|
return { min: -10, max: 10 };
|
|
515
516
|
}
|
|
516
|
-
),
|
|
517
|
+
), ce = h(
|
|
517
518
|
(t, e) => {
|
|
518
519
|
switch (t) {
|
|
519
520
|
case "LeftAnkle":
|
|
@@ -577,28 +578,28 @@ const i = {
|
|
|
577
578
|
return { min: -180, max: 180 };
|
|
578
579
|
}
|
|
579
580
|
}
|
|
580
|
-
),
|
|
581
|
+
), K = (t, e) => ({
|
|
581
582
|
kind: "joint",
|
|
582
583
|
value: t,
|
|
583
584
|
plane: e
|
|
584
|
-
}),
|
|
585
|
+
}), C = (t, e) => ({
|
|
585
586
|
kind: "limb",
|
|
586
587
|
value: t,
|
|
587
588
|
plane: e
|
|
588
|
-
}),
|
|
589
|
+
}), j = (t, e) => ({
|
|
589
590
|
kind: "acceleration",
|
|
590
591
|
value: t,
|
|
591
592
|
axis: e
|
|
592
|
-
}),
|
|
593
|
+
}), J = (t, e) => ({
|
|
593
594
|
kind: "angular_velocity",
|
|
594
595
|
value: t,
|
|
595
596
|
plane: e
|
|
596
|
-
}),
|
|
597
|
+
}), y = (t) => x.includes(t), le = (t) => w.includes(t), $ = (t) => typeof t == "object" && t !== null && "id" in t && "name" in t && !!S().find((e) => e.id === t.id), D = (t) => typeof t == "object" && t !== null && "id" in t && "name" in t && !!v().find((e) => e.id === t.id), he = (t, e, a = !1) => y(e) ? $(t) ? j(t, e) : z(
|
|
597
598
|
`Can't make acceleration part from joint: ${t} ${e}`
|
|
598
|
-
) :
|
|
599
|
+
) : D(t) ? a ? J(t, e) : K(t, e) : C(t, e), me = (t) => t.kind === "acceleration" ? t.axis : t.plane, fe = (t) => t?.kind === "acceleration" ? t.axis : null, ge = (t) => t?.kind === "acceleration" ? null : t?.plane ?? null, z = (t) => {
|
|
599
600
|
throw new Error(t);
|
|
600
|
-
},
|
|
601
|
-
if (!
|
|
601
|
+
}, d = (t) => t in i ? i[t] : t in o ? o[t] : "Unknown", de = (t) => d(t).replace(/Left|Right/g, ""), _ = (t) => t in p, W = (t, e) => {
|
|
602
|
+
if (!_(t))
|
|
602
603
|
return null;
|
|
603
604
|
const a = p[t];
|
|
604
605
|
if (e in a) {
|
|
@@ -609,22 +610,22 @@ const i = {
|
|
|
609
610
|
};
|
|
610
611
|
}
|
|
611
612
|
return null;
|
|
612
|
-
},
|
|
613
|
-
const e =
|
|
613
|
+
}, ue = (...t) => {
|
|
614
|
+
const e = W(...t);
|
|
614
615
|
return e ? Math.abs(e.max - e.min) : 0;
|
|
615
616
|
}, I = (t, e) => {
|
|
616
|
-
const a = Object.keys(
|
|
617
|
-
return !a && !r ? null : a ? t.limbs[e].sensor_angle ?
|
|
618
|
-
}, ue = (t, e, a) => {
|
|
619
|
-
const r = Object.keys(n).find((o) => o === e), s = I(t, e);
|
|
620
|
-
return s ? r ? T(e, s).includes(a) : P(e, s).includes(a) : !1;
|
|
617
|
+
const a = Object.keys(o).find((s) => s === e), r = Object.keys(i).find((s) => s === e);
|
|
618
|
+
return !a && !r ? null : a ? t.limbs[e].sensor_angle ? l.Sensor : l.Pose : t.joints[e].sensor_angle ? l.Sensor : l.Pose;
|
|
621
619
|
}, Le = (t, e, a) => {
|
|
622
|
-
const r = Object.keys(i).find((
|
|
620
|
+
const r = Object.keys(i).find((c) => c === e), s = I(t, e);
|
|
621
|
+
return s ? r ? U(e, s).includes(a) : P(e, s).includes(a) : !1;
|
|
622
|
+
}, Re = (t, e, a) => {
|
|
623
|
+
const r = Object.keys(o).find((c) => c === e), s = Object.keys(i).find((c) => c === e);
|
|
623
624
|
if (!r && !s)
|
|
624
625
|
throw new Error(
|
|
625
626
|
`Unknown partId: ${e} - this invariant should've been enforced by typescript`
|
|
626
627
|
);
|
|
627
|
-
return r ?
|
|
628
|
+
return r ? F(t.limbs[e])?.[a] ?? null : b(
|
|
628
629
|
t.joints[e],
|
|
629
630
|
void 0,
|
|
630
631
|
t.direction
|
|
@@ -695,13 +696,13 @@ const i = {
|
|
|
695
696
|
}
|
|
696
697
|
}
|
|
697
698
|
}, O = (t, e, a = !1) => {
|
|
698
|
-
const r =
|
|
699
|
-
if (s &&
|
|
700
|
-
const
|
|
699
|
+
const r = d(t), s = u(t, e, 1), c = u(t, e, -1);
|
|
700
|
+
if (s && c) {
|
|
701
|
+
const m = L(s), f = L(c), A = a ? `${f}/${m}` : `${m}/${f}`;
|
|
701
702
|
return `${r} (${A})`;
|
|
702
703
|
}
|
|
703
704
|
return `${r} (${e})`;
|
|
704
|
-
},
|
|
705
|
+
}, pe = (t, e) => {
|
|
705
706
|
let a;
|
|
706
707
|
switch (e) {
|
|
707
708
|
case "x":
|
|
@@ -713,23 +714,23 @@ const i = {
|
|
|
713
714
|
case "z":
|
|
714
715
|
a = "Ant./Post.";
|
|
715
716
|
}
|
|
716
|
-
return `${
|
|
717
|
+
return `${d(t)} ${a}`;
|
|
717
718
|
}, V = (t, e, a = !1) => {
|
|
718
|
-
const r =
|
|
719
|
+
const r = d(t), s = M(t, e, a);
|
|
719
720
|
return s ? `${r} (${s})` : null;
|
|
720
|
-
},
|
|
721
|
-
const s = r ?
|
|
721
|
+
}, ke = (t, e) => V(t, e) || O(t, e), R = (t, e, a, r = !1) => {
|
|
722
|
+
const s = r ? B : H, c = r ? N : u, [m, f] = t === "joint" ? [
|
|
722
723
|
s(e, a, 1),
|
|
723
724
|
s(e, a, -1)
|
|
724
725
|
] : [
|
|
725
|
-
|
|
726
|
-
|
|
726
|
+
c(e, a, 1),
|
|
727
|
+
c(e, a, -1)
|
|
727
728
|
];
|
|
728
729
|
return {
|
|
729
|
-
positive:
|
|
730
|
-
negative:
|
|
730
|
+
positive: m,
|
|
731
|
+
negative: f
|
|
731
732
|
};
|
|
732
|
-
},
|
|
733
|
+
}, q = (t, e = !1) => t.partKind === "joint" ? R(
|
|
733
734
|
"joint",
|
|
734
735
|
t.partId,
|
|
735
736
|
t.partDimension,
|
|
@@ -739,60 +740,67 @@ const i = {
|
|
|
739
740
|
t.partId,
|
|
740
741
|
t.partDimension,
|
|
741
742
|
e
|
|
742
|
-
),
|
|
743
|
-
const { positive: r, negative: s } =
|
|
743
|
+
), Se = (t, e, a = !1) => {
|
|
744
|
+
const { positive: r, negative: s } = q(
|
|
744
745
|
e,
|
|
745
746
|
a
|
|
746
747
|
);
|
|
747
748
|
return t >= 0 ? r : s;
|
|
749
|
+
}, Ae = (t) => {
|
|
750
|
+
const e = /* @__PURE__ */ new Set();
|
|
751
|
+
return t.forEach((a) => {
|
|
752
|
+
const r = a.includes("Left"), s = a.includes("Right");
|
|
753
|
+
a.includes("Knee") ? r ? (e.add(n.LeftThigh), e.add(n.LeftShank)) : s ? (e.add(n.RightThigh), e.add(n.RightShank)) : (e.add(n.LeftThigh), e.add(n.RightThigh), e.add(n.LeftShank), e.add(n.RightShank)) : a.includes("Hip") ? (e.add(n.Pelvis), r ? e.add(n.LeftThigh) : s ? e.add(n.RightThigh) : (e.add(n.LeftThigh), e.add(n.RightThigh))) : a.includes("Ankle") ? r ? (e.add(n.LeftShank), e.add(n.LeftFoot)) : s ? (e.add(n.RightShank), e.add(n.RightFoot)) : (e.add(n.LeftShank), e.add(n.RightShank), e.add(n.LeftFoot), e.add(n.RightFoot)) : a.includes("Shoulder") ? (e.add(n.Thorax), r ? e.add(n.LeftUpperArm) : s ? e.add(n.RightUpperArm) : (e.add(n.LeftUpperArm), e.add(n.RightUpperArm))) : a.includes("Elbow") && (r ? (e.add(n.LeftUpperArm), e.add(n.LeftForearm)) : s ? (e.add(n.RightUpperArm), e.add(n.RightForearm)) : (e.add(n.LeftUpperArm), e.add(n.RightUpperArm), e.add(n.LeftForearm), e.add(n.RightForearm))), a.includes("Thigh") ? r ? e.add(n.LeftThigh) : s ? e.add(n.RightThigh) : (e.add(n.LeftThigh), e.add(n.RightThigh)) : a.includes("Shank") ? r ? e.add(n.LeftShank) : s ? e.add(n.RightShank) : (e.add(n.LeftShank), e.add(n.RightShank)) : a.includes("Foot") ? r ? e.add(n.LeftFoot) : s ? e.add(n.RightFoot) : (e.add(n.LeftFoot), e.add(n.RightFoot)) : a.includes("UpperArm") ? r ? e.add(n.LeftUpperArm) : s ? e.add(n.RightUpperArm) : (e.add(n.LeftUpperArm), e.add(n.RightUpperArm)) : a.includes("Forearm") ? r ? e.add(n.LeftForearm) : s ? e.add(n.RightForearm) : (e.add(n.LeftForearm), e.add(n.RightForearm)) : a.includes("Back") && (e.add(n.Thorax), e.add(n.CenterBack));
|
|
754
|
+
}), Array.from(e);
|
|
748
755
|
};
|
|
749
756
|
export {
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
757
|
+
C as A,
|
|
758
|
+
j as B,
|
|
759
|
+
J as C,
|
|
753
760
|
y as D,
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
761
|
+
le as E,
|
|
762
|
+
$ as F,
|
|
763
|
+
D as G,
|
|
757
764
|
he as H,
|
|
758
765
|
me as I,
|
|
759
|
-
|
|
766
|
+
fe as J,
|
|
760
767
|
ge as K,
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
768
|
+
de as L,
|
|
769
|
+
W as M,
|
|
770
|
+
ue as N,
|
|
771
|
+
I as O,
|
|
765
772
|
Le as P,
|
|
766
|
-
|
|
767
|
-
|
|
773
|
+
Re as Q,
|
|
774
|
+
M as R,
|
|
768
775
|
pe as S,
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
776
|
+
ke as T,
|
|
777
|
+
R as U,
|
|
778
|
+
q as V,
|
|
779
|
+
Se as W,
|
|
772
780
|
V as a,
|
|
773
781
|
H as b,
|
|
774
782
|
u as c,
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
783
|
+
ce as d,
|
|
784
|
+
d as e,
|
|
785
|
+
Ae as f,
|
|
778
786
|
O as g,
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
n,
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
787
|
+
U as h,
|
|
788
|
+
re as i,
|
|
789
|
+
S as j,
|
|
790
|
+
P as k,
|
|
791
|
+
oe as l,
|
|
792
|
+
E as m,
|
|
793
|
+
v as n,
|
|
794
|
+
k as o,
|
|
795
|
+
o as p,
|
|
796
|
+
i as q,
|
|
797
|
+
te as r,
|
|
798
|
+
ae as s,
|
|
799
|
+
T as t,
|
|
792
800
|
ne as u,
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
801
|
+
ie as v,
|
|
802
|
+
se as w,
|
|
803
|
+
B as x,
|
|
804
|
+
N as y,
|
|
805
|
+
K as z
|
|
798
806
|
};
|
package/dist/services.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./services-action-DBOzfgMl.cjs"),e=require("./services-human-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./services-action-DBOzfgMl.cjs"),e=require("./services-human-CGLf7B6Q.cjs");exports.getActivityKindFromActivityType=t.getActivityKindFromActivityType;exports.mapActivityTypeEnumToLabel=t.mapActivityTypeEnumToLabel;exports.mapSessionTypeEnumToLabel=t.mapSessionTypeEnumToLabel;exports.getAllAvailableJoints=e.getAllAvailableJoints;exports.getAllAvailableLimbs=e.getAllAvailableLimbs;exports.getAllAvailablePoseJoints=e.getAllAvailablePoseJoints;exports.getAllAvailablePoseLimbs=e.getAllAvailablePoseLimbs;exports.getAllAvailableSensorJoints=e.getAllAvailableSensorJoints;exports.getAngleDirectionNames=e.getAngleDirectionNames;exports.getAvailableLimbsForLimbIds=e.getAvailableLimbsForLimbIds;exports.getAvailablePoseJointsForLimbIds=e.getAvailablePoseJointsForLimbIds;exports.getAvailableSensorJointsForLimbIds=e.getAvailableSensorJointsForLimbIds;exports.getAxis=e.getAxis;exports.getDefaultAngleSource=e.getDefaultAngleSource;exports.getDefaultJointRange=e.getDefaultJointRange;exports.getDefaultLimbRange=e.getDefaultLimbRange;exports.getEnabledJointPlanes=e.getEnabledJointPlanes;exports.getEnabledSegmentPlanes=e.getEnabledSegmentPlanes;exports.getHumanBodyAngle=e.getHumanBodyAngle;exports.getIsDefaultAngleAllowed=e.getIsDefaultAngleAllowed;exports.getJointAngleDirectionAbbr=e.getJointAngleDirectionAbbr;exports.getJointAngleDirectionName=e.getJointAngleDirectionName;exports.getJointNameWithPlane=e.getJointNameWithPlane;exports.getJointOrSegmentNameWithPlane=e.getJointOrSegmentNameWithPlane;exports.getJointPlaneName=e.getJointPlaneName;exports.getNormativeJointRange=e.getNormativeJointRange;exports.getParameterAngleDirectionName=e.getParameterAngleDirectionName;exports.getParameterDirectionNames=e.getParameterDirectionNames;exports.getPartName=e.getPartName;exports.getPartNameNoSide=e.getPartNameNoSide;exports.getPlane=e.getPlane;exports.getSegmentAngleDirectionAbbr=e.getSegmentAngleDirectionAbbr;exports.getSegmentAngleDirectionName=e.getSegmentAngleDirectionName;exports.getSegmentNameWithPlane=e.getSegmentNameWithPlane;exports.getSegmentXyzName=e.getSegmentXyzName;exports.getSuggestedSensorLocations=e.getSuggestedSensorLocations;exports.getTypicalRom=e.getTypicalRom;exports.getTypicalRomSize=e.getTypicalRomSize;exports.isAxis=e.isAxis;exports.isJoint=e.isJoint;exports.isLimb=e.isLimb;exports.isPlane=e.isPlane;exports.jointNames=e.jointNames;exports.jointsUsedByLimbs=e.jointsUsedByLimbs;exports.limbNames=e.limbNames;exports.limbsRequiredForJoints=e.limbsRequiredForJoints;exports.mkAccelerationPart=e.mkAccelerationPart;exports.mkAngularVelocityPart=e.mkAngularVelocityPart;exports.mkHumanPart=e.mkHumanPart;exports.mkJointPart=e.mkJointPart;exports.mkLimbPart=e.mkLimbPart;exports.planeOrAxis=e.planeOrAxis;
|
package/dist/services.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { g as t, m as s, a as i } from "./services-action-CfZFwhy-.js";
|
|
2
|
-
import {
|
|
2
|
+
import { n as l, j as g, m as o, u as m, t as r, U as A, s as b, w as P, v as c, J, O as N, i as S, l as L, h as d, k as u, Q as v, P as y, x as D, b as p, a as T, T as f, R, d as k, W as x, V as F, e as E, L as I, K as h, y as W, c as j, g as z, S as B, f as H, M as O, N as q, D as w, G as K, F as U, E as V, q as C, r as G, p as M, o as Q, B as X, C as Y, H as Z, z as _, A as $, I as ee } from "./services-human-CI19qLdG.js";
|
|
3
3
|
export {
|
|
4
4
|
t as getActivityKindFromActivityType,
|
|
5
5
|
l as getAllAvailableJoints,
|
|
6
6
|
g as getAllAvailableLimbs,
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
o as getAllAvailablePoseJoints,
|
|
8
|
+
m as getAllAvailablePoseLimbs,
|
|
9
9
|
r as getAllAvailableSensorJoints,
|
|
10
10
|
A as getAngleDirectionNames,
|
|
11
11
|
b as getAvailableLimbsForLimbIds,
|
|
@@ -13,12 +13,12 @@ export {
|
|
|
13
13
|
c as getAvailableSensorJointsForLimbIds,
|
|
14
14
|
J as getAxis,
|
|
15
15
|
N as getDefaultAngleSource,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
S as getDefaultJointRange,
|
|
17
|
+
L as getDefaultLimbRange,
|
|
18
|
+
d as getEnabledJointPlanes,
|
|
19
|
+
u as getEnabledSegmentPlanes,
|
|
20
|
+
v as getHumanBodyAngle,
|
|
21
|
+
y as getIsDefaultAngleAllowed,
|
|
22
22
|
D as getJointAngleDirectionAbbr,
|
|
23
23
|
p as getJointAngleDirectionName,
|
|
24
24
|
T as getJointNameWithPlane,
|
|
@@ -30,26 +30,27 @@ export {
|
|
|
30
30
|
E as getPartName,
|
|
31
31
|
I as getPartNameNoSide,
|
|
32
32
|
h as getPlane,
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
W as getSegmentAngleDirectionAbbr,
|
|
34
|
+
j as getSegmentAngleDirectionName,
|
|
35
|
+
z as getSegmentNameWithPlane,
|
|
36
|
+
B as getSegmentXyzName,
|
|
37
|
+
H as getSuggestedSensorLocations,
|
|
37
38
|
O as getTypicalRom,
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
q as getTypicalRomSize,
|
|
40
|
+
w as isAxis,
|
|
41
|
+
K as isJoint,
|
|
42
|
+
U as isLimb,
|
|
43
|
+
V as isPlane,
|
|
44
|
+
C as jointNames,
|
|
45
|
+
G as jointsUsedByLimbs,
|
|
46
|
+
M as limbNames,
|
|
47
|
+
Q as limbsRequiredForJoints,
|
|
47
48
|
s as mapActivityTypeEnumToLabel,
|
|
48
49
|
i as mapSessionTypeEnumToLabel,
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
X as mkAccelerationPart,
|
|
51
|
+
Y as mkAngularVelocityPart,
|
|
52
|
+
Z as mkHumanPart,
|
|
53
|
+
_ as mkJointPart,
|
|
54
|
+
$ as mkLimbPart,
|
|
55
|
+
ee as planeOrAxis
|
|
55
56
|
};
|
package/dist/types.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./services-human-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./services-human-CGLf7B6Q.cjs"),r=require("./generated-graphql.cjs"),m=require("./lodash-vendor-C3e6C_PJ.cjs"),p=require("./utils-conversion-sLq5wEdq.cjs"),l=(e,t)=>t==="left"||t==="right"?{sagittal:e.sagittal}:t==="forward"||t==="backward"?{frontal:e.frontal}:null,S=(e,t,n)=>t==="sensor"?e?.sensor_angle??null:t==="pose"?(e?.pose_angle&&l(e.pose_angle,n))??null:e?.sensor_angle?l(e.sensor_angle)??null:(e?.pose_angle&&l(e.pose_angle,n))??null,k=(e,t)=>(t==="sensor"?e?.sensor_angle:t==="pose"?e?.pose_angle:e?.sensor_angle||e?.pose_angle)||null,R=["frontal","sagittal","transverse"],T=e=>"limbs"in e,v=(e,t)=>t==="y"&&(e==="LeftFoot"||e==="RightFoot"||e==="LeftShank"||e==="RightShank"),F=(e,t)=>{switch(e){case"Head":return"Head";case"UpperBack":return"UpperBack";case"CenterBack":return"CenterBack";case"LowerBack":return"LowerBack";case"Thigh":return t==="left"?"LeftThigh":"RightThigh";case"Shank":return t==="left"?"LeftShank":"RightShank";case"Foot":return t==="left"?"LeftFoot":"RightFoot";case"UpperArm":return t==="left"?"LeftUpperArm":"RightUpperArm";case"Forearm":return t==="left"?"LeftForearm":"RightForearm";case"Pelvis":return t==="left"?"LeftPelvis":"RightPelvis";case"Clavicle":return t==="left"?"LeftClavicle":"RightClavicle"}},A=e=>e.startsWith("Left")?"left":e.startsWith("Right")?"right":null,b=(e,t)=>{switch(e){case"Ankle":return t==="left"?"LeftAnkle":"RightAnkle";case"Knee":return t==="left"?"LeftKnee":"RightKnee";case"Hip":return t==="left"?"LeftHip":"RightHip";case"Shoulder":return t==="left"?"LeftShoulder":"RightShoulder";case"Elbow":return t==="left"?"LeftElbow":"RightElbow";case"Spine":return"TotalSpine";case"Neck":return"Neck"}},u=e=>{switch(e){case"LeftAnkle":case"RightAnkle":return"Ankle";case"LeftKnee":case"RightKnee":return"Knee";case"LeftHip":case"RightHip":return"Hip";case"LeftShoulder":case"RightShoulder":return"Shoulder";case"LeftElbow":case"RightElbow":return"Elbow";case"ChestSpine":case"NavalSpine":case"TotalSpine":return"Spine";case"Neck":return"Neck"}},h=e=>{switch(e){case"Head":return"Head";case"UpperBack":return"UpperBack";case"CenterBack":return"CenterBack";case"LowerBack":return"LowerBack";case"LeftThigh":case"RightThigh":return"Thigh";case"LeftShank":case"RightShank":return"Shank";case"LeftFoot":case"RightFoot":return"Foot";case"LeftUpperArm":case"RightUpperArm":return"UpperArm";case"LeftForearm":case"RightForearm":return"Forearm";case"LeftPelvis":case"RightPelvis":return"Pelvis";case"LeftClavicle":case"RightClavicle":return"Clavicle"}};var g=(e=>(e.Sensor="sensor",e.Pose="pose",e))(g||{});const U=e=>"joint"in e?u(e.joint):h(e.segment),w=["joint","limb","acceleration","angular_velocity"],B=["frontal","sagittal","transverse"],P=["x","y","z"],j=()=>{const e=[],t={add:(n,o,a,c,s=!1)=>{const f={unit:"Count",value:0};return o?e.push({desc:{name:n,hint:a||null},value:o,isLoading:s,suffix:c||void 0}):s&&e.push({desc:{name:n,hint:a||null},value:f,isLoading:s,suffix:c||void 0}),t},build:()=>e};return t},d=(e,t)=>({unit:e,value:t}),C=(e,t)=>{if(t!=null)return d(e,t)},L=e=>"joint"in e?e.joint:e.segment,N=e=>L(e).toString(),H=e=>"plane"in e?e.plane:e.axis,O=e=>"plane"in e?e.plane:e.axis,y=e=>"joint"in e?i.jointNames[e.joint]:i.limbNames[e.segment],x=e=>{if(!e)return"Loading...";if(!e.action)return e.name??"Unknown Action";const t=e.action.name??"Unknown Action",n=e.actionSide?`${e.actionSide}`:"";return`${t} ${n} (Trial ${e.name??"1"})`},I=e=>typeof e=="object"&&"SyncError"in e,E=e=>{switch(`${e}`){case r.SensorLocation.Thorax:return"UpperBack";case r.SensorLocation.CenterBack:return"CenterBack";case r.SensorLocation.Pelvis:return"LowerBack";case r.SensorLocation.LeftThigh:return"LeftThigh";case r.SensorLocation.RightThigh:return"RightThigh";case r.SensorLocation.LeftShank:return"LeftShank";case r.SensorLocation.RightShank:return"RightShank";case r.SensorLocation.LeftFoot:return"LeftFoot";case r.SensorLocation.RightFoot:return"RightFoot";case r.SensorLocation.LeftUpperArm:return"LeftUpperArm";case r.SensorLocation.RightUpperArm:return"RightUpperArm";case r.SensorLocation.LeftForearm:return"LeftForearm";case r.SensorLocation.RightForearm:return"RightForearm";case r.SensorLocation.Head:return"Head"}return console.warn(`Unknown sensor location: ${e}`),null},K=e=>{switch(e){case r.SensorLocation.Thorax:return"Thorax";case r.SensorLocation.CenterBack:return"Center Back";case r.SensorLocation.Pelvis:return"Pelvis";case r.SensorLocation.LeftThigh:return"Left Thigh";case r.SensorLocation.RightThigh:return"Right Thigh";case r.SensorLocation.LeftShank:return"Left Shank";case r.SensorLocation.RightShank:return"Right Shank";case r.SensorLocation.LeftFoot:return"Left Foot";case r.SensorLocation.RightFoot:return"Right Foot";case r.SensorLocation.LeftUpperArm:return"Left Upper Arm";case r.SensorLocation.RightUpperArm:return"Right Upper Arm";case r.SensorLocation.LeftForearm:return"Left Forearm";case r.SensorLocation.RightForearm:return"Right Forearm";case r.SensorLocation.Head:return"Head"}return console.warn(`Unknown sensor location: ${e}`),"Unknown"},_=(e,t)=>Object.values(e).some(n=>t.id in n&&Object.keys(n[t.id]).length>0),q=(e,t)=>Math.max(...Object.values(e).map(n=>t.id in n?Object.keys(n[t.id]).length:0)),$=(e,t,n)=>Object.values(e).some(o=>t.id in o&&n in o[t.id]),J=(e,t)=>e[t.kind]?.[t.value.id]?.[i.planeOrAxis(t)],M=(e,t,n)=>{const o=structuredClone(e);if(n===void 0){const a=i.planeOrAxis(t);t.kind in o&&t.value.id in o[t.kind]&&a in o[t.kind][t.value.id]&&delete o[t.kind][t.value.id][a]}else m.merge(o,{[t.kind]:{[t.value.id]:{[i.planeOrAxis(t)]:n}}});return o},W=e=>Object.entries(e).flatMap(([t,n])=>Object.entries(n).flatMap(([o,a])=>Object.entries(a).map(([c,s])=>({min:s.min,max:s.max,kind:p.safelyConvertEnum(s.kind),partDimension:c,partId:o,partKind:t})))),D=e=>e.reduce((t,n)=>({...t,[n.partKind]:{...t[n.partKind]||{},[n.partId]:{...t[n.partKind]?.[n.partId]||{},[n.partDimension]:{kind:n.kind,min:n.min,max:n.max}}}}),{joint:{},limb:{},acceleration:{}}),V=e=>Object.values(e).every(t=>Object.keys(t).length===0),G=(e,t)=>{if(e.kind!==t.kind)return!1;switch(e.kind){case"Zed":return e.id===t.id;case"Usb":return e.name===t.name;case"GoPro":return e.id===t.id}};exports.AngleDataSource=g;exports.analysisStatBuilder=j;exports.areThresholdsEmpty=V;exports.availablePlanes=R;exports.axes=P;exports.canBeVerticalForce=v;exports.dimensionName=O;exports.dimensionToLegacy=H;exports.getAnalysisName=x;exports.getAnalysisPartIdNoSide=U;exports.getJointIdNoSide=u;exports.getJointIdWithSide=b;exports.getLimbIdNoSide=h;exports.getLimbIdWithSide=F;exports.getPointSide=A;exports.isDeviceEqual=G;exports.isLimbTrackingFrame=T;exports.isSyncError=I;exports.jointAngle=S;exports.jointOrLimbHasThreshold=_;exports.jointOrLimbThresholdCount=q;exports.limbAngle=k;exports.mkUnit=d;exports.partAndPlaneHasThreshold=$;exports.partIdName=y;exports.partIdToJointLimbId=L;exports.partIdToString=N;exports.partKinds=w;exports.planes=B;exports.sensorLocationName=K;exports.sensorLocationToLimbId=E;exports.thresholdForPart=J;exports.thresholdFragmentsToThresholds=D;exports.thresholdsToInput=W;exports.tryMkUnit=C;exports.updateThreshold=M;
|