@kosdev-code/kos-dispense-sdk 0.1.0-dev.5077 → 0.1.0-dev.5092

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 (29) hide show
  1. package/dispense-registration-manager-DDyKjPWB.cjs +2 -0
  2. package/dispense-registration-manager-DDyKjPWB.cjs.map +1 -0
  3. package/{dispense-registration-manager-kSiG2s8S.js → dispense-registration-manager-DgMTZL-g.js} +601 -590
  4. package/dispense-registration-manager-DgMTZL-g.js.map +1 -0
  5. package/{extension-utils-CdPC7X-L.cjs → extension-utils-BceaRPqX.cjs} +2 -2
  6. package/{extension-utils-CdPC7X-L.cjs.map → extension-utils-BceaRPqX.cjs.map} +1 -1
  7. package/{extension-utils-CuSBRs_n.js → extension-utils-mvxA4D4h.js} +2 -2
  8. package/{extension-utils-CuSBRs_n.js.map → extension-utils-mvxA4D4h.js.map} +1 -1
  9. package/index.cjs +1 -1
  10. package/index.js +3 -3
  11. package/models/models/assembly/assembly-model.d.ts.map +1 -1
  12. package/models/models/assembly/pump-utils.d.ts.map +1 -1
  13. package/models/models/pump/pump-model.d.ts.map +1 -1
  14. package/models/models/pump/types/index.d.ts +4 -0
  15. package/models/models/types/assembly.d.ts +4 -0
  16. package/models/models/types/assembly.d.ts.map +1 -1
  17. package/models/utils/service.d.ts +8 -8
  18. package/models.cjs +1 -1
  19. package/models.js +2 -2
  20. package/package.json +3 -3
  21. package/{pump-provider-BmaHEGSM.cjs → pump-provider-BSdtHuOD.cjs} +2 -2
  22. package/{pump-provider-BmaHEGSM.cjs.map → pump-provider-BSdtHuOD.cjs.map} +1 -1
  23. package/{pump-provider-C1wagpbM.js → pump-provider-C-Zclv9X.js} +2 -2
  24. package/{pump-provider-C1wagpbM.js.map → pump-provider-C-Zclv9X.js.map} +1 -1
  25. package/ui.cjs +1 -1
  26. package/ui.js +2 -2
  27. package/dispense-registration-manager-D2xgLGGi.cjs +0 -2
  28. package/dispense-registration-manager-D2xgLGGi.cjs.map +0 -1
  29. package/dispense-registration-manager-kSiG2s8S.js.map +0 -1
@@ -1,20 +1,20 @@
1
- var gt = Object.defineProperty;
2
- var ut = (e, t, r) => t in e ? gt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var o = (e, t, r) => (ut(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { kosModel as P, Kos as v, isKosModel as b, resolveServiceUrl as N, ServiceFactory as $, KosLog as m, KosModelContainer as D, KosExtensionUtils as A, kosChild as _, FetchError as Pt, ExtensionManager as g, EXTENSION_TROUBLE_MAPPER as Me, EXTENSION_TROUBLE_DATA_MAPPER as ee, getKosModelSync as z, kosDependency as xe, kosTroubleAware as yt, kosAction as O, kosTopicHandler as te, DependencyLifecycle as pe, getKosModel as Be, FutureManager as he, kosFuture as ge, FutureHandler as Ge, EXTENSION_FEATURE_FLAG_RESOLVER as It, isKosDataModel as mt, ChildModels as ft, KosFeatureFlags as vt, kosParentAware as bt, createPropKey as Ot, kosStateEntry as ue, kosStateExit as Pe, kosStateGuard as re, kosLoggerAware as je, kosStateMachine as Fe, MultipleFutureHandler as _t, arraysEqual as Et, getAllKosCompanionModels as U, EventBus as R, KosContextManager as Mt, destroyKosModel as wt, SingletonKosModelRegistrationFactory as Rt, kosFutureAware as Ct, ObservableData as Te, KosModelRegistrationFactory as Nt, KosModelRegistry as $t, RegistrationManager as w, registerCoreModels as Dt, registerLegacyModel as St } from "@kosdev-code/kos-ui-sdk";
1
+ var ut = Object.defineProperty;
2
+ var Pt = (e, t, r) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var o = (e, t, r) => (Pt(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { kosModel as y, Kos as v, isKosModel as b, resolveServiceUrl as D, ServiceFactory as S, KosLog as m, KosModelContainer as T, KosExtensionUtils as U, kosChild as _, FetchError as yt, ExtensionManager as P, EXTENSION_TROUBLE_MAPPER as Me, EXTENSION_TROUBLE_DATA_MAPPER as te, getKosModelSync as x, kosDependency as Be, kosTroubleAware as It, kosAction as O, kosTopicHandler as re, DependencyLifecycle as pe, getKosModel as Ge, FutureManager as he, kosFuture as ge, FutureHandler as je, EXTENSION_FEATURE_FLAG_RESOLVER as mt, isKosDataModel as ft, ChildModels as vt, KosFeatureFlags as bt, kosParentAware as Ot, createPropKey as _t, kosStateEntry as ue, kosStateExit as Pe, kosStateGuard as ae, kosLoggerAware as Fe, kosStateMachine as He, MultipleFutureHandler as Et, arraysEqual as Mt, getAllKosCompanionModels as z, EventBus as $, KosContextManager as wt, destroyKosModel as Rt, SingletonKosModelRegistrationFactory as Ct, kosFutureAware as $t, ObservableData as Te, KosModelRegistrationFactory as Nt, KosModelRegistry as Dt, RegistrationManager as R, registerCoreModels as St, registerLegacyModel as Tt } from "@kosdev-code/kos-ui-sdk";
5
5
  import "react";
6
- var h = /* @__PURE__ */ ((e) => (e.IngredientLoader = "kos.ingredient.loader", e.IngredientMapper = "kos.ingredient.mapper", e.IngredientIndex = "kos.ingredient.index", e.IngredientTypeMapper = "kos.ingredient.type.mapper", e.HolderTypeMapper = "kos.holder.type.mapper", e.HolderMapper = "kos.holder.mapper", e.HolderIndex = "kos.holder.index", e.HolderIngredientMapper = "kos.holder.ingredient.mapper", e.AvailabilityMapper = "kos.availability.mapper", e.AvailabilityLoader = "kos.availability.loader", e.SelectedPourableMapper = "kos.selected.pourable.mapper", e.AssemblyMapper = "kos.assembly.mapper", e.BoardMapper = "kos.board.mapper", e.BoardIndex = "kos.board.index", e.PumpIndex = "kos.pump.index", e.AssemblyFeatureFlags = "kos.assembly.feature.flags", e))(h || {}), S = /* @__PURE__ */ ((e) => (e.Nozzle = "nozzle-model", e.Availability = "availability-model", e.Holder = "holder-model", e.HolderContainer = "holder-container-model", e.IngredientContainer = "ingredient-container-model", e.Ingredient = "ingredient-model", e.Pump = "pump-model", e.PumpContainer = "pump-container-model", e))(S || {}), Tt = Object.getOwnPropertyDescriptor, Lt = (e, t, r, i) => {
7
- for (var a = i > 1 ? void 0 : i ? Tt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
8
- (n = e[s]) && (a = n(a) || a);
9
- return a;
6
+ var g = /* @__PURE__ */ ((e) => (e.IngredientLoader = "kos.ingredient.loader", e.IngredientMapper = "kos.ingredient.mapper", e.IngredientIndex = "kos.ingredient.index", e.IngredientTypeMapper = "kos.ingredient.type.mapper", e.HolderTypeMapper = "kos.holder.type.mapper", e.HolderMapper = "kos.holder.mapper", e.HolderIndex = "kos.holder.index", e.HolderIngredientMapper = "kos.holder.ingredient.mapper", e.AvailabilityMapper = "kos.availability.mapper", e.AvailabilityLoader = "kos.availability.loader", e.SelectedPourableMapper = "kos.selected.pourable.mapper", e.AssemblyMapper = "kos.assembly.mapper", e.BoardMapper = "kos.board.mapper", e.BoardIndex = "kos.board.index", e.PumpIndex = "kos.pump.index", e.AssemblyFeatureFlags = "kos.assembly.feature.flags", e))(g || {}), L = /* @__PURE__ */ ((e) => (e.Nozzle = "nozzle-model", e.Availability = "availability-model", e.Holder = "holder-model", e.HolderContainer = "holder-container-model", e.IngredientContainer = "ingredient-container-model", e.Ingredient = "ingredient-model", e.Pump = "pump-model", e.PumpContainer = "pump-container-model", e))(L || {}), Lt = Object.getOwnPropertyDescriptor, At = (e, t, r, a) => {
7
+ for (var i = a > 1 ? void 0 : a ? Lt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
8
+ (n = e[s]) && (i = n(i) || i);
9
+ return i;
10
10
  };
11
- const F = "ingredient-model";
11
+ const H = "ingredient-model";
12
12
  let be = class {
13
13
  constructor(e, {
14
14
  name: t,
15
15
  type: r,
16
- data: i,
17
- ingredientId: a,
16
+ data: a,
17
+ ingredientId: i,
18
18
  ...s
19
19
  }) {
20
20
  o(this, "id");
@@ -22,53 +22,53 @@ let be = class {
22
22
  o(this, "name");
23
23
  o(this, "type");
24
24
  o(this, "data");
25
- this.id = e, this.ingredientId = a, this.name = t, this.type = r, this.data = i, Object.assign(this, s);
25
+ this.id = e, this.ingredientId = i, this.name = t, this.type = r, this.data = a, Object.assign(this, s);
26
26
  }
27
27
  updateModel({
28
28
  name: e,
29
29
  type: t,
30
30
  data: r,
31
- ingredientId: i,
32
- ...a
31
+ ingredientId: a,
32
+ ...i
33
33
  }) {
34
- this.name = e, this.type = t, this.ingredientId = i, this.data = r, Object.assign(this, a);
34
+ this.name = e, this.type = t, this.ingredientId = a, this.data = r, Object.assign(this, i);
35
35
  }
36
36
  // -------------------LIFECYCLE----------------------------
37
37
  // -------------------ENTITY----------------------------
38
38
  };
39
- be = Lt([
40
- P(F)
39
+ be = At([
40
+ y(H)
41
41
  ], be);
42
- const He = {
42
+ const Ve = {
43
43
  registration: {
44
- [F]: {
44
+ [H]: {
45
45
  class: be,
46
46
  singleton: !1
47
47
  }
48
48
  },
49
- type: F,
50
- predicate: b(F),
51
- factory: v.Factory.create(F)
52
- }, { URL: Ve } = N("INGREDIENT_SERVICE"), { getOne: At } = $.build({
53
- basePath: `${Ve}/api/ext/dispense/ingredients`
54
- }), Ut = async () => await At({
55
- urlOverride: `${Ve}/api/ext/dispense/ingredients`
49
+ type: H,
50
+ predicate: b(H),
51
+ factory: v.Factory.create(H)
52
+ }, { URL: Ke } = D("INGREDIENT_SERVICE"), { getOne: Ut } = S.build({
53
+ basePath: `${Ke}/api/ext/dispense/ingredients`
54
+ }), zt = async () => await Ut({
55
+ urlOverride: `${Ke}/api/ext/dispense/ingredients`
56
56
  });
57
- var zt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Ke = (e, t, r, i) => {
58
- for (var a = i > 1 ? void 0 : i ? xt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
59
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
60
- return i && a && zt(t, r, a), a;
57
+ var xt = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, ke = (e, t, r, a) => {
58
+ for (var i = a > 1 ? void 0 : a ? Bt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
59
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
60
+ return a && i && xt(t, r, i), i;
61
61
  };
62
- const H = "ingredient-container-model", Bt = m.createLogger({ name: "ingredient-container-model" });
62
+ const V = "ingredient-container-model", Gt = m.createLogger({ name: "ingredient-container-model" });
63
63
  let se = class {
64
64
  constructor(e, t) {
65
65
  o(this, "id");
66
66
  o(this, "ingredients");
67
- this.id = e, this.ingredients = new D({
67
+ this.id = e, this.ingredients = new T({
68
68
  indexMap: {
69
69
  ingredientType: "type"
70
70
  },
71
- extensionId: h.IngredientIndex,
71
+ extensionId: g.IngredientIndex,
72
72
  parentId: e
73
73
  });
74
74
  }
@@ -79,31 +79,31 @@ let se = class {
79
79
  return this.ingredients.getIndexByKey("ingredientType", e);
80
80
  }
81
81
  async load(e) {
82
- var a;
83
- Bt.debug(`loading ingredient container ${this.id}`);
84
- const t = await Ut();
82
+ var i;
83
+ Gt.debug(`loading ingredient container ${this.id}`);
84
+ const t = await zt();
85
85
  if ((t == null ? void 0 : t.status) !== 200)
86
86
  throw new Error("Failed to load ingredients");
87
- const r = await A.executeLoaderExtension({
87
+ const r = await U.executeLoaderExtension({
88
88
  context: e,
89
- extension: h.IngredientLoader
90
- }), i = (t == null ? void 0 : t.data) ?? {};
91
- for (const s of Object.keys(i))
92
- for (const n of ((a = t == null ? void 0 : t.data) == null ? void 0 : a[s]) || []) {
93
- const c = await A.executeDataMapperExtension({
94
- extension: h.IngredientMapper,
89
+ extension: g.IngredientLoader
90
+ }), a = (t == null ? void 0 : t.data) ?? {};
91
+ for (const s of Object.keys(a))
92
+ for (const n of ((i = t == null ? void 0 : t.data) == null ? void 0 : i[s]) || []) {
93
+ const l = await U.executeDataMapperExtension({
94
+ extension: g.IngredientMapper,
95
95
  data: n,
96
96
  contextData: r
97
- }), l = await A.executePropertyMapperExtension({
98
- extension: h.IngredientTypeMapper,
97
+ }), c = await U.executePropertyMapperExtension({
98
+ extension: g.IngredientTypeMapper,
99
99
  data: n,
100
100
  contextData: r
101
101
  }), p = {
102
102
  ...n,
103
- type: l || n.type,
104
- ...c,
105
- data: c
106
- }, u = He.factory(n.id)(
103
+ type: c || n.type,
104
+ ...l,
105
+ data: l
106
+ }, u = Ve.factory(n.id)(
107
107
  p
108
108
  );
109
109
  this.ingredients.addModel(u);
@@ -111,100 +111,100 @@ let se = class {
111
111
  }
112
112
  // -------------------ENTITY----------------------------
113
113
  };
114
- Ke([
114
+ ke([
115
115
  _
116
116
  ], se.prototype, "ingredients", 2);
117
- se = Ke([
118
- P(H)
117
+ se = ke([
118
+ y(V)
119
119
  ], se);
120
- const ke = {
120
+ const Ye = {
121
121
  registration: {
122
- [H]: {
122
+ [V]: {
123
123
  class: se,
124
124
  singleton: !0
125
125
  }
126
126
  },
127
- type: H,
128
- predicate: b(H),
129
- factory: v.Singleton.create(H)
130
- }, { URL: ye } = N("HOLDER_SERVICE"), { getAll: Gt, postModel: Ye, deleteModel: jt } = $.build({
127
+ type: V,
128
+ predicate: b(V),
129
+ factory: v.Singleton.create(V)
130
+ }, { URL: ye } = D("HOLDER_SERVICE"), { getAll: jt, postModel: Ze, deleteModel: Ft } = S.build({
131
131
  basePath: `${ye}/api/kos/holders`
132
- }), Ft = m.createLogger({
132
+ }), Ht = m.createLogger({
133
133
  name: "holder-service",
134
134
  group: "Services"
135
- }), di = async () => await Gt({}), Ht = async (e, t) => {
135
+ }), da = async () => await jt({}), Vt = async (e, t) => {
136
136
  if (!e || !t)
137
137
  throw new Error("Missing holderPath or ingredientId");
138
- return await Ye({
138
+ return await Ze({
139
139
  model: { holderPath: e, ingredientId: t },
140
140
  urlOverride: `${ye}/api/ext/dispense/assignments`
141
141
  });
142
- }, Vt = async (e) => {
142
+ }, Kt = async (e) => {
143
143
  if (!e)
144
144
  throw new Error("Missing holderPath");
145
- return await jt({
145
+ return await Ft({
146
146
  id: e,
147
147
  urlOverride: `${ye}/api/ext/dispense/assignments/${e}`
148
148
  });
149
- }, Kt = async (e) => {
149
+ }, kt = async (e) => {
150
150
  if (!e)
151
151
  throw new Error("Missing holderPath");
152
- return Ft.debug(
152
+ return Ht.debug(
153
153
  `sending POST request to /api/ext/dispense/pumpEvents/replaceLine/${e}`
154
- ), await Ye({
154
+ ), await Ze({
155
155
  model: {},
156
156
  urlOverride: `${ye}/api/ext/dispense/pumpEvents/replaceLine/${e}`
157
157
  });
158
- }, { URL: ne } = N("ASSIGNMENT_SERVICE"), { getAll: kt, postModel: Ze, deleteModel: Yt } = $.build({
158
+ }, { URL: ne } = D("ASSIGNMENT_SERVICE"), { getAll: Yt, postModel: Xe, deleteModel: Zt } = S.build({
159
159
  destinationAddress: "",
160
160
  basePath: `${ne}/api/ext/dispense/assignments`
161
- }), oe = window.kosUseFos, li = async () => await kt({ fos: oe }), Zt = async (e, t) => {
162
- var a, s, n, c;
163
- const r = JSON.stringify(t), i = `${ne}/api/ext/dispense/assignments`;
161
+ }), oe = window.kosUseFos, la = async () => await Yt({ fos: oe }), Xt = async (e, t) => {
162
+ var i, s, n, l;
163
+ const r = JSON.stringify(t), a = `${ne}/api/ext/dispense/assignments`;
164
164
  try {
165
- const l = await Ze({
165
+ const c = await Xe({
166
166
  model: { holderPath: e, factoryJson: r },
167
- urlOverride: i
167
+ urlOverride: a
168
168
  });
169
- return (l == null ? void 0 : l.status) === 200 && ((a = l == null ? void 0 : l.data) != null && a.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
170
- } catch (l) {
171
- if (l instanceof Pt)
169
+ return (c == null ? void 0 : c.status) === 200 && ((i = c == null ? void 0 : c.data) != null && i.error) ? [c.data.error || "unknownError", c.data] : [void 0, c == null ? void 0 : c.data];
170
+ } catch (c) {
171
+ if (c instanceof yt)
172
172
  return [
173
- ((n = (s = l.payload) == null ? void 0 : s.data) == null ? void 0 : n.error) || "unknownError",
174
- (c = l.payload) == null ? void 0 : c.data
173
+ ((n = (s = c.payload) == null ? void 0 : s.data) == null ? void 0 : n.error) || "unknownError",
174
+ (l = c.payload) == null ? void 0 : l.data
175
175
  ];
176
176
  }
177
177
  return ["unknownError", void 0];
178
- }, ci = async (e) => {
178
+ }, ca = async (e) => {
179
179
  const t = oe ? `${ne}/api/ingredients/assignments/${e.holderPath}` : `${ne}/api/ext/dispense/assignments`;
180
- return await Ze({
180
+ return await Xe({
181
181
  model: { ...e, fuelGauge: 680 },
182
182
  fos: oe,
183
183
  urlOverride: t
184
184
  });
185
- }, pi = async (e) => await Yt({ id: e, fos: oe });
186
- var Xt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, we = (e, t, r, i) => {
187
- for (var a = i > 1 ? void 0 : i ? Jt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
188
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
189
- return i && a && Xt(t, r, a), a;
185
+ }, pa = async (e) => await Zt({ id: e, fos: oe });
186
+ var Jt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, we = (e, t, r, a) => {
187
+ for (var i = a > 1 ? void 0 : a ? qt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
188
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
189
+ return a && i && Jt(t, r, i), i;
190
190
  };
191
- const V = S.Holder, Le = m.createLogger({ name: "holder-model" });
192
- g[Me].register(
191
+ const K = L.Holder, Le = m.createLogger({ name: "holder-model" });
192
+ P[Me].register(
193
193
  "holder",
194
194
  async (e) => {
195
195
  const t = [];
196
196
  return t.push(...e.data.holderPaths), t;
197
197
  }
198
198
  );
199
- g[ee].register(
199
+ P[te].register(
200
200
  "pump",
201
201
  async (e) => {
202
202
  if (e.data.pumpPath) {
203
- const { model: t } = z(
203
+ const { model: t } = x(
204
204
  e.data.pumpPath
205
205
  );
206
206
  if (t) {
207
- const r = t.ingredientId ? z(t.ingredientId).model : void 0;
207
+ const r = t.ingredientId ? x(t.ingredientId).model : void 0;
208
208
  return {
209
209
  ingredientId: t.ingredientId,
210
210
  ingredientName: (r == null ? void 0 : r.displayName) ?? ((r == null ? void 0 : r.name) || ""),
@@ -215,17 +215,17 @@ g[ee].register(
215
215
  return {};
216
216
  }
217
217
  );
218
- g[ee].register(
218
+ P[te].register(
219
219
  "holder",
220
220
  async (e) => e.data.holderNames.length > 0 ? {
221
221
  holderName: e.data.holderNames[0] || ""
222
222
  } : {}
223
223
  );
224
- g[ee].register(
224
+ P[te].register(
225
225
  "container",
226
226
  async (e) => {
227
227
  if (e.data.ingredients.length > 0) {
228
- const t = e.data.ingredients[0], { model: r } = z(t);
228
+ const t = e.data.ingredients[0], { model: r } = x(t);
229
229
  return {
230
230
  ingredientName: (r == null ? void 0 : r.displayName) ?? ((r == null ? void 0 : r.name) || ""),
231
231
  ingredients: e.data.ingredients ? e.data.ingredients : [],
@@ -235,23 +235,23 @@ g[ee].register(
235
235
  return {};
236
236
  }
237
237
  );
238
- class qt extends Error {
239
- constructor(r, i) {
240
- super(i);
238
+ class Wt extends Error {
239
+ constructor(r, a) {
240
+ super(a);
241
241
  o(this, "type");
242
242
  this.name = "AssignmentError", this.type = r;
243
243
  }
244
244
  }
245
- let Q = class {
245
+ let ee = class {
246
246
  constructor(e, {
247
247
  path: t,
248
248
  name: r,
249
- ingredientSource: i,
250
- ingredientId: a,
249
+ ingredientSource: a,
250
+ ingredientId: i,
251
251
  ingredientType: s,
252
252
  slice: n,
253
- group: c,
254
- data: l,
253
+ group: l,
254
+ data: c,
255
255
  enjoyByDate: p
256
256
  }, u) {
257
257
  o(this, "id");
@@ -267,7 +267,7 @@ let Q = class {
267
267
  o(this, "enjoyByDate");
268
268
  o(this, "pumps");
269
269
  o(this, "ingredientContainer");
270
- this.id = e, this.path = t, this.name = r, this.ingredientType = s, this.ingredientSource = i, this.ingredientId = a, this.group = c, this.slice = n, this.enjoyByDate = p, this.data = l, this.pumps = new D({
270
+ this.id = e, this.path = t, this.name = r, this.ingredientType = s, this.ingredientSource = a, this.ingredientId = i, this.group = l, this.slice = n, this.enjoyByDate = p, this.data = c, this.pumps = new T({
271
271
  parentId: e,
272
272
  sortKey: "path"
273
273
  }), this.logger = u.logger;
@@ -276,14 +276,14 @@ let Q = class {
276
276
  path: e,
277
277
  name: t,
278
278
  ingredientSource: r,
279
- ingredientId: i,
280
- ingredientType: a,
279
+ ingredientId: a,
280
+ ingredientType: i,
281
281
  group: s,
282
282
  slice: n,
283
- enjoyByDate: c,
284
- data: l
283
+ enjoyByDate: l,
284
+ data: c
285
285
  }) {
286
- this.path = e, this.name = t, this.ingredientId = i, this.ingredientType = a, this.ingredientSource = r, this.enjoyByDate = c, this.slice = n, this.group = s, this.data = l;
286
+ this.path = e, this.name = t, this.ingredientId = a, this.ingredientType = i, this.ingredientSource = r, this.enjoyByDate = l, this.slice = n, this.group = s, this.data = c;
287
287
  }
288
288
  get hasEnjoyByDate() {
289
289
  return !!this.enjoyByDate && !this.unassigned;
@@ -308,8 +308,8 @@ let Q = class {
308
308
  return this.logger.debug(`isPouring: ${!!e}`), e;
309
309
  }
310
310
  async performIntent(e) {
311
- const t = typeof e == "string" ? e : e.intent, r = typeof e == "string" ? void 0 : e.pumpPath, i = r ? this.pumps.getModel(r) : this.pumps.data[0];
312
- return i == null ? void 0 : i.performIntent({ intent: t });
311
+ const t = typeof e == "string" ? e : e.intent, r = typeof e == "string" ? void 0 : e.pumpPath, a = r ? this.pumps.getModel(r) : this.pumps.data[0];
312
+ return a == null ? void 0 : a.performIntent({ intent: t });
313
313
  }
314
314
  get pourState() {
315
315
  return this.pumps.data.reduce((t, r) => r.pouringState ? r.pouringState : t, "");
@@ -383,9 +383,9 @@ let Q = class {
383
383
  if (!e)
384
384
  throw new Error("Invalid override");
385
385
  try {
386
- const [t, r] = await Zt(this.path, e);
386
+ const [t, r] = await Xt(this.path, e);
387
387
  if (t)
388
- throw new qt(
388
+ throw new Wt(
389
389
  t,
390
390
  `Failed to perform rfid override on holder ${this.id}`
391
391
  );
@@ -398,7 +398,7 @@ let Q = class {
398
398
  }
399
399
  async assignIngredient(e) {
400
400
  try {
401
- e ? await Ht(this.path, e) : await Vt(this.path), O(() => {
401
+ e ? await Vt(this.path, e) : await Kt(this.path), O(() => {
402
402
  this.ingredientId = e;
403
403
  });
404
404
  } catch (t) {
@@ -409,7 +409,7 @@ let Q = class {
409
409
  return this.troubles.some((e) => e.shouldDefer);
410
410
  }
411
411
  async replaceLine() {
412
- await Kt(this.path);
412
+ await kt(this.path);
413
413
  }
414
414
  // -------------------LIFECYCLE----------------------------
415
415
  // ----------------------------------
@@ -433,68 +433,68 @@ let Q = class {
433
433
  };
434
434
  we([
435
435
  _
436
- ], Q.prototype, "pumps", 2);
436
+ ], ee.prototype, "pumps", 2);
437
437
  we([
438
- xe({ modelType: ke.type })
439
- ], Q.prototype, "ingredientContainer", 2);
440
- Q = we([
441
- P(V),
442
- yt()
443
- ], Q);
444
- const Xe = {
438
+ Be({ modelType: Ye.type })
439
+ ], ee.prototype, "ingredientContainer", 2);
440
+ ee = we([
441
+ y(K),
442
+ It()
443
+ ], ee);
444
+ const Je = {
445
445
  registration: {
446
- [V]: {
447
- class: Q,
446
+ [K]: {
447
+ class: ee,
448
448
  singleton: !1
449
449
  }
450
450
  },
451
- type: V,
452
- predicate: b(V),
453
- factory: v.Factory.create(V)
454
- }, Wt = async (e, t) => {
451
+ type: K,
452
+ predicate: b(K),
453
+ factory: v.Factory.create(K)
454
+ }, Qt = async (e, t) => {
455
455
  var Se;
456
- const r = g.propertyMapper.executeMapper(
457
- h.HolderIngredientMapper,
456
+ const r = P.propertyMapper.executeMapper(
457
+ g.HolderIngredientMapper,
458
458
  t
459
- ), i = g.propertyMapper.executeMapper(
460
- h.HolderTypeMapper,
459
+ ), a = P.propertyMapper.executeMapper(
460
+ g.HolderTypeMapper,
461
461
  t
462
- ) || t.ingType, a = await A.executeDataMapperExtension({
463
- extension: h.HolderMapper,
462
+ ) || t.ingType, i = await U.executeDataMapperExtension({
463
+ extension: g.HolderMapper,
464
464
  data: t,
465
465
  contextData: {}
466
- }), { name: s, path: n, ingredientId: c, ingType: l, ingSource: p, slice: u, ...j } = t, y = { ...j, ...a }, L = u || { pos: 0 }, ae = {
466
+ }), { name: s, path: n, ingredientId: l, ingType: c, ingSource: p, slice: u, ...F } = t, h = { ...F, ...i }, M = u || { pos: 0 }, C = {
467
467
  name: s,
468
468
  path: n,
469
- ingredientId: r || c,
470
- ingredientType: i || l,
469
+ ingredientId: r || l,
470
+ ingredientType: a || c,
471
471
  ingredientSource: p,
472
472
  enjoyByDate: (Se = t.container) != null && Se.enjoyByDate ? new Date(t.container.enjoyByDate) : void 0,
473
- slice: L,
473
+ slice: M,
474
474
  group: e,
475
- data: y
475
+ data: h
476
476
  };
477
- return Xe.factory(t.path)(ae);
478
- }, { URL: Qt } = N("ASSEMBLY_SERVICE"), { getOne: er } = $.build({
479
- basePath: `${Qt}/api/kos/device/assemblies`
480
- }), tr = m.createLogger({
477
+ return Je.factory(t.path)(C);
478
+ }, { URL: er } = D("ASSEMBLY_SERVICE"), { getOne: tr } = S.build({
479
+ basePath: `${er}/api/kos/device/assemblies`
480
+ }), rr = m.createLogger({
481
481
  name: "assembly-service",
482
482
  group: "Services"
483
- }), Je = async () => (tr.debug("sending GET for assembly"), await er({}));
484
- var rr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, Ie = (e, t, r, i) => {
485
- for (var a = i > 1 ? void 0 : i ? ir(t, r) : t, s = e.length - 1, n; s >= 0; s--)
486
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
487
- return i && a && rr(t, r, a), a;
483
+ }), qe = async () => (rr.debug("sending GET for assembly"), await tr({}));
484
+ var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, Ie = (e, t, r, a) => {
485
+ for (var i = a > 1 ? void 0 : a ? ir(t, r) : t, s = e.length - 1, n; s >= 0; s--)
486
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
487
+ return a && i && ar(t, r, i), i;
488
488
  };
489
- const K = "board-container-model", qe = "/kos/hardware/board/linked", We = "/kos/hardware/board/unlinked";
490
- let x = class {
489
+ const k = "board-container-model", We = "/kos/hardware/board/linked", Qe = "/kos/hardware/board/unlinked";
490
+ let B = class {
491
491
  constructor(e, t, r) {
492
492
  o(this, "id");
493
493
  o(this, "logger");
494
494
  o(this, "models");
495
- this.id = e, this.logger = r.logger, this.models = new D({
495
+ this.id = e, this.logger = r.logger, this.models = new T({
496
496
  parentId: e,
497
- extensionId: h.BoardIndex
497
+ extensionId: g.BoardIndex
498
498
  });
499
499
  }
500
500
  get boardList() {
@@ -517,59 +517,59 @@ let x = class {
517
517
  r.updateModel(e);
518
518
  }
519
519
  handleBoardLinkEvent(e) {
520
- this.logger.debug(`handling ${qe} event ${e}`), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
520
+ this.logger.debug(`handling ${We} event ${e}`), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
521
521
  }
522
522
  handleBoardUnlinkEvent(e) {
523
523
  this.logger.debug(
524
- `handling ${We} event ${e}`
524
+ `handling ${Qe} event ${e}`
525
525
  ), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
526
526
  }
527
527
  };
528
528
  Ie([
529
529
  _
530
- ], x.prototype, "models", 2);
530
+ ], B.prototype, "models", 2);
531
531
  Ie([
532
- te({
532
+ re({
533
533
  lifecycle: pe.INIT,
534
- topic: qe,
534
+ topic: We,
535
535
  websocket: !0
536
536
  })
537
- ], x.prototype, "handleBoardLinkEvent", 1);
537
+ ], B.prototype, "handleBoardLinkEvent", 1);
538
538
  Ie([
539
- te({
539
+ re({
540
540
  lifecycle: pe.INIT,
541
- topic: We,
541
+ topic: Qe,
542
542
  websocket: !0
543
543
  })
544
- ], x.prototype, "handleBoardUnlinkEvent", 1);
545
- x = Ie([
546
- P(K)
547
- ], x);
548
- const ar = async (e) => {
549
- const t = e.data.boardPath, { model: r } = z(t);
544
+ ], B.prototype, "handleBoardUnlinkEvent", 1);
545
+ B = Ie([
546
+ y(k)
547
+ ], B);
548
+ const sr = async (e) => {
549
+ const t = e.data.boardPath, { model: r } = x(t);
550
550
  return {
551
551
  boardName: (r == null ? void 0 : r.name) || ""
552
552
  };
553
553
  };
554
- var sr = Object.defineProperty, nr = Object.getOwnPropertyDescriptor, Qe = (e, t, r, i) => {
555
- for (var a = i > 1 ? void 0 : i ? nr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
556
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
557
- return i && a && sr(t, r, a), a;
554
+ var nr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, et = (e, t, r, a) => {
555
+ for (var i = a > 1 ? void 0 : a ? or(t, r) : t, s = e.length - 1, n; s >= 0; s--)
556
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
557
+ return a && i && nr(t, r, i), i;
558
558
  };
559
- const k = S.PumpContainer;
560
- var et = /* @__PURE__ */ ((e) => (e.byBoard = "byBoard", e.byType = "byType", e.byNozzle = "byNozzle", e))(et || {});
559
+ const Y = L.PumpContainer;
560
+ var tt = /* @__PURE__ */ ((e) => (e.byBoard = "byBoard", e.byType = "byType", e.byNozzle = "byNozzle", e))(tt || {});
561
561
  let de = class {
562
562
  constructor(e, t) {
563
563
  o(this, "id");
564
564
  o(this, "pumps");
565
- this.id = e, this.pumps = new D({
565
+ this.id = e, this.pumps = new T({
566
566
  indexMap: {
567
567
  byNozzle: (r) => r.nozzlePaths,
568
568
  byBoard: (r) => r.boardPath,
569
569
  byType: "type"
570
570
  },
571
571
  parentId: e,
572
- extensionId: h.PumpIndex
572
+ extensionId: g.PumpIndex
573
573
  });
574
574
  }
575
575
  /**
@@ -606,67 +606,67 @@ let de = class {
606
606
  }
607
607
  // -------------------ENTITY----------------------------
608
608
  };
609
- Qe([
609
+ et([
610
610
  _
611
611
  ], de.prototype, "pumps", 2);
612
- de = Qe([
613
- P(k)
612
+ de = et([
613
+ y(Y)
614
614
  ], de);
615
615
  const Re = {
616
616
  registration: {
617
- [k]: {
617
+ [Y]: {
618
618
  class: de,
619
619
  singleton: !0
620
620
  }
621
621
  },
622
- type: k,
623
- predicate: b(k),
622
+ type: Y,
623
+ predicate: b(Y),
624
624
  factory: v.Singleton.create(
625
- k
625
+ Y
626
626
  )
627
- }, tt = async (e) => {
628
- const t = [], { model: r } = await Be(e);
627
+ }, rt = async (e) => {
628
+ const t = [], { model: r } = await Ge(e);
629
629
  return r && (t.push(r.boardPath), t.push(r.nozzlePath), t.push(r.holderPath)), t;
630
- }, or = async (e) => {
630
+ }, dr = async (e) => {
631
631
  const t = [], r = e.data.pumpPath;
632
632
  t.push(r);
633
- const i = await tt(r);
634
- return [...t, ...i];
635
- }, dr = async (e) => {
633
+ const a = await rt(r);
634
+ return [...t, ...a];
635
+ }, lr = async (e) => {
636
636
  const t = [], r = e.data.boardPath;
637
637
  t.push(e.data.boardPath);
638
- const i = await Be(
638
+ const a = await Ge(
639
639
  Re.type
640
640
  );
641
- if (i != null && i.model) {
642
- const s = i.model.models.getIndexByKey(
643
- et.byBoard,
641
+ if (a != null && a.model) {
642
+ const s = a.model.models.getIndexByKey(
643
+ tt.byBoard,
644
644
  r
645
645
  ).map(
646
- (c) => tt(c.path)
646
+ (l) => rt(l.path)
647
647
  );
648
- (await Promise.allSettled(s)).forEach((c) => {
649
- c.status === "fulfilled" && c.value.forEach((l) => t.push(l));
648
+ (await Promise.allSettled(s)).forEach((l) => {
649
+ l.status === "fulfilled" && l.value.forEach((c) => t.push(c));
650
650
  });
651
651
  }
652
652
  return Array.from(new Set(t));
653
653
  };
654
- var lr = Object.getOwnPropertyDescriptor, cr = (e, t, r, i) => {
655
- for (var a = i > 1 ? void 0 : i ? lr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
656
- (n = e[s]) && (a = n(a) || a);
657
- return a;
654
+ var cr = Object.getOwnPropertyDescriptor, pr = (e, t, r, a) => {
655
+ for (var i = a > 1 ? void 0 : a ? cr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
656
+ (n = e[s]) && (i = n(i) || i);
657
+ return i;
658
658
  };
659
- const Y = "board-model", Ae = (e, t) => {
660
- const { type: r, name: i, path: a, linked: s, instanceId: n, link: c, ...l } = e;
661
- t.type = r, t.name = i, t.path = a, t.linked = s, t.link = Object.freeze(c), t.instanceId = n, Object.assign(t, l);
659
+ const Z = "board-model", Ae = (e, t) => {
660
+ const { type: r, name: a, path: i, linked: s, instanceId: n, link: l, ...c } = e;
661
+ t.type = r, t.name = a, t.path = i, t.linked = s, t.link = Object.freeze(l), t.instanceId = n, Object.assign(t, c);
662
662
  };
663
- g[Me].register(
663
+ P[Me].register(
664
664
  "board",
665
- dr
665
+ lr
666
666
  );
667
- g[ee].register(
667
+ P[te].register(
668
668
  "board",
669
- ar
669
+ sr
670
670
  );
671
671
  let Oe = class {
672
672
  constructor(e, t, r) {
@@ -690,78 +690,78 @@ let Oe = class {
690
690
  this.logger.debug(`loading board ${this.id}`);
691
691
  }
692
692
  };
693
- Oe = cr([
694
- P(Y)
693
+ Oe = pr([
694
+ y(Z)
695
695
  ], Oe);
696
- const rt = {
696
+ const at = {
697
697
  registration: {
698
- [Y]: {
698
+ [Z]: {
699
699
  class: Oe,
700
700
  singleton: !1
701
701
  }
702
702
  },
703
- type: Y,
704
- predicate: b(Y),
705
- factory: v.Factory.create(Y)
703
+ type: Z,
704
+ predicate: b(Z),
705
+ factory: v.Factory.create(Z)
706
706
  }, it = {
707
707
  registration: {
708
- [K]: {
709
- class: x,
708
+ [k]: {
709
+ class: B,
710
710
  singleton: !0
711
711
  },
712
- ...rt.registration
712
+ ...at.registration
713
713
  },
714
- type: K,
715
- predicate: b(K),
714
+ type: k,
715
+ predicate: b(k),
716
716
  factory: v.Singleton.create(
717
- K
717
+ k
718
718
  )
719
719
  };
720
- var pr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, me = (e, t, r, i) => {
721
- for (var a = i > 1 ? void 0 : i ? hr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
722
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
723
- return i && a && pr(t, r, a), a;
720
+ var hr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, me = (e, t, r, a) => {
721
+ for (var i = a > 1 ? void 0 : a ? gr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
722
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
723
+ return a && i && hr(t, r, i), i;
724
724
  };
725
- const Z = S.HolderContainer, gr = "/kos/insertion/insert/start", ur = "/kos/insertion/insert/complete", Pr = "/kos/insertion/insert/update", yr = "/kos/insertion/remove", Ir = "/kos/pumpEvent/replaceLine", mr = "/kos/handle/*";
726
- let B = class {
725
+ const X = L.HolderContainer, ur = "/kos/insertion/insert/start", Pr = "/kos/insertion/insert/complete", yr = "/kos/insertion/insert/update", Ir = "/kos/insertion/remove", mr = "/kos/pumpEvent/replaceLine", fr = "/kos/handle/*";
726
+ let G = class {
727
727
  constructor(e, t, r) {
728
728
  o(this, "id");
729
729
  o(this, "holders");
730
730
  o(this, "logger");
731
- this.id = e, this.holders = new D({
731
+ this.id = e, this.holders = new T({
732
732
  indexMap: {
733
- nozzle: (i) => i.nozzlePaths,
733
+ nozzle: (a) => a.nozzlePaths,
734
734
  group: "group"
735
735
  },
736
736
  parentId: e,
737
- extensionId: h.HolderIndex
737
+ extensionId: g.HolderIndex
738
738
  }), this.logger = r.logger;
739
739
  }
740
740
  updateModel() {
741
741
  }
742
742
  handleHolderEvents(e) {
743
- var r, i, a;
743
+ var r, a, i;
744
744
  m.ifDebug(
745
745
  () => this.logger.debug("Received holder change event", JSON.stringify(e))
746
746
  );
747
747
  const t = this.holders.getModel(e.path);
748
748
  t && (this.logger.info(
749
749
  `Received change event for holder ${t.path}. Updating fuel gauge data.`
750
- ), t.slice.currentVolMl = (r = e.slice) == null ? void 0 : r.currentVolMl, t.slice.maxVolMl = (i = e.slice) == null ? void 0 : i.maxVolMl, (a = e == null ? void 0 : e.container) != null && a.enjoyByDate ? t.enjoyByDate = new Date(e.container.enjoyByDate) : t.enjoyByDate = void 0);
750
+ ), t.slice.currentVolMl = (r = e.slice) == null ? void 0 : r.currentVolMl, t.slice.maxVolMl = (a = e.slice) == null ? void 0 : a.maxVolMl, (i = e == null ? void 0 : e.container) != null && i.enjoyByDate ? t.enjoyByDate = new Date(e.container.enjoyByDate) : t.enjoyByDate = void 0);
751
751
  }
752
752
  handleInsertion(e) {
753
753
  m.ifDebug(
754
754
  () => this.logger.debug("Received insertion event", JSON.stringify(e))
755
755
  ), (Array.isArray(e) ? e : [e]).forEach((r) => {
756
756
  O(() => {
757
- var s, n, c;
758
- const i = r.ingredientId, a = this.holders.getModel(r.path);
759
- a && (this.logger.info(
760
- `Received insertion event for holder ${a.path}`
761
- ), a.updateIngredient(i), a.slice.currentVolMl = (s = r.slice) == null ? void 0 : s.currentVolMl, a.slice.maxVolMl = (n = r.slice) == null ? void 0 : n.maxVolMl, (c = r == null ? void 0 : r.container) != null && c.enjoyByDate ? a.enjoyByDate = new Date(r.container.enjoyByDate) : a.enjoyByDate = void 0, r.pumps.forEach((l) => {
757
+ var s, n, l;
758
+ const a = r.ingredientId, i = this.holders.getModel(r.path);
759
+ i && (this.logger.info(
760
+ `Received insertion event for holder ${i.path}`
761
+ ), i.updateIngredient(a), i.slice.currentVolMl = (s = r.slice) == null ? void 0 : s.currentVolMl, i.slice.maxVolMl = (n = r.slice) == null ? void 0 : n.maxVolMl, (l = r == null ? void 0 : r.container) != null && l.enjoyByDate ? i.enjoyByDate = new Date(r.container.enjoyByDate) : i.enjoyByDate = void 0, r.pumps.forEach((c) => {
762
762
  O(() => {
763
- const p = a.pumps.getModel(l.path);
764
- p && (p.ingredientId = l.ingredientId, p.inserted = l.inserted, p.prevIngredientId = l.prevIngredientId);
763
+ const p = i.pumps.getModel(c.path);
764
+ p && (p.ingredientId = c.ingredientId, p.inserted = c.inserted, p.prevIngredientId = c.prevIngredientId);
765
765
  });
766
766
  }));
767
767
  });
@@ -771,88 +771,88 @@ let B = class {
771
771
  };
772
772
  me([
773
773
  _
774
- ], B.prototype, "holders", 2);
774
+ ], G.prototype, "holders", 2);
775
775
  me([
776
- te({
777
- topic: mr,
776
+ re({
777
+ topic: fr,
778
778
  websocket: !0,
779
779
  condition: (e, t) => t.holders.getModel(e.path) !== void 0
780
780
  })
781
- ], B.prototype, "handleHolderEvents", 1);
781
+ ], G.prototype, "handleHolderEvents", 1);
782
782
  me([
783
- te({
783
+ re({
784
784
  topic: [
785
- gr,
786
785
  ur,
787
786
  Pr,
788
787
  yr,
789
- Ir
788
+ Ir,
789
+ mr
790
790
  ],
791
791
  websocket: !0
792
792
  })
793
- ], B.prototype, "handleInsertion", 1);
794
- B = me([
795
- P(Z)
796
- ], B);
797
- const at = {
793
+ ], G.prototype, "handleInsertion", 1);
794
+ G = me([
795
+ y(X)
796
+ ], G);
797
+ const st = {
798
798
  registration: {
799
- [Z]: {
800
- class: B,
799
+ [X]: {
800
+ class: G,
801
801
  singleton: !0
802
802
  }
803
803
  },
804
- type: Z,
805
- predicate: b(Z),
804
+ type: X,
805
+ predicate: b(X),
806
806
  factory: v.Singleton.create(
807
- Z
807
+ X
808
808
  )
809
- }, fr = m.createLogger({ name: "board-utils" }), vr = async (e) => {
810
- const t = await A.executeDataMapperExtension({
811
- extension: h.BoardMapper,
809
+ }, vr = m.createLogger({ name: "board-utils" }), br = async (e) => {
810
+ const t = await U.executeDataMapperExtension({
811
+ extension: g.BoardMapper,
812
812
  data: e,
813
813
  contextData: {}
814
- }), { type: r, name: i, path: a, linked: s, instanceId: n, ...c } = e, l = { ...c, ...t }, p = {
814
+ }), { type: r, name: a, path: i, linked: s, instanceId: n, ...l } = e, c = { ...l, ...t }, p = {
815
815
  type: r,
816
- name: i,
817
- path: a,
816
+ name: a,
817
+ path: i,
818
818
  linked: s,
819
819
  instanceId: n,
820
- ...l
821
- }, u = rt.factory(e.path)(p);
820
+ ...c
821
+ }, u = at.factory(e.path)(p);
822
822
  return u.updateModel(p), u;
823
- }, br = (e) => async (t) => {
824
- fr.debug(`adding board ${t.name}`);
825
- const r = await vr(t);
823
+ }, Or = (e) => async (t) => {
824
+ vr.debug(`adding board ${t.name}`);
825
+ const r = await br(t);
826
826
  e.addModel(r);
827
827
  };
828
828
  var d = /* @__PURE__ */ ((e) => (e.IDLE = "IDLE", e.POURING = "POURING", e.POUR_STARTING = "POUR_STARTING", e.POUR_CANCELING = "POUR_CANCELING", e))(d || {});
829
- const { URL: Ce } = N("PUMP_SERVICE"), { postModel: Or, getOne: _r } = $.build({
829
+ const { URL: Ce } = D("PUMP_SERVICE"), { postModel: _r, getOne: Er } = S.build({
830
830
  basePath: `${Ce}/api/kos/holders`
831
831
  });
832
832
  m.createLogger({
833
833
  name: "pump-service",
834
834
  group: "Services"
835
835
  });
836
- const Er = async ({
836
+ const Mr = async ({
837
837
  intent: e,
838
838
  pumpId: t,
839
839
  tracker: r
840
840
  }) => {
841
- const i = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/${t}/${e}`, a = await Or({ model: {}, urlOverride: i, tracker: r });
842
- return a != null && a.data && he.initiateFuture(a.data), a;
843
- }, Mr = async (e, t) => {
844
- const r = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/${e}/${t}/volume`, i = await _r({ urlOverride: r });
845
- return i != null && i.data ? i.data : { volume: -1 };
841
+ const a = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/${t}/${e}`, i = await _r({ model: {}, urlOverride: a, tracker: r });
842
+ return i != null && i.data && he.initiateFuture(i.data), i;
843
+ }, wr = async (e, t) => {
844
+ const r = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/${e}/${t}/volume`, a = await Er({ urlOverride: r });
845
+ return a != null && a.data ? a.data : { volume: -1 };
846
846
  };
847
- var wr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, st = (e, t, r, i) => {
848
- for (var a = i > 1 ? void 0 : i ? Rr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
849
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
850
- return i && a && wr(t, r, a), a;
847
+ var Rr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, nt = (e, t, r, a) => {
848
+ for (var i = a > 1 ? void 0 : a ? Cr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
849
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
850
+ return a && i && Rr(t, r, i), i;
851
851
  };
852
- const X = S.Pump;
853
- g[Me].register(
852
+ const J = L.Pump;
853
+ P[Me].register(
854
854
  "pump",
855
- or
855
+ dr
856
856
  );
857
857
  let le = class {
858
858
  constructor(e, t) {
@@ -868,35 +868,37 @@ let le = class {
868
868
  o(this, "name");
869
869
  o(this, "path");
870
870
  o(this, "prevIngredientId");
871
+ o(this, "state");
871
872
  o(this, "futureHandler");
872
873
  o(this, "currentState", d.IDLE);
873
874
  this.id = e;
874
875
  const {
875
876
  inserted: r,
876
- holderPath: i,
877
- boardPath: a,
877
+ holderPath: a,
878
+ boardPath: i,
878
879
  nozzlePath: s,
879
880
  name: n,
880
- path: c,
881
- childPump: l,
881
+ path: l,
882
+ childPump: c,
882
883
  virtual: p,
883
884
  prevIngredientId: u,
884
- ...j
885
+ state: F,
886
+ ...h
885
887
  } = t;
886
- this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath = i, this.boardPath = a, this.nozzlePath = s, this.name = n, this.path = c, this.childPump = !!l, this.virtual = !!p, this.prevIngredientId = u, Object.assign(this, j), this.futureHandler = new Ge(this);
888
+ this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath = a, this.boardPath = i, this.nozzlePath = s, this.name = n, this.path = l, this.childPump = !!c, this.virtual = !!p, this.prevIngredientId = u, this.state = F, Object.assign(this, h), this.futureHandler = new je(this);
887
889
  }
888
890
  updateModel(e) {
889
891
  const {
890
892
  inserted: t,
891
893
  holderPath: r,
892
- boardPath: i,
893
- nozzlePath: a,
894
+ boardPath: a,
895
+ nozzlePath: i,
894
896
  childPump: s,
895
897
  name: n,
896
- path: c,
897
- ...l
898
+ path: l,
899
+ ...c
898
900
  } = e;
899
- this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath = i, this.nozzlePath = a, this.childPump = this.childPump ? this.childPump : !!s, this.name = n, this.path = c, this.prevIngredientId = e.prevIngredientId, Object.assign(this, l);
901
+ this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath = a, this.nozzlePath = i, this.childPump = this.childPump ? this.childPump : !!s, this.name = n, this.path = l, this.prevIngredientId = e.prevIngredientId, Object.assign(this, c);
900
902
  }
901
903
  // -------------------LIFECYCLE----------------------------
902
904
  get pouringState() {
@@ -925,7 +927,7 @@ let le = class {
925
927
  return this.futureHandler.future;
926
928
  }
927
929
  async resolveIntentVolume(e) {
928
- return await Mr(this.path, e);
930
+ return await wr(this.path, e);
929
931
  }
930
932
  async performIntent(e, t) {
931
933
  const r = typeof e == "string" ? e : e.intent;
@@ -935,40 +937,40 @@ let le = class {
935
937
  if (this.currentState === d.IDLE) {
936
938
  if (this.currentState = d.POUR_STARTING, !t)
937
939
  throw new Error("No tracker provided");
938
- const i = await Er({
940
+ const a = await Mr({
939
941
  tracker: t,
940
942
  intent: r,
941
943
  pumpId: this.path
942
944
  });
943
945
  return this.currentState === d.POUR_STARTING && O(() => {
944
946
  this.currentState = d.POURING;
945
- }), i == null ? void 0 : i.data;
947
+ }), a == null ? void 0 : a.data;
946
948
  } else
947
949
  throw new Error(`Cannot pour in state ${this.currentState}`);
948
- } catch (i) {
949
- throw m.error(i), this.currentState = d.IDLE, i;
950
+ } catch (a) {
951
+ throw m.error(a), this.currentState = d.IDLE, a;
950
952
  }
951
953
  }
952
954
  // -------------------ENTITY----------------------------
953
955
  };
954
- st([
956
+ nt([
955
957
  ge()
956
958
  ], le.prototype, "performIntent", 1);
957
- le = st([
958
- P(X)
959
+ le = nt([
960
+ y(J)
959
961
  ], le);
960
- const nt = {
962
+ const ot = {
961
963
  registration: {
962
- [X]: {
964
+ [J]: {
963
965
  class: le,
964
966
  singleton: !1
965
967
  }
966
968
  },
967
- type: X,
968
- predicate: b(X),
969
- factory: v.Factory.create(X)
970
- }, Cr = m.createLogger({ name: "pump-utils" }), Nr = (e, t) => {
971
- const r = (t.pumps ?? []).length > 1, i = {
969
+ type: J,
970
+ predicate: b(J),
971
+ factory: v.Factory.create(J)
972
+ }, Ue = m.createLogger({ name: "pump-utils" }), $r = (e, t) => {
973
+ const r = (t.pumps ?? []).length > 1, a = {
972
974
  boardPath: t.boardPath,
973
975
  holderPath: t.holderPath,
974
976
  ingredientId: t.ingredientId,
@@ -979,32 +981,37 @@ const nt = {
979
981
  path: t.path,
980
982
  type: t.type,
981
983
  nozzlePath: e,
982
- prevIngredientId: t.prevIngredientId
983
- }, a = nt.factory(t.path)(i);
984
- return a.updateModel(i), a;
985
- }, ot = (e) => (t) => (r) => (i) => {
986
- var c;
987
- Cr.debug(`adding pump ${i.name}`);
988
- const a = Nr(r.path, i);
989
- e.addModel(a);
990
- const s = a.holderPath, n = t.holders.getModel(s);
991
- n == null || n.pumps.addModel(a), n != null && n.nozzlePaths.includes(r.path) || n == null || n.nozzlePaths.push(r.path), (c = i == null ? void 0 : i.pumps) == null || c.forEach((l) => {
992
- const p = a.holderPath, u = {
993
- ...l,
994
- childPump: !0,
995
- holderPath: p,
996
- ingredientId: a.ingredientId
997
- };
998
- ot(e)(t)(r)(u);
999
- });
984
+ prevIngredientId: t.prevIngredientId,
985
+ state: t.state
986
+ }, i = ot.factory(t.path)(a);
987
+ return i.updateModel(a), i;
988
+ }, dt = (e) => (t) => (r) => (a) => {
989
+ var i;
990
+ try {
991
+ Ue.debug(`adding pump ${a.name}`);
992
+ const s = $r(r.path, a);
993
+ e.addModel(s);
994
+ const n = s.holderPath, l = t.holders.getModel(n);
995
+ l == null || l.pumps.addModel(s), l != null && l.nozzlePaths.includes(r.path) || l == null || l.nozzlePaths.push(r.path), (i = a == null ? void 0 : a.pumps) == null || i.forEach((c) => {
996
+ const p = s.holderPath, u = {
997
+ ...c,
998
+ childPump: !0,
999
+ holderPath: p,
1000
+ ingredientId: s.ingredientId
1001
+ };
1002
+ dt(e)(t)(r)(u);
1003
+ });
1004
+ } catch (s) {
1005
+ throw Ue.error(`Error mapping assembly pump: ${s}`), s;
1006
+ }
1000
1007
  };
1001
- var $r = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, ie = (e, t, r, i) => {
1002
- for (var a = i > 1 ? void 0 : i ? Dr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1003
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
1004
- return i && a && $r(t, r, a), a;
1008
+ var Nr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, ie = (e, t, r, a) => {
1009
+ for (var i = a > 1 ? void 0 : a ? Dr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1010
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
1011
+ return a && i && Nr(t, r, i), i;
1005
1012
  };
1006
- const J = "assembly-model", Sr = "assembly-data", Tr = "assembly-raw-data";
1007
- let C = class {
1013
+ const q = "assembly-model", Sr = "assembly-data", Tr = "assembly-raw-data";
1014
+ let N = class {
1008
1015
  constructor(e, t, r) {
1009
1016
  o(this, "id");
1010
1017
  o(this, "_nozzlePaths", /* @__PURE__ */ new Set());
@@ -1013,7 +1020,7 @@ let C = class {
1013
1020
  o(this, "boardContainer");
1014
1021
  o(this, "pumpContainer");
1015
1022
  o(this, "logger");
1016
- this.id = e, this.holderContainer = at.factory({}), this.boardContainer = it.factory({}), this.pumpContainer = Re.factory({}), this.logger = r.logger;
1023
+ this.id = e, this.holderContainer = st.factory({}), this.boardContainer = it.factory({}), this.pumpContainer = Re.factory({}), this.logger = r.logger;
1017
1024
  }
1018
1025
  updateModel(e) {
1019
1026
  }
@@ -1056,92 +1063,96 @@ let C = class {
1056
1063
  }
1057
1064
  async ready() {
1058
1065
  var e;
1059
- (e = this.troubleContainer) == null || e.troubles.increment(), g[It].execute(
1060
- h.AssemblyFeatureFlags,
1066
+ (e = this.troubleContainer) == null || e.troubles.increment(), P[mt].execute(
1067
+ g.AssemblyFeatureFlags,
1061
1068
  this
1062
1069
  );
1063
1070
  }
1064
1071
  async load(e) {
1065
1072
  this.logger.debug(`loading assembly ${this.id}`);
1066
- const t = await Je();
1073
+ const t = await qe();
1067
1074
  if ((t == null ? void 0 : t.status) === 200) {
1068
- const r = await A.executeDataMapperExtension({
1069
- extension: h.AssemblyMapper,
1075
+ const r = await U.executeDataMapperExtension({
1076
+ extension: g.AssemblyMapper,
1070
1077
  data: t.data,
1071
1078
  contextData: {}
1072
1079
  });
1073
- e.set(Sr, r), Object.assign(this, r), Object.entries(r).forEach(([i, a]) => {
1074
- mt(a) && (this.logger.debug(`adding child model ${i} from extension data`), this[ft][i] = !0);
1080
+ e.set(Sr, r), Object.assign(this, r), Object.entries(r).forEach(([a, i]) => {
1081
+ ft(i) && (this.logger.debug(`adding child model ${a} from extension data`), this[vt][a] = !0);
1075
1082
  }), e.set(Tr, t.data);
1076
- for await (const i of t.data.assemblies) {
1083
+ for await (const a of t.data.assemblies) {
1077
1084
  const {
1078
- boards: a = [],
1085
+ boards: i = [],
1079
1086
  holders: s = {},
1080
1087
  nozzles: n = [],
1081
- core: c,
1082
- name: l,
1088
+ core: l,
1089
+ name: c,
1083
1090
  path: p,
1084
1091
  ...u
1085
- } = i;
1086
- this.logger.debug(`adding assembly ${l}`), Object.keys(u).forEach((y) => {
1087
- vt.enableFeature(y);
1092
+ } = a;
1093
+ this.logger.debug(`adding assembly ${c}`), this.logger.warn(`Assembly rest keys: ${Object.keys(u).join(", ")}`), Object.keys(u).forEach((h) => {
1094
+ var M;
1095
+ if (this.logger.warn(`Enabling feature flag: ${h}`), bt.enableFeature(h), e.set(`assembly-feature-${h}`, u[h]), ((M = u[h].state) == null ? void 0 : M.path) !== void 0) {
1096
+ const C = u[h].state.path;
1097
+ this.logger.warn(`Feature flag ${h} state path: ${C}`), e.set(`assembly-state-path-${h}`, C);
1098
+ }
1088
1099
  });
1089
- for await (const y of a)
1090
- this.logger.debug(`adding board ${y.name}`), await br(this.boardContainer)(y);
1091
- for await (const [y, L] of Object.entries(
1100
+ for await (const h of i)
1101
+ this.logger.debug(`adding board ${h.name}`), await Or(this.boardContainer)(h);
1102
+ for await (const [h, M] of Object.entries(
1092
1103
  s ?? {}
1093
1104
  ))
1094
- for await (const ae of L) {
1095
- this.logger.debug(`adding holder ${ae.name}`);
1096
- const De = await Wt(y, ae);
1105
+ for await (const C of M) {
1106
+ this.logger.debug(`adding holder ${C.name}`);
1107
+ const De = await Qt(h, C);
1097
1108
  this.holderContainer.holders.addModel(De);
1098
1109
  }
1099
- const j = ot(this.pumpContainer)(
1110
+ const F = dt(this.pumpContainer)(
1100
1111
  this.holderContainer
1101
1112
  );
1102
- n.forEach((y) => {
1103
- this._nozzlePaths.add(y.path);
1104
- const L = j(y);
1105
- y.pumps.forEach(L);
1113
+ n.forEach((h) => {
1114
+ this._nozzlePaths.add(h.path);
1115
+ const M = F(h);
1116
+ h.pumps.forEach(M);
1106
1117
  });
1107
1118
  }
1108
1119
  }
1109
1120
  }
1110
1121
  };
1111
1122
  ie([
1112
- xe({
1123
+ Be({
1113
1124
  modelType: "trouble-container-model"
1114
1125
  })
1115
- ], C.prototype, "troubleContainer", 2);
1126
+ ], N.prototype, "troubleContainer", 2);
1116
1127
  ie([
1117
1128
  _
1118
- ], C.prototype, "holderContainer", 2);
1129
+ ], N.prototype, "holderContainer", 2);
1119
1130
  ie([
1120
1131
  _
1121
- ], C.prototype, "boardContainer", 2);
1132
+ ], N.prototype, "boardContainer", 2);
1122
1133
  ie([
1123
1134
  _
1124
- ], C.prototype, "pumpContainer", 2);
1125
- C = ie([
1126
- P(J)
1127
- ], C);
1128
- const dt = {
1135
+ ], N.prototype, "pumpContainer", 2);
1136
+ N = ie([
1137
+ y(q)
1138
+ ], N);
1139
+ const lt = {
1129
1140
  registration: {
1130
- [J]: {
1131
- class: C,
1141
+ [q]: {
1142
+ class: N,
1132
1143
  singleton: !0
1133
1144
  }
1134
1145
  },
1135
- type: J,
1136
- predicate: b(J),
1137
- factory: v.Singleton.create(J)
1146
+ type: q,
1147
+ predicate: b(q),
1148
+ factory: v.Singleton.create(q)
1138
1149
  };
1139
- var Lr = Object.getOwnPropertyDescriptor, Ar = (e, t, r, i) => {
1140
- for (var a = i > 1 ? void 0 : i ? Lr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1141
- (n = e[s]) && (a = n(a) || a);
1142
- return a;
1150
+ var Lr = Object.getOwnPropertyDescriptor, Ar = (e, t, r, a) => {
1151
+ for (var i = a > 1 ? void 0 : a ? Lr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1152
+ (n = e[s]) && (i = n(i) || i);
1153
+ return i;
1143
1154
  };
1144
- const q = S.Availability;
1155
+ const W = L.Availability;
1145
1156
  let _e = class {
1146
1157
  constructor(e, t, r) {
1147
1158
  o(this, "id");
@@ -1169,56 +1180,56 @@ let _e = class {
1169
1180
  // -------------------ENTITY----------------------------
1170
1181
  };
1171
1182
  _e = Ar([
1172
- bt(),
1173
- P(q)
1183
+ Ot(),
1184
+ y(W)
1174
1185
  ], _e);
1175
1186
  const Ee = {
1176
1187
  registration: {
1177
- [q]: {
1188
+ [W]: {
1178
1189
  class: _e,
1179
1190
  singleton: !1
1180
1191
  }
1181
1192
  },
1182
- type: q,
1183
- predicate: b(q),
1193
+ type: W,
1194
+ predicate: b(W),
1184
1195
  factory: v.Factory.create(
1185
- q
1196
+ W
1186
1197
  )
1187
- }, { URL: G } = N("NOZZLE_SERVICE"), { postModel: Ne, deleteModel: Ur, getOne: zr } = $.build({
1188
- basePath: `${G}/api/nozzle`
1198
+ }, { URL: j } = D("NOZZLE_SERVICE"), { postModel: $e, deleteModel: Ur, getOne: zr } = S.build({
1199
+ basePath: `${j}/api/nozzle`
1189
1200
  }), xr = async (e, t) => {
1190
- const r = await Ne({
1201
+ const r = await $e({
1191
1202
  model: {},
1192
- urlOverride: `${G}/api/ext/dispense/nozzle/${e}/pipeline/beverage/pour`,
1203
+ urlOverride: `${j}/api/ext/dispense/nozzle/${e}/pipeline/beverage/pour`,
1193
1204
  ordered: !0,
1194
1205
  tracker: t
1195
1206
  });
1196
1207
  return r != null && r.data && he.initiateFuture(r.data), r;
1197
1208
  }, Br = async (e, t, r) => {
1198
- const i = await Ne({
1209
+ const a = await $e({
1199
1210
  model: {},
1200
- urlOverride: `${G}/api/ext/dispense/nozzle/${t}/pipeline/beverage/fixed/${e}`,
1211
+ urlOverride: `${j}/api/ext/dispense/nozzle/${t}/pipeline/beverage/fixed/${e}`,
1201
1212
  ordered: !0,
1202
1213
  tracker: r
1203
1214
  });
1204
- return i != null && i.data && he.initiateFuture(i.data), i;
1215
+ return a != null && a.data && he.initiateFuture(a.data), a;
1205
1216
  }, Gr = async (e) => await zr({
1206
- urlOverride: `${G}${e}/pipeline/beverage/availability`
1207
- }), jr = async (e, t) => await Ne({
1217
+ urlOverride: `${j}${e}/pipeline/beverage/availability`
1218
+ }), jr = async (e, t) => await $e({
1208
1219
  model: t,
1209
- urlOverride: `${G}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
1220
+ urlOverride: `${j}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
1210
1221
  }), Fr = async (e) => await Ur({
1211
1222
  id: e,
1212
- urlOverride: `${G}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
1223
+ urlOverride: `${j}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
1213
1224
  });
1214
- var Hr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, E = (e, t, r, i) => {
1215
- for (var a = i > 1 ? void 0 : i ? Vr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1216
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
1217
- return i && a && Hr(t, r, a), a;
1225
+ var Hr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, E = (e, t, r, a) => {
1226
+ for (var i = a > 1 ? void 0 : a ? Vr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1227
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
1228
+ return a && i && Hr(t, r, i), i;
1218
1229
  };
1219
- const W = S.Nozzle, Kr = Ot(
1230
+ const Q = L.Nozzle, Kr = _t(
1220
1231
  "beverageTopicPrefix"
1221
- ), fe = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0, Ue = "/kos/nozzle/pour/started", kr = "/kos/nozzle/pour/progress", Yr = "/kos/nozzle/pour/cancel";
1232
+ ), fe = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0, ze = "/kos/nozzle/pour/started", kr = "/kos/nozzle/pour/progress", Yr = "/kos/nozzle/pour/cancel";
1222
1233
  let I = class {
1223
1234
  constructor(e, t) {
1224
1235
  /** the unique identifier for this nozzle.*/
@@ -1233,7 +1244,7 @@ let I = class {
1233
1244
  o(this, "beverageTopicPrefix");
1234
1245
  o(this, "topicPrefix");
1235
1246
  o(this, "urlPrefix");
1236
- this.id = e, this.path = t.path, this.name = t.name, this.beverageTopicPrefix = t.beverageTopicPrefix, this.topicPrefix = t.topicPrefix, this.urlPrefix = t.urlPrefix, this._selectedBeverage = void 0, this._selectedBrand = void 0, this._additionalItems = [], this.futureHandler = new _t(this), this._availabilityItems = new D({
1247
+ this.id = e, this.path = t.path, this.name = t.name, this.beverageTopicPrefix = t.beverageTopicPrefix, this.topicPrefix = t.topicPrefix, this.urlPrefix = t.urlPrefix, this._selectedBeverage = void 0, this._selectedBrand = void 0, this._additionalItems = [], this.futureHandler = new Et(this), this._availabilityItems = new T({
1237
1248
  indexMap: {
1238
1249
  byGroup: "groupId",
1239
1250
  byParent: "parentId"
@@ -1325,32 +1336,32 @@ let I = class {
1325
1336
  context: r
1326
1337
  }) {
1327
1338
  if (!e) {
1328
- const c = await Fr(this.name);
1329
- if ((c == null ? void 0 : c.status) !== 200)
1339
+ const l = await Fr(this.name);
1340
+ if ((l == null ? void 0 : l.status) !== 200)
1330
1341
  throw new Error("Failed to clear pourable");
1331
1342
  this._selectedBeverage = void 0;
1332
1343
  return;
1333
1344
  }
1334
- if (e === this._selectedBeverage && Et(this._additionalItems, t)) {
1345
+ if (e === this._selectedBeverage && Mt(this._additionalItems, t)) {
1335
1346
  this.logger.info("No change in selected pourable");
1336
1347
  return;
1337
1348
  }
1338
1349
  this._selectedBeverage = e, this._additionalItems = t;
1339
- let i = await g.dataMapper.executeMapper(
1340
- h.SelectedPourableMapper,
1350
+ let a = await P.dataMapper.executeMapper(
1351
+ g.SelectedPourableMapper,
1341
1352
  {
1342
1353
  beverage: e,
1343
1354
  additional: t,
1344
1355
  context: r
1345
1356
  }
1346
1357
  );
1347
- const a = {
1358
+ const i = {
1348
1359
  bevId: e.rawId
1349
1360
  };
1350
- (!i || Object.keys(i).length === 0) && (this.logger.info(
1351
- `No selected pourable mapper defined, using the default payload ${a}`
1352
- ), i = a);
1353
- const s = i ?? a, n = await jr(this.name, s);
1361
+ (!a || Object.keys(a).length === 0) && (this.logger.info(
1362
+ `No selected pourable mapper defined, using the default payload ${i}`
1363
+ ), a = i);
1364
+ const s = a ?? i, n = await jr(this.name, s);
1354
1365
  if ((n == null ? void 0 : n.status) !== 200)
1355
1366
  throw new Error("Failed to select pourable");
1356
1367
  }
@@ -1385,7 +1396,7 @@ let I = class {
1385
1396
  );
1386
1397
  }
1387
1398
  handlePouringStart() {
1388
- this.logger.info("Pour started"), U(this).forEach((e) => {
1399
+ this.logger.info("Pour started"), z(this).forEach((e) => {
1389
1400
  var t;
1390
1401
  fe(e) && ((t = e.onPourStart) == null || t.call(e));
1391
1402
  });
@@ -1397,21 +1408,21 @@ let I = class {
1397
1408
  this.logger.info("Pour canceling");
1398
1409
  }
1399
1410
  handleCanceled() {
1400
- this.logger.info("Pour canceled"), U(this).forEach((t) => {
1411
+ this.logger.info("Pour canceled"), z(this).forEach((t) => {
1401
1412
  var r;
1402
1413
  fe(t) && ((r = t.onPourCancel) == null || r.call(t));
1403
1414
  });
1404
1415
  const e = {
1405
1416
  nozzleId: this.id
1406
1417
  };
1407
- R.publish(Yr, e);
1418
+ $.publish(Yr, e);
1408
1419
  }
1409
1420
  // ============================================================================
1410
1421
  // Future Lifecycle Handler
1411
1422
  // ============================================================================
1412
1423
  onFutureUpdate(e) {
1413
- U(this).forEach((i) => {
1414
- fe(i) && i.onPourProgress(e);
1424
+ z(this).forEach((a) => {
1425
+ fe(a) && a.onPourProgress(e);
1415
1426
  });
1416
1427
  const r = {
1417
1428
  nozzleId: this.id,
@@ -1424,7 +1435,7 @@ let I = class {
1424
1435
  reason: e.reason,
1425
1436
  timeRemaining: e.timeRemaining
1426
1437
  };
1427
- R.publish(kr, r), e.endState && O(() => {
1438
+ $.publish(kr, r), e.endState && O(() => {
1428
1439
  this.currentState === d.POURING && this.transition("POUR_COMPLETED");
1429
1440
  });
1430
1441
  }
@@ -1436,11 +1447,11 @@ let I = class {
1436
1447
  throw new Error("No tracker provided");
1437
1448
  const r = await xr(this.name, e);
1438
1449
  this.transition("POUR_ACTIVE");
1439
- const i = {
1450
+ const a = {
1440
1451
  nozzleId: this.id,
1441
1452
  type: "free"
1442
1453
  };
1443
- return R.publish(Ue, i), (t = r == null ? void 0 : r.data) != null && t.endState && this.transition("POUR_COMPLETED"), r;
1454
+ return $.publish(ze, a), (t = r == null ? void 0 : r.data) != null && t.endState && this.transition("POUR_COMPLETED"), r;
1444
1455
  } catch (r) {
1445
1456
  throw this.logger.error(r), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), r;
1446
1457
  }
@@ -1451,15 +1462,15 @@ let I = class {
1451
1462
  try {
1452
1463
  if (this.transition("START_POUR"), !t)
1453
1464
  throw new Error("No tracker provided");
1454
- const i = await Br(e, this.name, t);
1465
+ const a = await Br(e, this.name, t);
1455
1466
  this.transition("POUR_ACTIVE");
1456
- const a = {
1467
+ const i = {
1457
1468
  nozzleId: this.id,
1458
1469
  type: "fixed"
1459
1470
  };
1460
- return R.publish(Ue, a), (r = i == null ? void 0 : i.data) != null && r.endState && this.transition("POUR_COMPLETED"), i;
1461
- } catch (i) {
1462
- throw this.logger.error(i), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), i;
1471
+ return $.publish(ze, i), (r = a == null ? void 0 : a.data) != null && r.endState && this.transition("POUR_COMPLETED"), a;
1472
+ } catch (a) {
1473
+ throw this.logger.error(a), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), a;
1463
1474
  }
1464
1475
  }
1465
1476
  // Inherits throwOnInvalid: false - silently ignore if already idle
@@ -1470,105 +1481,105 @@ let I = class {
1470
1481
  updateGroupMembers() {
1471
1482
  this._availabilityItems.data.forEach((e) => {
1472
1483
  (e.taggedIds || []).forEach((r) => {
1473
- const i = this._availabilityItems.data.find(
1474
- (a) => a.rawId === r
1484
+ const a = this._availabilityItems.data.find(
1485
+ (i) => i.rawId === r
1475
1486
  );
1476
- i && i.parentId !== e.id && (i.parentId = e.id, this._availabilityItems.updateModel(i));
1487
+ a && a.parentId !== e.id && (a.parentId = e.id, this._availabilityItems.updateModel(a));
1477
1488
  });
1478
1489
  });
1479
1490
  }
1480
1491
  /** @internal */
1481
1492
  async load(e) {
1482
- var i, a;
1493
+ var a, i;
1483
1494
  this.logger.debug(`loading nozzle ${this.id}`);
1484
1495
  const t = await Gr(this.urlPrefix);
1485
1496
  if ((t == null ? void 0 : t.status) !== 200)
1486
1497
  throw new Error("Failed to load nozzle availability");
1487
- const r = await g.loader.executeLoader(
1488
- h.AvailabilityLoader,
1498
+ const r = await P.loader.executeLoader(
1499
+ g.AvailabilityLoader,
1489
1500
  {}
1490
1501
  );
1491
- e == null || e.set(h.AvailabilityLoader, r), e == null || e.set($e.type, this);
1492
- for (const s of Object.keys((i = t.data) == null ? void 0 : i.groups) || [])
1493
- for (const n of ((a = t.data) == null ? void 0 : a.groups[s]) || []) {
1494
- const c = await g.dataMapper.executeMapper(
1495
- h.AvailabilityMapper,
1502
+ e == null || e.set(g.AvailabilityLoader, r), e == null || e.set(Ne.type, this);
1503
+ for (const s of Object.keys((a = t.data) == null ? void 0 : a.groups) || [])
1504
+ for (const n of ((i = t.data) == null ? void 0 : i.groups[s]) || []) {
1505
+ const l = await P.dataMapper.executeMapper(
1506
+ g.AvailabilityMapper,
1496
1507
  { ...n, groupId: s },
1497
1508
  r
1498
- ), l = {
1509
+ ), c = {
1499
1510
  ...n,
1500
1511
  note: n.note ?? void 0,
1501
1512
  kosParentId: this.id,
1502
1513
  rawId: n.id,
1503
1514
  groupId: s,
1504
- data: c,
1515
+ data: l,
1505
1516
  properties: n.properties || {}
1506
1517
  }, p = Ee.factory(
1507
1518
  `${this.id}-${s}-${n.id}`
1508
- )(l);
1519
+ )(c);
1509
1520
  this._availabilityItems.addModel(p);
1510
1521
  }
1511
1522
  this.updateGroupMembers();
1512
1523
  }
1513
1524
  async updateAvailability(e) {
1514
- const t = Mt.getContext(this.id), r = (t == null ? void 0 : t.get(h.AvailabilityLoader)) || {};
1525
+ const t = wt.getContext(this.id), r = (t == null ? void 0 : t.get(g.AvailabilityLoader)) || {};
1515
1526
  if (e.rebuild)
1516
- for (const i of Object.keys(e == null ? void 0 : e.groups) || []) {
1517
- this._availabilityItems.getIndexByKey("group", i).filter(
1518
- (s) => !e.groups[i].find(
1519
- (n) => `${this.id}-${i}-${n.id}` === s.id
1527
+ for (const a of Object.keys(e == null ? void 0 : e.groups) || []) {
1528
+ this._availabilityItems.getIndexByKey("group", a).filter(
1529
+ (s) => !e.groups[a].find(
1530
+ (n) => `${this.id}-${a}-${n.id}` === s.id
1520
1531
  )
1521
1532
  ).forEach((s) => {
1522
- this._availabilityItems.removeModel(s.id), wt(s);
1533
+ this._availabilityItems.removeModel(s.id), Rt(s);
1523
1534
  });
1524
- for (const s of (e == null ? void 0 : e.groups[i]) || []) {
1525
- const n = await g.dataMapper.executeMapper(
1526
- h.AvailabilityMapper,
1527
- { ...s, groupId: i },
1535
+ for (const s of (e == null ? void 0 : e.groups[a]) || []) {
1536
+ const n = await P.dataMapper.executeMapper(
1537
+ g.AvailabilityMapper,
1538
+ { ...s, groupId: a },
1528
1539
  r
1529
- ), c = {
1540
+ ), l = {
1530
1541
  ...s,
1531
1542
  note: s.note ?? void 0,
1532
1543
  kosParentId: this.id,
1533
- groupId: i,
1544
+ groupId: a,
1534
1545
  rawId: s.id,
1535
1546
  data: n,
1536
1547
  taggedIds: s.taggedIds,
1537
1548
  properties: s.properties || {}
1538
- }, l = this._availabilityItems.getModel(
1539
- `${this.id}-${i}-${s.id}`
1549
+ }, c = this._availabilityItems.getModel(
1550
+ `${this.id}-${a}-${s.id}`
1540
1551
  );
1541
- if (l)
1542
- l.updateModel(c);
1552
+ if (c)
1553
+ c.updateModel(l);
1543
1554
  else {
1544
1555
  const p = Ee.factory(
1545
- `${this.id}-${i}-${s.id}`
1546
- )(c);
1556
+ `${this.id}-${a}-${s.id}`
1557
+ )(l);
1547
1558
  this._availabilityItems.addModel(p);
1548
1559
  }
1549
1560
  }
1550
1561
  }
1551
1562
  else
1552
- for (const i of Object.keys(e == null ? void 0 : e.groups) || [])
1553
- for (const a of (e == null ? void 0 : e.groups[i]) || []) {
1554
- const s = await g.dataMapper.executeMapper(
1555
- h.AvailabilityMapper,
1556
- { ...a, groupId: i },
1563
+ for (const a of Object.keys(e == null ? void 0 : e.groups) || [])
1564
+ for (const i of (e == null ? void 0 : e.groups[a]) || []) {
1565
+ const s = await P.dataMapper.executeMapper(
1566
+ g.AvailabilityMapper,
1567
+ { ...i, groupId: a },
1557
1568
  r
1558
1569
  ), n = {
1559
- ...a,
1560
- note: a.note ?? void 0,
1570
+ ...i,
1571
+ note: i.note ?? void 0,
1561
1572
  kosParentId: this.id,
1562
- groupId: i,
1563
- rawId: a.id,
1573
+ groupId: a,
1574
+ rawId: i.id,
1564
1575
  data: s,
1565
- type: a.type,
1566
- taggedIds: a.taggedIds,
1567
- properties: a.properties || {}
1568
- }, c = this._availabilityItems.getModel(
1569
- `${this.id}-${i}-${a.id}`
1576
+ type: i.type,
1577
+ taggedIds: i.taggedIds,
1578
+ properties: i.properties || {}
1579
+ }, l = this._availabilityItems.getModel(
1580
+ `${this.id}-${a}-${i.id}`
1570
1581
  );
1571
- c && c.updateModel(n);
1582
+ l && l.updateModel(n);
1572
1583
  }
1573
1584
  this.updateGroupMembers();
1574
1585
  }
@@ -1591,27 +1602,27 @@ E([
1591
1602
  ], I.prototype, "handleCanceled", 1);
1592
1603
  E([
1593
1604
  ge(),
1594
- re({ allowedStates: [d.IDLE] })
1605
+ ae({ allowedStates: [d.IDLE] })
1595
1606
  ], I.prototype, "pour", 1);
1596
1607
  E([
1597
1608
  ge(),
1598
- re({ allowedStates: [d.IDLE] })
1609
+ ae({ allowedStates: [d.IDLE] })
1599
1610
  ], I.prototype, "fixedPour", 1);
1600
1611
  E([
1601
- re({
1612
+ ae({
1602
1613
  allowedStates: [d.POUR_STARTING, d.POURING]
1603
1614
  })
1604
1615
  ], I.prototype, "cancelPour", 1);
1605
1616
  E([
1606
- te({
1617
+ re({
1607
1618
  topic: `${Kr}/availability`,
1608
1619
  websocket: !0
1609
1620
  })
1610
1621
  ], I.prototype, "updateAvailability", 1);
1611
1622
  I = E([
1612
- P(W),
1613
- je(),
1614
- Fe(
1623
+ y(Q),
1624
+ Fe(),
1625
+ He(
1615
1626
  {
1616
1627
  initial: d.IDLE,
1617
1628
  initializeAt: pe.READY,
@@ -1648,29 +1659,29 @@ I = E([
1648
1659
  }
1649
1660
  )
1650
1661
  ], I);
1651
- const $e = {
1662
+ const Ne = {
1652
1663
  registration: {
1653
- [W]: {
1664
+ [Q]: {
1654
1665
  class: I,
1655
1666
  singleton: !1
1656
1667
  }
1657
1668
  },
1658
- type: W,
1659
- predicate: b(W),
1660
- factory: v.Factory.create(W)
1669
+ type: Q,
1670
+ predicate: b(Q),
1671
+ factory: v.Factory.create(Q)
1661
1672
  };
1662
- var Zr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, lt = (e, t, r, i) => {
1663
- for (var a = i > 1 ? void 0 : i ? Xr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1664
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
1665
- return i && a && Zr(t, r, a), a;
1673
+ var Zr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, ct = (e, t, r, a) => {
1674
+ for (var i = a > 1 ? void 0 : a ? Xr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1675
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
1676
+ return a && i && Zr(t, r, i), i;
1666
1677
  };
1667
- const ct = "device-assembly-model";
1678
+ const pt = "device-assembly-model";
1668
1679
  let ce = class {
1669
1680
  constructor(e, t, r) {
1670
1681
  o(this, "id");
1671
1682
  o(this, "deviceNozzles");
1672
1683
  o(this, "logger");
1673
- this.id = e, this.logger = r.logger, this.deviceNozzles = new D();
1684
+ this.id = e, this.logger = r.logger, this.deviceNozzles = new T();
1674
1685
  }
1675
1686
  // -------------------LIFECYCLE----------------------------
1676
1687
  async init() {
@@ -1684,54 +1695,54 @@ let ce = class {
1684
1695
  }
1685
1696
  async load() {
1686
1697
  this.logger.debug(`loading device-assembly ${this.id}`);
1687
- const e = await Je();
1698
+ const e = await qe();
1688
1699
  (e == null ? void 0 : e.status) === 200 && e.data.assemblies.map((r) => r.nozzles ?? []).flat().forEach((r) => {
1689
1700
  var n;
1690
- const i = r.path, a = ((n = r.pipelines.find((c) => c.name === "beverage")) == null ? void 0 : n.topicPrefix) || "", s = $e.factory(i)({
1701
+ const a = r.path, i = ((n = r.pipelines.find((l) => l.name === "beverage")) == null ? void 0 : n.topicPrefix) || "", s = Ne.factory(a)({
1691
1702
  path: r.path,
1692
1703
  name: r.name,
1693
1704
  urlPrefix: r.urlPrefix,
1694
1705
  topicPrefix: r.topicPrefix,
1695
- beverageTopicPrefix: a
1706
+ beverageTopicPrefix: i
1696
1707
  });
1697
1708
  this.deviceNozzles.addModel(s);
1698
1709
  });
1699
1710
  }
1700
1711
  };
1701
- lt([
1712
+ ct([
1702
1713
  _
1703
1714
  ], ce.prototype, "deviceNozzles", 2);
1704
- ce = lt([
1705
- P(ct)
1715
+ ce = ct([
1716
+ y(pt)
1706
1717
  ], ce);
1707
- const Jr = new Rt({
1718
+ const Jr = new Ct({
1708
1719
  class: ce,
1709
- type: ct
1710
- }), { URL: pt } = N("GENERIC_POUR_SERVICE"), { postModel: qr } = $.build({
1711
- basePath: `${pt}/api/nozzle`
1720
+ type: pt
1721
+ }), { URL: ht } = D("GENERIC_POUR_SERVICE"), { postModel: qr } = S.build({
1722
+ basePath: `${ht}/api/nozzle`
1712
1723
  }), Wr = async (e, t) => {
1713
1724
  const r = await qr({
1714
1725
  model: {},
1715
- urlOverride: `${pt}${e}`,
1726
+ urlOverride: `${ht}${e}`,
1716
1727
  ordered: !0,
1717
1728
  tracker: t
1718
1729
  });
1719
1730
  return r != null && r.data && he.initiateFuture(r.data), r;
1720
1731
  };
1721
- var Qr = Object.defineProperty, ei = Object.getOwnPropertyDescriptor, T = (e, t, r, i) => {
1722
- for (var a = i > 1 ? void 0 : i ? ei(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1723
- (n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
1724
- return i && a && Qr(t, r, a), a;
1732
+ var Qr = Object.defineProperty, ea = Object.getOwnPropertyDescriptor, A = (e, t, r, a) => {
1733
+ for (var i = a > 1 ? void 0 : a ? ea(t, r) : t, s = e.length - 1, n; s >= 0; s--)
1734
+ (n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
1735
+ return a && i && Qr(t, r, i), i;
1725
1736
  };
1726
- const ht = "generic-pour-model", ti = "/kos/generic/pour/started", ri = "/kos/generic/pour/progress", ii = "/kos/generic/pour/cancel", ve = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0;
1727
- let M = class {
1737
+ const gt = "generic-pour-model", ta = "/kos/generic/pour/started", ra = "/kos/generic/pour/progress", aa = "/kos/generic/pour/cancel", ve = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0;
1738
+ let w = class {
1728
1739
  constructor(e, t) {
1729
1740
  o(this, "id");
1730
1741
  o(this, "servicePathFactory");
1731
1742
  o(this, "pourType");
1732
1743
  o(this, "selectedId");
1733
1744
  o(this, "state");
1734
- this.id = e, this.futureHandler = new Ge(this), this.servicePathFactory = t.servicePathFactory, this.pourType = t.pourType || "free", this.selectedId = t.selectedId, this.state = Te();
1745
+ this.id = e, this.futureHandler = new je(this), this.servicePathFactory = t.servicePathFactory, this.pourType = t.pourType || "free", this.selectedId = t.selectedId, this.state = Te();
1735
1746
  }
1736
1747
  get servicePath() {
1737
1748
  return this.selectedId ? this.servicePathFactory(this.selectedId, this.state) : "";
@@ -1746,7 +1757,7 @@ let M = class {
1746
1757
  this.state = Te();
1747
1758
  }
1748
1759
  handlePouringStart() {
1749
- this.logger.info("Pour started"), U(this).forEach((t) => {
1760
+ this.logger.info("Pour started"), z(this).forEach((t) => {
1750
1761
  var r;
1751
1762
  ve(t) && ((r = t.onPourStart) == null || r.call(t));
1752
1763
  });
@@ -1754,7 +1765,7 @@ let M = class {
1754
1765
  pourTarget: this.id,
1755
1766
  type: this.pourType
1756
1767
  };
1757
- R.publish(ti, e);
1768
+ $.publish(ta, e);
1758
1769
  }
1759
1770
  handlePouringEnd() {
1760
1771
  this.logger.info("Pour ended");
@@ -1763,14 +1774,14 @@ let M = class {
1763
1774
  this.logger.info("Pour canceling");
1764
1775
  }
1765
1776
  handleCanceled() {
1766
- this.logger.info("Pour canceled"), U(this).forEach((t) => {
1777
+ this.logger.info("Pour canceled"), z(this).forEach((t) => {
1767
1778
  var r;
1768
1779
  ve(t) && ((r = t.onPourCancel) == null || r.call(t));
1769
1780
  });
1770
1781
  const e = {
1771
1782
  pourTarget: this.id
1772
1783
  };
1773
- R.publish(ii, e);
1784
+ $.publish(aa, e);
1774
1785
  }
1775
1786
  // Inherits throwOnInvalid: false from class
1776
1787
  async pour(e) {
@@ -1819,7 +1830,7 @@ let M = class {
1819
1830
  // Future Lifecycle Handler
1820
1831
  // ============================================================================
1821
1832
  onFutureUpdate(e) {
1822
- U(this).forEach((r) => {
1833
+ z(this).forEach((r) => {
1823
1834
  ve(r) && r.onPourProgress(e);
1824
1835
  });
1825
1836
  const t = {
@@ -1833,37 +1844,37 @@ let M = class {
1833
1844
  reason: e.reason,
1834
1845
  timeRemaining: e.timeRemaining
1835
1846
  };
1836
- R.publish(ri, t), e.endState && O(() => {
1847
+ $.publish(ra, t), e.endState && O(() => {
1837
1848
  this.currentState === d.POURING && this.transition("POUR_COMPLETED");
1838
1849
  });
1839
1850
  }
1840
1851
  };
1841
- T([
1852
+ A([
1842
1853
  ue(d.POURING)
1843
- ], M.prototype, "handlePouringStart", 1);
1844
- T([
1854
+ ], w.prototype, "handlePouringStart", 1);
1855
+ A([
1845
1856
  Pe(d.POURING)
1846
- ], M.prototype, "handlePouringEnd", 1);
1847
- T([
1857
+ ], w.prototype, "handlePouringEnd", 1);
1858
+ A([
1848
1859
  ue(d.POUR_CANCELING)
1849
- ], M.prototype, "handleCancelStart", 1);
1850
- T([
1860
+ ], w.prototype, "handleCancelStart", 1);
1861
+ A([
1851
1862
  Pe(d.POUR_CANCELING)
1852
- ], M.prototype, "handleCanceled", 1);
1853
- T([
1863
+ ], w.prototype, "handleCanceled", 1);
1864
+ A([
1854
1865
  ge(),
1855
- re({ allowedStates: [d.IDLE] })
1856
- ], M.prototype, "pour", 1);
1857
- T([
1858
- re({
1866
+ ae({ allowedStates: [d.IDLE] })
1867
+ ], w.prototype, "pour", 1);
1868
+ A([
1869
+ ae({
1859
1870
  allowedStates: [d.POUR_STARTING, d.POURING]
1860
1871
  })
1861
- ], M.prototype, "cancelPour", 1);
1862
- M = T([
1863
- P(ht),
1864
- je(),
1865
- Ct(),
1866
- Fe(
1872
+ ], w.prototype, "cancelPour", 1);
1873
+ w = A([
1874
+ y(gt),
1875
+ Fe(),
1876
+ $t(),
1877
+ He(
1867
1878
  {
1868
1879
  initial: d.IDLE,
1869
1880
  initializeAt: pe.READY,
@@ -1899,102 +1910,102 @@ M = T([
1899
1910
  // Gracefully ignore invalid state calls (expected runtime scenarios)
1900
1911
  }
1901
1912
  )
1902
- ], M);
1903
- const hi = new Nt({
1904
- class: M,
1905
- type: ht
1906
- }), ze = {
1907
- ...ke.registration,
1908
- ...He.registration,
1909
- ...at.registration,
1910
- ...Xe.registration,
1911
- ...$e.registration,
1912
- ...nt.registration,
1913
+ ], w);
1914
+ const ha = new Nt({
1915
+ class: w,
1916
+ type: gt
1917
+ }), xe = {
1918
+ ...Ye.registration,
1919
+ ...Ve.registration,
1920
+ ...st.registration,
1921
+ ...Je.registration,
1922
+ ...Ne.registration,
1923
+ ...ot.registration,
1913
1924
  ...Re.registration,
1914
1925
  ...Ee.registration,
1915
- ...dt.registration,
1926
+ ...lt.registration,
1916
1927
  ...it.registration
1917
- }, ai = (e) => () => (Dt(e)(), Jr.register(), Object.keys(ze).forEach((t) => {
1918
- const r = ze[t];
1919
- St(e)(t, r);
1920
- }), g[ee].register(
1928
+ }, ia = (e) => () => (St(e)(), Jr.register(), Object.keys(xe).forEach((t) => {
1929
+ const r = xe[t];
1930
+ Tt(e)(t, r);
1931
+ }), P[te].register(
1921
1932
  "FirmwareUpdateInProgressTrouble",
1922
1933
  async (t) => {
1923
1934
  var r;
1924
1935
  if ((r = t.data) != null && r.deviceId) {
1925
- const { model: i } = z(
1926
- dt.type
1936
+ const { model: a } = x(
1937
+ lt.type
1927
1938
  );
1928
- if (i) {
1929
- const a = i.boards.find(
1939
+ if (a) {
1940
+ const i = a.boards.find(
1930
1941
  (s) => s.id === t.data.deviceId
1931
- ) ? z(t.data.deviceId).model : void 0;
1942
+ ) ? x(t.data.deviceId).model : void 0;
1932
1943
  return {
1933
- devices: a ? a.name : ""
1944
+ devices: i ? i.name : ""
1934
1945
  };
1935
1946
  }
1936
1947
  }
1937
1948
  return {};
1938
1949
  }
1939
1950
  ), {
1940
- preload: w.model.preloadModel(e),
1941
- model: w.model.register(e),
1942
- companion: w.companion.register(e),
1943
- legacy: w.model.registerLegacyModel(e)
1951
+ preload: R.model.preloadModel(e),
1952
+ model: R.model.register(e),
1953
+ companion: R.companion.register(e),
1954
+ legacy: R.model.registerLegacyModel(e)
1944
1955
  }), f = {
1945
- ...$t
1956
+ ...Dt
1946
1957
  };
1947
1958
  f.dispense = {
1948
- models: ai(f)
1959
+ models: ia(f)
1949
1960
  };
1950
- f.preload = w.model.preloadModel(f);
1951
- f.model = w.model.register(f);
1952
- f.companion = w.companion.register(f);
1953
- f.legacy = w.model.registerLegacyModel(f);
1954
- const gi = f;
1961
+ f.preload = R.model.preloadModel(f);
1962
+ f.model = R.model.register(f);
1963
+ f.companion = R.companion.register(f);
1964
+ f.legacy = R.model.registerLegacyModel(f);
1965
+ const ga = f;
1955
1966
  export {
1956
- dt as A,
1957
- x as B,
1967
+ lt as A,
1968
+ B,
1958
1969
  Sr as C,
1959
- S as D,
1960
- h as E,
1970
+ L as D,
1971
+ g as E,
1961
1972
  Gr as F,
1962
- hi as G,
1963
- Xe as H,
1964
- He as I,
1973
+ ha as G,
1974
+ Je as H,
1975
+ Ve as I,
1965
1976
  Br as J,
1966
- gi as K,
1977
+ ga as K,
1967
1978
  xr as L,
1968
1979
  jr as M,
1969
- $e as N,
1980
+ Ne as N,
1970
1981
  Wr as O,
1971
- nt as P,
1972
- qe as T,
1982
+ ot as P,
1983
+ We as T,
1973
1984
  Tr as a,
1974
1985
  Ee as b,
1975
- We as c,
1986
+ Qe as c,
1976
1987
  it as d,
1977
- rt as e,
1988
+ at as e,
1978
1989
  Jr as f,
1979
- at as g,
1980
- ke as h,
1990
+ st as g,
1991
+ Ye as h,
1981
1992
  Re as i,
1982
- et as j,
1993
+ tt as j,
1983
1994
  d as k,
1984
- ze as l,
1985
- Ut as m,
1986
- ci as n,
1987
- Ht as o,
1988
- pi as p,
1989
- li as q,
1990
- ai as r,
1991
- di as s,
1992
- Kt as t,
1993
- Zt as u,
1994
- Vt as v,
1995
- Je as w,
1996
- Mr as x,
1997
- Er as y,
1995
+ xe as l,
1996
+ zt as m,
1997
+ ca as n,
1998
+ Vt as o,
1999
+ pa as p,
2000
+ la as q,
2001
+ ia as r,
2002
+ da as s,
2003
+ kt as t,
2004
+ Xt as u,
2005
+ Kt as v,
2006
+ qe as w,
2007
+ wr as x,
2008
+ Mr as y,
1998
2009
  Fr as z
1999
2010
  };
2000
- //# sourceMappingURL=dispense-registration-manager-kSiG2s8S.js.map
2011
+ //# sourceMappingURL=dispense-registration-manager-DgMTZL-g.js.map