@kosdev-code/kos-dispense-sdk 2.0.33 → 2.0.35

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 (43) hide show
  1. package/dispense-registration-manager-BZeOXyYn.cjs +2 -0
  2. package/dispense-registration-manager-BZeOXyYn.cjs.map +1 -0
  3. package/{dispense-registration-manager-CKFF29mO.js → dispense-registration-manager-eOOE05xT.js} +333 -328
  4. package/dispense-registration-manager-eOOE05xT.js.map +1 -0
  5. package/{extension-utils-Bb22_AzV.js → extension-utils-B9gziKDQ.js} +69 -62
  6. package/extension-utils-B9gziKDQ.js.map +1 -0
  7. package/{extension-utils-CScCluY5.cjs → extension-utils-DcOOx69a.cjs} +2 -2
  8. package/extension-utils-DcOOx69a.cjs.map +1 -0
  9. package/index.cjs +1 -1
  10. package/index.js +87 -85
  11. package/models/constants/constants.d.ts +2 -1
  12. package/models/constants/constants.d.ts.map +1 -1
  13. package/models/models/assembly/assembly-model.d.ts +1 -0
  14. package/models/models/assembly/assembly-model.d.ts.map +1 -1
  15. package/models/models/assembly/index.d.ts +2 -1
  16. package/models/models/assembly/index.d.ts.map +1 -1
  17. package/models/utils/extension-utils.d.ts +3 -2
  18. package/models/utils/extension-utils.d.ts.map +1 -1
  19. package/models/utils/service.d.ts +5 -1
  20. package/models/utils/service.d.ts.map +1 -1
  21. package/models.cjs +1 -1
  22. package/models.js +28 -26
  23. package/package.json +3 -3
  24. package/pump-provider-BgSHNZEC.js +1239 -0
  25. package/pump-provider-BgSHNZEC.js.map +1 -0
  26. package/pump-provider-BkfgOMJx.cjs +2 -0
  27. package/pump-provider-BkfgOMJx.cjs.map +1 -0
  28. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts +75 -1
  29. package/ui/hooks/cui-kit/use-default-cui-kit-lifecycle.d.ts.map +1 -1
  30. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts +3 -1
  31. package/ui/hooks/cui-kit/use-dispense-lifecycle.d.ts.map +1 -1
  32. package/ui/hooks/cui-kit/use-dispense-timers.d.ts.map +1 -1
  33. package/ui.cjs +1 -1
  34. package/ui.js +2 -2
  35. package/dispense-registration-manager-CKFF29mO.js.map +0 -1
  36. package/dispense-registration-manager-CjKpNrUy.cjs +0 -2
  37. package/dispense-registration-manager-CjKpNrUy.cjs.map +0 -1
  38. package/extension-utils-Bb22_AzV.js.map +0 -1
  39. package/extension-utils-CScCluY5.cjs.map +0 -1
  40. package/pump-provider-CP6xxU4h.cjs +0 -2
  41. package/pump-provider-CP6xxU4h.cjs.map +0 -1
  42. package/pump-provider-jdIoS5JD.js +0 -1155
  43. package/pump-provider-jdIoS5JD.js.map +0 -1
@@ -1,11 +1,11 @@
1
1
  var pt = Object.defineProperty;
2
2
  var ut = (e, t, r) => t in e ? pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
3
  var o = (e, t, r) => (ut(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { kosModel as I, isKosModel as v, Kos as b, resolveServiceUrl as C, ServiceFactory as S, KosLog as m, KosModelContainer as R, KosExtensionUtils as T, kosChild as M, FetchError as ht, ExtensionManager as h, EXTENSION_TROUBLE_MAPPER as Me, EXTENSION_TROUBLE_DATA_MAPPER as W, getKosModelSync as z, kosDependency as ce, TroubleContainer as xe, troubleByTypeReducer as Ae, kosAction as g, kosTopicHandler as Q, DependencyLifecycle as Be, getKosModel as Ue, FutureManager as pe, kosFuture as ue, FutureHandler as Ge, isKosDataModel as gt, ChildModels as yt, KosFeatureFlags as It, kosParentAware as ft, createPropKey as mt, MultipleFutureHandler as Pt, arraysEqual as vt, getAllKosCompanionModels as E, EventBus as _, KosContextManager as bt, destroyKosModel as _t, SingletonKosModelRegistrationFactory as Mt, KosModelRegistrationFactory as Ot, KosModelRegistry as Et, RegistrationManager as O, registerCoreModels as wt, registerLegacyModel as $t } from "@kosdev-code/kos-ui-sdk";
4
+ import { kosModel as I, isKosModel as b, Kos as v, resolveServiceUrl as S, ServiceFactory as C, KosLog as m, KosModelContainer as R, KosExtensionUtils as N, kosChild as M, FetchError as ht, ExtensionManager as h, EXTENSION_TROUBLE_MAPPER as Me, EXTENSION_TROUBLE_DATA_MAPPER as W, getKosModelSync as z, kosDependency as ce, TroubleContainer as xe, troubleByTypeReducer as Ae, kosAction as g, kosTopicHandler as Q, DependencyLifecycle as Be, getKosModel as Ue, FutureManager as pe, kosFuture as ue, FutureHandler as Ge, EXTENSION_FEATURE_FLAG_RESOLVER as gt, isKosDataModel as yt, ChildModels as It, KosFeatureFlags as ft, kosParentAware as mt, createPropKey as Pt, MultipleFutureHandler as bt, arraysEqual as vt, getAllKosCompanionModels as E, EventBus as _, KosContextManager as _t, destroyKosModel as Mt, SingletonKosModelRegistrationFactory as Ot, KosModelRegistrationFactory as Et, KosModelRegistry as wt, RegistrationManager as O, registerCoreModels as $t, registerLegacyModel as St } from "@kosdev-code/kos-ui-sdk";
5
5
  import "react";
6
- var u = /* @__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))(u || {}), D = /* @__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))(D || {}), Ct = Object.defineProperty, St = Object.getOwnPropertyDescriptor, Rt = (e, t, r, s) => {
7
- for (var i = s > 1 ? void 0 : s ? St(t, r) : t, n = e.length - 1, a; n >= 0; n--)
8
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
6
+ var u = /* @__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))(u || {}), D = /* @__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))(D || {}), Ct = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, Dt = (e, t, r, s) => {
7
+ for (var i = s > 1 ? void 0 : s ? Rt(t, r) : t, a = e.length - 1, n; a >= 0; a--)
8
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
9
9
  return s && i && Ct(t, r, i), i;
10
10
  };
11
11
  const G = "ingredient-model";
@@ -15,14 +15,14 @@ let Pe = class {
15
15
  type: r,
16
16
  data: s,
17
17
  ingredientId: i,
18
- ...n
18
+ ...a
19
19
  }) {
20
20
  o(this, "id");
21
21
  o(this, "ingredientId");
22
22
  o(this, "name");
23
23
  o(this, "type");
24
24
  o(this, "data");
25
- this.id = e, this.ingredientId = i, this.name = t, this.type = r, this.data = s, Object.assign(this, n);
25
+ this.id = e, this.ingredientId = i, this.name = t, this.type = r, this.data = s, Object.assign(this, a);
26
26
  }
27
27
  updateModel({
28
28
  name: e,
@@ -36,7 +36,7 @@ let Pe = class {
36
36
  // -------------------LIFECYCLE----------------------------
37
37
  // -------------------ENTITY----------------------------
38
38
  };
39
- Pe = Rt([
39
+ Pe = Dt([
40
40
  I(G)
41
41
  ], Pe);
42
42
  const je = {
@@ -47,19 +47,19 @@ const je = {
47
47
  }
48
48
  },
49
49
  type: G,
50
- predicate: v(G),
51
- factory: b.Factory.create(G)
52
- }, { URL: Fe } = C("INGREDIENT_SERVICE"), { getOne: Dt } = S.build({
50
+ predicate: b(G),
51
+ factory: v.Factory.create(G)
52
+ }, { URL: Fe } = S("INGREDIENT_SERVICE"), { getOne: Tt } = C.build({
53
53
  basePath: `${Fe}/api/ext/dispense/ingredients`
54
- }), Nt = async () => await Dt({
54
+ }), Nt = async () => await Tt({
55
55
  urlOverride: `${Fe}/api/ext/dispense/ingredients`
56
56
  });
57
- var Tt = Object.defineProperty, zt = Object.getOwnPropertyDescriptor, He = (e, t, r, s) => {
58
- for (var i = s > 1 ? void 0 : s ? zt(t, r) : t, n = e.length - 1, a; n >= 0; n--)
59
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
60
- return s && i && Tt(t, r, i), i;
57
+ var zt = Object.defineProperty, Lt = Object.getOwnPropertyDescriptor, He = (e, t, r, s) => {
58
+ for (var i = s > 1 ? void 0 : s ? Lt(t, r) : t, a = e.length - 1, n; a >= 0; a--)
59
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
60
+ return s && i && zt(t, r, i), i;
61
61
  };
62
- const j = "ingredient-container-model", Lt = m.createLogger({ name: "ingredient-container-model" });
62
+ const j = "ingredient-container-model", xt = m.createLogger({ name: "ingredient-container-model" });
63
63
  let se = class {
64
64
  constructor(e, t) {
65
65
  o(this, "id");
@@ -80,30 +80,30 @@ let se = class {
80
80
  }
81
81
  async load(e) {
82
82
  var i;
83
- Lt.debug(`loading ingredient container ${this.id}`);
83
+ xt.debug(`loading ingredient container ${this.id}`);
84
84
  const t = await Nt();
85
85
  if ((t == null ? void 0 : t.status) !== 200)
86
86
  throw new Error("Failed to load ingredients");
87
- const r = await T.executeLoaderExtension({
87
+ const r = await N.executeLoaderExtension({
88
88
  context: e,
89
89
  extension: u.IngredientLoader
90
90
  }), s = (t == null ? void 0 : t.data) ?? {};
91
- for (const n of Object.keys(s))
92
- for (const a of ((i = t == null ? void 0 : t.data) == null ? void 0 : i[n]) || []) {
93
- const c = await T.executeDataMapperExtension({
91
+ for (const a of Object.keys(s))
92
+ for (const n of ((i = t == null ? void 0 : t.data) == null ? void 0 : i[a]) || []) {
93
+ const c = await N.executeDataMapperExtension({
94
94
  extension: u.IngredientMapper,
95
- data: a,
95
+ data: n,
96
96
  contextData: r
97
- }), l = await T.executePropertyMapperExtension({
97
+ }), l = await N.executePropertyMapperExtension({
98
98
  extension: u.IngredientTypeMapper,
99
- data: a,
99
+ data: n,
100
100
  contextData: r
101
101
  }), p = {
102
- ...a,
103
- type: l || a.type,
102
+ ...n,
103
+ type: l || n.type,
104
104
  ...c,
105
105
  data: c
106
- }, y = je.factory(a.id)(
106
+ }, y = je.factory(n.id)(
107
107
  p
108
108
  );
109
109
  this.ingredients.addModel(y);
@@ -125,42 +125,42 @@ const Ke = {
125
125
  }
126
126
  },
127
127
  type: j,
128
- predicate: v(j),
129
- factory: b.Singleton.create(j)
130
- }, { URL: he } = C("HOLDER_SERVICE"), { getAll: xt, postModel: Ve, deleteModel: At } = S.build({
128
+ predicate: b(j),
129
+ factory: v.Singleton.create(j)
130
+ }, { URL: he } = S("HOLDER_SERVICE"), { getAll: At, postModel: Ve, deleteModel: Bt } = C.build({
131
131
  basePath: `${he}/api/kos/holders`
132
- }), Bt = m.createLogger({
132
+ }), Ut = m.createLogger({
133
133
  name: "holder-service",
134
134
  group: "Services"
135
- }), ii = async () => await xt({}), Ut = async (e, t) => {
135
+ }), ai = async () => await At({}), Gt = async (e, t) => {
136
136
  if (!e || !t)
137
137
  throw new Error("Missing holderPath or ingredientId");
138
138
  return await Ve({
139
139
  model: { holderPath: e, ingredientId: t },
140
140
  urlOverride: `${he}/api/ext/dispense/assignments`
141
141
  });
142
- }, Gt = async (e) => {
142
+ }, jt = async (e) => {
143
143
  if (!e)
144
144
  throw new Error("Missing holderPath");
145
- return await At({
145
+ return await Bt({
146
146
  id: e,
147
147
  urlOverride: `${he}/api/ext/dispense/assignments/${e}`
148
148
  });
149
- }, jt = async (e) => {
149
+ }, Ft = async (e) => {
150
150
  if (!e)
151
151
  throw new Error("Missing holderPath");
152
- return Bt.debug(
152
+ return Ut.debug(
153
153
  `sending POST request to /api/ext/dispense/pumpEvents/replaceLine/${e}`
154
154
  ), await Ve({
155
155
  model: {},
156
156
  urlOverride: `${he}/api/ext/dispense/pumpEvents/replaceLine/${e}`
157
157
  });
158
- }, { URL: ne } = C("ASSIGNMENT_SERVICE"), { getAll: Ft, postModel: Ye, deleteModel: Ht } = S.build({
158
+ }, { URL: ae } = S("ASSIGNMENT_SERVICE"), { getAll: Ht, postModel: Ye, deleteModel: Kt } = C.build({
159
159
  destinationAddress: "",
160
- basePath: `${ne}/api/ext/dispense/assignments`
161
- }), ae = window.kosUseFos, si = async () => await Ft({ fos: ae }), Kt = async (e, t) => {
162
- var i, n, a, c;
163
- const r = JSON.stringify(t), s = `${ne}/api/ext/dispense/assignments`;
160
+ basePath: `${ae}/api/ext/dispense/assignments`
161
+ }), ne = window.kosUseFos, ni = async () => await Ht({ fos: ne }), Vt = async (e, t) => {
162
+ var i, a, n, c;
163
+ const r = JSON.stringify(t), s = `${ae}/api/ext/dispense/assignments`;
164
164
  try {
165
165
  const l = await Ye({
166
166
  model: { holderPath: e, factoryJson: r },
@@ -170,23 +170,23 @@ const Ke = {
170
170
  } catch (l) {
171
171
  if (l instanceof ht)
172
172
  return [
173
- ((a = (n = l.payload) == null ? void 0 : n.data) == null ? void 0 : a.error) || "unknownError",
173
+ ((n = (a = l.payload) == null ? void 0 : a.data) == null ? void 0 : n.error) || "unknownError",
174
174
  (c = l.payload) == null ? void 0 : c.data
175
175
  ];
176
176
  }
177
177
  return ["unknownError", void 0];
178
- }, ni = async (e) => {
179
- const t = ae ? `${ne}/api/ingredients/assignments/${e.holderPath}` : `${ne}/api/ext/dispense/assignments`;
178
+ }, oi = async (e) => {
179
+ const t = ne ? `${ae}/api/ingredients/assignments/${e.holderPath}` : `${ae}/api/ext/dispense/assignments`;
180
180
  return await Ye({
181
181
  model: { ...e, fuelGauge: 680 },
182
- fos: ae,
182
+ fos: ne,
183
183
  urlOverride: t
184
184
  });
185
- }, ai = async (e) => await Ht({ id: e, fos: ae });
186
- var Vt = Object.defineProperty, Yt = Object.getOwnPropertyDescriptor, ge = (e, t, r, s) => {
187
- for (var i = s > 1 ? void 0 : s ? Yt(t, r) : t, n = e.length - 1, a; n >= 0; n--)
188
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
189
- return s && i && Vt(t, r, i), i;
185
+ }, di = async (e) => await Kt({ id: e, fos: ne });
186
+ var Yt = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, ge = (e, t, r, s) => {
187
+ for (var i = s > 1 ? void 0 : s ? kt(t, r) : t, a = e.length - 1, n; a >= 0; a--)
188
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
189
+ return s && i && Yt(t, r, i), i;
190
190
  };
191
191
  const F = D.Holder, De = m.createLogger({ name: "holder-model" });
192
192
  h[Me].register(
@@ -235,7 +235,7 @@ h[W].register(
235
235
  return {};
236
236
  }
237
237
  );
238
- class kt extends Error {
238
+ class Zt extends Error {
239
239
  constructor(r, s) {
240
240
  super(s);
241
241
  o(this, "type");
@@ -248,8 +248,8 @@ let L = class {
248
248
  name: r,
249
249
  ingredientSource: s,
250
250
  ingredientId: i,
251
- ingredientType: n,
252
- slice: a,
251
+ ingredientType: a,
252
+ slice: n,
253
253
  group: c,
254
254
  data: l,
255
255
  enjoyByDate: p
@@ -268,7 +268,7 @@ let L = class {
268
268
  o(this, "pumps");
269
269
  o(this, "ingredientContainer");
270
270
  o(this, "troubleContainer");
271
- this.id = e, this.path = t, this.name = r, this.ingredientType = n, this.ingredientSource = s, this.ingredientId = i, this.group = c, this.slice = a, this.enjoyByDate = p, this.data = l, this.pumps = new R({
271
+ this.id = e, this.path = t, this.name = r, this.ingredientType = a, this.ingredientSource = s, this.ingredientId = i, this.group = c, this.slice = n, this.enjoyByDate = p, this.data = l, this.pumps = new R({
272
272
  parentId: e,
273
273
  sortKey: "path"
274
274
  }), this.logger = y.logger;
@@ -279,12 +279,12 @@ let L = class {
279
279
  ingredientSource: r,
280
280
  ingredientId: s,
281
281
  ingredientType: i,
282
- group: n,
283
- slice: a,
282
+ group: a,
283
+ slice: n,
284
284
  enjoyByDate: c,
285
285
  data: l
286
286
  }) {
287
- this.path = e, this.name = t, this.ingredientId = s, this.ingredientType = i, this.ingredientSource = r, this.enjoyByDate = c, this.slice = a, this.group = n, this.data = l;
287
+ this.path = e, this.name = t, this.ingredientId = s, this.ingredientType = i, this.ingredientSource = r, this.enjoyByDate = c, this.slice = n, this.group = a, this.data = l;
288
288
  }
289
289
  get hasEnjoyByDate() {
290
290
  return !!this.enjoyByDate && !this.unassigned;
@@ -396,9 +396,9 @@ let L = class {
396
396
  if (!e)
397
397
  throw new Error("Invalid override");
398
398
  try {
399
- const [t, r] = await Kt(this.path, e);
399
+ const [t, r] = await Vt(this.path, e);
400
400
  if (t)
401
- throw new kt(
401
+ throw new Zt(
402
402
  t,
403
403
  `Failed to perform rfid override on holder ${this.id}`
404
404
  );
@@ -411,7 +411,7 @@ let L = class {
411
411
  }
412
412
  async assignIngredient(e) {
413
413
  try {
414
- e ? await Ut(this.path, e) : await Gt(this.path), g(() => {
414
+ e ? await Gt(this.path, e) : await jt(this.path), g(() => {
415
415
  this.ingredientId = e;
416
416
  });
417
417
  } catch (t) {
@@ -422,7 +422,7 @@ let L = class {
422
422
  return this.troubles.some((e) => e.shouldDefer);
423
423
  }
424
424
  async replaceLine() {
425
- await jt(this.path);
425
+ await Ft(this.path);
426
426
  }
427
427
  // -------------------LIFECYCLE----------------------------
428
428
  // ----------------------------------
@@ -464,9 +464,9 @@ const ke = {
464
464
  }
465
465
  },
466
466
  type: F,
467
- predicate: v(F),
468
- factory: b.Factory.create(F)
469
- }, Zt = async (e, t) => {
467
+ predicate: b(F),
468
+ factory: v.Factory.create(F)
469
+ }, Xt = async (e, t) => {
470
470
  var Re;
471
471
  const r = h.propertyMapper.executeMapper(
472
472
  u.HolderIngredientMapper,
@@ -474,34 +474,34 @@ const ke = {
474
474
  ), s = h.propertyMapper.executeMapper(
475
475
  u.HolderTypeMapper,
476
476
  t
477
- ) || t.ingType, i = await T.executeDataMapperExtension({
477
+ ) || t.ingType, i = await N.executeDataMapperExtension({
478
478
  extension: u.HolderMapper,
479
479
  data: t,
480
480
  contextData: {}
481
- }), { name: n, path: a, ingredientId: c, ingType: l, ingSource: p, slice: y, ...U } = t, f = { ...U, ...i }, N = y || { pos: 0 }, re = {
482
- name: n,
483
- path: a,
481
+ }), { name: a, path: n, ingredientId: c, ingType: l, ingSource: p, slice: y, ...U } = t, f = { ...U, ...i }, T = y || { pos: 0 }, re = {
482
+ name: a,
483
+ path: n,
484
484
  ingredientId: r || c,
485
485
  ingredientType: s || l,
486
486
  ingredientSource: p,
487
487
  enjoyByDate: (Re = t.container) != null && Re.enjoyByDate ? new Date(t.container.enjoyByDate) : void 0,
488
- slice: N,
488
+ slice: T,
489
489
  group: e,
490
490
  data: f
491
491
  };
492
492
  return ke.factory(t.path)(re);
493
- }, { URL: Jt } = C("ASSEMBLY_SERVICE"), { getOne: Xt } = S.build({
493
+ }, { URL: Jt } = S("ASSEMBLY_SERVICE"), { getOne: qt } = C.build({
494
494
  basePath: `${Jt}/api/kos/device/assemblies`
495
- }), qt = m.createLogger({
495
+ }), Wt = m.createLogger({
496
496
  name: "assembly-service",
497
497
  group: "Services"
498
- }), Ze = async () => (qt.debug("sending GET for assembly"), await Xt({}));
499
- var Wt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, ye = (e, t, r, s) => {
500
- for (var i = s > 1 ? void 0 : s ? Qt(t, r) : t, n = e.length - 1, a; n >= 0; n--)
501
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
502
- return s && i && Wt(t, r, i), i;
498
+ }), Ze = async () => (Wt.debug("sending GET for assembly"), await qt({}));
499
+ var Qt = Object.defineProperty, er = Object.getOwnPropertyDescriptor, ye = (e, t, r, s) => {
500
+ for (var i = s > 1 ? void 0 : s ? er(t, r) : t, a = e.length - 1, n; a >= 0; a--)
501
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
502
+ return s && i && Qt(t, r, i), i;
503
503
  };
504
- const H = "board-container-model", Je = "/kos/hardware/board/linked", Xe = "/kos/hardware/board/unlinked";
504
+ const H = "board-container-model", Xe = "/kos/hardware/board/linked", Je = "/kos/hardware/board/unlinked";
505
505
  let x = class {
506
506
  constructor(e, t, r) {
507
507
  o(this, "id");
@@ -532,11 +532,11 @@ let x = class {
532
532
  r.updateModel(e);
533
533
  }
534
534
  handleBoardLinkEvent(e) {
535
- this.logger.debug(`handling ${Je} event ${e}`), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
535
+ this.logger.debug(`handling ${Xe} event ${e}`), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
536
536
  }
537
537
  handleBoardUnlinkEvent(e) {
538
538
  this.logger.debug(
539
- `handling ${Xe} event ${e}`
539
+ `handling ${Je} event ${e}`
540
540
  ), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
541
541
  }
542
542
  };
@@ -546,30 +546,30 @@ ye([
546
546
  ye([
547
547
  Q({
548
548
  lifecycle: Be.INIT,
549
- topic: Je,
549
+ topic: Xe,
550
550
  websocket: !0
551
551
  })
552
552
  ], x.prototype, "handleBoardLinkEvent", 1);
553
553
  ye([
554
554
  Q({
555
555
  lifecycle: Be.INIT,
556
- topic: Xe,
556
+ topic: Je,
557
557
  websocket: !0
558
558
  })
559
559
  ], x.prototype, "handleBoardUnlinkEvent", 1);
560
560
  x = ye([
561
561
  I(H)
562
562
  ], x);
563
- const er = async (e) => {
563
+ const tr = async (e) => {
564
564
  const t = e.data.boardPath, { model: r } = z(t);
565
565
  return {
566
566
  boardName: (r == null ? void 0 : r.name) || ""
567
567
  };
568
568
  };
569
- var tr = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, qe = (e, t, r, s) => {
570
- for (var i = s > 1 ? void 0 : s ? rr(t, r) : t, n = e.length - 1, a; n >= 0; n--)
571
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
572
- return s && i && tr(t, r, i), i;
569
+ var rr = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, qe = (e, t, r, s) => {
570
+ for (var i = s > 1 ? void 0 : s ? ir(t, r) : t, a = e.length - 1, n; a >= 0; a--)
571
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
572
+ return s && i && rr(t, r, i), i;
573
573
  };
574
574
  const K = D.PumpContainer;
575
575
  var We = /* @__PURE__ */ ((e) => (e.byBoard = "byBoard", e.byType = "byType", e.byNozzle = "byNozzle", e))(We || {});
@@ -635,55 +635,55 @@ const Oe = {
635
635
  }
636
636
  },
637
637
  type: K,
638
- predicate: v(K),
639
- factory: b.Singleton.create(
638
+ predicate: b(K),
639
+ factory: v.Singleton.create(
640
640
  K
641
641
  )
642
642
  }, Qe = async (e) => {
643
643
  const t = [], { model: r } = await Ue(e);
644
644
  return r && (t.push(r.boardPath), t.push(r.nozzlePath), t.push(r.holderPath)), t;
645
- }, ir = async (e) => {
645
+ }, sr = async (e) => {
646
646
  const t = [], r = e.data.pumpPath;
647
647
  t.push(r);
648
648
  const s = await Qe(r);
649
649
  return [...t, ...s];
650
- }, sr = async (e) => {
650
+ }, ar = async (e) => {
651
651
  const t = [], r = e.data.boardPath;
652
652
  t.push(e.data.boardPath);
653
653
  const s = await Ue(
654
654
  Oe.type
655
655
  );
656
656
  if (s != null && s.model) {
657
- const n = s.model.models.getIndexByKey(
657
+ const a = s.model.models.getIndexByKey(
658
658
  We.byBoard,
659
659
  r
660
660
  ).map(
661
661
  (c) => Qe(c.path)
662
662
  );
663
- (await Promise.allSettled(n)).forEach((c) => {
663
+ (await Promise.allSettled(a)).forEach((c) => {
664
664
  c.status === "fulfilled" && c.value.forEach((l) => t.push(l));
665
665
  });
666
666
  }
667
667
  return Array.from(new Set(t));
668
668
  };
669
- var nr = Object.defineProperty, ar = Object.getOwnPropertyDescriptor, or = (e, t, r, s) => {
670
- for (var i = s > 1 ? void 0 : s ? ar(t, r) : t, n = e.length - 1, a; n >= 0; n--)
671
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
669
+ var nr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, dr = (e, t, r, s) => {
670
+ for (var i = s > 1 ? void 0 : s ? or(t, r) : t, a = e.length - 1, n; a >= 0; a--)
671
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
672
672
  return s && i && nr(t, r, i), i;
673
673
  };
674
- const V = "board-model", Ne = (e, t) => {
675
- const { type: r, name: s, path: i, linked: n, instanceId: a, link: c, ...l } = e;
676
- t.type = r, t.name = s, t.path = i, t.linked = n, t.link = Object.freeze(c), t.instanceId = a, Object.assign(t, l);
674
+ const V = "board-model", Te = (e, t) => {
675
+ const { type: r, name: s, path: i, linked: a, instanceId: n, link: c, ...l } = e;
676
+ t.type = r, t.name = s, t.path = i, t.linked = a, t.link = Object.freeze(c), t.instanceId = n, Object.assign(t, l);
677
677
  };
678
678
  h[Me].register(
679
679
  "board",
680
- sr
680
+ ar
681
681
  );
682
682
  h[W].register(
683
683
  "board",
684
- er
684
+ tr
685
685
  );
686
- let ve = class {
686
+ let be = class {
687
687
  constructor(e, t, r) {
688
688
  o(this, "id");
689
689
  o(this, "type");
@@ -692,10 +692,10 @@ let ve = class {
692
692
  o(this, "linked");
693
693
  o(this, "instanceId");
694
694
  o(this, "logger");
695
- this.id = e, this.logger = r.logger, Ne(t, this);
695
+ this.id = e, this.logger = r.logger, Te(t, this);
696
696
  }
697
697
  updateModel(e) {
698
- Ne(e, this);
698
+ Te(e, this);
699
699
  }
700
700
  // -------------------LIFECYCLE----------------------------
701
701
  async init() {
@@ -705,19 +705,19 @@ let ve = class {
705
705
  this.logger.debug(`loading board ${this.id}`);
706
706
  }
707
707
  };
708
- ve = or([
708
+ be = dr([
709
709
  I(V)
710
- ], ve);
710
+ ], be);
711
711
  const et = {
712
712
  registration: {
713
713
  [V]: {
714
- class: ve,
714
+ class: be,
715
715
  singleton: !1
716
716
  }
717
717
  },
718
718
  type: V,
719
- predicate: v(V),
720
- factory: b.Factory.create(V)
719
+ predicate: b(V),
720
+ factory: v.Factory.create(V)
721
721
  }, tt = {
722
722
  registration: {
723
723
  [H]: {
@@ -727,17 +727,17 @@ const et = {
727
727
  ...et.registration
728
728
  },
729
729
  type: H,
730
- predicate: v(H),
731
- factory: b.Singleton.create(
730
+ predicate: b(H),
731
+ factory: v.Singleton.create(
732
732
  H
733
733
  )
734
734
  };
735
- var dr = Object.defineProperty, lr = Object.getOwnPropertyDescriptor, Ie = (e, t, r, s) => {
736
- for (var i = s > 1 ? void 0 : s ? lr(t, r) : t, n = e.length - 1, a; n >= 0; n--)
737
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
738
- return s && i && dr(t, r, i), i;
735
+ var lr = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, Ie = (e, t, r, s) => {
736
+ for (var i = s > 1 ? void 0 : s ? cr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
737
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
738
+ return s && i && lr(t, r, i), i;
739
739
  };
740
- const Y = D.HolderContainer, cr = "/kos/insertion/insert/start", pr = "/kos/insertion/insert/complete", ur = "/kos/insertion/insert/update", hr = "/kos/insertion/remove", gr = "/kos/pumpEvent/replaceLine", yr = "/kos/handle/*";
740
+ const Y = D.HolderContainer, pr = "/kos/insertion/insert/start", ur = "/kos/insertion/insert/complete", hr = "/kos/insertion/insert/update", gr = "/kos/insertion/remove", yr = "/kos/pumpEvent/replaceLine", Ir = "/kos/handle/*";
741
741
  let A = class {
742
742
  constructor(e, t, r) {
743
743
  o(this, "id");
@@ -769,11 +769,11 @@ let A = class {
769
769
  () => this.logger.debug("Received insertion event", JSON.stringify(e))
770
770
  ), (Array.isArray(e) ? e : [e]).forEach((r) => {
771
771
  g(() => {
772
- var n, a, c;
772
+ var a, n, c;
773
773
  const s = r.ingredientId, i = this.holders.getModel(r.path);
774
774
  i && (this.logger.info(
775
775
  `Received insertion event for holder ${i.path}`
776
- ), i.updateIngredient(s), i.slice.currentVolMl = (n = r.slice) == null ? void 0 : n.currentVolMl, i.slice.maxVolMl = (a = r.slice) == null ? void 0 : a.maxVolMl, (c = r == null ? void 0 : r.container) != null && c.enjoyByDate ? i.enjoyByDate = new Date(r.container.enjoyByDate) : i.enjoyByDate = void 0, r.pumps.forEach((l) => {
776
+ ), i.updateIngredient(s), i.slice.currentVolMl = (a = r.slice) == null ? void 0 : a.currentVolMl, i.slice.maxVolMl = (n = r.slice) == null ? void 0 : n.maxVolMl, (c = r == null ? void 0 : r.container) != null && c.enjoyByDate ? i.enjoyByDate = new Date(r.container.enjoyByDate) : i.enjoyByDate = void 0, r.pumps.forEach((l) => {
777
777
  g(() => {
778
778
  const p = i.pumps.getModel(l.path);
779
779
  p && (p.ingredientId = l.ingredientId, p.inserted = l.inserted, p.prevIngredientId = l.prevIngredientId);
@@ -789,7 +789,7 @@ Ie([
789
789
  ], A.prototype, "holders", 2);
790
790
  Ie([
791
791
  Q({
792
- topic: yr,
792
+ topic: Ir,
793
793
  websocket: !0,
794
794
  condition: (e, t) => t.holders.getModel(e.path) !== void 0
795
795
  })
@@ -797,11 +797,11 @@ Ie([
797
797
  Ie([
798
798
  Q({
799
799
  topic: [
800
- cr,
801
800
  pr,
802
801
  ur,
803
802
  hr,
804
- gr
803
+ gr,
804
+ yr
805
805
  ],
806
806
  websocket: !0
807
807
  })
@@ -817,57 +817,57 @@ const rt = {
817
817
  }
818
818
  },
819
819
  type: Y,
820
- predicate: v(Y),
821
- factory: b.Singleton.create(
820
+ predicate: b(Y),
821
+ factory: v.Singleton.create(
822
822
  Y
823
823
  )
824
- }, Ir = m.createLogger({ name: "board-utils" }), fr = async (e) => {
825
- const t = await T.executeDataMapperExtension({
824
+ }, fr = m.createLogger({ name: "board-utils" }), mr = async (e) => {
825
+ const t = await N.executeDataMapperExtension({
826
826
  extension: u.BoardMapper,
827
827
  data: e,
828
828
  contextData: {}
829
- }), { type: r, name: s, path: i, linked: n, instanceId: a, ...c } = e, l = { ...c, ...t }, p = {
829
+ }), { type: r, name: s, path: i, linked: a, instanceId: n, ...c } = e, l = { ...c, ...t }, p = {
830
830
  type: r,
831
831
  name: s,
832
832
  path: i,
833
- linked: n,
834
- instanceId: a,
833
+ linked: a,
834
+ instanceId: n,
835
835
  ...l
836
836
  }, y = et.factory(e.path)(p);
837
837
  return y.updateModel(p), y;
838
- }, mr = (e) => async (t) => {
839
- Ir.debug(`adding board ${t.name}`);
840
- const r = await fr(t);
838
+ }, Pr = (e) => async (t) => {
839
+ fr.debug(`adding board ${t.name}`);
840
+ const r = await mr(t);
841
841
  e.addModel(r);
842
842
  };
843
843
  var d = /* @__PURE__ */ ((e) => (e.IDLE = "IDLE", e.POURING = "POURING", e.POUR_STARTING = "POUR_STARTING", e.POUR_CANCELING = "POUR_CANCELING", e.POUR_CANCELED = "POUR_CANCELED", e.POUR_COMPLETE = "POUR_COMPLETE", e))(d || {});
844
- const { URL: Ee } = C("PUMP_SERVICE"), { postModel: Pr, getOne: vr } = S.build({
844
+ const { URL: Ee } = S("PUMP_SERVICE"), { postModel: br, getOne: vr } = C.build({
845
845
  basePath: `${Ee}/api/kos/holders`
846
846
  });
847
847
  m.createLogger({
848
848
  name: "pump-service",
849
849
  group: "Services"
850
850
  });
851
- const br = async ({
851
+ const _r = async ({
852
852
  intent: e,
853
853
  pumpId: t,
854
854
  tracker: r
855
855
  }) => {
856
- const s = `${Ee}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/${t}/${e}`, i = await Pr({ model: {}, urlOverride: s, tracker: r });
856
+ const s = `${Ee}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/${t}/${e}`, i = await br({ model: {}, urlOverride: s, tracker: r });
857
857
  return i != null && i.data && pe.initiateFuture(i.data), i;
858
- }, _r = async (e, t) => {
858
+ }, Mr = async (e, t) => {
859
859
  const r = `${Ee}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/${e}/${t}/volume`, s = await vr({ urlOverride: r });
860
860
  return s != null && s.data ? s.data : { volume: -1 };
861
861
  };
862
- var Mr = Object.defineProperty, Or = Object.getOwnPropertyDescriptor, we = (e, t, r, s) => {
863
- for (var i = s > 1 ? void 0 : s ? Or(t, r) : t, n = e.length - 1, a; n >= 0; n--)
864
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
865
- return s && i && Mr(t, r, i), i;
862
+ var Or = Object.defineProperty, Er = Object.getOwnPropertyDescriptor, we = (e, t, r, s) => {
863
+ for (var i = s > 1 ? void 0 : s ? Er(t, r) : t, a = e.length - 1, n; a >= 0; a--)
864
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
865
+ return s && i && Or(t, r, i), i;
866
866
  };
867
867
  const k = D.Pump;
868
868
  h[Me].register(
869
869
  "pump",
870
- ir
870
+ sr
871
871
  );
872
872
  let q = class {
873
873
  constructor(e, t) {
@@ -891,15 +891,15 @@ let q = class {
891
891
  inserted: r,
892
892
  holderPath: s,
893
893
  boardPath: i,
894
- nozzlePath: n,
895
- name: a,
894
+ nozzlePath: a,
895
+ name: n,
896
896
  path: c,
897
897
  childPump: l,
898
898
  virtual: p,
899
899
  prevIngredientId: y,
900
900
  ...U
901
901
  } = t;
902
- this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath = s, this.boardPath = i, this.nozzlePath = n, this.name = a, this.path = c, this.childPump = !!l, this.virtual = !!p, this.prevIngredientId = y, Object.assign(this, U), this.futureHandler = new Ge(this);
902
+ this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath = s, this.boardPath = i, this.nozzlePath = a, this.name = n, this.path = c, this.childPump = !!l, this.virtual = !!p, this.prevIngredientId = y, Object.assign(this, U), this.futureHandler = new Ge(this);
903
903
  }
904
904
  updateModel(e) {
905
905
  const {
@@ -907,12 +907,12 @@ let q = class {
907
907
  holderPath: r,
908
908
  boardPath: s,
909
909
  nozzlePath: i,
910
- childPump: n,
911
- name: a,
910
+ childPump: a,
911
+ name: n,
912
912
  path: c,
913
913
  ...l
914
914
  } = e;
915
- this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath = s, this.nozzlePath = i, this.childPump = this.childPump ? this.childPump : !!n, this.name = a, this.path = c, this.prevIngredientId = e.prevIngredientId, Object.assign(this, l);
915
+ this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath = s, this.nozzlePath = i, this.childPump = this.childPump ? this.childPump : !!a, this.name = n, this.path = c, this.prevIngredientId = e.prevIngredientId, Object.assign(this, l);
916
916
  }
917
917
  // -------------------LIFECYCLE----------------------------
918
918
  get troubles() {
@@ -953,7 +953,7 @@ let q = class {
953
953
  return this.futureHandler.future;
954
954
  }
955
955
  async resolveIntentVolume(e) {
956
- return await _r(this.path, e);
956
+ return await Mr(this.path, e);
957
957
  }
958
958
  async performIntent(e, t) {
959
959
  const r = typeof e == "string" ? e : e.intent;
@@ -963,7 +963,7 @@ let q = class {
963
963
  if (this.currentState === d.IDLE) {
964
964
  if (this.currentState = d.POUR_STARTING, !t)
965
965
  throw new Error("No tracker provided");
966
- const s = await br({
966
+ const s = await _r({
967
967
  tracker: t,
968
968
  intent: r,
969
969
  pumpId: this.path
@@ -996,9 +996,9 @@ const it = {
996
996
  }
997
997
  },
998
998
  type: k,
999
- predicate: v(k),
1000
- factory: b.Factory.create(k)
1001
- }, Er = m.createLogger({ name: "pump-utils" }), wr = (e, t) => {
999
+ predicate: b(k),
1000
+ factory: v.Factory.create(k)
1001
+ }, wr = m.createLogger({ name: "pump-utils" }), $r = (e, t) => {
1002
1002
  const r = (t.pumps ?? []).length > 1, s = {
1003
1003
  boardPath: t.boardPath,
1004
1004
  holderPath: t.holderPath,
@@ -1015,11 +1015,11 @@ const it = {
1015
1015
  return i.updateModel(s), i;
1016
1016
  }, st = (e) => (t) => (r) => (s) => {
1017
1017
  var c;
1018
- Er.debug(`adding pump ${s.name}`);
1019
- const i = wr(r.path, s);
1018
+ wr.debug(`adding pump ${s.name}`);
1019
+ const i = $r(r.path, s);
1020
1020
  e.addModel(i);
1021
- const n = i.holderPath, a = t.holders.getModel(n);
1022
- a == null || a.pumps.addModel(i), a != null && a.nozzlePaths.includes(r.path) || a == null || a.nozzlePaths.push(r.path), (c = s == null ? void 0 : s.pumps) == null || c.forEach((l) => {
1021
+ const a = i.holderPath, n = t.holders.getModel(a);
1022
+ n == null || n.pumps.addModel(i), n != null && n.nozzlePaths.includes(r.path) || n == null || n.nozzlePaths.push(r.path), (c = s == null ? void 0 : s.pumps) == null || c.forEach((l) => {
1023
1023
  const p = i.holderPath, y = {
1024
1024
  ...l,
1025
1025
  childPump: !0,
@@ -1029,12 +1029,12 @@ const it = {
1029
1029
  st(e)(t)(r)(y);
1030
1030
  });
1031
1031
  };
1032
- var $r = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, ee = (e, t, r, s) => {
1033
- for (var i = s > 1 ? void 0 : s ? Cr(t, r) : t, n = e.length - 1, a; n >= 0; n--)
1034
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
1035
- return s && i && $r(t, r, i), i;
1032
+ var Sr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, ee = (e, t, r, s) => {
1033
+ for (var i = s > 1 ? void 0 : s ? Cr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1034
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
1035
+ return s && i && Sr(t, r, i), i;
1036
1036
  };
1037
- const Z = "assembly-model", Sr = "assembly-data";
1037
+ const Z = "assembly-model", Rr = "assembly-data", Dr = "assembly-raw-data";
1038
1038
  let w = class {
1039
1039
  constructor(e, t, r) {
1040
1040
  o(this, "id");
@@ -1087,50 +1087,53 @@ let w = class {
1087
1087
  }
1088
1088
  async ready() {
1089
1089
  var e;
1090
- (e = this.troubleContainer) == null || e.troubles.increment();
1090
+ (e = this.troubleContainer) == null || e.troubles.increment(), h[gt].execute(
1091
+ u.AssemblyFeatureFlags,
1092
+ this
1093
+ );
1091
1094
  }
1092
1095
  async load(e) {
1093
1096
  this.logger.debug(`loading assembly ${this.id}`);
1094
1097
  const t = await Ze();
1095
1098
  if ((t == null ? void 0 : t.status) === 200) {
1096
- const r = await T.executeDataMapperExtension({
1099
+ const r = await N.executeDataMapperExtension({
1097
1100
  extension: u.AssemblyMapper,
1098
1101
  data: t.data,
1099
1102
  contextData: {}
1100
1103
  });
1101
- e.set(Sr, r), Object.assign(this, r), Object.entries(r).forEach(([s, i]) => {
1102
- gt(i) && (this.logger.debug(`adding child model ${s} from extension data`), this[yt][s] = !0);
1103
- });
1104
+ e.set(Rr, r), Object.assign(this, r), Object.entries(r).forEach(([s, i]) => {
1105
+ yt(i) && (this.logger.debug(`adding child model ${s} from extension data`), this[It][s] = !0);
1106
+ }), e.set(Dr, t.data);
1104
1107
  for await (const s of t.data.assemblies) {
1105
1108
  const {
1106
1109
  boards: i = [],
1107
- holders: n = {},
1108
- nozzles: a = [],
1110
+ holders: a = {},
1111
+ nozzles: n = [],
1109
1112
  core: c,
1110
1113
  name: l,
1111
1114
  path: p,
1112
1115
  ...y
1113
1116
  } = s;
1114
1117
  this.logger.debug(`adding assembly ${l}`), Object.keys(y).forEach((f) => {
1115
- It.enableFeature(f);
1118
+ ft.enableFeature(f);
1116
1119
  });
1117
1120
  for await (const f of i)
1118
- this.logger.debug(`adding board ${f.name}`), await mr(this.boardContainer)(f);
1119
- for await (const [f, N] of Object.entries(
1120
- n ?? {}
1121
+ this.logger.debug(`adding board ${f.name}`), await Pr(this.boardContainer)(f);
1122
+ for await (const [f, T] of Object.entries(
1123
+ a ?? {}
1121
1124
  ))
1122
- for await (const re of N) {
1125
+ for await (const re of T) {
1123
1126
  this.logger.debug(`adding holder ${re.name}`);
1124
- const Se = await Zt(f, re);
1125
- this.holderContainer.holders.addModel(Se);
1127
+ const Ce = await Xt(f, re);
1128
+ this.holderContainer.holders.addModel(Ce);
1126
1129
  }
1127
1130
  const U = st(this.pumpContainer)(
1128
1131
  this.holderContainer
1129
1132
  );
1130
- a.forEach((f) => {
1133
+ n.forEach((f) => {
1131
1134
  this._nozzlePaths.add(f.path);
1132
- const N = U(f);
1133
- f.pumps.forEach(N);
1135
+ const T = U(f);
1136
+ f.pumps.forEach(T);
1134
1137
  });
1135
1138
  }
1136
1139
  }
@@ -1153,7 +1156,7 @@ ee([
1153
1156
  w = ee([
1154
1157
  I(Z)
1155
1158
  ], w);
1156
- const nt = {
1159
+ const at = {
1157
1160
  registration: {
1158
1161
  [Z]: {
1159
1162
  class: w,
@@ -1161,16 +1164,16 @@ const nt = {
1161
1164
  }
1162
1165
  },
1163
1166
  type: Z,
1164
- predicate: v(Z),
1165
- factory: b.Singleton.create(Z)
1167
+ predicate: b(Z),
1168
+ factory: v.Singleton.create(Z)
1166
1169
  };
1167
- var Rr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, Nr = (e, t, r, s) => {
1168
- for (var i = s > 1 ? void 0 : s ? Dr(t, r) : t, n = e.length - 1, a; n >= 0; n--)
1169
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
1170
- return s && i && Rr(t, r, i), i;
1170
+ var Tr = Object.defineProperty, Nr = Object.getOwnPropertyDescriptor, zr = (e, t, r, s) => {
1171
+ for (var i = s > 1 ? void 0 : s ? Nr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1172
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
1173
+ return s && i && Tr(t, r, i), i;
1171
1174
  };
1172
- const J = D.Availability;
1173
- let be = class {
1175
+ const X = D.Availability;
1176
+ let ve = class {
1174
1177
  constructor(e, t, r) {
1175
1178
  o(this, "id");
1176
1179
  o(this, "data");
@@ -1196,25 +1199,25 @@ let be = class {
1196
1199
  // -------------------LIFECYCLE----------------------------
1197
1200
  // -------------------ENTITY----------------------------
1198
1201
  };
1199
- be = Nr([
1200
- ft(),
1201
- I(J)
1202
- ], be);
1202
+ ve = zr([
1203
+ mt(),
1204
+ I(X)
1205
+ ], ve);
1203
1206
  const _e = {
1204
1207
  registration: {
1205
- [J]: {
1206
- class: be,
1208
+ [X]: {
1209
+ class: ve,
1207
1210
  singleton: !1
1208
1211
  }
1209
1212
  },
1210
- type: J,
1211
- predicate: v(J),
1212
- factory: b.Factory.create(
1213
- J
1213
+ type: X,
1214
+ predicate: b(X),
1215
+ factory: v.Factory.create(
1216
+ X
1214
1217
  )
1215
- }, { URL: B } = C("NOZZLE_SERVICE"), { postModel: $e, deleteModel: Tr, getOne: zr } = S.build({
1218
+ }, { URL: B } = S("NOZZLE_SERVICE"), { postModel: $e, deleteModel: Lr, getOne: xr } = C.build({
1216
1219
  basePath: `${B}/api/nozzle`
1217
- }), Lr = async (e, t) => {
1220
+ }), Ar = async (e, t) => {
1218
1221
  const r = await $e({
1219
1222
  model: {},
1220
1223
  urlOverride: `${B}/api/ext/dispense/nozzle/${e}/pipeline/beverage/pour`,
@@ -1222,7 +1225,7 @@ const _e = {
1222
1225
  tracker: t
1223
1226
  });
1224
1227
  return r != null && r.data && pe.initiateFuture(r.data), r;
1225
- }, xr = async (e, t, r) => {
1228
+ }, Br = async (e, t, r) => {
1226
1229
  const s = await $e({
1227
1230
  model: {},
1228
1231
  urlOverride: `${B}/api/ext/dispense/nozzle/${t}/pipeline/beverage/fixed/${e}`,
@@ -1230,23 +1233,23 @@ const _e = {
1230
1233
  tracker: r
1231
1234
  });
1232
1235
  return s != null && s.data && pe.initiateFuture(s.data), s;
1233
- }, Ar = async (e) => await zr({
1236
+ }, Ur = async (e) => await xr({
1234
1237
  urlOverride: `${B}${e}/pipeline/beverage/availability`
1235
- }), Br = async (e, t) => await $e({
1238
+ }), Gr = async (e, t) => await $e({
1236
1239
  model: t,
1237
1240
  urlOverride: `${B}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
1238
- }), Ur = async (e) => await Tr({
1241
+ }), jr = async (e) => await Lr({
1239
1242
  id: e,
1240
1243
  urlOverride: `${B}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
1241
1244
  });
1242
- var Gr = Object.defineProperty, jr = Object.getOwnPropertyDescriptor, te = (e, t, r, s) => {
1243
- for (var i = s > 1 ? void 0 : s ? jr(t, r) : t, n = e.length - 1, a; n >= 0; n--)
1244
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
1245
- return s && i && Gr(t, r, i), i;
1245
+ var Fr = Object.defineProperty, Hr = Object.getOwnPropertyDescriptor, te = (e, t, r, s) => {
1246
+ for (var i = s > 1 ? void 0 : s ? Hr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1247
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
1248
+ return s && i && Fr(t, r, i), i;
1246
1249
  };
1247
- const X = D.Nozzle, Fr = mt(
1250
+ const J = D.Nozzle, Kr = Pt(
1248
1251
  "beverageTopicPrefix"
1249
- ), ie = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0, Te = "/kos/nozzle/pour/started", Hr = "/kos/nozzle/pour/progress", fe = "/kos/nozzle/pour/cancel";
1252
+ ), ie = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0, Ne = "/kos/nozzle/pour/started", Vr = "/kos/nozzle/pour/progress", fe = "/kos/nozzle/pour/cancel";
1250
1253
  let $ = class {
1251
1254
  constructor(e, t, r) {
1252
1255
  /** the unique identifier for this nozzle.*/
@@ -1263,7 +1266,7 @@ let $ = class {
1263
1266
  o(this, "beverageTopicPrefix");
1264
1267
  o(this, "topicPrefix");
1265
1268
  o(this, "urlPrefix");
1266
- 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 Pt(this), this._availabilityItems = new R({
1269
+ 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 bt(this), this._availabilityItems = new R({
1267
1270
  indexMap: {
1268
1271
  byGroup: "groupId",
1269
1272
  byParent: "parentId"
@@ -1355,7 +1358,7 @@ let $ = class {
1355
1358
  context: r
1356
1359
  }) {
1357
1360
  if (!e) {
1358
- const c = await Ur(this.name);
1361
+ const c = await jr(this.name);
1359
1362
  if ((c == null ? void 0 : c.status) !== 200)
1360
1363
  throw new Error("Failed to clear pourable");
1361
1364
  this._selectedBeverage = void 0;
@@ -1380,8 +1383,8 @@ let $ = class {
1380
1383
  (!s || Object.keys(s).length === 0) && (this.logger.info(
1381
1384
  `No selected pourable mapper defined, using the default payload ${i}`
1382
1385
  ), s = i);
1383
- const n = s ?? i, a = await Br(this.name, n);
1384
- if ((a == null ? void 0 : a.status) !== 200)
1386
+ const a = s ?? i, n = await Gr(this.name, a);
1387
+ if ((n == null ? void 0 : n.status) !== 200)
1385
1388
  throw new Error("Failed to select pourable");
1386
1389
  }
1387
1390
  /**
@@ -1434,7 +1437,7 @@ let $ = class {
1434
1437
  reason: e.reason,
1435
1438
  timeRemaining: e.timeRemaining
1436
1439
  };
1437
- _.publish(Hr, r), e.endState && g(() => {
1440
+ _.publish(Vr, r), e.endState && g(() => {
1438
1441
  this.currentState = d.IDLE;
1439
1442
  });
1440
1443
  }
@@ -1444,16 +1447,16 @@ let $ = class {
1444
1447
  if (this.currentState === d.IDLE) {
1445
1448
  if (this.updateIfCurrent(d.IDLE, d.POUR_STARTING), !e)
1446
1449
  throw new Error("No tracker provided");
1447
- const r = await Lr(this.name, e);
1450
+ const r = await Ar(this.name, e);
1448
1451
  this.updateIfCurrent(d.POUR_STARTING, d.POURING), E(this).forEach((i) => {
1449
- var n;
1450
- ie(i) && ((n = i.onPourStart) == null || n.call(i));
1452
+ var a;
1453
+ ie(i) && ((a = i.onPourStart) == null || a.call(i));
1451
1454
  });
1452
1455
  const s = {
1453
1456
  nozzleId: this.id,
1454
1457
  type: "free"
1455
1458
  };
1456
- if (_.publish(Te, s), (t = r == null ? void 0 : r.data) != null && t.endState) {
1459
+ if (_.publish(Ne, s), (t = r == null ? void 0 : r.data) != null && t.endState) {
1457
1460
  this.updateIfCurrent(d.POURING, d.IDLE);
1458
1461
  const i = {
1459
1462
  nozzleId: this.id
@@ -1473,23 +1476,23 @@ let $ = class {
1473
1476
  if (this.currentState === d.IDLE) {
1474
1477
  if (this.currentState = d.POUR_STARTING, !t)
1475
1478
  throw new Error("No tracker provided");
1476
- const s = await xr(e, this.name, t);
1479
+ const s = await Br(e, this.name, t);
1477
1480
  this.currentState === d.POUR_STARTING && g(() => {
1478
1481
  this.currentState = d.POURING;
1479
- }), E(this).forEach((n) => {
1480
- var a;
1481
- ie(n) && ((a = n.onPourStart) == null || a.call(n));
1482
+ }), E(this).forEach((a) => {
1483
+ var n;
1484
+ ie(a) && ((n = a.onPourStart) == null || n.call(a));
1482
1485
  });
1483
1486
  const i = {
1484
1487
  nozzleId: this.id,
1485
1488
  type: "fixed"
1486
1489
  };
1487
- if (_.publish(Te, i), (r = s == null ? void 0 : s.data) != null && r.endState) {
1490
+ if (_.publish(Ne, i), (r = s == null ? void 0 : s.data) != null && r.endState) {
1488
1491
  this.updateIfCurrent(d.POURING, d.IDLE);
1489
- const n = {
1492
+ const a = {
1490
1493
  nozzleId: this.id
1491
1494
  };
1492
- _.publish(fe, n);
1495
+ _.publish(fe, a);
1493
1496
  }
1494
1497
  return s;
1495
1498
  } else
@@ -1531,68 +1534,68 @@ let $ = class {
1531
1534
  async load(e) {
1532
1535
  var s, i;
1533
1536
  this.logger.debug(`loading nozzle ${this.id}`);
1534
- const t = await Ar(this.urlPrefix);
1537
+ const t = await Ur(this.urlPrefix);
1535
1538
  if ((t == null ? void 0 : t.status) !== 200)
1536
1539
  throw new Error("Failed to load nozzle availability");
1537
1540
  const r = await h.loader.executeLoader(
1538
1541
  u.AvailabilityLoader,
1539
1542
  {}
1540
1543
  );
1541
- e == null || e.set(u.AvailabilityLoader, r), e == null || e.set(Ce.type, this);
1542
- for (const n of Object.keys((s = t.data) == null ? void 0 : s.groups) || [])
1543
- for (const a of ((i = t.data) == null ? void 0 : i.groups[n]) || []) {
1544
+ e == null || e.set(u.AvailabilityLoader, r), e == null || e.set(Se.type, this);
1545
+ for (const a of Object.keys((s = t.data) == null ? void 0 : s.groups) || [])
1546
+ for (const n of ((i = t.data) == null ? void 0 : i.groups[a]) || []) {
1544
1547
  const c = await h.dataMapper.executeMapper(
1545
1548
  u.AvailabilityMapper,
1546
- { ...a, groupId: n },
1549
+ { ...n, groupId: a },
1547
1550
  r
1548
1551
  ), l = {
1549
- ...a,
1550
- note: a.note ?? void 0,
1552
+ ...n,
1553
+ note: n.note ?? void 0,
1551
1554
  kosParentId: this.id,
1552
- rawId: a.id,
1553
- groupId: n,
1555
+ rawId: n.id,
1556
+ groupId: a,
1554
1557
  data: c,
1555
- properties: a.properties || {}
1558
+ properties: n.properties || {}
1556
1559
  }, p = _e.factory(
1557
- `${this.id}-${n}-${a.id}`
1560
+ `${this.id}-${a}-${n.id}`
1558
1561
  )(l);
1559
1562
  this._availabilityItems.addModel(p);
1560
1563
  }
1561
1564
  this.updateGroupMembers();
1562
1565
  }
1563
1566
  async updateAvailability(e) {
1564
- const t = bt.getContext(this.id), r = (t == null ? void 0 : t.get(u.AvailabilityLoader)) || {};
1567
+ const t = _t.getContext(this.id), r = (t == null ? void 0 : t.get(u.AvailabilityLoader)) || {};
1565
1568
  if (e.rebuild)
1566
1569
  for (const s of Object.keys(e == null ? void 0 : e.groups) || []) {
1567
1570
  this._availabilityItems.getIndexByKey("group", s).filter(
1568
- (n) => !e.groups[s].find(
1569
- (a) => `${this.id}-${s}-${a.id}` === n.id
1571
+ (a) => !e.groups[s].find(
1572
+ (n) => `${this.id}-${s}-${n.id}` === a.id
1570
1573
  )
1571
- ).forEach((n) => {
1572
- this._availabilityItems.removeModel(n.id), _t(n);
1574
+ ).forEach((a) => {
1575
+ this._availabilityItems.removeModel(a.id), Mt(a);
1573
1576
  });
1574
- for (const n of (e == null ? void 0 : e.groups[s]) || []) {
1575
- const a = await h.dataMapper.executeMapper(
1577
+ for (const a of (e == null ? void 0 : e.groups[s]) || []) {
1578
+ const n = await h.dataMapper.executeMapper(
1576
1579
  u.AvailabilityMapper,
1577
- { ...n, groupId: s },
1580
+ { ...a, groupId: s },
1578
1581
  r
1579
1582
  ), c = {
1580
- ...n,
1581
- note: n.note ?? void 0,
1583
+ ...a,
1584
+ note: a.note ?? void 0,
1582
1585
  kosParentId: this.id,
1583
1586
  groupId: s,
1584
- rawId: n.id,
1585
- data: a,
1586
- taggedIds: n.taggedIds,
1587
- properties: n.properties || {}
1587
+ rawId: a.id,
1588
+ data: n,
1589
+ taggedIds: a.taggedIds,
1590
+ properties: a.properties || {}
1588
1591
  }, l = this._availabilityItems.getModel(
1589
- `${this.id}-${s}-${n.id}`
1592
+ `${this.id}-${s}-${a.id}`
1590
1593
  );
1591
1594
  if (l)
1592
1595
  l.updateModel(c);
1593
1596
  else {
1594
1597
  const p = _e.factory(
1595
- `${this.id}-${s}-${n.id}`
1598
+ `${this.id}-${s}-${a.id}`
1596
1599
  )(c);
1597
1600
  this._availabilityItems.addModel(p);
1598
1601
  }
@@ -1601,24 +1604,24 @@ let $ = class {
1601
1604
  else
1602
1605
  for (const s of Object.keys(e == null ? void 0 : e.groups) || [])
1603
1606
  for (const i of (e == null ? void 0 : e.groups[s]) || []) {
1604
- const n = await h.dataMapper.executeMapper(
1607
+ const a = await h.dataMapper.executeMapper(
1605
1608
  u.AvailabilityMapper,
1606
1609
  { ...i, groupId: s },
1607
1610
  r
1608
- ), a = {
1611
+ ), n = {
1609
1612
  ...i,
1610
1613
  note: i.note ?? void 0,
1611
1614
  kosParentId: this.id,
1612
1615
  groupId: s,
1613
1616
  rawId: i.id,
1614
- data: n,
1617
+ data: a,
1615
1618
  type: i.type,
1616
1619
  taggedIds: i.taggedIds,
1617
1620
  properties: i.properties || {}
1618
1621
  }, c = this._availabilityItems.getModel(
1619
1622
  `${this.id}-${s}-${i.id}`
1620
1623
  );
1621
- c && c.updateModel(a);
1624
+ c && c.updateModel(n);
1622
1625
  }
1623
1626
  this.updateGroupMembers();
1624
1627
  }
@@ -1635,28 +1638,28 @@ te([
1635
1638
  ], $.prototype, "fixedPour", 1);
1636
1639
  te([
1637
1640
  Q({
1638
- topic: `${Fr}/availability`,
1641
+ topic: `${Kr}/availability`,
1639
1642
  websocket: !0
1640
1643
  })
1641
1644
  ], $.prototype, "updateAvailability", 1);
1642
1645
  $ = te([
1643
- I(X)
1646
+ I(J)
1644
1647
  ], $);
1645
- const Ce = {
1648
+ const Se = {
1646
1649
  registration: {
1647
- [X]: {
1650
+ [J]: {
1648
1651
  class: $,
1649
1652
  singleton: !1
1650
1653
  }
1651
1654
  },
1652
- type: X,
1653
- predicate: v(X),
1654
- factory: b.Factory.create(X)
1655
+ type: J,
1656
+ predicate: b(J),
1657
+ factory: v.Factory.create(J)
1655
1658
  };
1656
- var Kr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, at = (e, t, r, s) => {
1657
- for (var i = s > 1 ? void 0 : s ? Vr(t, r) : t, n = e.length - 1, a; n >= 0; n--)
1658
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
1659
- return s && i && Kr(t, r, i), i;
1659
+ var Yr = Object.defineProperty, kr = Object.getOwnPropertyDescriptor, nt = (e, t, r, s) => {
1660
+ for (var i = s > 1 ? void 0 : s ? kr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1661
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
1662
+ return s && i && Yr(t, r, i), i;
1660
1663
  };
1661
1664
  const ot = "device-assembly-model";
1662
1665
  let de = class {
@@ -1680,31 +1683,31 @@ let de = class {
1680
1683
  this.logger.debug(`loading device-assembly ${this.id}`);
1681
1684
  const e = await Ze();
1682
1685
  (e == null ? void 0 : e.status) === 200 && e.data.assemblies.map((r) => r.nozzles ?? []).flat().forEach((r) => {
1683
- var a;
1684
- const s = r.path, i = ((a = r.pipelines.find((c) => c.name === "beverage")) == null ? void 0 : a.topicPrefix) || "", n = Ce.factory(s)({
1686
+ var n;
1687
+ const s = r.path, i = ((n = r.pipelines.find((c) => c.name === "beverage")) == null ? void 0 : n.topicPrefix) || "", a = Se.factory(s)({
1685
1688
  path: r.path,
1686
1689
  name: r.name,
1687
1690
  urlPrefix: r.urlPrefix,
1688
1691
  topicPrefix: r.topicPrefix,
1689
1692
  beverageTopicPrefix: i
1690
1693
  });
1691
- this.deviceNozzles.addModel(n);
1694
+ this.deviceNozzles.addModel(a);
1692
1695
  });
1693
1696
  }
1694
1697
  };
1695
- at([
1698
+ nt([
1696
1699
  M
1697
1700
  ], de.prototype, "deviceNozzles", 2);
1698
- de = at([
1701
+ de = nt([
1699
1702
  I(ot)
1700
1703
  ], de);
1701
- const Yr = new Mt({
1704
+ const Zr = new Ot({
1702
1705
  class: de,
1703
1706
  type: ot
1704
- }), { URL: dt } = C("GENERIC_POUR_SERVICE"), { postModel: kr } = S.build({
1707
+ }), { URL: dt } = S("GENERIC_POUR_SERVICE"), { postModel: Xr } = C.build({
1705
1708
  basePath: `${dt}/api/nozzle`
1706
- }), Zr = async (e, t) => {
1707
- const r = await kr({
1709
+ }), Jr = async (e, t) => {
1710
+ const r = await Xr({
1708
1711
  model: {},
1709
1712
  urlOverride: `${dt}${e}`,
1710
1713
  ordered: !0,
@@ -1712,12 +1715,12 @@ const Yr = new Mt({
1712
1715
  });
1713
1716
  return r != null && r.data && pe.initiateFuture(r.data), r;
1714
1717
  };
1715
- var Jr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, lt = (e, t, r, s) => {
1716
- for (var i = s > 1 ? void 0 : s ? Xr(t, r) : t, n = e.length - 1, a; n >= 0; n--)
1717
- (a = e[n]) && (i = (s ? a(t, r, i) : a(i)) || i);
1718
- return s && i && Jr(t, r, i), i;
1718
+ var qr = Object.defineProperty, Wr = Object.getOwnPropertyDescriptor, lt = (e, t, r, s) => {
1719
+ for (var i = s > 1 ? void 0 : s ? Wr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1720
+ (n = e[a]) && (i = (s ? n(t, r, i) : n(i)) || i);
1721
+ return s && i && qr(t, r, i), i;
1719
1722
  };
1720
- const ct = "generic-pour-model", qr = "/kos/generic/pour/started", Wr = "/kos/generic/pour/progress", ze = "/kos/generic/pour/cancel", me = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0;
1723
+ const ct = "generic-pour-model", Qr = "/kos/generic/pour/started", ei = "/kos/generic/pour/progress", ze = "/kos/generic/pour/cancel", me = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0;
1721
1724
  let le = class {
1722
1725
  constructor(e, t, r) {
1723
1726
  o(this, "id");
@@ -1738,16 +1741,16 @@ let le = class {
1738
1741
  if (this.currentState === d.IDLE) {
1739
1742
  if (this.updateIfCurrent(d.IDLE, d.POUR_STARTING), !e)
1740
1743
  throw new Error("No tracker provided");
1741
- const r = await Zr(this.servicePath, e);
1744
+ const r = await Jr(this.servicePath, e);
1742
1745
  this.updateIfCurrent(d.POUR_STARTING, d.POURING), E(this).forEach((i) => {
1743
- var n;
1744
- me(i) && ((n = i.onPourStart) == null || n.call(i));
1746
+ var a;
1747
+ me(i) && ((a = i.onPourStart) == null || a.call(i));
1745
1748
  });
1746
1749
  const s = {
1747
1750
  pourTarget: this.id,
1748
1751
  type: this.pourType
1749
1752
  };
1750
- if (_.publish(qr, s), (t = r == null ? void 0 : r.data) != null && t.endState) {
1753
+ if (_.publish(Qr, s), (t = r == null ? void 0 : r.data) != null && t.endState) {
1751
1754
  this.updateIfCurrent(d.POURING, d.IDLE);
1752
1755
  const i = {
1753
1756
  pourTarget: this.id
@@ -1823,7 +1826,7 @@ let le = class {
1823
1826
  reason: e.reason,
1824
1827
  timeRemaining: e.timeRemaining
1825
1828
  };
1826
- _.publish(Wr, t), e.endState && g(() => {
1829
+ _.publish(ei, t), e.endState && g(() => {
1827
1830
  this.currentState = d.IDLE;
1828
1831
  });
1829
1832
  }
@@ -1841,7 +1844,7 @@ lt([
1841
1844
  le = lt([
1842
1845
  I(ct)
1843
1846
  ], le);
1844
- const oi = new Ot({
1847
+ const li = new Et({
1845
1848
  class: le,
1846
1849
  type: ct
1847
1850
  }), Le = {
@@ -1849,26 +1852,26 @@ const oi = new Ot({
1849
1852
  ...je.registration,
1850
1853
  ...rt.registration,
1851
1854
  ...ke.registration,
1852
- ...Ce.registration,
1855
+ ...Se.registration,
1853
1856
  ...it.registration,
1854
1857
  ...Oe.registration,
1855
1858
  ..._e.registration,
1856
- ...nt.registration,
1859
+ ...at.registration,
1857
1860
  ...tt.registration
1858
- }, Qr = (e) => () => (wt(e)(), Yr.register(), Object.keys(Le).forEach((t) => {
1861
+ }, ti = (e) => () => ($t(e)(), Zr.register(), Object.keys(Le).forEach((t) => {
1859
1862
  const r = Le[t];
1860
- $t(e)(t, r);
1863
+ St(e)(t, r);
1861
1864
  }), h[W].register(
1862
1865
  "FirmwareUpdateInProgressTrouble",
1863
1866
  async (t) => {
1864
1867
  var r;
1865
1868
  if ((r = t.data) != null && r.deviceId) {
1866
1869
  const { model: s } = z(
1867
- nt.type
1870
+ at.type
1868
1871
  );
1869
1872
  if (s) {
1870
1873
  const i = s.boards.find(
1871
- (n) => n.id === t.data.deviceId
1874
+ (a) => a.id === t.data.deviceId
1872
1875
  ) ? z(t.data.deviceId).model : void 0;
1873
1876
  return {
1874
1877
  devices: i ? i.name : ""
@@ -1883,57 +1886,59 @@ const oi = new Ot({
1883
1886
  companion: O.companion.register(e),
1884
1887
  legacy: O.model.registerLegacyModel(e)
1885
1888
  }), P = {
1886
- ...Et
1889
+ ...wt
1887
1890
  };
1888
1891
  P.dispense = {
1889
- models: Qr(P)
1892
+ models: ti(P)
1890
1893
  };
1891
1894
  P.preload = O.model.preloadModel(P);
1892
1895
  P.model = O.model.register(P);
1893
1896
  P.companion = O.companion.register(P);
1894
1897
  P.legacy = O.model.registerLegacyModel(P);
1895
- const di = P;
1898
+ const ci = P;
1896
1899
  export {
1897
- nt as A,
1900
+ at as A,
1898
1901
  x as B,
1899
- xr as C,
1902
+ Rr as C,
1900
1903
  D,
1901
1904
  u as E,
1902
- Lr as F,
1903
- oi as G,
1905
+ Ur as F,
1906
+ li as G,
1904
1907
  ke as H,
1905
1908
  je as I,
1906
1909
  Br as J,
1907
- di as K,
1908
- Zr as L,
1909
- Ce as N,
1910
+ ci as K,
1911
+ Ar as L,
1912
+ Gr as M,
1913
+ Se as N,
1914
+ Jr as O,
1910
1915
  it as P,
1911
- Je as T,
1912
- _e as a,
1913
- Xe as b,
1914
- tt as c,
1915
- et as d,
1916
- Yr as e,
1917
- rt as f,
1918
- Ke as g,
1919
- Oe as h,
1920
- We as i,
1921
- d as j,
1916
+ Xe as T,
1917
+ Dr as a,
1918
+ _e as b,
1919
+ Je as c,
1920
+ tt as d,
1921
+ et as e,
1922
+ Zr as f,
1923
+ rt as g,
1924
+ Ke as h,
1925
+ Oe as i,
1926
+ We as j,
1922
1927
  Le as k,
1923
- Nt as l,
1924
- ni as m,
1925
- Ut as n,
1926
- ai as o,
1927
- si as p,
1928
- ii as q,
1929
- Qr as r,
1930
- jt as s,
1931
- Kt as t,
1932
- Gt as u,
1933
- Ze as v,
1934
- _r as w,
1935
- br as x,
1936
- Ur as y,
1937
- Ar as z
1928
+ d as l,
1929
+ Nt as m,
1930
+ oi as n,
1931
+ Gt as o,
1932
+ di as p,
1933
+ ni as q,
1934
+ ti as r,
1935
+ ai as s,
1936
+ Ft as t,
1937
+ Vt as u,
1938
+ jt as v,
1939
+ Ze as w,
1940
+ Mr as x,
1941
+ _r as y,
1942
+ jr as z
1938
1943
  };
1939
- //# sourceMappingURL=dispense-registration-manager-CKFF29mO.js.map
1944
+ //# sourceMappingURL=dispense-registration-manager-eOOE05xT.js.map