@m4l/gclick-realtime 1.10.0 → 1.11.0

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.
Files changed (197) hide show
  1. package/consumer/RealTimeConsumerContext.d.ts +10 -0
  2. package/consumer/RealTimeConsumerContext.d.ts.map +1 -0
  3. package/consumer/RealTimeConsumerContext.js +128 -0
  4. package/consumer/index.d.ts +4 -0
  5. package/consumer/index.d.ts.map +1 -0
  6. package/consumer/index.js +7 -0
  7. package/consumer/types.d.ts +47 -0
  8. package/consumer/types.d.ts.map +1 -0
  9. package/consumer/useRealTimeConsumer.d.ts.map +1 -0
  10. package/{web/consumer → consumer}/useRealTimeConsumer.js +2 -2
  11. package/contracts/deviceData.d.ts +19 -22
  12. package/contracts/deviceData.d.ts.map +1 -1
  13. package/contracts/deviceDetail.d.ts +0 -2
  14. package/contracts/deviceDetail.d.ts.map +1 -1
  15. package/contracts/index.d.ts +1 -1
  16. package/contracts/index.d.ts.map +1 -1
  17. package/dummy/catalogs/baseDeviceTemplate.d.ts.map +1 -1
  18. package/dummy/catalogs/baseDeviceTemplate.js +4 -35
  19. package/dummy/catalogs/blueprints.d.ts +9 -54
  20. package/dummy/catalogs/blueprints.d.ts.map +1 -1
  21. package/dummy/catalogs/blueprints.js +25 -42
  22. package/dummy/catalogs/departments.d.ts +10 -0
  23. package/dummy/catalogs/departments.d.ts.map +1 -0
  24. package/dummy/catalogs/departments.js +43 -0
  25. package/dummy/index.d.ts +3 -3
  26. package/dummy/index.d.ts.map +1 -1
  27. package/dummy/index.js +28 -28
  28. package/dummy/shared/types.d.ts +2 -4
  29. package/dummy/shared/types.d.ts.map +1 -1
  30. package/dummy/{runtime → simulation}/simulation.d.ts +1 -1
  31. package/dummy/simulation/simulation.d.ts.map +1 -0
  32. package/dummy/{runtime → simulation}/simulation.js +333 -423
  33. package/dummy/{runtime/dummy.d.ts → source-data/SourceDataDummy.d.ts} +8 -3
  34. package/dummy/source-data/SourceDataDummy.d.ts.map +1 -0
  35. package/dummy/{runtime/dummy.js → source-data/SourceDataDummy.js} +117 -128
  36. package/mobile/index.d.ts +4 -0
  37. package/mobile/index.d.ts.map +1 -0
  38. package/mobile/index.js +23 -0
  39. package/mobile/resourceTypes.d.ts +48 -0
  40. package/mobile/resourceTypes.d.ts.map +1 -0
  41. package/mobile/resourceTypes.js +54 -0
  42. package/mobile/runtime/atmosphere.d.ts +10 -0
  43. package/mobile/runtime/atmosphere.d.ts.map +1 -0
  44. package/mobile/runtime/atmosphere.js +16 -0
  45. package/mobile/runtime/dummy.d.ts +11 -0
  46. package/mobile/runtime/dummy.d.ts.map +1 -0
  47. package/mobile/runtime/dummy.js +16 -0
  48. package/mobile/runtime/index.d.ts +11 -0
  49. package/mobile/runtime/index.d.ts.map +1 -0
  50. package/mobile/runtime/runtimeRegistry.d.ts +17 -0
  51. package/mobile/runtime/runtimeRegistry.d.ts.map +1 -0
  52. package/mobile/runtime/runtimeRegistry.js +24 -0
  53. package/mobile/runtime/sourceDataFactory.d.ts +6 -0
  54. package/mobile/runtime/sourceDataFactory.d.ts.map +1 -0
  55. package/mobile/runtime/sourceDataFactory.js +29 -0
  56. package/mobile/runtime/types.d.ts +8 -0
  57. package/mobile/runtime/types.d.ts.map +1 -0
  58. package/package.json +37 -1
  59. package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts +1 -1
  60. package/payload/mergeDevicePayloadWithUpdatedAtGuard.d.ts.map +1 -1
  61. package/rt_alarms/constants.d.ts +6 -0
  62. package/rt_alarms/constants.d.ts.map +1 -0
  63. package/rt_alarms/constants.js +7 -0
  64. package/rt_alarms/index.d.ts +15 -0
  65. package/rt_alarms/index.d.ts.map +1 -0
  66. package/rt_alarms/index.js +18 -0
  67. package/rt_devices/constants.d.ts +4 -0
  68. package/rt_devices/constants.d.ts.map +1 -0
  69. package/rt_devices/constants.js +5 -0
  70. package/rt_devices/index.d.ts +22 -0
  71. package/rt_devices/index.d.ts.map +1 -0
  72. package/rt_devices/index.js +150 -0
  73. package/rt_devices/resourceTypeMergeStrategies.d.ts +12 -0
  74. package/rt_devices/resourceTypeMergeStrategies.d.ts.map +1 -0
  75. package/rt_devices/resourceTypeMergeStrategies.js +19 -0
  76. package/shared/atmosphereHost.d.ts +5 -0
  77. package/shared/atmosphereHost.d.ts.map +1 -0
  78. package/shared/atmosphereHost.js +7 -0
  79. package/shared/index.d.ts +5 -0
  80. package/shared/index.d.ts.map +1 -0
  81. package/shared/index.js +11 -0
  82. package/shared/performanceMetrics.d.ts +64 -0
  83. package/shared/performanceMetrics.d.ts.map +1 -0
  84. package/shared/performanceMetrics.js +73 -0
  85. package/shared/runtimeRegistry.d.ts +17 -0
  86. package/shared/runtimeRegistry.d.ts.map +1 -0
  87. package/shared/runtimeRegistry.js +27 -0
  88. package/shared/runtimeResourceTypesKey.d.ts +14 -0
  89. package/shared/runtimeResourceTypesKey.d.ts.map +1 -0
  90. package/shared/runtimeResourceTypesKey.js +18 -0
  91. package/shared/startupSnapshots.d.ts +28 -0
  92. package/shared/startupSnapshots.d.ts.map +1 -0
  93. package/shared/startupSnapshots.js +29 -0
  94. package/web/diagnostics/performanceMetrics.d.ts +34 -0
  95. package/web/diagnostics/performanceMetrics.d.ts.map +1 -0
  96. package/web/diagnostics/performanceMetrics.js +61 -0
  97. package/web/host/devicesResourceType.d.ts +3 -11
  98. package/web/host/devicesResourceType.d.ts.map +1 -1
  99. package/web/host/devicesResourceType.js +58 -171
  100. package/web/host/hostRuntime.d.ts +6 -8
  101. package/web/host/hostRuntime.d.ts.map +1 -1
  102. package/web/host/hostRuntime.js +29 -38
  103. package/web/host/index.d.ts +2 -2
  104. package/web/host/index.d.ts.map +1 -1
  105. package/web/host/launchContract.d.ts +19 -13
  106. package/web/host/launchContract.d.ts.map +1 -1
  107. package/web/host/launchContract.js +82 -76
  108. package/web/index.d.ts +2 -7
  109. package/web/index.d.ts.map +1 -1
  110. package/web/index.js +34 -62
  111. package/web/runtime/atmosphere.d.ts +12 -0
  112. package/web/runtime/atmosphere.d.ts.map +1 -0
  113. package/web/runtime/atmosphere.js +22 -0
  114. package/web/runtime/dummy.d.ts +11 -0
  115. package/web/runtime/dummy.d.ts.map +1 -0
  116. package/web/runtime/dummy.js +22 -0
  117. package/web/runtime/index.d.ts +8 -9
  118. package/web/runtime/index.d.ts.map +1 -1
  119. package/web/runtime/performanceMetricReporter.d.ts +8 -0
  120. package/web/runtime/performanceMetricReporter.d.ts.map +1 -0
  121. package/web/runtime/performanceMetricReporter.js +10 -0
  122. package/web/runtime/runtimeRegistry.d.ts +21 -5
  123. package/web/runtime/runtimeRegistry.d.ts.map +1 -1
  124. package/web/runtime/runtimeRegistry.js +22 -7
  125. package/web/runtime/sourceDataFactory.d.ts +7 -0
  126. package/web/runtime/sourceDataFactory.d.ts.map +1 -0
  127. package/web/runtime/sourceDataFactory.js +26 -0
  128. package/web/{producer → runtime}/types.d.ts +2 -7
  129. package/web/runtime/types.d.ts.map +1 -0
  130. package/dummy/catalogs/group.d.ts +0 -10
  131. package/dummy/catalogs/group.d.ts.map +0 -1
  132. package/dummy/catalogs/group.js +0 -46
  133. package/dummy/runtime/dummy.d.ts.map +0 -1
  134. package/dummy/runtime/simulation.d.ts.map +0 -1
  135. package/libs/observability/mf/src/browserRuntimeHandles.js +0 -350
  136. package/libs/observability/mf/src/diagnosticPolicies/catalog.js +0 -12
  137. package/libs/observability/mf/src/diagnosticPolicies/contracts.js +0 -8
  138. package/libs/observability/mf/src/diagnosticPolicies/host.js +0 -127
  139. package/libs/observability/mf/src/diagnosticPolicies/operativeMyGpsDevices.js +0 -79
  140. package/web/consumer/RealTimeConsumerContext.d.ts +0 -10
  141. package/web/consumer/RealTimeConsumerContext.d.ts.map +0 -1
  142. package/web/consumer/RealTimeConsumerContext.js +0 -156
  143. package/web/consumer/index.d.ts +0 -6
  144. package/web/consumer/index.d.ts.map +0 -1
  145. package/web/consumer/store.d.ts +0 -10
  146. package/web/consumer/store.d.ts.map +0 -1
  147. package/web/consumer/store.helpers.d.ts +0 -62
  148. package/web/consumer/store.helpers.d.ts.map +0 -1
  149. package/web/consumer/store.helpers.js +0 -141
  150. package/web/consumer/store.js +0 -227
  151. package/web/consumer/types.d.ts +0 -161
  152. package/web/consumer/types.d.ts.map +0 -1
  153. package/web/consumer/useRealTimeConsumer.d.ts.map +0 -1
  154. package/web/host/startupSnapshots.d.ts +0 -45
  155. package/web/host/startupSnapshots.d.ts.map +0 -1
  156. package/web/host/startupSnapshots.js +0 -103
  157. package/web/producer/RealTimeProducerContext.d.ts +0 -9
  158. package/web/producer/RealTimeProducerContext.d.ts.map +0 -1
  159. package/web/producer/RealTimeProducerContext.js +0 -16
  160. package/web/producer/index.d.ts +0 -7
  161. package/web/producer/index.d.ts.map +0 -1
  162. package/web/producer/sourceDataFactory.d.ts +0 -13
  163. package/web/producer/sourceDataFactory.d.ts.map +0 -1
  164. package/web/producer/sourceDataFactory.js +0 -32
  165. package/web/producer/store.d.ts +0 -7
  166. package/web/producer/store.d.ts.map +0 -1
  167. package/web/producer/store.js +0 -5
  168. package/web/producer/types.d.ts.map +0 -1
  169. package/web/producer/useRealTimeProducer.d.ts +0 -7
  170. package/web/producer/useRealTimeProducer.d.ts.map +0 -1
  171. package/web/producer/useRealTimeProducer.js +0 -15
  172. package/web/runtime/resourceTypeMergeStrategies.d.ts +0 -10
  173. package/web/runtime/resourceTypeMergeStrategies.d.ts.map +0 -1
  174. package/web/runtime/resourceTypeMergeStrategies.js +0 -19
  175. package/web/runtime/runtime.d.ts +0 -16
  176. package/web/runtime/runtime.d.ts.map +0 -1
  177. package/web/runtime/runtime.js +0 -28
  178. package/web/runtime/runtimeAtmosphereOnly.d.ts +0 -11
  179. package/web/runtime/runtimeAtmosphereOnly.d.ts.map +0 -1
  180. package/web/runtime/runtimeAtmosphereOnly.js +0 -28
  181. package/web/runtime/runtimeRegistry.shared.d.ts +0 -23
  182. package/web/runtime/runtimeRegistry.shared.d.ts.map +0 -1
  183. package/web/runtime/runtimeRegistry.shared.js +0 -47
  184. package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts +0 -9
  185. package/web/runtime/runtimeRegistryAtmosphereOnly.d.ts.map +0 -1
  186. package/web/runtime/runtimeRegistryAtmosphereOnly.js +0 -13
  187. package/web/shared/constants.d.ts +0 -11
  188. package/web/shared/constants.d.ts.map +0 -1
  189. package/web/shared/constants.js +0 -11
  190. package/web/shared/index.d.ts +0 -3
  191. package/web/shared/index.d.ts.map +0 -1
  192. package/web/shared/performanceMetrics.d.ts +0 -48
  193. package/web/shared/performanceMetrics.d.ts.map +0 -1
  194. package/web/shared/performanceMetrics.js +0 -70
  195. package/web/shared/runtimeTypes.d.ts +0 -4
  196. package/web/shared/runtimeTypes.d.ts.map +0 -1
  197. /package/{web/consumer → consumer}/useRealTimeConsumer.d.ts +0 -0
@@ -1,21 +1,21 @@
1
- import { getVptValueWithGuard as b } from "../../payload/getVptValueWithGuard.js";
2
- import { GNSSEnumSignal as T, ADCPowerEnum as D, GNSSEnumMotionStatus as p } from "../../contracts/constants.js";
3
- import { calculateDistanceMeters as J, calculatePolylineDistanceMeters as ie, resolveFrameSpeedKph as oe, interpolateCoordinate as re, calculateCourseDegrees as ue } from "../shared/helpers.js";
4
- import { createRealTimeDummySimulationConfigFromPreset as ce, REAL_TIME_DUMMY_SIMULATION_PRESETS as le } from "../catalogs/presets.js";
5
- import { REAL_TIME_DUMMY_DEFAULT_SCENARIO_ID as de, REAL_TIME_DUMMY_SCENARIOS as U, REAL_TIME_DUMMY_DEFAULT_PLAYBACK as k } from "../catalogs/scenarios.js";
6
- import E from "../../node_modules/lodash-es/cloneDeep.js";
1
+ import { getVptValueWithGuard as L } from "../../payload/getVptValueWithGuard.js";
2
+ import { GNSSEnumSignal as w, ADCPowerEnum as y, GNSSEnumMotionStatus as p } from "../../contracts/constants.js";
3
+ import { calculateDistanceMeters as W, calculatePolylineDistanceMeters as te, resolveFrameSpeedKph as ne, interpolateCoordinate as se, calculateCourseDegrees as ae } from "../shared/helpers.js";
4
+ import { createRealTimeDummySimulationConfigFromPreset as ie, REAL_TIME_DUMMY_SIMULATION_PRESETS as oe } from "../catalogs/presets.js";
5
+ import { REAL_TIME_DUMMY_DEFAULT_SCENARIO_ID as re, REAL_TIME_DUMMY_SCENARIOS as U, REAL_TIME_DUMMY_DEFAULT_PLAYBACK as E } from "../catalogs/scenarios.js";
6
+ import D from "../../node_modules/lodash-es/cloneDeep.js";
7
7
  import { REAL_TIME_DUMMY_ROUTE_TEMPLATES as G } from "../catalogs/routes.js";
8
8
  import { REAL_TIME_DUMMY_EXECUTION_PLANS as N } from "../catalogs/plans.js";
9
9
  import { REAL_TIME_DUMMY_DEVICE_BLUEPRINTS as x } from "../catalogs/blueprints.js";
10
- import I from "../../node_modules/lodash-es/merge.js";
11
- import { REAL_TIME_DUMMY_DEFAULT_ICON_ID as pe, REAL_TIME_DUMMY_BASE_DEVICE_TEMPLATE as me } from "../catalogs/baseDeviceTemplate.js";
12
- import h from "../../node_modules/lodash-es/unset.js";
13
- const C = Date.parse("2026-04-21T12:00:00.000Z"), Q = [
10
+ import b from "../../node_modules/lodash-es/merge.js";
11
+ import { REAL_TIME_DUMMY_DEFAULT_ICON_ID as ce, REAL_TIME_DUMMY_BASE_DEVICE_TEMPLATE as ue } from "../catalogs/baseDeviceTemplate.js";
12
+ import T from "../../node_modules/lodash-es/unset.js";
13
+ const C = Date.parse("2026-04-21T12:00:00.000Z"), H = [
14
14
  "gnssCourse",
15
15
  "gnssLatitude",
16
16
  "gnssLongitude",
17
17
  "gnssSpeed"
18
- ], ee = [
18
+ ], Z = [
19
19
  "adcPowerBackupLevel",
20
20
  "adcPowerBackupStatus",
21
21
  "adcPowerBackupVolt",
@@ -24,27 +24,11 @@ const C = Date.parse("2026-04-21T12:00:00.000Z"), Q = [
24
24
  "adcPowerMainVolt",
25
25
  "adcPowerSrcMainBatteryType"
26
26
  ];
27
- function R(e, t) {
27
+ function A(e, t) {
28
28
  return Object.hasOwn(e, t);
29
29
  }
30
- const ve = "rt_devices";
31
- function fe(e) {
32
- if (e)
33
- return {
34
- bgColor: e.color,
35
- id: e.id,
36
- name: e.name
37
- };
38
- }
39
- function ge(e) {
40
- if (e)
41
- return {
42
- color: e.bgColor,
43
- id: e.id,
44
- name: e.name
45
- };
46
- }
47
- function S(e, t) {
30
+ const le = "rt_devices";
31
+ function h(e, t) {
48
32
  if (!e)
49
33
  return e;
50
34
  const n = Date.parse(e);
@@ -52,103 +36,73 @@ function S(e, t) {
52
36
  t + (n - C)
53
37
  ).toISOString() : e;
54
38
  }
55
- function L(e) {
39
+ function I(e) {
56
40
  return typeof e == "object" && e !== null && "value" in e;
57
41
  }
58
- function Me(e, t, n) {
42
+ function de(e, t, n) {
59
43
  const a = e.vpts?.vptGnss?.[t];
60
- L(a) && (a.updatedAt = S(
44
+ I(a) && (a.updatedAt = h(
61
45
  a.updatedAt,
62
46
  n
63
47
  ));
64
48
  }
65
49
  function F(e, t) {
66
- e && (e.updatedAt = S(
50
+ e && (e.updatedAt = h(
67
51
  e.updatedAt,
68
52
  t
69
- ), e.value = S(
53
+ ), e.value = h(
70
54
  e.value,
71
55
  t
72
56
  ) ?? e.value);
73
57
  }
74
- function K(e, t) {
75
- e && (e.updatedAt = S(
76
- e.updatedAt,
77
- t
78
- ), e.value = S(
79
- e.value,
80
- t
81
- ) ?? e.value);
82
- }
83
- function q(e, t) {
84
- e && (e.updatedAt = S(
85
- e.updatedAt,
86
- t
87
- ));
88
- }
89
- function ye(e, t, n) {
58
+ function pe(e, t, n) {
90
59
  const a = e.vpts?.vptGnss?.[t];
91
- L(a) && (a.updatedAt = n);
60
+ I(a) && (a.updatedAt = n);
92
61
  }
93
- function Y(e, t) {
94
- e && (e.updatedAt = t, e.value = t);
95
- }
96
- function $(e, t) {
62
+ function K(e, t) {
97
63
  e && (e.updatedAt = t, e.value = t);
98
64
  }
99
- function j(e, t) {
100
- e && (e.updatedAt = t);
101
- }
102
- function P(e, t, n) {
103
- return L(e) ? {
65
+ function R(e, t, n) {
66
+ return I(e) ? {
104
67
  ...e,
105
68
  updatedAt: n,
106
69
  value: t
107
- } : t;
70
+ } : {
71
+ updatedAt: n,
72
+ value: t
73
+ };
108
74
  }
109
75
  function X(e, t) {
110
- return K(
111
- e.reportProfiles?.generalEvents?.reportProfileLastEventDate,
112
- t
113
- ), q(
114
- e.reportProfiles?.generalEvents?.reportProfileLastEventId,
115
- t
116
- ), K(
117
- e.reportProfiles?.systemEvents?.reportProfileLastEventDate,
118
- t
119
- ), q(
120
- e.reportProfiles?.systemEvents?.reportProfileLastEventId,
121
- t
122
- ), Object.values(e.vpts?.vptDiX ?? {}).forEach((n) => {
123
- n.diXStatus && (n.diXStatus.updatedAt = S(
76
+ return Object.values(e.vpts?.vptDiX ?? {}).forEach((n) => {
77
+ n.diXStatus && (n.diXStatus.updatedAt = h(
124
78
  n.diXStatus.updatedAt,
125
79
  t
126
- )), n.diXValue && (n.diXValue.updatedAt = S(
80
+ )), n.diXValue && (n.diXValue.updatedAt = h(
127
81
  n.diXValue.updatedAt,
128
82
  t
129
83
  ));
130
84
  }), Object.values(e.vpts?.vptDoX ?? {}).forEach((n) => {
131
- n.diXValue && (n.diXValue.updatedAt = S(
85
+ n.diXValue && (n.diXValue.updatedAt = h(
132
86
  n.diXValue.updatedAt,
133
87
  t
134
88
  ));
135
- }), e.vpts?.vptGnss?.gnssMotionStatus && (e.vpts.vptGnss.gnssMotionStatus.updatedAt = S(
89
+ }), e.vpts?.vptGnss?.gnssMotionStatus && (e.vpts.vptGnss.gnssMotionStatus.updatedAt = h(
136
90
  e.vpts.vptGnss.gnssMotionStatus.updatedAt,
137
91
  t
138
- )), e.vpts?.vptGnss?.gnssSignal && (e.vpts.vptGnss.gnssSignal.updatedAt = S(
92
+ )), e.vpts?.vptGnss?.gnssSignal && (e.vpts.vptGnss.gnssSignal.updatedAt = h(
139
93
  e.vpts.vptGnss.gnssSignal.updatedAt,
140
94
  t
141
- )), e.vpts?.vptIgnition?.ignitionValue && (e.vpts.vptIgnition.ignitionValue.updatedAt = S(
95
+ )), e.vpts?.vptIgnition?.ignitionValue && (e.vpts.vptIgnition.ignitionValue.updatedAt = h(
142
96
  e.vpts.vptIgnition.ignitionValue.updatedAt,
143
97
  t
144
- )), ee.forEach((n) => {
98
+ )), Z.forEach((n) => {
145
99
  const a = e.vpts?.vptAdcPower?.[n];
146
- L(a) && (a.updatedAt = S(
100
+ I(a) && (a.updatedAt = h(
147
101
  a.updatedAt,
148
102
  t
149
103
  ));
150
- }), Q.forEach((n) => {
151
- Me(e, n, t);
104
+ }), H.forEach((n) => {
105
+ de(e, n, t);
152
106
  }), e.vpts?.vptNetwork && (F(
153
107
  e.vpts.vptNetwork.networkLastConnectionDate,
154
108
  t
@@ -157,47 +111,35 @@ function X(e, t) {
157
111
  t
158
112
  )), e;
159
113
  }
160
- function De(e, t) {
161
- const n = E(e);
114
+ function me(e, t) {
115
+ const n = D(e);
162
116
  return X(n.current, t), n;
163
117
  }
164
- function Se(e, t) {
165
- const n = E(e), a = new Date(t).toISOString();
166
- return $(
167
- n.current.reportProfiles?.generalEvents?.reportProfileLastEventDate,
168
- a
169
- ), j(
170
- n.current.reportProfiles?.generalEvents?.reportProfileLastEventId,
171
- a
172
- ), $(
173
- n.current.reportProfiles?.systemEvents?.reportProfileLastEventDate,
174
- a
175
- ), j(
176
- n.current.reportProfiles?.systemEvents?.reportProfileLastEventId,
177
- a
178
- ), Object.values(n.current.vpts?.vptDiX ?? {}).forEach((s) => {
118
+ function ve(e, t) {
119
+ const n = D(e), a = new Date(t).toISOString();
120
+ return Object.values(n.current.vpts?.vptDiX ?? {}).forEach((s) => {
179
121
  s.diXStatus && (s.diXStatus.updatedAt = a), s.diXValue && (s.diXValue.updatedAt = a);
180
122
  }), Object.values(n.current.vpts?.vptDoX ?? {}).forEach((s) => {
181
123
  s.diXValue && (s.diXValue.updatedAt = a);
182
- }), n.current.vpts?.vptGnss?.gnssMotionStatus && (n.current.vpts.vptGnss.gnssMotionStatus.updatedAt = a), n.current.vpts?.vptGnss?.gnssSignal && (n.current.vpts.vptGnss.gnssSignal.updatedAt = a), n.current.vpts?.vptIgnition?.ignitionValue && (n.current.vpts.vptIgnition.ignitionValue.updatedAt = a), ee.forEach((s) => {
183
- const o = n.current.vpts?.vptAdcPower?.[s];
184
- L(o) && (o.updatedAt = a);
185
- }), Q.forEach((s) => {
186
- ye(
124
+ }), n.current.vpts?.vptGnss?.gnssMotionStatus && (n.current.vpts.vptGnss.gnssMotionStatus.updatedAt = a), n.current.vpts?.vptGnss?.gnssSignal && (n.current.vpts.vptGnss.gnssSignal.updatedAt = a), n.current.vpts?.vptIgnition?.ignitionValue && (n.current.vpts.vptIgnition.ignitionValue.updatedAt = a), Z.forEach((s) => {
125
+ const i = n.current.vpts?.vptAdcPower?.[s];
126
+ I(i) && (i.updatedAt = a);
127
+ }), H.forEach((s) => {
128
+ pe(
187
129
  n.current,
188
130
  s,
189
131
  a
190
132
  );
191
- }), n.current.vpts?.vptNetwork && (Y(
133
+ }), n.current.vpts?.vptNetwork && (K(
192
134
  n.current.vpts.vptNetwork.networkLastConnectionDate,
193
135
  a
194
- ), Y(
136
+ ), K(
195
137
  n.current.vpts.vptNetwork.networkLastEventDate,
196
138
  a
197
139
  )), n;
198
140
  }
199
- function Ee(e, t) {
200
- const n = E(e);
141
+ function ge(e, t) {
142
+ const n = D(e);
201
143
  if (n.type === "delete")
202
144
  return n;
203
145
  if (n.type === "new") {
@@ -209,51 +151,51 @@ function Ee(e, t) {
209
151
  t
210
152
  ), n;
211
153
  }
212
- function W(e, t) {
154
+ function q(e, t) {
213
155
  return {
214
- ...k,
156
+ ...E,
215
157
  ...e,
216
158
  ...t,
217
159
  framesPerTick: Math.max(
218
160
  1,
219
- t?.framesPerTick ?? e?.framesPerTick ?? k.framesPerTick
161
+ t?.framesPerTick ?? e?.framesPerTick ?? E.framesPerTick
220
162
  ),
221
163
  intervalMs: Math.max(
222
164
  1,
223
- t?.intervalMs ?? e?.intervalMs ?? k.intervalMs
165
+ t?.intervalMs ?? e?.intervalMs ?? E.intervalMs
224
166
  ),
225
167
  logicalSampleSeconds: Math.max(
226
168
  1,
227
- t?.logicalSampleSeconds ?? e?.logicalSampleSeconds ?? k.logicalSampleSeconds
169
+ t?.logicalSampleSeconds ?? e?.logicalSampleSeconds ?? E.logicalSampleSeconds
228
170
  )
229
171
  };
230
172
  }
231
- function he(e) {
232
- if (!R(x, e))
173
+ function fe(e) {
174
+ if (!A(x, e))
233
175
  throw new Error(`Unknown dummy blueprint "${e}"`);
234
176
  return x[e];
235
177
  }
236
- function Te(e) {
237
- if (!R(G, e))
178
+ function Me(e) {
179
+ if (!A(G, e))
238
180
  throw new Error(`Unknown dummy route "${e}"`);
239
181
  return G[e];
240
182
  }
241
- function we(e) {
242
- if (!R(N, e))
183
+ function Se(e) {
184
+ if (!A(N, e))
243
185
  throw new Error(`Unknown dummy plan "${e}"`);
244
186
  return N[e];
245
187
  }
246
- function Ie(e) {
247
- const t = le[e];
188
+ function ye(e) {
189
+ const t = oe[e];
248
190
  if (!t)
249
191
  throw new Error(`Unknown dummy simulation preset "${e}"`);
250
192
  return t;
251
193
  }
252
- function Le(e) {
194
+ function De(e) {
253
195
  const t = e.reduce(
254
- (n, a, s, o) => {
255
- const i = a.assignment.resourceSerialId;
256
- return o.findIndex((r) => r.assignment.resourceSerialId === i) !== s && !n.includes(i) && n.push(i), n;
196
+ (n, a, s, i) => {
197
+ const o = a.assignment.resourceSerialId;
198
+ return i.findIndex((r) => r.assignment.resourceSerialId === o) !== s && !n.includes(o) && n.push(o), n;
257
199
  },
258
200
  []
259
201
  );
@@ -262,50 +204,50 @@ function Le(e) {
262
204
  `Dummy simulation resolved duplicate device ids: ${t.join(", ")}. Each preset must contribute its own unique resourceSerialId values.`
263
205
  );
264
206
  }
265
- function ke(e) {
266
- const t = e?.presetId, n = t ? Ie(t).simulation : void 0, a = e?.scenarioId ?? n?.scenarioId ?? de;
267
- if (!R(U, a))
207
+ function he(e) {
208
+ const t = e?.presetId, n = t ? ye(t).simulation : void 0, a = e?.scenarioId ?? n?.scenarioId ?? re;
209
+ if (!A(U, a))
268
210
  throw new Error(`Unknown dummy scenario "${a}"`);
269
- const s = U[a], o = (e?.devices ?? n?.devices ?? s.devices).map(
270
- (i) => ({
271
- assignment: i,
272
- blueprint: he(i.blueprintId),
273
- plan: we(i.planId),
274
- route: Te(i.routeId)
211
+ const s = U[a], i = (e?.devices ?? n?.devices ?? s.devices).map(
212
+ (o) => ({
213
+ assignment: o,
214
+ blueprint: fe(o.blueprintId),
215
+ plan: Se(o.planId),
216
+ route: Me(o.routeId)
275
217
  })
276
218
  );
277
- return Le(o), {
278
- devices: o,
279
- playback: W(
280
- W(s.playback, n?.playback),
219
+ return De(i), {
220
+ devices: i,
221
+ playback: q(
222
+ q(s.playback, n?.playback),
281
223
  e?.playback
282
224
  )
283
225
  };
284
226
  }
285
- function te(e) {
227
+ function z(e) {
286
228
  switch (e) {
287
- case T.noSignal:
229
+ case w.noSignal:
288
230
  return 2;
289
- case T.acceptable:
231
+ case w.acceptable:
290
232
  return 19;
291
- case T.reliable:
233
+ case w.reliable:
292
234
  default:
293
235
  return 31;
294
236
  }
295
237
  }
296
- function Pe(e) {
238
+ function we(e) {
297
239
  switch (e) {
298
- case T.noSignal:
240
+ case w.noSignal:
299
241
  return {
300
242
  gnssHdop: 4.9,
301
243
  gnssSatellitesInUse: 0
302
244
  };
303
- case T.acceptable:
245
+ case w.acceptable:
304
246
  return {
305
247
  gnssHdop: 1.7,
306
248
  gnssSatellitesInUse: 8
307
249
  };
308
- case T.reliable:
250
+ case w.reliable:
309
251
  default:
310
252
  return {
311
253
  gnssHdop: 0.8,
@@ -316,17 +258,17 @@ function Pe(e) {
316
258
  function O(e, t, n) {
317
259
  return Math.min(n, Math.max(t, e));
318
260
  }
319
- function H(e) {
261
+ function Y(e) {
320
262
  return Math.round(e * 10) / 10;
321
263
  }
322
- function Z(e, t) {
323
- return e <= 0 ? D.lost : t === "4.5" ? e >= 4.1 ? D.ok : D.low : t === "12" ? e >= 12.4 ? D.ok : D.low : e >= 24.8 ? D.ok : D.low;
264
+ function $(e, t) {
265
+ return e <= 0 ? y.lost : t === "4.5" ? e >= 4.1 ? y.ok : y.low : t === "12" ? e >= 12.4 ? y.ok : y.low : e >= 24.8 ? y.ok : y.low;
324
266
  }
325
- function z(e, t) {
267
+ function j(e, t) {
326
268
  const [n, a] = t === "4.5" ? [3.8, 4.2] : t === "12" ? [12, 13.8] : [24.3, 27.9], s = (e - n) / (a - n);
327
269
  return Math.round(O(s, 0, 1) * 100);
328
270
  }
329
- function A(e, t) {
271
+ function V(e, t) {
330
272
  const n = [0, 0.04, -0.03, 0.06, -0.02], a = n[t % n.length] ?? 0;
331
273
  let s = e.ignition ? 13.6 : 12.3;
332
274
  switch (e.motionStatus) {
@@ -356,142 +298,142 @@ function A(e, t) {
356
298
  s = e.ignition ? 13.6 : 12.3;
357
299
  break;
358
300
  }
359
- e.signal === T.noSignal && (s -= 0.2);
360
- let o = e.ignition ? 4.16 : 4.04;
301
+ e.signal === w.noSignal && (s -= 0.2);
302
+ let i = e.ignition ? 4.16 : 4.04;
361
303
  switch (e.motionStatus) {
362
304
  case p.notDetectable:
363
- o = e.ignition ? 4.05 : 3.98;
305
+ i = e.ignition ? 4.05 : 3.98;
364
306
  break;
365
307
  case p.off:
366
- o = 4;
308
+ i = 4;
367
309
  break;
368
310
  case p.towing:
369
- o = 3.96;
311
+ i = 3.96;
370
312
  break;
371
313
  case p.stopped:
372
- o = e.ignition ? 4.08 : 4;
314
+ i = e.ignition ? 4.08 : 4;
373
315
  break;
374
316
  case p.stoppedRalenti:
375
- o = 4.13;
317
+ i = 4.13;
376
318
  break;
377
319
  case p.stoppedExcesiveRalenti:
378
- o = 4.1;
320
+ i = 4.1;
379
321
  break;
380
322
  case p.maxSpeed:
381
- o = 4.18;
323
+ i = 4.18;
382
324
  break;
383
325
  case p.moving:
384
326
  default:
385
- o = e.ignition ? 4.16 : 4.04;
327
+ i = e.ignition ? 4.16 : 4.04;
386
328
  break;
387
329
  }
388
- e.signal === T.acceptable && (o -= 0.03), e.signal === T.noSignal && (o -= 0.08);
389
- const i = H(O(s + a, 11.8, 13.9)), u = H(O(o + a / 2, 3.8, 4.2));
330
+ e.signal === w.acceptable && (i -= 0.03), e.signal === w.noSignal && (i -= 0.08);
331
+ const o = Y(O(s + a, 11.8, 13.9)), c = Y(O(i + a / 2, 3.8, 4.2));
390
332
  return {
391
- backupLevel: z(u, "4.5"),
392
- backupStatus: Z(u, "4.5"),
393
- backupVolt: u,
394
- mainLevel: z(i, "12"),
395
- mainStatus: Z(i, "12"),
396
- mainVolt: i,
333
+ backupLevel: j(c, "4.5"),
334
+ backupStatus: $(c, "4.5"),
335
+ backupVolt: c,
336
+ mainLevel: j(o, "12"),
337
+ mainStatus: $(o, "12"),
338
+ mainVolt: o,
397
339
  srcMainBatteryType: 0
398
340
  };
399
341
  }
400
- function be(e) {
342
+ function ke(e) {
401
343
  return Object.fromEntries(
402
- Object.entries(e.vpts?.vptDiX ?? {}).map(([t, n]) => [t, !!b(n.diXValue, !1)])
344
+ Object.entries(e.vpts?.vptDiX ?? {}).map(([t, n]) => [t, !!L(n.diXValue, !1)])
403
345
  );
404
346
  }
405
- function Re(e) {
347
+ function Te(e) {
406
348
  return Object.fromEntries(
407
- Object.entries(e.vpts?.vptDoX ?? {}).map(([t, n]) => [t, !!b(n.diXValue, !1)])
349
+ Object.entries(e.vpts?.vptDoX ?? {}).map(([t, n]) => [t, !!L(n.diXValue, !1)])
408
350
  );
409
351
  }
410
352
  function B(e, t) {
411
353
  return e.motionStatus !== void 0 ? e.motionStatus : t.ignition ? e.speedKph >= 55 ? p.maxSpeed : p.moving : p.towing;
412
354
  }
413
- function ne(e, t) {
355
+ function J(e, t) {
414
356
  return e.motionStatus !== void 0 ? e.motionStatus : t.ignition ? p.stopped : p.off;
415
357
  }
416
- function se(e, t) {
358
+ function Q(e, t) {
417
359
  const n = t.signal ?? e.signal;
418
360
  return {
419
361
  diX: t.diX ? { ...e.diX, ...t.diX } : { ...e.diX },
420
362
  doX: t.doX ? { ...e.doX, ...t.doX } : { ...e.doX },
421
363
  ignition: t.ignition ?? e.ignition,
422
- modemCsq: t.modemCsq ?? (t.signal !== void 0 ? te(n) : e.modemCsq),
364
+ modemCsq: t.modemCsq ?? (t.signal !== void 0 ? z(n) : e.modemCsq),
423
365
  signal: n
424
366
  };
425
367
  }
426
- function Ae(e, t) {
368
+ function be(e, t) {
427
369
  return e.omitDeviceIcon ?? t.omitDeviceIcon ?? !1;
428
370
  }
429
- function Ve(e, t) {
430
- const n = E(me);
431
- I(n.current, t.currentPatch ?? {}), I(n.current, e.currentPatch ?? {}), I(n.settings, t.settingsPatch ?? {}), n.settings.active = e.active ?? t.active ?? n.settings.active, n.alias = e.alias ?? t.alias ?? n.alias;
432
- const a = e.group ?? t.group ?? n.settings.group, s = e.department ?? t.department ?? n.department ?? ge(a);
433
- if (n.department = s, n.settings.group = a ?? fe(s), n.settings.iconBgColor = e.iconBgColor ?? t.iconBgColor ?? n.settings.iconBgColor, Ae(e, t))
371
+ function Ie(e, t) {
372
+ const n = D(ue);
373
+ b(n.current, t.currentPatch ?? {}), b(n.current, e.currentPatch ?? {}), b(n.settings, t.settingsPatch ?? {}), n.settings.active = e.active ?? t.active ?? n.settings.active, n.alias = e.alias ?? t.alias ?? n.alias;
374
+ const a = e.department ?? t.department ?? n.department;
375
+ if (n.department = a, n.settings.iconBgColor = e.iconBgColor ?? t.iconBgColor ?? n.settings.iconBgColor, be(e, t))
434
376
  n.deviceIcon = void 0;
435
377
  else {
436
378
  n.deviceIcon ??= {
437
- iconId: pe
379
+ iconId: ce
438
380
  };
439
381
  const i = e.iconId ?? t.iconId ?? n.deviceIcon.iconId;
440
382
  n.deviceIcon.iconId = i;
441
383
  }
442
384
  n.name = e.name ?? t.name, n.settings.properties?.internal_name && (n.settings.properties.internal_name.value = `${n.name}-${e.resourceSerialId}`);
443
- const o = String(e.resourceSerialId);
385
+ const s = String(e.resourceSerialId);
444
386
  return {
445
387
  ...n,
446
- id: Number(o)
388
+ id: Number(s)
447
389
  };
448
390
  }
449
- function _e(e) {
450
- const t = e.current.vpts?.vptGnss?.gnssSignal?.value ?? T.reliable;
391
+ function Ee(e) {
392
+ const t = e.current.vpts?.vptGnss?.gnssSignal?.value ?? w.reliable;
451
393
  return {
452
- diX: be(e.current),
453
- doX: Re(e.current),
454
- ignition: !!b(e.current.vpts?.vptIgnition?.ignitionValue, !0),
455
- modemCsq: b(
394
+ diX: ke(e.current),
395
+ doX: Te(e.current),
396
+ ignition: !!L(e.current.vpts?.vptIgnition?.ignitionValue, !0),
397
+ modemCsq: L(
456
398
  e.current.vpts?.vptModem?.modemCsq,
457
- te(t)
399
+ z(t)
458
400
  ),
459
401
  signal: t
460
402
  };
461
403
  }
462
- function Ce(e, t) {
404
+ function Re(e, t) {
463
405
  if (e.playbackOffsetSeconds !== void 0)
464
406
  return Math.max(0, e.playbackOffsetSeconds);
465
407
  const n = Number(e.resourceSerialId);
466
408
  return Number.isFinite(n) ? Math.abs(n) % 12 * t.logicalSampleSeconds * 4 : 0;
467
409
  }
468
- function Xe(e, t) {
410
+ function Le(e, t) {
469
411
  if (e.emissionOffsetMs !== void 0)
470
412
  return Math.max(0, e.emissionOffsetMs % t.intervalMs);
471
413
  const n = Number(e.resourceSerialId);
472
414
  return Number.isFinite(n) ? Math.abs(n * 137 % t.intervalMs) : 0;
473
415
  }
474
- function Oe(e) {
416
+ function Ae(e) {
475
417
  return {
476
- cumulativeDistancesMeters: e.waypoints.reduce((n, a, s, o) => {
418
+ cumulativeDistancesMeters: e.waypoints.reduce((n, a, s, i) => {
477
419
  if (s === 0)
478
420
  return n.push(0), n;
479
- const i = o[s - 1], u = n[s - 1] ?? 0;
480
- return n.push(u + J(i, a)), n;
421
+ const o = i[s - 1], c = n[s - 1] ?? 0;
422
+ return n.push(c + W(o, a)), n;
481
423
  }, []),
482
- totalDistanceMeters: ie(e.waypoints),
424
+ totalDistanceMeters: te(e.waypoints),
483
425
  waypoints: e.waypoints
484
426
  };
485
427
  }
486
- function Be(e) {
428
+ function Ve(e) {
487
429
  const t = e.waypoints[0], n = e.waypoints[e.waypoints.length - 1];
488
- return !t || !n ? !1 : J(t, n) <= 1;
430
+ return !t || !n ? !1 : W(t, n) <= 1;
489
431
  }
490
- function Ue(e) {
432
+ function _e(e) {
491
433
  return e.phases.reduce((t, n) => n.type !== "drive" ? t : t + n.speedKph * 1e3 / 3600 * n.durationSeconds, 0);
492
434
  }
493
- function Ge(e, t, n) {
494
- const a = Ue(n), s = Math.max(150, t.totalDistanceMeters * 0.03);
435
+ function Pe(e, t, n) {
436
+ const a = _e(n), s = Math.max(150, t.totalDistanceMeters * 0.03);
495
437
  if (a > t.totalDistanceMeters + s)
496
438
  throw new Error(
497
439
  `Dummy plan "${n.planId}" exceeds route "${e.routeId}" by ${Math.round(
@@ -499,7 +441,7 @@ function Ge(e, t, n) {
499
441
  )} meters`
500
442
  );
501
443
  }
502
- function V(e, t, n) {
444
+ function _(e, t, n) {
503
445
  const a = e.waypoints[0];
504
446
  if (!a)
505
447
  throw new Error("Dummy route must contain at least one waypoint");
@@ -514,34 +456,34 @@ function V(e, t, n) {
514
456
  Math.max(0, t),
515
457
  e.totalDistanceMeters
516
458
  );
517
- for (let i = 0; i < e.waypoints.length - 1; i += 1) {
518
- const u = e.waypoints[i], r = e.waypoints[i + 1], M = e.cumulativeDistancesMeters[i] ?? 0, v = e.cumulativeDistancesMeters[i + 1] ?? M;
519
- if (s > v && i < e.waypoints.length - 2)
459
+ for (let o = 0; o < e.waypoints.length - 1; o += 1) {
460
+ const c = e.waypoints[o], r = e.waypoints[o + 1], M = e.cumulativeDistancesMeters[o] ?? 0, v = e.cumulativeDistancesMeters[o + 1] ?? M;
461
+ if (s > v && o < e.waypoints.length - 2)
520
462
  continue;
521
- const f = Math.max(0, v - M), l = f === 0 ? 0 : (s - M) / f, c = re(u, r, l), d = f === 0 ? n : ue(u, r);
463
+ const g = Math.max(0, v - M), l = g === 0 ? 0 : (s - M) / g, u = se(c, r, l), d = g === 0 ? n : ae(c, r);
522
464
  return {
523
- address: l < 0.5 ? u.address : r.address,
465
+ address: l < 0.5 ? c.address : r.address,
524
466
  course: d,
525
- lat: c.lat,
526
- lng: c.lng
467
+ lat: u.lat,
468
+ lng: u.lng
527
469
  };
528
470
  }
529
- const o = e.waypoints[e.waypoints.length - 1];
471
+ const i = e.waypoints[e.waypoints.length - 1];
530
472
  return {
531
- address: o.address,
473
+ address: i.address,
532
474
  course: n,
533
- lat: o.lat,
534
- lng: o.lng
475
+ lat: i.lat,
476
+ lng: i.lng
535
477
  };
536
478
  }
537
- function Ne(e, t, n) {
479
+ function Ce(e, t, n) {
538
480
  const a = t.phases.find((r) => r.type !== "delete");
539
481
  if (!a)
540
482
  throw new Error(`Dummy plan "${t.planId}" must contain at least one executable phase`);
541
- const s = se(n, a), o = V(e, 0, 0), i = a.type === "drive" ? B(a, s) : ne(a, s), u = A(
483
+ const s = Q(n, a), i = _(e, 0, 0), o = a.type === "drive" ? B(a, s) : J(a, s), c = V(
542
484
  {
543
485
  ignition: s.ignition,
544
- motionStatus: i,
486
+ motionStatus: o,
545
487
  signal: s.signal
546
488
  },
547
489
  0
@@ -550,47 +492,47 @@ function Ne(e, t, n) {
550
492
  cursor: {
551
493
  currentTimestampMs: C,
552
494
  frameIndex: 0,
553
- lastCourse: o.course,
495
+ lastCourse: i.course,
554
496
  odometerMeters: 0,
555
497
  routeDistanceMeters: 0
556
498
  },
557
499
  frameState: {
558
- address: o.address,
559
- backupLevel: u.backupLevel,
560
- backupStatus: u.backupStatus,
561
- backupVolt: u.backupVolt,
562
- course: o.course,
500
+ address: i.address,
501
+ backupLevel: c.backupLevel,
502
+ backupStatus: c.backupStatus,
503
+ backupVolt: c.backupVolt,
504
+ course: i.course,
563
505
  diX: { ...s.diX },
564
506
  doX: { ...s.doX },
565
507
  ignition: s.ignition,
566
- lat: o.lat,
567
- lng: o.lng,
568
- mainLevel: u.mainLevel,
569
- mainStatus: u.mainStatus,
570
- mainVolt: u.mainVolt,
508
+ lat: i.lat,
509
+ lng: i.lng,
510
+ mainLevel: c.mainLevel,
511
+ mainStatus: c.mainStatus,
512
+ mainVolt: c.mainVolt,
571
513
  modemCsq: s.modemCsq,
572
- motionStatus: i,
514
+ motionStatus: o,
573
515
  odometerMeters: 0,
574
516
  signal: s.signal,
575
517
  speedKph: a.type === "drive" ? a.speedKph : 0,
576
- srcMainBatteryType: u.srcMainBatteryType,
518
+ srcMainBatteryType: c.srcMainBatteryType,
577
519
  timestampMs: C
578
520
  },
579
521
  persistentState: s
580
522
  };
581
523
  }
582
- function xe(e, t, n, a, s) {
583
- const o = t.reduce((m, g, y) => ((g.type === "new" || g.type === "update") && m.push(y), m), []);
584
- if (!o.length)
524
+ function Xe(e, t, n, a, s) {
525
+ const i = t.reduce((m, f, S) => ((f.type === "new" || f.type === "update") && m.push(S), m), []);
526
+ if (!i.length)
585
527
  return {
586
528
  initialMessageIndex: 1,
587
529
  initialResource: e,
588
530
  playbackMessages: t
589
531
  };
590
- const i = Ce(a, n), u = Math.floor(i / n.logicalSampleSeconds), r = Math.min(u, o.length - 1), M = o[r], v = t[M], f = (v.type === "new", v.payload.current), l = {
532
+ const o = Re(a, n), c = Math.floor(o / n.logicalSampleSeconds), r = Math.min(c, i.length - 1), M = i[r], v = t[M], g = (v.type === "new", v.payload.current), l = {
591
533
  ...e,
592
- current: E(f)
593
- }, c = t.slice(M + 1), d = n.loop ? t.slice(1, M + 1) : [];
534
+ current: D(g)
535
+ }, u = t.slice(M + 1), d = n.loop ? t.slice(1, M + 1) : [];
594
536
  return {
595
537
  initialMessageIndex: 1,
596
538
  initialResource: l,
@@ -601,129 +543,97 @@ function xe(e, t, n, a, s) {
601
543
  resourceSerialId: a.resourceSerialId,
602
544
  type: "new"
603
545
  },
604
- ...c,
546
+ ...u,
605
547
  ...d
606
548
  ]
607
549
  };
608
550
  }
609
- function Fe(e, t) {
551
+ function Oe(e, t) {
610
552
  const n = t.messagePayloadPatches ?? [];
611
553
  if (!n.length)
612
554
  return e;
613
555
  const a = {
614
556
  ...e,
615
- initialResource: E(e.initialResource),
616
- messages: e.messages.map((s) => E(s))
557
+ initialResource: D(e.initialResource),
558
+ messages: e.messages.map((s) => D(s))
617
559
  };
618
560
  return n.forEach((s) => {
619
- const o = a.messages[s.messageIndex];
620
- if (!o)
561
+ const i = a.messages[s.messageIndex];
562
+ if (!i)
621
563
  throw new Error(
622
564
  `Dummy hostile payload patch targeted missing message index ${s.messageIndex} for device ${t.resourceSerialId}.`
623
565
  );
624
- if (o.type === "delete")
566
+ if (i.type === "delete")
625
567
  throw new Error(
626
568
  `Dummy hostile payload patch cannot target delete message index ${s.messageIndex} for device ${t.resourceSerialId}.`
627
569
  );
628
- I(
629
- o.payload,
630
- E(s.payloadPatch)
631
- ), s.messageIndex === 0 && o.type === "new" && I(
570
+ b(
571
+ i.payload,
572
+ D(s.payloadPatch)
573
+ ), s.messageIndex === 0 && i.type === "new" && b(
632
574
  a.initialResource,
633
- E(s.payloadPatch)
575
+ D(s.payloadPatch)
634
576
  );
635
577
  }), a;
636
578
  }
637
- function Ke(e, t) {
579
+ function Be(e, t) {
638
580
  const n = t.omittedGnssFields, a = t.omitSyntheticModemTimestamps === !0;
639
581
  if (!n?.gnssLatitude && !n?.gnssLongitude && !n?.gnssMotionStatus && !n?.gnssSignal && !a)
640
582
  return e;
641
583
  const s = {
642
584
  ...e,
643
- initialResource: E(e.initialResource),
644
- messages: e.messages.map((i) => E(i))
645
- }, o = (i) => {
646
- n?.gnssLatitude && h(i, "vpts.vptGnss.gnssLatitude"), n?.gnssLongitude && h(i, "vpts.vptGnss.gnssLongitude"), n?.gnssMotionStatus && h(i, "vpts.vptGnss.gnssMotionStatus"), n?.gnssSignal && h(i, "vpts.vptGnss.gnssSignal"), a && (h(i, "reportProfiles.generalEvents.reportProfileLastEventDate"), h(i, "reportProfiles.generalEvents.reportProfileLastEventId"), h(i, "reportProfiles.systemEvents.reportProfileLastEventDate"), h(i, "reportProfiles.systemEvents.reportProfileLastEventId"), h(i, "vpts.vptNetwork.networkLastConnectionDate"), h(i, "vpts.vptNetwork.networkLastEventDate"));
585
+ initialResource: D(e.initialResource),
586
+ messages: e.messages.map((o) => D(o))
587
+ }, i = (o) => {
588
+ n?.gnssLatitude && T(o, "vpts.vptGnss.gnssLatitude"), n?.gnssLongitude && T(o, "vpts.vptGnss.gnssLongitude"), n?.gnssMotionStatus && T(o, "vpts.vptGnss.gnssMotionStatus"), n?.gnssSignal && T(o, "vpts.vptGnss.gnssSignal"), a && (T(o, "vpts.vptNetwork.networkLastConnectionDate"), T(o, "vpts.vptNetwork.networkLastEventDate"));
647
589
  };
648
- return o(
590
+ return i(
649
591
  s.initialResource.current
650
- ), s.messages.forEach((i) => {
651
- if (i.type !== "delete") {
652
- if (i.type === "new") {
653
- o(i.payload.current);
592
+ ), s.messages.forEach((o) => {
593
+ if (o.type !== "delete") {
594
+ if (o.type === "new") {
595
+ i(o.payload.current);
654
596
  return;
655
597
  }
656
- o(
657
- i.payload.current
598
+ i(
599
+ o.payload.current
658
600
  );
659
601
  }
660
602
  }), s;
661
603
  }
662
- function _(e, t) {
663
- const n = new Date(t.timestampMs).toISOString(), a = Pe(t.signal), s = E(e);
664
- return s.reportProfiles = {
665
- ...s.reportProfiles,
666
- generalEvents: {
667
- ...s.reportProfiles?.generalEvents,
668
- reportProfileLastEventDate: {
669
- ...s.reportProfiles?.generalEvents?.reportProfileLastEventDate,
670
- state: "current",
671
- updatedAt: n,
672
- value: n
673
- },
674
- reportProfileLastEventId: {
675
- ...s.reportProfiles?.generalEvents?.reportProfileLastEventId,
676
- state: "current",
677
- updatedAt: n,
678
- value: 20
679
- }
680
- },
681
- systemEvents: {
682
- ...s.reportProfiles?.systemEvents,
683
- reportProfileLastEventDate: {
684
- ...s.reportProfiles?.systemEvents?.reportProfileLastEventDate,
685
- state: "current",
686
- updatedAt: n,
687
- value: n
688
- },
689
- reportProfileLastEventId: {
690
- ...s.reportProfiles?.systemEvents?.reportProfileLastEventId,
691
- state: "current",
692
- updatedAt: n,
693
- value: 1304
694
- }
695
- }
696
- }, s.vpts = s.vpts ?? {}, s.vpts.vptDiX = Object.fromEntries(
697
- Object.entries(t.diX).map(([o, i]) => [
698
- o,
604
+ function P(e, t) {
605
+ const n = new Date(t.timestampMs).toISOString(), a = we(t.signal), s = D(e);
606
+ return s.vpts = s.vpts ?? {}, s.vpts.vptDiX = Object.fromEntries(
607
+ Object.entries(t.diX).map(([i, o]) => [
608
+ i,
699
609
  {
700
610
  diXStatus: { value: !0, updatedAt: n },
701
- diXValue: { value: i, updatedAt: n }
611
+ diXValue: { value: o, updatedAt: n }
702
612
  }
703
613
  ])
704
614
  ), s.vpts.vptDoX = Object.fromEntries(
705
- Object.entries(t.doX).map(([o, i]) => [
706
- o,
615
+ Object.entries(t.doX).map(([i, o]) => [
616
+ i,
707
617
  {
708
- diXValue: { value: i, updatedAt: n }
618
+ diXValue: { value: o, updatedAt: n }
709
619
  }
710
620
  ])
711
621
  ), s.vpts.vptGnss = {
712
622
  ...s.vpts.vptGnss,
713
623
  gnssAddress: t.address,
714
624
  gnssAltitude: 1520,
715
- gnssCourse: P(
625
+ gnssCourse: R(
716
626
  s.vpts.vptGnss?.gnssCourse,
717
627
  Math.round(t.course),
718
628
  n
719
629
  ),
720
630
  gnssHdop: a.gnssHdop,
721
- gnssLatitude: P(
631
+ gnssLatitude: R(
722
632
  s.vpts.vptGnss?.gnssLatitude,
723
633
  t.lat,
724
634
  n
725
635
  ),
726
- gnssLongitude: P(
636
+ gnssLongitude: R(
727
637
  s.vpts.vptGnss?.gnssLongitude,
728
638
  t.lng,
729
639
  n
@@ -732,7 +642,7 @@ function _(e, t) {
732
642
  gnssOdometer: Math.round(t.odometerMeters),
733
643
  gnssSatellitesInUse: a.gnssSatellitesInUse,
734
644
  gnssSignal: { value: t.signal, updatedAt: n },
735
- gnssSpeed: P(
645
+ gnssSpeed: R(
736
646
  s.vpts.vptGnss?.gnssSpeed,
737
647
  t.speedKph,
738
648
  n
@@ -795,42 +705,42 @@ function _(e, t) {
795
705
  }
796
706
  }, s;
797
707
  }
798
- function ae(e, t) {
708
+ function ee(e, t) {
799
709
  return Math.max(1, Math.ceil(e.durationSeconds / t.logicalSampleSeconds));
800
710
  }
801
- function qe(e, t, n, a, s, o, i, u, r) {
802
- const M = ae(o, u);
711
+ function Ue(e, t, n, a, s, i, o, c, r) {
712
+ const M = ee(i, c);
803
713
  for (let v = 0; v < M; v += 1) {
804
- const f = oe(o.speedKph, r.frameIndex + 1), l = f * 1e3 / 3600 * u.logicalSampleSeconds, c = Math.min(
714
+ const g = ne(i.speedKph, r.frameIndex + 1), l = g * 1e3 / 3600 * c.logicalSampleSeconds, u = Math.min(
805
715
  s.totalDistanceMeters,
806
716
  r.routeDistanceMeters + l
807
- ), d = c - r.routeDistanceMeters, m = V(s, c, r.lastCourse);
808
- r.currentTimestampMs += u.logicalSampleSeconds * 1e3, r.frameIndex += 1, r.lastCourse = m.course, r.odometerMeters += d, r.routeDistanceMeters = c;
809
- const g = {
717
+ ), d = u - r.routeDistanceMeters, m = _(s, u, r.lastCourse);
718
+ r.currentTimestampMs += c.logicalSampleSeconds * 1e3, r.frameIndex += 1, r.lastCourse = m.course, r.odometerMeters += d, r.routeDistanceMeters = u;
719
+ const f = {
810
720
  address: m.address,
811
721
  backupLevel: 0,
812
- backupStatus: D.lost,
722
+ backupStatus: y.lost,
813
723
  backupVolt: 0,
814
724
  course: m.course,
815
- diX: { ...i.diX },
816
- doX: { ...i.doX },
817
- ignition: i.ignition,
725
+ diX: { ...o.diX },
726
+ doX: { ...o.doX },
727
+ ignition: o.ignition,
818
728
  lat: m.lat,
819
729
  lng: m.lng,
820
730
  mainLevel: 0,
821
- mainStatus: D.lost,
731
+ mainStatus: y.lost,
822
732
  mainVolt: 0,
823
- modemCsq: i.modemCsq,
824
- motionStatus: B(o, i),
733
+ modemCsq: o.modemCsq,
734
+ motionStatus: B(i, o),
825
735
  odometerMeters: r.odometerMeters,
826
- signal: i.signal,
827
- speedKph: d > 0 ? f : 0,
736
+ signal: o.signal,
737
+ speedKph: d > 0 ? g : 0,
828
738
  srcMainBatteryType: 0,
829
739
  timestampMs: r.currentTimestampMs
830
- }, y = A(g, r.frameIndex);
831
- g.mainLevel = y.mainLevel, g.mainStatus = y.mainStatus, g.mainVolt = y.mainVolt, g.backupLevel = y.backupLevel, g.backupStatus = y.backupStatus, g.backupVolt = y.backupVolt, g.srcMainBatteryType = y.srcMainBatteryType, e.push({
740
+ }, S = V(f, r.frameIndex);
741
+ f.mainLevel = S.mainLevel, f.mainStatus = S.mainStatus, f.mainVolt = S.mainVolt, f.backupLevel = S.backupLevel, f.backupStatus = S.backupStatus, f.backupVolt = S.backupVolt, f.srcMainBatteryType = S.srcMainBatteryType, e.push({
832
742
  payload: {
833
- current: _(a, g)
743
+ current: P(a, f)
834
744
  },
835
745
  resourceTypeId: t,
836
746
  resourceSerialId: n,
@@ -838,36 +748,36 @@ function qe(e, t, n, a, s, o, i, u, r) {
838
748
  });
839
749
  }
840
750
  }
841
- function Ye(e, t, n, a, s, o, i, u, r) {
842
- const M = ae(o, u);
751
+ function Ge(e, t, n, a, s, i, o, c, r) {
752
+ const M = ee(i, c);
843
753
  for (let v = 0; v < M; v += 1) {
844
- const f = V(s, r.routeDistanceMeters, r.lastCourse);
845
- r.currentTimestampMs += u.logicalSampleSeconds * 1e3, r.frameIndex += 1;
754
+ const g = _(s, r.routeDistanceMeters, r.lastCourse);
755
+ r.currentTimestampMs += c.logicalSampleSeconds * 1e3, r.frameIndex += 1;
846
756
  const l = {
847
- address: f.address,
757
+ address: g.address,
848
758
  backupLevel: 0,
849
- backupStatus: D.lost,
759
+ backupStatus: y.lost,
850
760
  backupVolt: 0,
851
- course: o.courseOverrideDegrees ?? r.lastCourse,
852
- diX: { ...i.diX },
853
- doX: { ...i.doX },
854
- ignition: i.ignition,
855
- lat: f.lat,
856
- lng: f.lng,
761
+ course: i.courseOverrideDegrees ?? r.lastCourse,
762
+ diX: { ...o.diX },
763
+ doX: { ...o.doX },
764
+ ignition: o.ignition,
765
+ lat: g.lat,
766
+ lng: g.lng,
857
767
  mainLevel: 0,
858
- mainStatus: D.lost,
768
+ mainStatus: y.lost,
859
769
  mainVolt: 0,
860
- modemCsq: i.modemCsq,
861
- motionStatus: ne(o, i),
770
+ modemCsq: o.modemCsq,
771
+ motionStatus: J(i, o),
862
772
  odometerMeters: r.odometerMeters,
863
- signal: i.signal,
773
+ signal: o.signal,
864
774
  speedKph: 0,
865
775
  srcMainBatteryType: 0,
866
776
  timestampMs: r.currentTimestampMs
867
- }, c = A(l, r.frameIndex);
868
- l.mainLevel = c.mainLevel, l.mainStatus = c.mainStatus, l.mainVolt = c.mainVolt, l.backupLevel = c.backupLevel, l.backupStatus = c.backupStatus, l.backupVolt = c.backupVolt, l.srcMainBatteryType = c.srcMainBatteryType, e.push({
777
+ }, u = V(l, r.frameIndex);
778
+ l.mainLevel = u.mainLevel, l.mainStatus = u.mainStatus, l.mainVolt = u.mainVolt, l.backupLevel = u.backupLevel, l.backupStatus = u.backupStatus, l.backupVolt = u.backupVolt, l.srcMainBatteryType = u.srcMainBatteryType, e.push({
869
779
  payload: {
870
- current: _(a, l)
780
+ current: P(a, l)
871
781
  },
872
782
  resourceTypeId: t,
873
783
  resourceSerialId: n,
@@ -875,39 +785,39 @@ function Ye(e, t, n, a, s, o, i, u, r) {
875
785
  });
876
786
  }
877
787
  }
878
- function $e({
788
+ function Ne({
879
789
  baseCurrent: e,
880
790
  cursor: t,
881
791
  messages: n,
882
792
  persistentState: a,
883
793
  playback: s,
884
- resourceTypeId: o,
885
- resourceSerialId: i,
886
- routeIndex: u,
794
+ resourceTypeId: i,
795
+ resourceSerialId: o,
796
+ routeIndex: c,
887
797
  speedKph: r
888
798
  }) {
889
- if (r === void 0 || !Be(u) || t.routeDistanceMeters >= u.totalDistanceMeters)
799
+ if (r === void 0 || !Ve(c) || t.routeDistanceMeters >= c.totalDistanceMeters)
890
800
  return;
891
801
  const M = Math.max(r, 8);
892
- for (; t.routeDistanceMeters < u.totalDistanceMeters; ) {
893
- const v = M * 1e3 / 3600 * s.logicalSampleSeconds, f = Math.min(
894
- u.totalDistanceMeters,
802
+ for (; t.routeDistanceMeters < c.totalDistanceMeters; ) {
803
+ const v = M * 1e3 / 3600 * s.logicalSampleSeconds, g = Math.min(
804
+ c.totalDistanceMeters,
895
805
  t.routeDistanceMeters + v
896
- ), l = f - t.routeDistanceMeters, c = V(u, f, t.lastCourse);
897
- t.currentTimestampMs += s.logicalSampleSeconds * 1e3, t.frameIndex += 1, t.lastCourse = c.course, t.odometerMeters += l, t.routeDistanceMeters = f;
806
+ ), l = g - t.routeDistanceMeters, u = _(c, g, t.lastCourse);
807
+ t.currentTimestampMs += s.logicalSampleSeconds * 1e3, t.frameIndex += 1, t.lastCourse = u.course, t.odometerMeters += l, t.routeDistanceMeters = g;
898
808
  const d = {
899
- address: c.address,
809
+ address: u.address,
900
810
  backupLevel: 0,
901
- backupStatus: D.lost,
811
+ backupStatus: y.lost,
902
812
  backupVolt: 0,
903
- course: c.course,
813
+ course: u.course,
904
814
  diX: { ...a.diX },
905
815
  doX: { ...a.doX },
906
816
  ignition: a.ignition,
907
- lat: c.lat,
908
- lng: c.lng,
817
+ lat: u.lat,
818
+ lng: u.lng,
909
819
  mainLevel: 0,
910
- mainStatus: D.lost,
820
+ mainStatus: y.lost,
911
821
  mainVolt: 0,
912
822
  modemCsq: a.modemCsq,
913
823
  motionStatus: B(
@@ -922,40 +832,40 @@ function $e({
922
832
  speedKph: l > 0 ? M : 0,
923
833
  srcMainBatteryType: 0,
924
834
  timestampMs: t.currentTimestampMs
925
- }, m = A(d, t.frameIndex);
835
+ }, m = V(d, t.frameIndex);
926
836
  d.mainLevel = m.mainLevel, d.mainStatus = m.mainStatus, d.mainVolt = m.mainVolt, d.backupLevel = m.backupLevel, d.backupStatus = m.backupStatus, d.backupVolt = m.backupVolt, d.srcMainBatteryType = m.srcMainBatteryType, n.push({
927
837
  payload: {
928
- current: _(e, d)
838
+ current: P(e, d)
929
839
  },
930
- resourceTypeId: o,
931
- resourceSerialId: i,
840
+ resourceTypeId: i,
841
+ resourceSerialId: o,
932
842
  type: "update"
933
843
  });
934
844
  }
935
845
  }
936
- function je(e, t, n) {
937
- const { assignment: a, blueprint: s, plan: o, route: i } = e, u = Oe(i);
938
- Ge(i, u, o);
939
- const r = Ve(a, s), M = _e(r), { cursor: v, frameState: f, persistentState: l } = Ne(
940
- u,
941
- o,
846
+ function xe(e, t, n) {
847
+ const { assignment: a, blueprint: s, plan: i, route: o } = e, c = Ae(o);
848
+ Pe(o, c, i);
849
+ const r = Ie(a, s), M = Ee(r), { cursor: v, frameState: g, persistentState: l } = Ce(
850
+ c,
851
+ i,
942
852
  M
943
- ), c = {
853
+ ), u = {
944
854
  ...r,
945
- current: _(r.current, f)
855
+ current: P(r.current, g)
946
856
  };
947
- let d = l, m = o.phases.find((w) => w.type === "drive")?.speedKph;
948
- const g = [
857
+ let d = l, m = i.phases.find((k) => k.type === "drive")?.speedKph;
858
+ const f = [
949
859
  {
950
- payload: c,
860
+ payload: u,
951
861
  resourceTypeId: n,
952
862
  resourceSerialId: a.resourceSerialId,
953
863
  type: "new"
954
864
  }
955
865
  ];
956
- for (const w of o.phases) {
957
- if (w.type === "delete") {
958
- g.push({
866
+ for (const k of i.phases) {
867
+ if (k.type === "delete") {
868
+ f.push({
959
869
  payload: {},
960
870
  resourceTypeId: n,
961
871
  resourceSerialId: a.resourceSerialId,
@@ -963,65 +873,65 @@ function je(e, t, n) {
963
873
  });
964
874
  break;
965
875
  }
966
- if (d = se(d, w), w.type === "drive") {
967
- m = w.speedKph, qe(
968
- g,
876
+ if (d = Q(d, k), k.type === "drive") {
877
+ m = k.speedKph, Ue(
878
+ f,
969
879
  n,
970
880
  a.resourceSerialId,
971
881
  r.current,
972
- u,
973
- w,
882
+ c,
883
+ k,
974
884
  d,
975
885
  t,
976
886
  v
977
887
  );
978
888
  continue;
979
889
  }
980
- Ye(
981
- g,
890
+ Ge(
891
+ f,
982
892
  n,
983
893
  a.resourceSerialId,
984
894
  r.current,
985
- u,
986
- w,
895
+ c,
896
+ k,
987
897
  d,
988
898
  t,
989
899
  v
990
900
  );
991
901
  }
992
- $e({
902
+ Ne({
993
903
  baseCurrent: r.current,
994
904
  cursor: v,
995
- messages: g,
905
+ messages: f,
996
906
  persistentState: d,
997
907
  playback: t,
998
908
  resourceTypeId: n,
999
909
  resourceSerialId: a.resourceSerialId,
1000
- routeIndex: u,
910
+ routeIndex: c,
1001
911
  speedKph: m
1002
912
  });
1003
- const y = xe(
913
+ const S = Xe(
1004
914
  r,
1005
- g,
915
+ f,
1006
916
  t,
1007
917
  a,
1008
918
  n
1009
919
  );
1010
- return Ke(
1011
- Fe({
1012
- emissionOffsetMs: Xe(a, t),
1013
- initialMessageIndex: y.initialMessageIndex,
1014
- initialResource: y.initialResource,
1015
- messages: y.playbackMessages,
920
+ return Be(
921
+ Oe({
922
+ emissionOffsetMs: Le(a, t),
923
+ initialMessageIndex: S.initialMessageIndex,
924
+ initialResource: S.initialResource,
925
+ messages: S.playbackMessages,
1016
926
  resourceSerialId: a.resourceSerialId
1017
927
  }, a),
1018
928
  a
1019
929
  );
1020
930
  }
1021
- function We(e, t) {
1022
- const n = ke(e), a = t?.resourceTypeId ?? ve, s = {
1023
- devices: n.devices.map((o) => je(
1024
- o,
931
+ function Fe(e, t) {
932
+ const n = he(e), a = t?.resourceTypeId ?? le, s = {
933
+ devices: n.devices.map((i) => xe(
934
+ i,
1025
935
  n.playback,
1026
936
  a
1027
937
  )),
@@ -1029,32 +939,32 @@ function We(e, t) {
1029
939
  };
1030
940
  return t?.wallClockStartAtMs === void 0 ? s : {
1031
941
  ...s,
1032
- devices: s.devices.map((o) => ({
1033
- ...o,
1034
- initialResource: De(
1035
- o.initialResource,
942
+ devices: s.devices.map((i) => ({
943
+ ...i,
944
+ initialResource: me(
945
+ i.initialResource,
1036
946
  t.wallClockStartAtMs
1037
947
  ),
1038
- messages: o.messages.map((i) => Ee(
1039
- i,
948
+ messages: i.messages.map((o) => ge(
949
+ o,
1040
950
  t.wallClockStartAtMs
1041
951
  ))
1042
952
  }))
1043
953
  };
1044
954
  }
1045
- function He(e, t) {
1046
- return We(e).devices.reduce((a, s) => (a[s.resourceSerialId] = t?.wallClockStartAtMs === void 0 ? s.initialResource : Se(
955
+ function Ke(e, t) {
956
+ return Fe(e).devices.reduce((a, s) => (a[s.resourceSerialId] = t?.wallClockStartAtMs === void 0 ? s.initialResource : ve(
1047
957
  s.initialResource,
1048
958
  t.wallClockStartAtMs
1049
959
  ), a), {});
1050
960
  }
1051
- function Ze({
961
+ function qe({
1052
962
  resourceTypeId: e,
1053
963
  simulation: t
1054
964
  }) {
1055
965
  const n = Date.now();
1056
966
  return {
1057
- initialHashResources: He(t, {
967
+ initialHashResources: Ke(t, {
1058
968
  wallClockStartAtMs: n
1059
969
  }),
1060
970
  resourceTypeId: e,
@@ -1063,22 +973,22 @@ function Ze({
1063
973
  wallClockStartAtMs: n
1064
974
  };
1065
975
  }
1066
- function ct({
976
+ function st({
1067
977
  presetId: e,
1068
978
  resourceTypeId: t,
1069
979
  simulationOverrides: n
1070
980
  }) {
1071
- return Ze({
981
+ return qe({
1072
982
  resourceTypeId: t,
1073
- simulation: ce({
983
+ simulation: ie({
1074
984
  overrides: n,
1075
985
  presetId: e
1076
986
  })
1077
987
  });
1078
988
  }
1079
989
  export {
1080
- We as buildRealTimeDummyRuntimeModel,
1081
- He as createRealTimeDummyInitialResources,
1082
- Ze as createRealTimeDummyResourceTypeConfig,
1083
- ct as createRealTimeDummyResourceTypeConfigFromPreset
990
+ Fe as buildRealTimeDummyRuntimeModel,
991
+ Ke as createRealTimeDummyInitialResources,
992
+ qe as createRealTimeDummyResourceTypeConfig,
993
+ st as createRealTimeDummyResourceTypeConfigFromPreset
1084
994
  };