@kosdev-code/kos-freestyle-sdk 2.1.26 → 2.1.28

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 (44) hide show
  1. package/{extension-utils-DABHO8qx.cjs → extension-utils-CbiToj2v.cjs} +2 -2
  2. package/{extension-utils-DABHO8qx.cjs.map → extension-utils-CbiToj2v.cjs.map} +1 -1
  3. package/{extension-utils-CARIyqNK.js → extension-utils-DP5eulYE.js} +11 -11
  4. package/{extension-utils-CARIyqNK.js.map → extension-utils-DP5eulYE.js.map} +1 -1
  5. package/index.cjs +1 -1
  6. package/index.js +36 -33
  7. package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts +195 -5
  8. package/models/models/agitation-required-trouble/agitation-required-trouble-model.d.ts.map +1 -1
  9. package/models/models/agitation-required-trouble/index.d.ts +4 -2
  10. package/models/models/agitation-required-trouble/index.d.ts.map +1 -1
  11. package/models/models/carb-agitator/carb-agitator-model.d.ts +258 -0
  12. package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
  13. package/models/models/carb-agitator/services/carb-tank-services.d.ts +25 -0
  14. package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -1
  15. package/models/utils/freestyle-registration-manager.d.ts.map +1 -1
  16. package/models/utils/openapi-index.d.ts +2 -2
  17. package/models/utils/services/freestyle/1.6.5/openapi.d.ts +1462 -0
  18. package/models/utils/services/freestyle/1.6.5/service.d.ts +118 -0
  19. package/models/utils/services/freestyle/1.6.5/service.d.ts.map +1 -0
  20. package/models/utils/services/freestyle/1.8.1/openapi.d.ts +1656 -0
  21. package/models/utils/services/freestyle/1.8.1/service.d.ts +118 -0
  22. package/models/utils/services/freestyle/1.8.1/service.d.ts.map +1 -0
  23. package/models/utils/services/handle/1.8.1/openapi.d.ts +237 -0
  24. package/models/utils/services/handle/1.8.1/service.d.ts +118 -0
  25. package/models/utils/services/handle/1.8.1/service.d.ts.map +1 -0
  26. package/models/utils/services-index.d.ts +3 -0
  27. package/models/utils/services-index.d.ts.map +1 -1
  28. package/models.cjs +1 -1
  29. package/models.js +30 -27
  30. package/package.json +4 -4
  31. package/{service-VUszslQD.cjs → service-BYZ3LYEa.cjs} +2 -2
  32. package/service-BYZ3LYEa.cjs.map +1 -0
  33. package/{service-C0WOCTr1.js → service-_jG-Kd3m.js} +634 -478
  34. package/service-_jG-Kd3m.js.map +1 -0
  35. package/ui.cjs +1 -1
  36. package/ui.js +2 -2
  37. package/{use-nutrition-info-BWyJAXF6.js → use-nutrition-info-B9ybCLwb.js} +2 -2
  38. package/{use-nutrition-info-BWyJAXF6.js.map → use-nutrition-info-B9ybCLwb.js.map} +1 -1
  39. package/{use-nutrition-info-BRX7H5o6.cjs → use-nutrition-info-C-RDcG4S.cjs} +2 -2
  40. package/{use-nutrition-info-BRX7H5o6.cjs.map → use-nutrition-info-C-RDcG4S.cjs.map} +1 -1
  41. package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts +0 -87
  42. package/models/models/agitation-required-trouble/agitation-required-trouble-registration.d.ts.map +0 -1
  43. package/service-C0WOCTr1.js.map +0 -1
  44. package/service-VUszslQD.cjs.map +0 -1
@@ -1,36 +1,55 @@
1
- var mt = Object.defineProperty;
2
- var yt = (e, t, r) => t in e ? mt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var i = (e, t, r) => (yt(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { resolveServiceUrl as A, ServiceFactory as w, KosLog as $, createPropKey as x, kosStateProp as O, kosConfigProperty as b, kosStateEntry as me, kosStateExit as bt, kosStateGuard as ye, kosFuture as _, kosModel as f, kosLoggerAware as ee, kosCompanion as De, kosFutureAware as Le, kosStateMachine as Pt, DependencyLifecycle as Fe, KosModelContainer as vt, kosChild as Ne, kosModelEffect as be, EventBus as Y, KosModelRegistrationFactory as C, SingletonKosModelRegistrationFactory as Pe, FetchError as ve, FutureManager as y, FutureEndState as U, FutureHandler as ze, kosParentAware as xe, KosFeatureFlags as ne, getKosCompanionModel as Tt, getKosModelSync as R, kosContainerAware as It, KosContextManager as _t, kosAction as K, KOS_MODEL_ID as E, kosMultipleFutureAware as $t, kosTopicHandler as Ct, modelTypeEventTopicFactory as Et, RegistrationManager as m, registerCoreModels as Ot, Trouble as St, ExtensionManager as le, EXTENSION_TROUBLE_DATA_MAPPER as ue, createClient as Ue, kosServiceRequest as Ge } from "@kosdev-code/kos-ui-sdk";
5
- import { PourState as d, Assembly as je, KosModelRegistry as At, registerDispenseModels as wt, Nozzle as Mt, Pump as Rt, Holder as Dt, PumpContainer as Lt, PumpIndex as Ft } from "@kosdev-code/kos-dispense-sdk";
6
- const { URL: qe } = A("ICE_AGITATOR_SERVICE"), { postModel: Nt } = w.build({
7
- basePath: `${qe}/api/ext/freestyle/ice`
1
+ var vt = Object.defineProperty;
2
+ var Tt = (e, t, r) => t in e ? vt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var i = (e, t, r) => (Tt(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { resolveServiceUrl as A, ServiceFactory as w, KosLog as $, createPropKey as U, kosStateProp as O, kosConfigProperty as b, kosStateEntry as be, kosStateExit as _t, kosStateGuard as Pe, kosFuture as I, kosModel as f, kosLoggerAware as V, kosCompanion as ve, kosFutureAware as xe, kosStateMachine as It, DependencyLifecycle as Ue, KosModelContainer as $t, kosChild as qe, kosModelEffect as Te, EventBus as k, KosModelRegistrationFactory as E, SingletonKosModelRegistrationFactory as _e, FetchError as Ie, FutureManager as y, FutureEndState as q, FutureHandler as Ge, kosParentAware as je, KosFeatureFlags as ue, getKosCompanionModel as Ct, getKosModelSync as R, kosContainerAware as Ot, KosContextManager as Et, kosAction as Z, KOS_MODEL_ID as C, kosMultipleFutureAware as St, kosTopicHandler as At, modelTypeEventTopicFactory as wt, RegistrationManager as m, registerCoreModels as Mt, Trouble as Rt, ExtensionManager as ce, EXTENSION_TROUBLE_DATA_MAPPER as de, createClient as H, kosServiceRequest as B } from "@kosdev-code/kos-ui-sdk";
5
+ import { PourState as d, Assembly as Ve, KosModelRegistry as Dt, registerDispenseModels as Ft, Nozzle as Lt, Pump as zt, Holder as Nt, PumpContainer as xt, PumpIndex as Ut } from "@kosdev-code/kos-dispense-sdk";
6
+ const { URL: He } = A("ICE_AGITATOR_SERVICE"), { postModel: qt } = w.build({
7
+ basePath: `${He}/api/ext/freestyle/ice`
8
8
  });
9
9
  $.createLogger({
10
10
  name: "carb-tank-service",
11
11
  group: "Services"
12
12
  });
13
- const zt = async (e, t) => {
14
- const r = await Nt({
13
+ const Gt = async (e, t) => {
14
+ const r = await qt({
15
15
  model: {},
16
16
  tracker: t,
17
- urlOverride: `${qe}/api/handle/${e}/test`
17
+ urlOverride: `${He}/api/handle/${e}/test`
18
18
  });
19
19
  if (!(r != null && r.data))
20
20
  throw new Error("No response from server");
21
21
  return r == null ? void 0 : r.data;
22
22
  };
23
- var Ve = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Ut = (e, t, r) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, P = (e, t, r, o) => {
24
- for (var a = o > 1 ? void 0 : o ? xt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
23
+ var Be = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Vt = (e, t, r) => t in e ? Be(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, P = (e, t, r, o) => {
24
+ for (var a = o > 1 ? void 0 : o ? jt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
25
25
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
26
- return o && a && Ve(t, r, a), a;
27
- }, Gt = (e, t, r) => (Ut(e, t + "", r), r);
28
- const jt = "carb-agitator-model", Te = x("statePath");
26
+ return o && a && Be(t, r, a), a;
27
+ }, Ht = (e, t, r) => (Vt(e, t + "", r), r);
28
+ const Bt = "carb-agitator-model", $e = U("statePath");
29
29
  let g = class {
30
+ /**
31
+ * Creates a new carb agitator model instance.
32
+ *
33
+ * @param modelId - Unique identifier for this instance
34
+ * @param options - Configuration options including name
35
+ * @param context - KOS creation context providing assembly paths
36
+ */
30
37
  constructor(e, t, r) {
38
+ /**
39
+ * Unique identifier for this carb agitator instance.
40
+ */
31
41
  i(this, "id");
42
+ /**
43
+ * Display name for this carb agitator.
44
+ */
32
45
  i(this, "name");
46
+ /**
47
+ * Device path for carb tank operations.
48
+ */
33
49
  i(this, "path");
50
+ /**
51
+ * State path for accessing probe and filling status.
52
+ */
34
53
  i(this, "statePath");
35
54
  i(this, "highProbeWet");
36
55
  i(this, "lowProbeWet");
@@ -41,23 +60,62 @@ let g = class {
41
60
  const o = r.kosContext.get("assembly-state-path-carbTank");
42
61
  this.statePath = o;
43
62
  }
63
+ /**
64
+ * Gets the carb holder associated with this agitator.
65
+ *
66
+ * Retrieves the first holder from the "carb" group in the parent assembly.
67
+ *
68
+ * @returns The carb holder model, or undefined if not found
69
+ */
44
70
  get holder() {
45
71
  var t;
46
72
  return (t = this.getCompanionParent()) == null ? void 0 : t.getHoldersByGroup("carb")[0];
47
73
  }
74
+ /**
75
+ * Gets the pump associated with the carb holder.
76
+ *
77
+ * Returns the first pump from the holder's pump collection.
78
+ *
79
+ * @returns The pump model, or undefined if holder or pump not available
80
+ */
48
81
  get pump() {
49
82
  var e;
50
83
  return (e = this.holder) == null ? void 0 : e.pumps.data[0];
51
84
  }
85
+ /**
86
+ * Indicates whether the carb tank is currently being filled.
87
+ *
88
+ * @returns true if the filling state property indicates active filling
89
+ */
52
90
  get isFilling() {
53
91
  return !!this.filling.value;
54
92
  }
93
+ /**
94
+ * Indicates whether the carb tank has been initialized.
95
+ *
96
+ * @returns true if the carb tank enabled configuration is set to true
97
+ */
55
98
  get isCarbInitialized() {
56
99
  return !!this.enabled.value;
57
100
  }
101
+ /**
102
+ * Indicates whether carb tank activation is allowed.
103
+ *
104
+ * Activation is only allowed when the carb tank is not already enabled.
105
+ *
106
+ * @returns true if the carb tank can be activated
107
+ */
58
108
  get canActivate() {
59
109
  return !this.enabled.value;
60
110
  }
111
+ /**
112
+ * Indicates whether the workflow can proceed past carb initialization.
113
+ *
114
+ * The workflow can proceed when the state machine is in either INITIALIZED
115
+ * (carb tank activated) or SKIPPED (user chose to bypass carbonation).
116
+ *
117
+ * @returns true if ready to proceed with beverage operations
118
+ */
61
119
  get canProceed() {
62
120
  return this.isInState(
63
121
  "INITIALIZED"
@@ -82,6 +140,15 @@ let g = class {
82
140
  async activateCarbTank() {
83
141
  this.transition("ACTIVATE"), this.enabled.updateProperty(!0), this.transition("ACTIVATION_COMPLETE");
84
142
  }
143
+ /**
144
+ * Deactivates the carb tank and resets to uninitialized state.
145
+ *
146
+ * This method:
147
+ * 1. Updates the enabled configuration property to false
148
+ * 2. Transitions back to UNINITIALIZED state
149
+ *
150
+ * Can be called from any state.
151
+ */
85
152
  async deactivateCarbTank() {
86
153
  this.enabled.updateProperty(!1), this.transition("RESET");
87
154
  }
@@ -91,31 +158,37 @@ let g = class {
91
158
  reset() {
92
159
  this.enabled.updateProperty(!1), this.transition("RESET");
93
160
  }
161
+ /**
162
+ * Toggles the carb tank between enabled and disabled states.
163
+ *
164
+ * If currently enabled, calls {@link deactivateCarbTank}.
165
+ * If currently disabled, calls {@link activateCarbTank}.
166
+ */
94
167
  toggleCarbTank() {
95
168
  this.enabled.value ? this.deactivateCarbTank() : this.activateCarbTank();
96
169
  }
97
170
  handleTestCarbTank(e) {
98
171
  if (!e)
99
172
  throw new Error("No tracker provided");
100
- return this.logger.info(`testing carb tank: ${this.id}`), zt(this.path, e);
173
+ return this.logger.info(`testing carb tank: ${this.id}`), Gt(this.path, e);
101
174
  }
102
175
  };
103
- Gt(g, "Registration");
176
+ Ht(g, "Registration");
104
177
  P([
105
178
  O({
106
- path: Te,
179
+ path: $e,
107
180
  attribute: "highProbeWet"
108
181
  })
109
182
  ], g.prototype, "highProbeWet", 2);
110
183
  P([
111
184
  O({
112
- path: Te,
185
+ path: $e,
113
186
  attribute: "lowProbeWet"
114
187
  })
115
188
  ], g.prototype, "lowProbeWet", 2);
116
189
  P([
117
190
  O({
118
- path: Te,
191
+ path: $e,
119
192
  attribute: "filling"
120
193
  })
121
194
  ], g.prototype, "filling", 2);
@@ -126,43 +199,43 @@ P([
126
199
  })
127
200
  ], g.prototype, "enabled", 2);
128
201
  P([
129
- me(
202
+ be(
130
203
  "ACTIVATING"
131
204
  /* ACTIVATING */
132
205
  )
133
206
  ], g.prototype, "handleActivationStart", 1);
134
207
  P([
135
- bt(
208
+ _t(
136
209
  "ACTIVATING"
137
210
  /* ACTIVATING */
138
211
  )
139
212
  ], g.prototype, "handleActivationComplete", 1);
140
213
  P([
141
- me(
214
+ be(
142
215
  "INITIALIZED"
143
216
  /* INITIALIZED */
144
217
  )
145
218
  ], g.prototype, "handleInitialized", 1);
146
219
  P([
147
- me(
220
+ be(
148
221
  "SKIPPED"
149
222
  /* SKIPPED */
150
223
  )
151
224
  ], g.prototype, "handleSkipped", 1);
152
225
  P([
153
- ye({ allowedStates: [
226
+ Pe({ allowedStates: [
154
227
  "UNINITIALIZED"
155
228
  /* UNINITIALIZED */
156
229
  ] })
157
230
  ], g.prototype, "activateCarbTank", 1);
158
231
  P([
159
- ye({ allowedStates: [
232
+ Pe({ allowedStates: [
160
233
  "UNINITIALIZED"
161
234
  /* UNINITIALIZED */
162
235
  ] })
163
236
  ], g.prototype, "skip", 1);
164
237
  P([
165
- ye({
238
+ Pe({
166
239
  allowedStates: [
167
240
  "INITIALIZED",
168
241
  "SKIPPED"
@@ -171,14 +244,14 @@ P([
171
244
  })
172
245
  ], g.prototype, "reset", 1);
173
246
  P([
174
- _()
247
+ I()
175
248
  ], g.prototype, "handleTestCarbTank", 1);
176
249
  g = P([
177
- f({ modelTypeId: jt, singleton: !1 }),
178
- ee(),
179
- De({ mode: "composition", lifecycle: Fe.LOAD }),
180
- Le(),
181
- Pt(
250
+ f({ modelTypeId: Bt, singleton: !1 }),
251
+ V(),
252
+ ve({ mode: "composition", lifecycle: Ue.LOAD }),
253
+ xe(),
254
+ It(
182
255
  {
183
256
  initial: "UNINITIALIZED",
184
257
  states: {
@@ -215,19 +288,19 @@ g = P([
215
288
  }
216
289
  )
217
290
  ], g);
218
- const Be = g.Registration;
219
- var qt = Object.defineProperty, Vt = Object.getOwnPropertyDescriptor, He = (e, t, r, o) => {
220
- for (var a = o > 1 ? void 0 : o ? Vt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
291
+ const Ke = g.Registration;
292
+ var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, Ye = (e, t, r, o) => {
293
+ for (var a = o > 1 ? void 0 : o ? Yt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
221
294
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
222
- return o && a && qt(t, r, a), a;
295
+ return o && a && Kt(t, r, a), a;
223
296
  };
224
- const Ke = "cartridge-agitator-container-model";
225
- let W = class {
297
+ const We = "cartridge-agitator-container-model";
298
+ let J = class {
226
299
  constructor(e, t, r) {
227
300
  i(this, "id");
228
301
  i(this, "logger");
229
302
  i(this, "_models");
230
- this.id = e, this.logger = r.logger, this._models = new vt({
303
+ this.id = e, this.logger = r.logger, this._models = new $t({
231
304
  parentId: e
232
305
  });
233
306
  }
@@ -258,35 +331,35 @@ let W = class {
258
331
  );
259
332
  }
260
333
  };
261
- He([
262
- Ne
263
- ], W.prototype, "_models", 2);
264
- W = He([
265
- f(Ke)
266
- ], W);
267
- const { URL: Ye } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Bt } = w.build({
268
- basePath: `${Ye}/api/ext/freestyle/freestyle/ice`
269
- }), Ht = async (e, t) => {
270
- const r = await Bt({
334
+ Ye([
335
+ qe
336
+ ], J.prototype, "_models", 2);
337
+ J = Ye([
338
+ f(We)
339
+ ], J);
340
+ const { URL: Ze } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Wt } = w.build({
341
+ basePath: `${Ze}/api/ext/freestyle/freestyle/ice`
342
+ }), Zt = async (e, t) => {
343
+ const r = await Wt({
271
344
  model: {},
272
345
  tracker: t,
273
- urlOverride: `${Ye}/api/handle/${e}/test`
346
+ urlOverride: `${Ze}/api/handle/${e}/test`
274
347
  });
275
348
  if (!(r != null && r.data))
276
349
  throw new Error("No response from server");
277
350
  return r.data;
278
351
  };
279
- var Kt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, te = (e, t, r, o) => {
280
- for (var a = o > 1 ? void 0 : o ? Yt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
352
+ var kt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, ae = (e, t, r, o) => {
353
+ for (var a = o > 1 ? void 0 : o ? Jt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
281
354
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
282
- return o && a && Kt(t, r, a), a;
355
+ return o && a && kt(t, r, a), a;
283
356
  };
284
- const We = "cartridge-agitator-model";
285
- class Z {
357
+ const ke = "cartridge-agitator-model";
358
+ class Q {
286
359
  }
287
- i(Z, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), i(Z, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
288
- const Wt = x("statePath");
289
- let F = class {
360
+ i(Q, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), i(Q, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
361
+ const Qt = U("statePath");
362
+ let L = class {
290
363
  constructor(e, t) {
291
364
  i(this, "id");
292
365
  i(this, "agitating");
@@ -301,48 +374,48 @@ let F = class {
301
374
  async testAgitate(e) {
302
375
  if (!e)
303
376
  throw new Error("No tracker provided");
304
- return this.logger.info(`agitating cartridge-agitator ${this.id}`), Ht(this.path, e);
377
+ return this.logger.info(`agitating cartridge-agitator ${this.id}`), Zt(this.path, e);
305
378
  }
306
379
  handleAgitation() {
307
380
  var e;
308
- this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), Y.publish(Z.TOPIC_AGITATION_STARTED, {
381
+ this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), k.publish(Q.TOPIC_AGITATION_STARTED, {
309
382
  path: this.path,
310
383
  futureId: (e = this.future) == null ? void 0 : e.futureId
311
- })) : Y.publish(Z.TOPIC_AGITATION_ENDED, {
384
+ })) : k.publish(Q.TOPIC_AGITATION_ENDED, {
312
385
  path: this.path
313
386
  });
314
387
  }
315
388
  };
316
- te([
317
- O({ path: Wt, attribute: "agitating" })
318
- ], F.prototype, "agitating", 2);
319
- te([
320
- _()
321
- ], F.prototype, "testAgitate", 1);
322
- te([
323
- be({
389
+ ae([
390
+ O({ path: Qt, attribute: "agitating" })
391
+ ], L.prototype, "agitating", 2);
392
+ ae([
393
+ I()
394
+ ], L.prototype, "testAgitate", 1);
395
+ ae([
396
+ Te({
324
397
  dependencies: (e) => [e.isAgitating]
325
398
  })
326
- ], F.prototype, "handleAgitation", 1);
327
- F = te([
328
- f(We),
329
- Le(),
330
- ee()
331
- ], F);
332
- const Ze = new C({
333
- class: F,
399
+ ], L.prototype, "handleAgitation", 1);
400
+ L = ae([
401
+ f(ke),
402
+ xe(),
403
+ V()
404
+ ], L);
405
+ const Je = new E({
406
+ class: L,
407
+ type: ke
408
+ }), Ce = new _e({
409
+ class: J,
334
410
  type: We
335
- }), Ie = new Pe({
336
- class: W,
337
- type: Ke
338
411
  });
339
- Ie.addRelatedModel(Ze);
340
- var ke = Object.defineProperty, Zt = Object.getOwnPropertyDescriptor, kt = (e, t, r) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, re = (e, t, r, o) => {
341
- for (var a = o > 1 ? void 0 : o ? Zt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
412
+ Ce.addRelatedModel(Je);
413
+ var Qe = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, er = (e, t, r) => t in e ? Qe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oe = (e, t, r, o) => {
414
+ for (var a = o > 1 ? void 0 : o ? Xt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
342
415
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
343
- return o && a && ke(t, r, a), a;
344
- }, Qt = (e, t, r) => (kt(e, t + "", r), r);
345
- const Xt = "cgp-pump-model", _e = x("statePath");
416
+ return o && a && Qe(t, r, a), a;
417
+ }, tr = (e, t, r) => (er(e, t + "", r), r);
418
+ const rr = "cgp-pump-model", Oe = U("statePath");
346
419
  let D = class {
347
420
  constructor(e, t) {
348
421
  i(this, "highProbeWet");
@@ -357,44 +430,44 @@ let D = class {
357
430
  return this.state.path;
358
431
  }
359
432
  };
360
- Qt(D, "Registration");
361
- re([
433
+ tr(D, "Registration");
434
+ oe([
362
435
  O({
363
- path: _e,
436
+ path: Oe,
364
437
  attribute: "highProbeWet"
365
438
  })
366
439
  ], D.prototype, "highProbeWet", 2);
367
- re([
440
+ oe([
368
441
  O({
369
- path: _e,
442
+ path: Oe,
370
443
  attribute: "lowProbeWet"
371
444
  })
372
445
  ], D.prototype, "lowProbeWet", 2);
373
- re([
446
+ oe([
374
447
  O({
375
- path: _e,
448
+ path: Oe,
376
449
  attribute: "filling"
377
450
  })
378
451
  ], D.prototype, "filling", 2);
379
- D = re([
380
- f({ modelTypeId: Xt, singleton: !1 }),
381
- De({
452
+ D = oe([
453
+ f({ modelTypeId: rr, singleton: !1 }),
454
+ ve({
382
455
  mode: "composition"
383
456
  }),
384
- ee()
457
+ V()
385
458
  ], D);
386
- const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V } = w.build({
459
+ const ar = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: K } = w.build({
387
460
  basePath: `${G}/api/fcm-pump`
388
461
  }), h = $.createLogger({
389
462
  name: "fcm-pump-service",
390
463
  group: "Services"
391
- }), er = async (e) => {
464
+ }), or = async (e) => {
392
465
  var t, r, o, a, n;
393
466
  h.debug(
394
467
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
395
468
  );
396
469
  try {
397
- const s = await V({
470
+ const s = await K({
398
471
  model: {},
399
472
  urlOverride: `${G}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
400
473
  });
@@ -403,18 +476,18 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
403
476
  if (h.error(
404
477
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
405
478
  s
406
- ), s instanceof ve) {
479
+ ), s instanceof Ie) {
407
480
  const u = ((o = (r = s.payload) == null ? void 0 : r.data) == null ? void 0 : o.error) || ((a = s.payload) == null ? void 0 : a.error) || "unknownError";
408
481
  return [u, ((n = s.payload) == null ? void 0 : n.data) || { error: u }];
409
482
  }
410
483
  }
411
484
  return ["unknownError", { error: "unknownError" }];
412
- }, tr = async (e, t) => {
485
+ }, ir = async (e, t) => {
413
486
  h.debug(
414
487
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
415
488
  );
416
489
  try {
417
- const r = await V({
490
+ const r = await K({
418
491
  model: {},
419
492
  urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
420
493
  tracker: t
@@ -427,18 +500,18 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
427
500
  );
428
501
  const o = {
429
502
  id: t || "",
430
- endState: U.Fail,
503
+ endState: q.Fail,
431
504
  tracker: t,
432
505
  reason: "Failed to resolve trouble"
433
506
  };
434
507
  return y.initiateFuture(o), o;
435
508
  }
436
- }, rr = async (e, t) => {
509
+ }, sr = async (e, t) => {
437
510
  h.debug(
438
511
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
439
512
  );
440
513
  try {
441
- const r = await V({
514
+ const r = await K({
442
515
  model: {},
443
516
  urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
444
517
  tracker: t
@@ -451,18 +524,18 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
451
524
  );
452
525
  const o = {
453
526
  id: t || "",
454
- endState: U.Fail,
527
+ endState: q.Fail,
455
528
  tracker: t,
456
529
  reason: "Failed to resolve trouble"
457
530
  };
458
531
  return y.initiateFuture(o), o;
459
532
  }
460
- }, ar = async (e, t, r) => {
533
+ }, nr = async (e, t, r) => {
461
534
  h.debug(
462
535
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
463
536
  );
464
537
  try {
465
- const o = await V({
538
+ const o = await K({
466
539
  model: {},
467
540
  urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
468
541
  tracker: r
@@ -475,22 +548,22 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
475
548
  );
476
549
  const a = {
477
550
  id: r || "",
478
- endState: U.Fail,
551
+ endState: q.Fail,
479
552
  tracker: r,
480
553
  reason: "Failed to resolve trouble"
481
554
  };
482
555
  return y.initiateFuture(a), a;
483
556
  }
484
- }, or = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", ir = async (e, t, r) => {
557
+ }, lr = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", ur = async (e, t, r) => {
485
558
  h.debug(
486
559
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
487
560
  );
488
561
  try {
489
- const o = await V({
562
+ const o = await K({
490
563
  model: {},
491
564
  urlOverride: `${G}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
492
565
  });
493
- return h.debug("performPreCalibrate - response:", o), or(o == null ? void 0 : o.data);
566
+ return h.debug("performPreCalibrate - response:", o), lr(o == null ? void 0 : o.data);
494
567
  } catch (o) {
495
568
  h.error(
496
569
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
@@ -499,19 +572,19 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
499
572
  return;
500
573
  }
501
574
  };
502
- var sr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, ae = (e, t, r, o) => {
503
- for (var a = o > 1 ? void 0 : o ? nr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
575
+ var cr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, ie = (e, t, r, o) => {
576
+ for (var a = o > 1 ? void 0 : o ? dr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
504
577
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
505
- return o && a && sr(t, r, a), a;
578
+ return o && a && cr(t, r, a), a;
506
579
  };
507
- const Qe = "fcm-pump-model", lr = $.createLogger({ name: "fcm-pump-model" });
508
- let N = class {
580
+ const Xe = "fcm-pump-model", pr = $.createLogger({ name: "fcm-pump-model" });
581
+ let z = class {
509
582
  constructor(e, t, r) {
510
583
  i(this, "id");
511
584
  i(this, "logger");
512
585
  i(this, "pumpModel");
513
586
  i(this, "futureHandler");
514
- this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new ze(this);
587
+ this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new Ge(this);
515
588
  }
516
589
  get future() {
517
590
  return this.futureHandler.future;
@@ -532,23 +605,23 @@ let N = class {
532
605
  return this.pumpModel.performIntent(e);
533
606
  }
534
607
  async performElectricalTest() {
535
- const [e, t] = await er(this.pumpModel.path);
536
- return e && lr.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
608
+ const [e, t] = await or(this.pumpModel.path);
609
+ return e && pr.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
537
610
  }
538
611
  getChildren() {
539
612
  return [...this.futureHandler.allFutures];
540
613
  }
541
614
  async performPreCalibrate(e) {
542
- return tr(this.pumpModel.path, e);
615
+ return ir(this.pumpModel.path, e);
543
616
  }
544
617
  async performCalibrate(e) {
545
- return rr(this.pumpModel.path, e);
618
+ return sr(this.pumpModel.path, e);
546
619
  }
547
620
  async performVerify(e, t) {
548
- return ar(this.pumpModel.path, e, t);
621
+ return nr(this.pumpModel.path, e, t);
549
622
  }
550
623
  async performComplete(e, t) {
551
- return ir(this.pumpModel.path, e, t);
624
+ return ur(this.pumpModel.path, e, t);
552
625
  }
553
626
  // -------------------LIFECYCLE----------------------------
554
627
  async init() {
@@ -558,29 +631,29 @@ let N = class {
558
631
  this.logger.debug(`loading fcm-pump ${this.id}`);
559
632
  }
560
633
  };
561
- ae([
562
- _()
563
- ], N.prototype, "performPreCalibrate", 1);
564
- ae([
565
- _()
566
- ], N.prototype, "performCalibrate", 1);
567
- ae([
568
- _()
569
- ], N.prototype, "performVerify", 1);
570
- N = ae([
571
- f(Qe)
572
- ], N);
573
- const ur = new C({
574
- class: N,
575
- type: Qe
634
+ ie([
635
+ I()
636
+ ], z.prototype, "performPreCalibrate", 1);
637
+ ie([
638
+ I()
639
+ ], z.prototype, "performCalibrate", 1);
640
+ ie([
641
+ I()
642
+ ], z.prototype, "performVerify", 1);
643
+ z = ie([
644
+ f(Xe)
645
+ ], z);
646
+ const gr = new E({
647
+ class: z,
648
+ type: Xe
576
649
  });
577
- var cr = Object.defineProperty, dr = Object.getOwnPropertyDescriptor, Xe = (e, t, r, o) => {
578
- for (var a = o > 1 ? void 0 : o ? dr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
650
+ var hr = Object.defineProperty, fr = Object.getOwnPropertyDescriptor, et = (e, t, r, o) => {
651
+ for (var a = o > 1 ? void 0 : o ? fr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
579
652
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
580
- return o && a && cr(t, r, a), a;
653
+ return o && a && hr(t, r, a), a;
581
654
  };
582
- const Je = "freestyle-assembly-model", pr = "iceAgitator", gr = "carbTank", hr = "remoteTrays";
583
- let k = class {
655
+ const tt = "freestyle-assembly-model", mr = "iceAgitator", yr = "carbTank", br = "remoteTrays";
656
+ let X = class {
584
657
  constructor(e, t, r) {
585
658
  i(this, "id");
586
659
  i(this, "_carbTankModel");
@@ -642,45 +715,45 @@ let k = class {
642
715
  }
643
716
  // -------------------LIFECYCLE----------------------------
644
717
  get supportsRemoteTrays() {
645
- return ne.isFeatureEnabled(hr);
718
+ return ue.isFeatureEnabled(br);
646
719
  }
647
720
  get supportsIce() {
648
- return ne.isFeatureEnabled(pr);
721
+ return ue.isFeatureEnabled(mr);
649
722
  }
650
723
  get supportsCarb() {
651
- return ne.isFeatureEnabled(gr);
724
+ return ue.isFeatureEnabled(yr);
652
725
  }
653
726
  async init() {
654
727
  this.logger.debug(`initializing freestyle-assembly ${this.id}`);
655
728
  }
656
729
  async ready() {
657
- const e = Tt(
730
+ const e = Ct(
658
731
  this.assembly,
659
- Be.type
732
+ Ke.type
660
733
  );
661
734
  this._carbTankModel = e;
662
735
  }
663
736
  };
664
- Xe([
665
- Ne
666
- ], k.prototype, "_remoteTrays", 2);
667
- k = Xe([
668
- xe(),
669
- f(Je)
670
- ], k);
671
- const de = new Pe({
672
- class: k,
673
- type: Je
737
+ et([
738
+ qe
739
+ ], X.prototype, "_remoteTrays", 2);
740
+ X = et([
741
+ je(),
742
+ f(tt)
743
+ ], X);
744
+ const ge = new _e({
745
+ class: X,
746
+ type: tt
674
747
  });
675
- var fr = Object.defineProperty, mr = Object.getOwnPropertyDescriptor, et = (e, t, r, o) => {
676
- for (var a = o > 1 ? void 0 : o ? mr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
748
+ var Pr = Object.defineProperty, vr = Object.getOwnPropertyDescriptor, rt = (e, t, r, o) => {
749
+ for (var a = o > 1 ? void 0 : o ? vr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
677
750
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
678
- return o && a && fr(t, r, a), a;
751
+ return o && a && Pr(t, r, a), a;
679
752
  };
680
- const tt = "remote-tray-model";
681
- x("holderPath");
682
- const yr = x("configPath");
683
- let Q = class {
753
+ const at = "remote-tray-model";
754
+ U("holderPath");
755
+ const Tr = U("configPath");
756
+ let ee = class {
684
757
  constructor(e, t, r) {
685
758
  /** Unique identifier for the remote tray instance */
686
759
  i(this, "id");
@@ -770,50 +843,50 @@ let Q = class {
770
843
  this.logger.debug(`loading remote-tray ${this.id}`);
771
844
  }
772
845
  };
773
- et([
846
+ rt([
774
847
  b({
775
- path: yr,
848
+ path: Tr,
776
849
  attribute: "enabled"
777
850
  })
778
- ], Q.prototype, "remoteTrayEnabled", 2);
779
- Q = et([
780
- f(tt)
781
- ], Q);
782
- const j = new C({
783
- class: Q,
784
- type: tt
851
+ ], ee.prototype, "remoteTrayEnabled", 2);
852
+ ee = rt([
853
+ f(at)
854
+ ], ee);
855
+ const j = new E({
856
+ class: ee,
857
+ type: at
785
858
  });
786
- var br = Object.getOwnPropertyDescriptor, Pr = (e, t, r, o) => {
787
- for (var a = o > 1 ? void 0 : o ? br(t, r) : t, n = e.length - 1, s; n >= 0; n--)
859
+ var _r = Object.getOwnPropertyDescriptor, Ir = (e, t, r, o) => {
860
+ for (var a = o > 1 ? void 0 : o ? _r(t, r) : t, n = e.length - 1, s; n >= 0; n--)
788
861
  (s = e[n]) && (a = s(a) || a);
789
862
  return a;
790
863
  };
791
- const rt = "remote-tray-container-model";
792
- let pe = class {
864
+ const ot = "remote-tray-container-model";
865
+ let he = class {
793
866
  constructor(e) {
794
867
  i(this, "id");
795
868
  this.id = e;
796
869
  }
797
870
  };
798
- pe = Pr([
799
- f(rt),
800
- ee(),
801
- It()
802
- ], pe);
803
- const $e = new Pe({
804
- class: pe,
805
- type: rt
871
+ he = Ir([
872
+ f(ot),
873
+ V(),
874
+ Ot()
875
+ ], he);
876
+ const Ee = new _e({
877
+ class: he,
878
+ type: ot
806
879
  });
807
- $e.addRelatedModel(j);
808
- var vr = Object.getOwnPropertyDescriptor, Tr = (e, t, r, o) => {
809
- for (var a = o > 1 ? void 0 : o ? vr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
880
+ Ee.addRelatedModel(j);
881
+ var $r = Object.getOwnPropertyDescriptor, Cr = (e, t, r, o) => {
882
+ for (var a = o > 1 ? void 0 : o ? $r(t, r) : t, n = e.length - 1, s; n >= 0; n--)
810
883
  (s = e[n]) && (a = s(a) || a);
811
884
  return a;
812
885
  };
813
- const at = "freestyle-holder-model";
814
- function Ir(e) {
815
- const t = _t.getContext(e), r = t == null ? void 0 : t.get(
816
- de.type
886
+ const it = "freestyle-holder-model";
887
+ function Or(e) {
888
+ const t = Et.getContext(e), r = t == null ? void 0 : t.get(
889
+ ge.type
817
890
  );
818
891
  if (!r) {
819
892
  $.error("Freestyle assembly not found");
@@ -821,14 +894,14 @@ function Ir(e) {
821
894
  }
822
895
  return r;
823
896
  }
824
- async function _r(e, t) {
897
+ async function Er(e, t) {
825
898
  if (!e || !t)
826
899
  return;
827
900
  const r = await e[t]();
828
901
  if (r != null && r.tracker)
829
902
  return y.getFuture(r.tracker);
830
903
  }
831
- let ge = class {
904
+ let fe = class {
832
905
  constructor(e, t, r) {
833
906
  i(this, "id");
834
907
  i(this, "logger");
@@ -844,14 +917,14 @@ let ge = class {
844
917
  if (!this.holder.data.agitated)
845
918
  return;
846
919
  this.future = void 0;
847
- const e = Ir(this.id);
920
+ const e = Or(this.id);
848
921
  if (!e)
849
922
  return;
850
923
  if (!e.defaultCartridgeAgitator) {
851
924
  this.logger.error("Agitator not found");
852
925
  return;
853
926
  }
854
- return this.future = await _r(
927
+ return this.future = await Er(
855
928
  e.defaultCartridgeAgitator,
856
929
  "testAgitate"
857
930
  ), this.future;
@@ -868,51 +941,51 @@ let ge = class {
868
941
  this.logger.debug(`loading freestyle-holder ${this.id}`);
869
942
  }
870
943
  };
871
- ge = Tr([
872
- f(at)
873
- ], ge);
874
- const Oe = new C({
875
- class: ge,
876
- type: at
877
- }), { URL: $r } = A("FREESTYLE-NOZZLE_SERVICE"), { getOne: Cr } = w.build({
878
- basePath: `${$r}/api/freestyle-nozzle`
879
- }), H = $.createLogger({
944
+ fe = Cr([
945
+ f(it)
946
+ ], fe);
947
+ const Ae = new E({
948
+ class: fe,
949
+ type: it
950
+ }), { URL: Sr } = A("FREESTYLE-NOZZLE_SERVICE"), { getOne: Ar } = w.build({
951
+ basePath: `${Sr}/api/freestyle-nozzle`
952
+ }), W = $.createLogger({
880
953
  name: "freestyle-nozzle-service",
881
954
  group: "Services"
882
955
  });
883
- class Er extends Error {
956
+ class wr extends Error {
884
957
  constructor(t) {
885
958
  super(t), this.name = "NutritionInfoError";
886
959
  }
887
960
  }
888
- class Se extends Error {
961
+ class we extends Error {
889
962
  constructor(t) {
890
963
  super(t), this.name = "InvalidRequestError";
891
964
  }
892
965
  }
893
- const Or = async (e, t, r, o = "http://localhost:8081") => {
894
- if (H.debug("sending GET for freestyle-nozzle"), !t)
895
- throw H.error("Invalid freestyle-nozzle request: beverageId is required"), new Se("No beverageId provided");
966
+ const Mr = async (e, t, r, o = "http://localhost:8081") => {
967
+ if (W.debug("sending GET for freestyle-nozzle"), !t)
968
+ throw W.error("Invalid freestyle-nozzle request: beverageId is required"), new we("No beverageId provided");
896
969
  if (!r || r.length === 0)
897
- throw H.error("Invalid freestyle-nozzle request: volumes are required"), new Se("No volumes provided");
898
- const a = await Cr({
970
+ throw W.error("Invalid freestyle-nozzle request: volumes are required"), new we("No volumes provided");
971
+ const a = await Ar({
899
972
  urlOverride: `${o}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
900
973
  ","
901
974
  )}`
902
975
  });
903
976
  if (!(a != null && a.data))
904
- throw H.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
977
+ throw W.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
905
978
  if (a.data.error)
906
- throw new Er(a.data.error);
979
+ throw new wr(a.data.error);
907
980
  return a.data;
908
981
  };
909
- var Sr = Object.defineProperty, Ar = Object.getOwnPropertyDescriptor, ot = (e, t, r, o) => {
910
- for (var a = o > 1 ? void 0 : o ? Ar(t, r) : t, n = e.length - 1, s; n >= 0; n--)
982
+ var Rr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, st = (e, t, r, o) => {
983
+ for (var a = o > 1 ? void 0 : o ? Dr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
911
984
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
912
- return o && a && Sr(t, r, a), a;
985
+ return o && a && Rr(t, r, a), a;
913
986
  };
914
- const it = "freestyle-nozzle-model";
915
- let X = class {
987
+ const nt = "freestyle-nozzle-model";
988
+ let te = class {
916
989
  constructor(e, t, r) {
917
990
  i(this, "id");
918
991
  i(this, "logger");
@@ -937,12 +1010,12 @@ let X = class {
937
1010
  );
938
1011
  const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
939
1012
  try {
940
- const r = await Or(
1013
+ const r = await Mr(
941
1014
  t,
942
1015
  e,
943
1016
  this._cupSizes
944
1017
  );
945
- K(() => {
1018
+ Z(() => {
946
1019
  this._nutritionInfo = r;
947
1020
  });
948
1021
  } catch (r) {
@@ -961,54 +1034,54 @@ let X = class {
961
1034
  this.logger.debug(`loading freestyle-nozzle ${this.id}`);
962
1035
  }
963
1036
  };
964
- ot([
965
- be({
1037
+ st([
1038
+ Te({
966
1039
  dependencies: (e) => [
967
1040
  e.selectedPourable.beverage
968
1041
  ]
969
1042
  })
970
- ], X.prototype, "handleBeverageSelection", 1);
971
- X = ot([
972
- xe(),
973
- f(it)
974
- ], X);
975
- const Ae = new C({
976
- class: X,
977
- type: it
978
- }), { URL: st } = A("PUMP_SERVICE"), { postModel: wr } = w.build({
979
- basePath: `${st}/api/ext/freestyle/microCalibration`
980
- }), ce = $.createLogger({
1043
+ ], te.prototype, "handleBeverageSelection", 1);
1044
+ te = st([
1045
+ je(),
1046
+ f(nt)
1047
+ ], te);
1048
+ const Me = new E({
1049
+ class: te,
1050
+ type: nt
1051
+ }), { URL: lt } = A("PUMP_SERVICE"), { postModel: Fr } = w.build({
1052
+ basePath: `${lt}/api/ext/freestyle/microCalibration`
1053
+ }), pe = $.createLogger({
981
1054
  name: "freestyle-pump-service",
982
1055
  group: "Services"
983
- }), Mr = async (e, t) => {
1056
+ }), Lr = async (e, t) => {
984
1057
  var r, o, a, n, s;
985
- ce.debug(
1058
+ pe.debug(
986
1059
  `replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
987
1060
  );
988
1061
  try {
989
- const u = await wr({
1062
+ const u = await Fr({
990
1063
  model: {},
991
- urlOverride: `${st}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
1064
+ urlOverride: `${lt}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
992
1065
  });
993
- return ce.debug("replacePump - response:", u), ((u == null ? void 0 : u.status) === 200 || (u == null ? void 0 : u.status) === 499) && ((r = u.data) != null && r.error) ? [u.data.error || "unknownError", u.data] : [void 0, u == null ? void 0 : u.data];
1066
+ return pe.debug("replacePump - response:", u), ((u == null ? void 0 : u.status) === 200 || (u == null ? void 0 : u.status) === 499) && ((r = u.data) != null && r.error) ? [u.data.error || "unknownError", u.data] : [void 0, u == null ? void 0 : u.data];
994
1067
  } catch (u) {
995
- if (ce.error(
1068
+ if (pe.error(
996
1069
  `replacePump - sending POST request to /api/cal/${e}/code/${t}`,
997
1070
  u
998
- ), u instanceof ve) {
1071
+ ), u instanceof Ie) {
999
1072
  const S = ((a = (o = u.payload) == null ? void 0 : o.data) == null ? void 0 : a.error) || ((n = u.payload) == null ? void 0 : n.error) || "unknownError";
1000
1073
  return [S, ((s = u.payload) == null ? void 0 : s.data) || { error: S }];
1001
1074
  }
1002
1075
  }
1003
1076
  return ["unknownError", { error: "unknownError" }];
1004
1077
  };
1005
- var Rr = Object.getOwnPropertyDescriptor, Dr = (e, t, r, o) => {
1006
- for (var a = o > 1 ? void 0 : o ? Rr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1078
+ var zr = Object.getOwnPropertyDescriptor, Nr = (e, t, r, o) => {
1079
+ for (var a = o > 1 ? void 0 : o ? zr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1007
1080
  (s = e[n]) && (a = s(a) || a);
1008
1081
  return a;
1009
1082
  };
1010
- const nt = "freestyle-pump-model";
1011
- let he = class {
1083
+ const ut = "freestyle-pump-model";
1084
+ let me = class {
1012
1085
  constructor(e, t, r) {
1013
1086
  i(this, "id");
1014
1087
  i(this, "logger");
@@ -1017,65 +1090,65 @@ let he = class {
1017
1090
  }
1018
1091
  // -------------------LIFECYCLE----------------------------
1019
1092
  async replacePump(e) {
1020
- const [t, r] = await Mr(this.pump.path, e);
1093
+ const [t, r] = await Lr(this.pump.path, e);
1021
1094
  return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
1022
1095
  }
1023
1096
  };
1024
- he = Dr([
1025
- f(nt)
1026
- ], he);
1027
- const we = new C({
1028
- class: he,
1029
- type: nt
1030
- }), { URL: L } = A("ICE_AGITATOR_SERVICE"), { getAll: lt, postModel: oe } = w.build({
1031
- basePath: `${L}/api/ext/freestyle/ice`
1032
- }), ut = $.createLogger({
1097
+ me = Nr([
1098
+ f(ut)
1099
+ ], me);
1100
+ const Re = new E({
1101
+ class: me,
1102
+ type: ut
1103
+ }), { URL: F } = A("ICE_AGITATOR_SERVICE"), { getAll: ct, postModel: se } = w.build({
1104
+ basePath: `${F}/api/ext/freestyle/ice`
1105
+ }), dt = $.createLogger({
1033
1106
  name: "ice-agitator-service",
1034
1107
  group: "Services"
1035
- }), Lr = async (e) => (ut.debug("sending GET for ice types"), await lt({
1036
- urlOverride: `${L}/api/handle/${e}/types`
1037
- })), Fr = async (e, t) => (ut.debug("sending POST for ice types"), await oe({
1038
- urlOverride: `${L}/api/handle/${e}/type/${t}`,
1108
+ }), xr = async (e) => (dt.debug("sending GET for ice types"), await ct({
1109
+ urlOverride: `${F}/api/handle/${e}/types`
1110
+ })), Ur = async (e, t) => (dt.debug("sending POST for ice types"), await se({
1111
+ urlOverride: `${F}/api/handle/${e}/type/${t}`,
1039
1112
  model: {}
1040
- })), Nr = async (e) => await lt({
1041
- urlOverride: `${L}/api/kos/config/details/${e}/4`
1042
- }), zr = async (e, t) => {
1043
- const r = await oe({
1113
+ })), qr = async (e) => await ct({
1114
+ urlOverride: `${F}/api/kos/config/details/${e}/4`
1115
+ }), Gr = async (e, t) => {
1116
+ const r = await se({
1044
1117
  model: {},
1045
1118
  tracker: t,
1046
- urlOverride: `${L}/api/handle/${e}/pour`
1119
+ urlOverride: `${F}/api/handle/${e}/pour`
1047
1120
  });
1048
1121
  if (!(r != null && r.data))
1049
1122
  throw new Error("No response from server");
1050
1123
  return r == null ? void 0 : r.data;
1051
- }, xr = async (e, t) => {
1052
- const r = await oe({
1124
+ }, jr = async (e, t) => {
1125
+ const r = await se({
1053
1126
  model: {},
1054
1127
  tracker: t,
1055
- urlOverride: `${L}/api/handle/${e}/test/agitation`
1128
+ urlOverride: `${F}/api/handle/${e}/test/agitation`
1056
1129
  });
1057
1130
  if (!(r != null && r.data))
1058
1131
  throw new Error("No response from server");
1059
1132
  return r == null ? void 0 : r.data;
1060
- }, Ur = async (e, t) => {
1061
- const r = await oe({
1133
+ }, Vr = async (e, t) => {
1134
+ const r = await se({
1062
1135
  model: {},
1063
1136
  tracker: t,
1064
- urlOverride: `${L}/api/handle/${e}/test/gate`
1137
+ urlOverride: `${F}/api/handle/${e}/test/gate`
1065
1138
  });
1066
1139
  if (!(r != null && r.data))
1067
1140
  throw new Error("No response from server");
1068
1141
  return r == null ? void 0 : r.data;
1069
1142
  };
1070
- var Gr = Object.defineProperty, jr = Object.getOwnPropertyDescriptor, p = (e, t, r, o) => {
1071
- for (var a = o > 1 ? void 0 : o ? jr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1143
+ var Hr = Object.defineProperty, Br = Object.getOwnPropertyDescriptor, p = (e, t, r, o) => {
1144
+ for (var a = o > 1 ? void 0 : o ? Br(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1072
1145
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1073
- return o && a && Gr(t, r, a), a;
1146
+ return o && a && Hr(t, r, a), a;
1074
1147
  };
1075
- class J {
1148
+ class re {
1076
1149
  }
1077
- i(J, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), i(J, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
1078
- const ct = "ice-agitator-model", dt = x("statePath");
1150
+ i(re, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), i(re, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
1151
+ const pt = "ice-agitator-model", gt = U("statePath");
1079
1152
  let c = class {
1080
1153
  constructor(e, t, r) {
1081
1154
  i(this, "id");
@@ -1097,7 +1170,7 @@ let c = class {
1097
1170
  i(this, "_allIceTypes");
1098
1171
  i(this, "logger");
1099
1172
  i(this, "currentState", d.IDLE);
1100
- i(this, "resetDefaultValues", async () => await Nr(this.path));
1173
+ i(this, "resetDefaultValues", async () => await qr(this.path));
1101
1174
  this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
1102
1175
  }
1103
1176
  get iceTypes() {
@@ -1128,7 +1201,7 @@ let c = class {
1128
1201
  return this.currentState === d.IDLE;
1129
1202
  }
1130
1203
  updateIfCurrent(e, t) {
1131
- this.currentState === e && K(() => {
1204
+ this.currentState === e && Z(() => {
1132
1205
  this.currentState = t;
1133
1206
  });
1134
1207
  }
@@ -1137,7 +1210,7 @@ let c = class {
1137
1210
  if (this.currentState === d.IDLE) {
1138
1211
  if (this.updateIfCurrent(d.IDLE, d.POUR_STARTING), !e)
1139
1212
  throw new Error("No tracker provided");
1140
- const t = await zr(this.path, e);
1213
+ const t = await Gr(this.path, e);
1141
1214
  return this.updateIfCurrent(d.POUR_STARTING, d.POURING), t != null && t.endState && this.updateIfCurrent(d.POURING, d.IDLE), t;
1142
1215
  } else
1143
1216
  throw new Error(`Cannot pour in state ${this.currentState}`);
@@ -1150,7 +1223,7 @@ let c = class {
1150
1223
  * */
1151
1224
  async cancelIceDispense() {
1152
1225
  var e;
1153
- this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), K(() => {
1226
+ this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), Z(() => {
1154
1227
  this.currentState = d.IDLE;
1155
1228
  })) : this.logger.warn(
1156
1229
  `Cannot cancel ice dispense in state ${this.currentState}`
@@ -1159,45 +1232,45 @@ let c = class {
1159
1232
  async testAgitate(e) {
1160
1233
  if (!e)
1161
1234
  throw new Error("No tracker provided");
1162
- return this.logger.info(`agitating ice-agitator ${this.id}`), xr(this.path, e);
1235
+ return this.logger.info(`agitating ice-agitator ${this.id}`), jr(this.path, e);
1163
1236
  }
1164
1237
  async testGate(e) {
1165
1238
  if (!e)
1166
1239
  throw new Error("No tracker provided");
1167
- return this.logger.info(`testing ice gate: ${this.id}`), Ur(this.path, e);
1240
+ return this.logger.info(`testing ice gate: ${this.id}`), Vr(this.path, e);
1168
1241
  }
1169
1242
  handleAgitationChange() {
1170
1243
  var e;
1171
- this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), Y.publish(J.TOPIC_AGITATION_STARTED, {
1244
+ this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), k.publish(re.TOPIC_AGITATION_STARTED, {
1172
1245
  path: this.path,
1173
1246
  futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
1174
- })) : Y.publish(J.TOPIC_AGITATION_ENDED, {
1247
+ })) : k.publish(re.TOPIC_AGITATION_ENDED, {
1175
1248
  path: this.path
1176
1249
  });
1177
1250
  }
1178
1251
  async updateIceType(e) {
1179
- await Fr(this.path, e);
1252
+ await Ur(this.path, e);
1180
1253
  }
1181
1254
  async init() {
1182
1255
  this.logger.debug(`initializing ice-agitator ${this.id}`);
1183
1256
  }
1184
1257
  async load() {
1185
1258
  this.logger.debug(`loading ice-agitator ${this.id}`);
1186
- const e = await Lr(this.path);
1187
- (e == null ? void 0 : e.status) === 200 && K(() => {
1259
+ const e = await xr(this.path);
1260
+ (e == null ? void 0 : e.status) === 200 && Z(() => {
1188
1261
  this._allIceTypes = e.data || [];
1189
1262
  });
1190
1263
  }
1191
1264
  };
1192
1265
  p([
1193
1266
  b({
1194
- path: E,
1267
+ path: C,
1195
1268
  attribute: "settings.volWithoutIceMl"
1196
1269
  })
1197
1270
  ], c.prototype, "volWithoutIceMl", 2);
1198
1271
  p([
1199
1272
  b({
1200
- path: E,
1273
+ path: C,
1201
1274
  attribute: "settings.durationSec",
1202
1275
  converter: {
1203
1276
  to: "second"
@@ -1206,49 +1279,49 @@ p([
1206
1279
  ], c.prototype, "durationSec", 2);
1207
1280
  p([
1208
1281
  b({
1209
- path: E,
1282
+ path: C,
1210
1283
  attribute: "enableIceChuteClear"
1211
1284
  })
1212
1285
  ], c.prototype, "enableIceChuteClear", 2);
1213
1286
  p([
1214
1287
  b({
1215
- path: E,
1288
+ path: C,
1216
1289
  attribute: "iceChuteClearDurationMs"
1217
1290
  })
1218
1291
  ], c.prototype, "iceChuteClearDurationMs", 2);
1219
1292
  p([
1220
1293
  b({
1221
- path: E,
1294
+ path: C,
1222
1295
  attribute: "iceChuteClearIntervalSec"
1223
1296
  })
1224
1297
  ], c.prototype, "iceChuteClearIntervalSec", 2);
1225
1298
  p([
1226
1299
  b({
1227
- path: E,
1300
+ path: C,
1228
1301
  attribute: "iceChuteClearRetryIntervalSec"
1229
1302
  })
1230
1303
  ], c.prototype, "iceChuteClearRetryIntervalSec", 2);
1231
1304
  p([
1232
1305
  b({
1233
- path: E,
1306
+ path: C,
1234
1307
  attribute: "maxDispenseSec"
1235
1308
  })
1236
1309
  ], c.prototype, "maxDispenseSec", 2);
1237
1310
  p([
1238
1311
  b({
1239
- path: E,
1312
+ path: C,
1240
1313
  attribute: "type"
1241
1314
  })
1242
1315
  ], c.prototype, "type", 2);
1243
1316
  p([
1244
1317
  b({
1245
- path: E,
1318
+ path: C,
1246
1319
  attribute: "settings.dilutionOffset"
1247
1320
  })
1248
1321
  ], c.prototype, "dilutionOffset", 2);
1249
1322
  p([
1250
1323
  b({
1251
- path: E,
1324
+ path: C,
1252
1325
  attribute: "settings.inactivitySec",
1253
1326
  converter: {
1254
1327
  to: "minute"
@@ -1256,42 +1329,42 @@ p([
1256
1329
  })
1257
1330
  ], c.prototype, "inactivitySec", 2);
1258
1331
  p([
1259
- O({ path: dt, attribute: "agitating" })
1332
+ O({ path: gt, attribute: "agitating" })
1260
1333
  ], c.prototype, "agitating", 2);
1261
1334
  p([
1262
- O({ path: dt, attribute: "iceChuteOpen" })
1335
+ O({ path: gt, attribute: "iceChuteOpen" })
1263
1336
  ], c.prototype, "iceChuteOpen", 2);
1264
1337
  p([
1265
- _({ alias: "pour" })
1338
+ I({ alias: "pour" })
1266
1339
  ], c.prototype, "pourIce", 1);
1267
1340
  p([
1268
- _({ alias: "agitate" })
1341
+ I({ alias: "agitate" })
1269
1342
  ], c.prototype, "testAgitate", 1);
1270
1343
  p([
1271
- _({
1344
+ I({
1272
1345
  alias: "gate"
1273
1346
  })
1274
1347
  ], c.prototype, "testGate", 1);
1275
1348
  p([
1276
- be({
1349
+ Te({
1277
1350
  dependencies: (e) => [e.isAgitating]
1278
1351
  })
1279
1352
  ], c.prototype, "handleAgitationChange", 1);
1280
1353
  c = p([
1281
- f(ct),
1282
- $t()
1354
+ f(pt),
1355
+ St()
1283
1356
  ], c);
1284
- const pt = new C({
1357
+ const ht = new E({
1285
1358
  class: c,
1286
- type: ct
1359
+ type: pt
1287
1360
  });
1288
- var qr = Object.getOwnPropertyDescriptor, Vr = (e, t, r, o) => {
1289
- for (var a = o > 1 ? void 0 : o ? qr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1361
+ var Kr = Object.getOwnPropertyDescriptor, Yr = (e, t, r, o) => {
1362
+ for (var a = o > 1 ? void 0 : o ? Kr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1290
1363
  (s = e[n]) && (a = s(a) || a);
1291
1364
  return a;
1292
1365
  };
1293
- const gt = "lfcv-pump-model";
1294
- let fe = class {
1366
+ const ft = "lfcv-pump-model";
1367
+ let ye = class {
1295
1368
  constructor(e, t, r) {
1296
1369
  i(this, "id");
1297
1370
  i(this, "logger");
@@ -1321,30 +1394,30 @@ let fe = class {
1321
1394
  this.logger.debug(`loading lfcv-pump ${this.id}`);
1322
1395
  }
1323
1396
  };
1324
- fe = Vr([
1325
- f(gt)
1326
- ], fe);
1327
- const Br = new C({
1328
- class: fe,
1329
- type: gt
1330
- }), { URL: Hr } = A("LFCV-PUMP_SERVICE"), { getAll: Kr } = w.build({
1331
- basePath: `${Hr}/api/lfcv-pump`
1332
- }), Yr = $.createLogger({
1397
+ ye = Yr([
1398
+ f(ft)
1399
+ ], ye);
1400
+ const Wr = new E({
1401
+ class: ye,
1402
+ type: ft
1403
+ }), { URL: Zr } = A("LFCV-PUMP_SERVICE"), { getAll: kr } = w.build({
1404
+ basePath: `${Zr}/api/lfcv-pump`
1405
+ }), Jr = $.createLogger({
1333
1406
  name: "lfcv-pump-service",
1334
1407
  group: "Services"
1335
- }), fa = async () => (Yr.debug("sending GET for lfcv-pump"), await Kr({})), { URL: B } = A("SPM-PUMP_SERVICE"), { postModel: ie } = w.build({
1336
- basePath: `${B}/api/spm-pump`
1408
+ }), Ia = async () => (Jr.debug("sending GET for lfcv-pump"), await kr({})), { URL: Y } = A("SPM-PUMP_SERVICE"), { postModel: ne } = w.build({
1409
+ basePath: `${Y}/api/spm-pump`
1337
1410
  }), T = $.createLogger({
1338
1411
  name: "spm-pump-service",
1339
1412
  group: "Services"
1340
- }), Wr = async (e, t) => {
1413
+ }), Qr = async (e, t) => {
1341
1414
  T.debug(
1342
1415
  `performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
1343
1416
  );
1344
1417
  try {
1345
- const r = await ie({
1418
+ const r = await ne({
1346
1419
  model: {},
1347
- urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
1420
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
1348
1421
  tracker: t
1349
1422
  });
1350
1423
  return T.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -1355,20 +1428,20 @@ const Br = new C({
1355
1428
  );
1356
1429
  const o = {
1357
1430
  id: t || "",
1358
- endState: U.Fail,
1431
+ endState: q.Fail,
1359
1432
  tracker: t,
1360
1433
  reason: "Failed to resolve trouble"
1361
1434
  };
1362
1435
  return y.initiateFuture(o), o;
1363
1436
  }
1364
- }, Zr = async (e, t) => {
1437
+ }, Xr = async (e, t) => {
1365
1438
  T.debug(
1366
1439
  `performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
1367
1440
  );
1368
1441
  try {
1369
- const r = await ie({
1442
+ const r = await ne({
1370
1443
  model: {},
1371
- urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
1444
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
1372
1445
  tracker: t
1373
1446
  });
1374
1447
  return T.debug("performCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
@@ -1379,18 +1452,18 @@ const Br = new C({
1379
1452
  );
1380
1453
  const o = {
1381
1454
  id: t || "",
1382
- endState: U.Fail,
1455
+ endState: q.Fail,
1383
1456
  tracker: t,
1384
1457
  reason: "Failed to resolve trouble"
1385
1458
  };
1386
1459
  return y.initiateFuture(o), o;
1387
1460
  }
1388
- }, kr = async (e, t, r, o) => {
1461
+ }, ea = async (e, t, r, o) => {
1389
1462
  T.debug(
1390
1463
  `performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
1391
1464
  );
1392
1465
  try {
1393
- const a = await ie({
1466
+ const a = await ne({
1394
1467
  model: {
1395
1468
  ...r,
1396
1469
  // commandedCalibrationVolume: 0,
@@ -1399,7 +1472,7 @@ const Br = new C({
1399
1472
  // newCalibrationValue: 0,
1400
1473
  // pouredCalibrationVolume: 0,
1401
1474
  },
1402
- urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
1475
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
1403
1476
  tracker: o
1404
1477
  });
1405
1478
  return T.debug("performVerify - response:", a), a != null && a.data && y.initiateFuture(a.data), a == null ? void 0 : a.data;
@@ -1410,19 +1483,19 @@ const Br = new C({
1410
1483
  );
1411
1484
  const n = {
1412
1485
  id: o || "",
1413
- endState: U.Fail,
1486
+ endState: q.Fail,
1414
1487
  tracker: o,
1415
1488
  reason: "Failed to resolve trouble"
1416
1489
  };
1417
1490
  return y.initiateFuture(n), n;
1418
1491
  }
1419
- }, Qr = async (e, t, r, o) => {
1492
+ }, ta = async (e, t, r, o) => {
1420
1493
  var a, n, s, u, S;
1421
1494
  T.debug(
1422
1495
  `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
1423
1496
  );
1424
1497
  try {
1425
- const l = await ie({
1498
+ const l = await ne({
1426
1499
  model: {
1427
1500
  ...o,
1428
1501
  // commandedCalibrationVolume: 0,
@@ -1431,33 +1504,33 @@ const Br = new C({
1431
1504
  // newCalibrationValue: 0,
1432
1505
  // pouredCalibrationVolume: 0,
1433
1506
  },
1434
- urlOverride: `${B}/api/ext/freestyle/microCalibration/pour/${e}/complete`
1507
+ urlOverride: `${Y}/api/ext/freestyle/microCalibration/pour/${e}/complete`
1435
1508
  });
1436
1509
  return T.debug("performComplete - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((a = l.data) != null && a.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
1437
1510
  } catch (l) {
1438
1511
  if (T.error(
1439
1512
  `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
1440
1513
  l
1441
- ), l instanceof ve) {
1514
+ ), l instanceof Ie) {
1442
1515
  const v = ((s = (n = l.payload) == null ? void 0 : n.data) == null ? void 0 : s.error) || ((u = l.payload) == null ? void 0 : u.error) || "unknownError";
1443
1516
  return [v, ((S = l.payload) == null ? void 0 : S.data) || { error: v }];
1444
1517
  }
1445
1518
  }
1446
1519
  return ["unknownError", { error: "unknownError" }];
1447
1520
  };
1448
- var Xr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, se = (e, t, r, o) => {
1449
- for (var a = o > 1 ? void 0 : o ? Jr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1521
+ var ra = Object.defineProperty, aa = Object.getOwnPropertyDescriptor, le = (e, t, r, o) => {
1522
+ for (var a = o > 1 ? void 0 : o ? aa(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1450
1523
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1451
- return o && a && Xr(t, r, a), a;
1524
+ return o && a && ra(t, r, a), a;
1452
1525
  };
1453
- const ht = "spm-pump-model";
1454
- let z = class {
1526
+ const mt = "spm-pump-model";
1527
+ let N = class {
1455
1528
  constructor(e, t, r) {
1456
1529
  i(this, "id");
1457
1530
  i(this, "logger");
1458
1531
  i(this, "pump");
1459
1532
  i(this, "futureHandler");
1460
- this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new ze(this);
1533
+ this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new Ge(this);
1461
1534
  }
1462
1535
  get name() {
1463
1536
  return this.pump.name;
@@ -1478,16 +1551,16 @@ let z = class {
1478
1551
  return this.futureHandler.future;
1479
1552
  }
1480
1553
  async performPreCalibrate(e) {
1481
- return Wr(this.pump.path, e);
1554
+ return Qr(this.pump.path, e);
1482
1555
  }
1483
1556
  async performCalibrate(e) {
1484
- return Zr(this.pump.path, e);
1557
+ return Xr(this.pump.path, e);
1485
1558
  }
1486
1559
  async performVerify(e, t, r) {
1487
- return kr(this.pump.path, e, t, r);
1560
+ return ea(this.pump.path, e, t, r);
1488
1561
  }
1489
1562
  async performComplete(e, t, r) {
1490
- return Qr(this.pump.path, e, t, r);
1563
+ return ta(this.pump.path, e, t, r);
1491
1564
  }
1492
1565
  // -------------------LIFECYCLE----------------------------
1493
1566
  async init() {
@@ -1497,44 +1570,67 @@ let z = class {
1497
1570
  this.logger.debug(`loading spm-pump ${this.id}`);
1498
1571
  }
1499
1572
  };
1500
- se([
1501
- _()
1502
- ], z.prototype, "performPreCalibrate", 1);
1503
- se([
1504
- _()
1505
- ], z.prototype, "performCalibrate", 1);
1506
- se([
1507
- _()
1508
- ], z.prototype, "performVerify", 1);
1509
- z = se([
1510
- f(ht)
1511
- ], z);
1512
- const ea = new C({
1513
- class: z,
1514
- type: ht
1573
+ le([
1574
+ I()
1575
+ ], N.prototype, "performPreCalibrate", 1);
1576
+ le([
1577
+ I()
1578
+ ], N.prototype, "performCalibrate", 1);
1579
+ le([
1580
+ I()
1581
+ ], N.prototype, "performVerify", 1);
1582
+ N = le([
1583
+ f(mt)
1584
+ ], N);
1585
+ const oa = new E({
1586
+ class: N,
1587
+ type: mt
1515
1588
  });
1516
- var ta = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, Ce = (e, t, r, o) => {
1517
- for (var a = o > 1 ? void 0 : o ? ra(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1589
+ var yt = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, sa = (e, t, r) => t in e ? yt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Se = (e, t, r, o) => {
1590
+ for (var a = o > 1 ? void 0 : o ? ia(t, r) : t, n = e.length - 1, s; n >= 0; n--)
1518
1591
  (s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
1519
- return o && a && ta(t, r, a), a;
1520
- };
1521
- const Ee = "agitation-required-trouble-model", aa = (e) => {
1592
+ return o && a && yt(t, r, a), a;
1593
+ }, na = (e, t, r) => (sa(e, t + "", r), r);
1594
+ const bt = "agitation-required-trouble-model", la = (e) => {
1522
1595
  if (e.data.agitationRequired)
1523
- return Ee;
1524
- }, oa = "InsufficientAgitationTrouble";
1525
- let q = class {
1526
- constructor(e, t, r) {
1596
+ return bt;
1597
+ }, ua = "InsufficientAgitationTrouble";
1598
+ let x = class {
1599
+ /**
1600
+ * Creates a new AgitationRequiredTrouble model instance.
1601
+ *
1602
+ * @param modelId - Unique identifier for this model instance (typically matches parent trouble ID)
1603
+ */
1604
+ constructor(e) {
1605
+ /**
1606
+ * Unique identifier for this model instance.
1607
+ */
1527
1608
  i(this, "id");
1528
- i(this, "logger");
1529
- i(this, "trouble");
1530
1609
  i(this, "_deferred");
1531
1610
  i(this, "_holdersLoaded", !1);
1532
1611
  i(this, "agitateBeforePour");
1533
- this.id = e, this.logger = r.logger, this._deferred = !1, this.trouble = t.companionParent;
1612
+ this.id = e, this._deferred = !1;
1534
1613
  }
1614
+ /**
1615
+ * Resolves the agitation trouble by delegating to the parent trouble model.
1616
+ *
1617
+ * Resolution typically involves completing the agitation process and clearing
1618
+ * the trouble state once carbonation or mixing levels are acceptable.
1619
+ *
1620
+ * @returns Promise resolving to the future response from the parent trouble's resolution
1621
+ */
1535
1622
  async resolve() {
1536
1623
  return this.trouble.resolve();
1537
1624
  }
1625
+ /**
1626
+ * Gets the holder model associated with this agitation trouble.
1627
+ *
1628
+ * The holder is the physical container (cartridge holder, ingredient holder, etc.)
1629
+ * that requires agitation. Returns undefined if the holder model hasn't been
1630
+ * loaded yet through the Assembly model initialization.
1631
+ *
1632
+ * @returns The holder model or undefined if not yet loaded
1633
+ */
1538
1634
  get holder() {
1539
1635
  const e = this.trouble.data.holderPaths[0], t = R(e);
1540
1636
  if (!(!this._holdersLoaded && !t.model))
@@ -1546,52 +1642,82 @@ let q = class {
1546
1642
  R(e).model && (this._holdersLoaded = !0);
1547
1643
  }
1548
1644
  }
1645
+ /**
1646
+ * Determines if trouble resolution should be deferred until agitation completes.
1647
+ *
1648
+ * Trouble resolution is deferred when:
1649
+ * 1. The holder has active insufficient agitation troubles
1650
+ * 2. The `agitateBeforePour` configuration is enabled
1651
+ *
1652
+ * This ensures that operations requiring agitation (prime, purge, or other
1653
+ * holder-related troubles) wait for proper carbonation or mixing before
1654
+ * being marked as resolved.
1655
+ *
1656
+ * @returns true if trouble resolution should wait for agitation to complete
1657
+ */
1549
1658
  get shouldDefer() {
1550
1659
  var o, a;
1551
1660
  if (!this.holder)
1552
1661
  return !0;
1553
- const t = (((o = this.holder) == null ? void 0 : o.troublesByType[oa]) || []).length > 0;
1662
+ const t = (((o = this.holder) == null ? void 0 : o.troublesByType[ua]) || []).length > 0;
1554
1663
  return !!((a = this.agitateBeforePour) != null && a.value) && t;
1555
1664
  }
1665
+ /**
1666
+ * Gets the current deferral state of this trouble.
1667
+ *
1668
+ * @returns true if this trouble resolution is currently deferred
1669
+ */
1556
1670
  get deferred() {
1557
1671
  return this._deferred;
1558
1672
  }
1673
+ /**
1674
+ * Marks this trouble as deferred, preventing immediate resolution.
1675
+ *
1676
+ * Called by the trouble system to indicate that trouble resolution
1677
+ * should wait for agitation to complete before being marked as resolved.
1678
+ */
1559
1679
  defer() {
1560
1680
  this._deferred = !0;
1561
1681
  }
1682
+ /**
1683
+ * Clears the deferral state, allowing trouble resolution to proceed.
1684
+ *
1685
+ * Typically called after agitation has completed and the trouble can
1686
+ * now be safely resolved.
1687
+ */
1562
1688
  clearDefer() {
1563
1689
  this._deferred = !1;
1564
1690
  }
1565
1691
  };
1566
- Ce([
1692
+ na(x, "Registration");
1693
+ Se([
1567
1694
  b({
1568
1695
  path: "app:kosdev.ddk:app",
1569
1696
  attribute: "ncui.agitateBeforePour"
1570
1697
  })
1571
- ], q.prototype, "agitateBeforePour", 2);
1572
- Ce([
1573
- Ct({
1574
- topic: Et(je.type),
1575
- lifecycle: Fe.INIT
1698
+ ], x.prototype, "agitateBeforePour", 2);
1699
+ Se([
1700
+ At({
1701
+ topic: wt(Ve.type),
1702
+ lifecycle: Ue.INIT
1576
1703
  })
1577
- ], q.prototype, "updateHolder", 1);
1578
- q = Ce([
1579
- f(Ee)
1580
- ], q);
1581
- const ia = new C({
1582
- class: q,
1583
- type: Ee
1584
- }), sa = ["iceAgitator"], na = {
1585
- iceAgitator: pt.factory
1586
- }, la = $.createLogger({ name: "freestyle-assembly-data-mapper" }), ma = async (e) => {
1587
- const t = Ie.instance().options({}).build(), r = $e.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
1704
+ ], x.prototype, "updateHolder", 1);
1705
+ x = Se([
1706
+ f({ modelTypeId: bt, singleton: !1 }),
1707
+ V(),
1708
+ ve({ mode: "composition", parentProperty: "trouble" })
1709
+ ], x);
1710
+ const ca = x.Registration, da = ["iceAgitator"], pa = {
1711
+ iceAgitator: ht.factory
1712
+ }, ga = $.createLogger({ name: "freestyle-assembly-data-mapper" }), $a = async (e) => {
1713
+ const t = Ce.instance().options({}).build(), r = Ee.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
1588
1714
  var S;
1589
- return sa.forEach((l) => {
1715
+ return da.forEach((l) => {
1590
1716
  var M;
1591
1717
  const v = u[l];
1592
1718
  if (v) {
1593
- const ft = na[l](v.path);
1594
- s[l] = ft({
1719
+ const Pt = pa[l](v.path);
1720
+ s[l] = Pt({
1595
1721
  name: v.name,
1596
1722
  path: v.path,
1597
1723
  statePath: ((M = v.state) == null ? void 0 : M.path) || ""
@@ -1599,7 +1725,7 @@ const ia = new C({
1599
1725
  }
1600
1726
  }), (S = u.cartridgeAgitators) == null || S.forEach((l) => {
1601
1727
  var M;
1602
- const v = Ze.instance(
1728
+ const v = Je.instance(
1603
1729
  l.path
1604
1730
  ).options({
1605
1731
  name: l.name,
@@ -1608,7 +1734,7 @@ const ia = new C({
1608
1734
  }).build();
1609
1735
  t.addModel(v);
1610
1736
  }), u.remoteTrays && u.remoteTrays.forEach((l) => {
1611
- la.info(`Found remote tray ${l.name} with path ${l.path}`);
1737
+ ga.info(`Found remote tray ${l.name} with path ${l.path}`);
1612
1738
  const v = `${j.type}-${l.holderPath}`, M = j.instance(v).options({
1613
1739
  holderPath: l.holderPath,
1614
1740
  configPath: l.path,
@@ -1624,19 +1750,19 @@ const ia = new C({
1624
1750
  supportsCarb: n,
1625
1751
  supportsIce: a
1626
1752
  };
1627
- }, ua = (e) => () => (Ot(e)(), wt(e)(), Ae.register(), de.register(), pt.register(), Be.register(), Ie.register(), ea.register(), ur.register(), Br.register(), Jt.register(), we.register(), Oe.register(), j.register(), $e.register(), m.companion.register(e)(
1628
- Mt.type,
1629
- Ae.type
1753
+ }, ha = (e) => () => (Mt(e)(), Ft(e)(), Me.register(), ge.register(), ht.register(), Ke.register(), Ce.register(), oa.register(), gr.register(), Wr.register(), ar.register(), Re.register(), Ae.register(), j.register(), Ee.register(), m.companion.register(e)(
1754
+ Lt.type,
1755
+ Me.type
1630
1756
  ), m.companion.register(e)(
1631
- je.type,
1632
- de.type
1633
- ), ia.register(), m.companion.register(e)(
1634
- St.type,
1635
- aa
1636
- ), m.companion.register(e)(Rt.type, we.type), m.companion.register(e)(
1637
- Dt.type,
1638
- Oe.type
1639
- ), le[ue].register(
1757
+ Ve.type,
1758
+ ge.type
1759
+ ), ca.register(), m.companion.register(e)(
1760
+ Rt.type,
1761
+ la
1762
+ ), m.companion.register(e)(zt.type, Re.type), m.companion.register(e)(
1763
+ Nt.type,
1764
+ Ae.type
1765
+ ), ce[de].register(
1640
1766
  "EnjoyByTrouble",
1641
1767
  async (t) => {
1642
1768
  if (t.data.enjoyByDate) {
@@ -1649,21 +1775,21 @@ const ia = new C({
1649
1775
  }
1650
1776
  return {};
1651
1777
  }
1652
- ), le[ue].register(
1778
+ ), ce[de].register(
1653
1779
  "SuperPumpRequiredTrouble",
1654
1780
  // This is the trouble type
1655
1781
  async (t) => {
1656
1782
  const { model: r } = R(
1657
- Lt.type
1783
+ xt.type
1658
1784
  );
1659
1785
  return r ? {
1660
1786
  superPumps: r.models.getIndexByKey(
1661
- Ft.byType,
1787
+ Ut.byType,
1662
1788
  "microSuper"
1663
1789
  ).map((n) => n.name).join(", ")
1664
1790
  } : {};
1665
1791
  }
1666
- ), le[ue].register(
1792
+ ), ce[de].register(
1667
1793
  "MicroPumpAirDetectTrouble",
1668
1794
  async (t) => {
1669
1795
  if (t.ifaces.includes("container"))
@@ -1687,73 +1813,103 @@ const ia = new C({
1687
1813
  model: m.model.register(e),
1688
1814
  companion: m.companion.register(e),
1689
1815
  legacy: m.model.registerLegacyModel(e)
1690
- }), I = {
1691
- ...At
1816
+ }), _ = {
1817
+ ...Dt
1692
1818
  };
1693
- I.freestyle = {
1694
- models: ua(I)
1819
+ _.freestyle = {
1820
+ models: ha(_)
1695
1821
  };
1696
- I.preload = m.model.preloadModel(I);
1697
- I.model = m.model.register(I);
1698
- I.companion = m.companion.register(I);
1699
- I.legacy = m.model.registerLegacyModel(I);
1700
- const ya = I;
1701
- function ca(e) {
1702
- return Ge(e);
1822
+ _.preload = m.model.preloadModel(_);
1823
+ _.model = m.model.register(_);
1824
+ _.companion = m.companion.register(_);
1825
+ _.legacy = m.model.registerLegacyModel(_);
1826
+ const Ca = _;
1827
+ function fa(e) {
1828
+ return B(e);
1829
+ }
1830
+ const De = H(), Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1831
+ __proto__: null,
1832
+ api: De,
1833
+ default: De,
1834
+ kosServiceRequest: fa
1835
+ }, Symbol.toStringTag, { value: "Module" }));
1836
+ function ma(e) {
1837
+ return B(e);
1838
+ }
1839
+ const Fe = H(), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1840
+ __proto__: null,
1841
+ api: Fe,
1842
+ default: Fe,
1843
+ kosServiceRequest: ma
1844
+ }, Symbol.toStringTag, { value: "Module" }));
1845
+ function ya(e) {
1846
+ return B(e);
1847
+ }
1848
+ const Le = H(), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1849
+ __proto__: null,
1850
+ api: Le,
1851
+ default: Le,
1852
+ kosServiceRequest: ya
1853
+ }, Symbol.toStringTag, { value: "Module" }));
1854
+ function ba(e) {
1855
+ return B(e);
1703
1856
  }
1704
- const Me = Ue(), ba = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1857
+ const ze = H(), Aa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1705
1858
  __proto__: null,
1706
- api: Me,
1707
- default: Me,
1708
- kosServiceRequest: ca
1859
+ api: ze,
1860
+ default: ze,
1861
+ kosServiceRequest: ba
1709
1862
  }, Symbol.toStringTag, { value: "Module" }));
1710
- function da(e) {
1711
- return Ge(e);
1863
+ function Pa(e) {
1864
+ return B(e);
1712
1865
  }
1713
- const Re = Ue(), Pa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1866
+ const Ne = H(), wa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1714
1867
  __proto__: null,
1715
- api: Re,
1716
- default: Re,
1717
- kosServiceRequest: da
1868
+ api: Ne,
1869
+ default: Ne,
1870
+ kosServiceRequest: Pa
1718
1871
  }, Symbol.toStringTag, { value: "Module" }));
1719
1872
  export {
1720
- oa as A,
1721
- kr as B,
1722
- Be as C,
1723
- ma as D,
1724
- pr as E,
1725
- ur as F,
1726
- J as I,
1727
- ya as K,
1728
- Br as L,
1729
- Er as N,
1730
- $e as R,
1731
- ea as S,
1732
- Ie as a,
1733
- Z as b,
1734
- Ze as c,
1735
- Jt as d,
1736
- de as e,
1737
- Oe as f,
1738
- Ae as g,
1739
- we as h,
1740
- pt as i,
1741
- ia as j,
1742
- Pa as k,
1743
- j as l,
1744
- ir as m,
1745
- er as n,
1746
- tr as o,
1747
- rr as p,
1748
- ar as q,
1749
- ua as r,
1750
- ba as s,
1751
- Se as t,
1752
- Or as u,
1753
- Mr as v,
1754
- fa as w,
1755
- Zr as x,
1756
- Qr as y,
1757
- Wr as z
1873
+ ua as A,
1874
+ Xr as B,
1875
+ Ke as C,
1876
+ ta as D,
1877
+ Qr as E,
1878
+ gr as F,
1879
+ ea as G,
1880
+ $a as H,
1881
+ re as I,
1882
+ mr as J,
1883
+ Ca as K,
1884
+ Wr as L,
1885
+ wr as N,
1886
+ Ee as R,
1887
+ oa as S,
1888
+ Ce as a,
1889
+ Q as b,
1890
+ Je as c,
1891
+ ar as d,
1892
+ ge as e,
1893
+ Ae as f,
1894
+ Me as g,
1895
+ Re as h,
1896
+ ht as i,
1897
+ ca as j,
1898
+ Ea as k,
1899
+ Sa as l,
1900
+ Aa as m,
1901
+ wa as n,
1902
+ j as o,
1903
+ sr as p,
1904
+ ur as q,
1905
+ ha as r,
1906
+ Oa as s,
1907
+ or as t,
1908
+ ir as u,
1909
+ nr as v,
1910
+ we as w,
1911
+ Mr as x,
1912
+ Lr as y,
1913
+ Ia as z
1758
1914
  };
1759
- //# sourceMappingURL=service-C0WOCTr1.js.map
1915
+ //# sourceMappingURL=service-_jG-Kd3m.js.map