@kosdev-code/kos-ddk-models 2.0.0 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.mjs CHANGED
@@ -1,38 +1,38 @@
1
- var Mr = Object.defineProperty;
2
- var Sr = (e, t, r) => t in e ? Mr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
- var i = (e, t, r) => (Sr(e, typeof t != "symbol" ? t + "" : t, r), r);
4
- import { resolveServiceUrl as h, ServiceFactory as f, KosLog as p, kosTopicHandler as Me, kosModel as l, kosAction as y, isKosModel as c, Kos as d, createPropKey as wr, kosStateProp as Er, KosModelRegistrationFactory as Ye, kosDependency as g, KosModelContainer as Ge, resolveContainerDeltas as st, kosChild as Se, Device as Cr, kosConfigProperty as u, kosFuture as _, kosModelEffect as gt, MultipleFutureHandler as Lr, FutureEndState as b, TroubleServices as we, Troubles as it, SingletonKosModelRegistrationFactory as le, FetchError as qe, FutureManager as C, FutureHandler as ce, getKosCompanionModel as ht, StorageDeviceContainer as Dr, KosDataContainer as kr, TroubleContainer as Qe, troubleByTypeReducer as Ir, registerExtensionPoint as Rr, ExtensionManager as Ee, kosConfigBean as Fr, ObservableData as Ar, kosAutoEffect as xr } from "@kosdev-code/kos-ui-sdk";
5
- import { AGITATION_REQUIRED_TROUBLE as ft, CartridgeAgitatorEvents as mt } from "@kosdev-code/kos-freestyle-sdk";
6
- import { Assembly as Ce, HolderContainer as jr, IngredientContainer as Ur } from "@kosdev-code/kos-dispense-sdk";
7
- const nt = "PurgeTrouble", Vr = "PrimeTrouble", { URL: Xe } = h("AUTH_SERVICE"), { getOne: Hr, postModel: Wr } = f.build({
8
- basePath: `${Xe}/api/auth`
9
- }), yt = p.createLogger({ name: "auth-service", group: "Services" }), bt = async () => (yt.debug("sending GET for auth"), await Hr({
10
- urlOverride: `${Xe}/api/app/kosdev.ddk/auth/role`
11
- })), vt = async (e) => (yt.debug("sending POST for auth"), await Wr({
12
- urlOverride: `${Xe}/api/app/kosdev.ddk/auth/pincode/${e}`,
1
+ var Fr = Object.defineProperty;
2
+ var xr = (e, t, r) => t in e ? Fr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
3
+ var s = (e, t, r) => (xr(e, typeof t != "symbol" ? t + "" : t, r), r);
4
+ import { resolveServiceUrl as g, ServiceFactory as h, KosLog as p, kosTopicHandler as we, kosModel as l, kosAction as v, isKosModel as c, Kos as u, createPropKey as Ar, kosStateProp as jr, KosModelRegistrationFactory as Ee, kosDependency as f, KosModelContainer as Ze, resolveContainerDeltas as ct, kosChild as Le, Device as Ur, kosConfigProperty as d, kosFuture as b, kosModelEffect as bt, MultipleFutureHandler as Vr, FutureEndState as y, TroubleServices as De, Troubles as ut, SingletonKosModelRegistrationFactory as de, FetchError as et, FutureManager as $, FutureHandler as A, getKosCompanionModel as vt, StorageDeviceContainer as Hr, KosDataContainer as Wr, TroubleContainer as tt, troubleByTypeReducer as zr, registerExtensionPoint as Nr, ExtensionManager as Re, kosConfigBean as Br, ObservableData as Kr, kosAutoEffect as Yr } from "@kosdev-code/kos-ui-sdk";
5
+ import { AGITATION_REQUIRED_TROUBLE as _t, CartridgeAgitatorEvents as $t } from "@kosdev-code/kos-freestyle-sdk";
6
+ import { Assembly as Ie, HolderContainer as qr, IngredientContainer as Gr } from "@kosdev-code/kos-dispense-sdk";
7
+ const dt = "PurgeTrouble", Qr = "PrimeTrouble", { URL: rt } = g("AUTH_SERVICE"), { getOne: Xr, postModel: Jr } = h.build({
8
+ basePath: `${rt}/api/auth`
9
+ }), Pt = p.createLogger({ name: "auth-service", group: "Services" }), Tt = async () => (Pt.debug("sending GET for auth"), await Xr({
10
+ urlOverride: `${rt}/api/app/kosdev.ddk/auth/role`
11
+ })), Ot = async (e) => (Pt.debug("sending POST for auth"), await Jr({
12
+ urlOverride: `${rt}/api/app/kosdev.ddk/auth/pincode/${e}`,
13
13
  model: {}
14
- })), gi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
14
+ })), Ms = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
15
15
  __proto__: null,
16
- getCurrentRole: bt,
17
- sendPinCode: vt
16
+ getCurrentRole: Tt,
17
+ sendPinCode: Ot
18
18
  }, Symbol.toStringTag, { value: "Module" }));
19
- var Nr = Object.defineProperty, zr = Object.getOwnPropertyDescriptor, _t = (e, t, r, s) => {
20
- for (var o = s > 1 ? void 0 : s ? zr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
21
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
22
- return s && o && Nr(t, r, o), o;
19
+ var Zr = Object.defineProperty, eo = Object.getOwnPropertyDescriptor, Mt = (e, t, r, i) => {
20
+ for (var o = i > 1 ? void 0 : i ? eo(t, r) : t, a = e.length - 1, n; a >= 0; a--)
21
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
22
+ return i && o && Zr(t, r, o), o;
23
23
  };
24
- const V = "auth-model", at = (e) => e.toLowerCase();
25
- let fe = class {
24
+ const z = "auth-model", pt = (e) => e.toLowerCase();
25
+ let be = class {
26
26
  constructor(e, t, r) {
27
- i(this, "id");
28
- i(this, "logger");
29
- i(this, "currentRole");
27
+ s(this, "id");
28
+ s(this, "logger");
29
+ s(this, "currentRole");
30
30
  this.id = e, this.logger = r.logger, this.currentRole = "crew";
31
31
  }
32
32
  async authorize(e) {
33
33
  if (!e)
34
34
  return !1;
35
- const t = await vt(e);
35
+ const t = await Ot(e);
36
36
  return (t == null ? void 0 : t.status) === 200 ? t.data : !1;
37
37
  }
38
38
  // -------------------LIFECYCLE----------------------------
@@ -41,50 +41,50 @@ let fe = class {
41
41
  }
42
42
  async load() {
43
43
  this.logger.debug(`loading auth ${this.id}`);
44
- const e = await bt();
45
- (e == null ? void 0 : e.status) === 200 && (this.logger.debug(`response ${e.data}`), y(() => {
46
- this.currentRole = at(e.data);
44
+ const e = await Tt();
45
+ (e == null ? void 0 : e.status) === 200 && (this.logger.debug(`response ${e.data}`), v(() => {
46
+ this.currentRole = pt(e.data);
47
47
  }));
48
48
  }
49
49
  handleRoleChange(e) {
50
- this.currentRole = at(e);
50
+ this.currentRole = pt(e);
51
51
  }
52
52
  forceRole(e) {
53
53
  this.currentRole = e;
54
54
  }
55
55
  };
56
- _t([
57
- Me({
56
+ Mt([
57
+ we({
58
58
  topic: "/app/kosdev.ddk/auth/role",
59
59
  websocket: !0
60
60
  })
61
- ], fe.prototype, "handleRoleChange", 1);
62
- fe = _t([
63
- l(V)
64
- ], fe);
65
- const Je = {
61
+ ], be.prototype, "handleRoleChange", 1);
62
+ be = Mt([
63
+ l(z)
64
+ ], be);
65
+ const ot = {
66
66
  registration: {
67
- [V]: {
68
- class: fe,
67
+ [z]: {
68
+ class: be,
69
69
  singleton: !1
70
70
  }
71
71
  },
72
- type: V,
73
- predicate: c(V),
74
- factory: d.Factory.create(V)
72
+ type: z,
73
+ predicate: c(z),
74
+ factory: u.Factory.create(z)
75
75
  };
76
- var Br = Object.defineProperty, Kr = Object.getOwnPropertyDescriptor, $t = (e, t, r, s) => {
77
- for (var o = s > 1 ? void 0 : s ? Kr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
78
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
79
- return s && o && Br(t, r, o), o;
76
+ var to = Object.defineProperty, ro = Object.getOwnPropertyDescriptor, St = (e, t, r, i) => {
77
+ for (var o = i > 1 ? void 0 : i ? ro(t, r) : t, a = e.length - 1, n; a >= 0; a--)
78
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
79
+ return i && o && to(t, r, o), o;
80
80
  };
81
- const Tt = "door-model", Yr = wr("doorPath");
82
- let me = class {
81
+ const Ct = "door-model", oo = Ar("doorPath");
82
+ let ve = class {
83
83
  constructor(e, t, r) {
84
- i(this, "id");
85
- i(this, "logger");
86
- i(this, "doorPath");
87
- i(this, "open");
84
+ s(this, "id");
85
+ s(this, "logger");
86
+ s(this, "doorPath");
87
+ s(this, "open");
88
88
  this.id = e, this.logger = r.logger, this.doorPath = t.doorPath;
89
89
  }
90
90
  get currentState() {
@@ -94,45 +94,45 @@ let me = class {
94
94
  return this.open.value === void 0 ? !0 : this.open.value;
95
95
  }
96
96
  };
97
- $t([
98
- Er({ path: Yr, attribute: "state" })
99
- ], me.prototype, "open", 2);
100
- me = $t([
101
- l(Tt)
102
- ], me);
103
- const Gr = new Ye({
104
- class: me,
105
- type: Tt
106
- }), { URL: Ze } = h("SETUP-STEP_SERVICE"), { getAll: qr, postModel: Qr } = f.build({
107
- basePath: `${Ze}/api/setup-step`
108
- }), Pt = p.createLogger({
97
+ St([
98
+ jr({ path: oo, attribute: "state" })
99
+ ], ve.prototype, "open", 2);
100
+ ve = St([
101
+ l(Ct)
102
+ ], ve);
103
+ const io = new Ee({
104
+ class: ve,
105
+ type: Ct
106
+ }), { URL: it } = g("SETUP-STEP_SERVICE"), { getAll: so, postModel: no } = h.build({
107
+ basePath: `${it}/api/setup-step`
108
+ }), wt = p.createLogger({
109
109
  name: "setup-step-service",
110
110
  group: "Services"
111
- }), Ot = async () => (Pt.debug("sending GET for setup-step"), await qr({
112
- urlOverride: `${Ze}/api/app/kosdev.ddk/setup/steps`
113
- })), Mt = async (e) => (Pt.debug("sending POST for setup-step"), await Qr({
114
- urlOverride: `${Ze}/api/app/kosdev.ddk/setup/complete/${e}`,
111
+ }), Et = async () => (wt.debug("sending GET for setup-step"), await so({
112
+ urlOverride: `${it}/api/app/kosdev.ddk/setup/steps`
113
+ })), Lt = async (e) => (wt.debug("sending POST for setup-step"), await no({
114
+ urlOverride: `${it}/api/app/kosdev.ddk/setup/complete/${e}`,
115
115
  model: {}
116
- })), hi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
116
+ })), Ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
117
117
  __proto__: null,
118
- getSetupSteps: Ot,
119
- markStepComplete: Mt
118
+ getSetupSteps: Et,
119
+ markStepComplete: Lt
120
120
  }, Symbol.toStringTag, { value: "Module" }));
121
- var Xr = Object.defineProperty, Jr = Object.getOwnPropertyDescriptor, Zr = (e, t, r, s) => {
122
- for (var o = s > 1 ? void 0 : s ? Jr(t, r) : t, a = e.length - 1, n; a >= 0; a--)
123
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
124
- return s && o && Xr(t, r, o), o;
121
+ var ao = Object.defineProperty, lo = Object.getOwnPropertyDescriptor, co = (e, t, r, i) => {
122
+ for (var o = i > 1 ? void 0 : i ? lo(t, r) : t, a = e.length - 1, n; a >= 0; a--)
123
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
124
+ return i && o && ao(t, r, o), o;
125
125
  };
126
- const H = "setup-step-model";
127
- let je = class {
126
+ const N = "setup-step-model";
127
+ let Ne = class {
128
128
  constructor(e, t, r) {
129
- i(this, "id");
130
- i(this, "idx");
131
- i(this, "name");
132
- i(this, "complete");
133
- i(this, "preStep");
134
- i(this, "exclusive");
135
- i(this, "logger");
129
+ s(this, "id");
130
+ s(this, "idx");
131
+ s(this, "name");
132
+ s(this, "complete");
133
+ s(this, "preStep");
134
+ s(this, "exclusive");
135
+ s(this, "logger");
136
136
  this.id = e, this.idx = t.idx, this.logger = r.logger, this.name = t.name, this.complete = t.complete, this.preStep = t.preStep, this.exclusive = t.exclusive;
137
137
  }
138
138
  updateModel(e) {
@@ -145,8 +145,8 @@ let je = class {
145
145
  return `setup.${this.name}.body`;
146
146
  }
147
147
  async completeStep() {
148
- const e = await Mt(this.name);
149
- (e == null ? void 0 : e.status) === 200 && y(() => {
148
+ const e = await Lt(this.name);
149
+ (e == null ? void 0 : e.status) === 200 && v(() => {
150
150
  this.complete = !0;
151
151
  });
152
152
  }
@@ -158,45 +158,45 @@ let je = class {
158
158
  this.logger.debug(`loading setup-step ${this.id}`);
159
159
  }
160
160
  };
161
- je = Zr([
162
- l(H)
163
- ], je);
164
- const St = {
161
+ Ne = co([
162
+ l(N)
163
+ ], Ne);
164
+ const Dt = {
165
165
  registration: {
166
- [H]: {
167
- class: je,
166
+ [N]: {
167
+ class: Ne,
168
168
  singleton: !1
169
169
  }
170
170
  },
171
- type: H,
172
- predicate: c(H),
173
- factory: d.Factory.create(H)
171
+ type: N,
172
+ predicate: c(N),
173
+ factory: u.Factory.create(N)
174
174
  };
175
- var eo = Object.defineProperty, to = Object.getOwnPropertyDescriptor, Le = (e, t, r, s) => {
176
- for (var o = s > 1 ? void 0 : s ? to(t, r) : t, a = e.length - 1, n; a >= 0; a--)
177
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
178
- return s && o && eo(t, r, o), o;
175
+ var uo = Object.defineProperty, po = Object.getOwnPropertyDescriptor, ke = (e, t, r, i) => {
176
+ for (var o = i > 1 ? void 0 : i ? po(t, r) : t, a = e.length - 1, n; a >= 0; a--)
177
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
178
+ return i && o && uo(t, r, o), o;
179
179
  };
180
- const W = "setup-step-container-model";
181
- function lt(e) {
180
+ const B = "setup-step-container-model";
181
+ function gt(e) {
182
182
  return (t) => {
183
- const r = St.factory(t.id)(t);
183
+ const r = Dt.factory(t.id)(t);
184
184
  r.updateModel(t), e.addModel(r);
185
185
  };
186
186
  }
187
- function ct(e) {
187
+ function ht(e) {
188
188
  return (t) => {
189
189
  e.removeModel(t);
190
190
  };
191
191
  }
192
- let L = class {
192
+ let D = class {
193
193
  constructor(e, t, r) {
194
- i(this, "id");
195
- i(this, "_currentStep");
196
- i(this, "logger");
197
- i(this, "models");
198
- i(this, "authModel");
199
- this.id = e, this.logger = r.logger, this._currentStep = void 0, this.models = new Ge({
194
+ s(this, "id");
195
+ s(this, "_currentStep");
196
+ s(this, "logger");
197
+ s(this, "models");
198
+ s(this, "authModel");
199
+ this.id = e, this.logger = r.logger, this._currentStep = void 0, this.models = new Ze({
200
200
  parentId: e,
201
201
  sortKey: "idx"
202
202
  });
@@ -247,112 +247,112 @@ let L = class {
247
247
  }
248
248
  async load() {
249
249
  this.logger.debug(`loading setup-step-container container ${this.id}`);
250
- const e = await Ot();
250
+ const e = await Et();
251
251
  if (e != null && e.data) {
252
252
  const t = e.data.map(
253
- (r, s) => ({
253
+ (r, i) => ({
254
254
  ...r,
255
- idx: s,
255
+ idx: i,
256
256
  id: `setup-${r.name}`
257
257
  })
258
258
  );
259
- st({
259
+ ct({
260
260
  container: this.models,
261
- onAddItem: lt(this),
262
- onRemoveItem: ct(this)
261
+ onAddItem: gt(this),
262
+ onRemoveItem: ht(this)
263
263
  })(t);
264
264
  }
265
265
  this.nextStep();
266
266
  }
267
267
  handleStepChanges(e) {
268
- const t = e.map((r, s) => ({
268
+ const t = e.map((r, i) => ({
269
269
  ...r,
270
- idx: s,
270
+ idx: i,
271
271
  id: `setup-${r.name}`
272
272
  }));
273
- st({
273
+ ct({
274
274
  container: this.models,
275
- onAddItem: lt(this),
276
- onRemoveItem: ct(this)
275
+ onAddItem: gt(this),
276
+ onRemoveItem: ht(this)
277
277
  })(t);
278
278
  }
279
279
  };
280
- Le([
281
- Se
282
- ], L.prototype, "models", 2);
283
- Le([
284
- g({ modelType: Je.type })
285
- ], L.prototype, "authModel", 2);
286
- Le([
287
- Me({
280
+ ke([
281
+ Le
282
+ ], D.prototype, "models", 2);
283
+ ke([
284
+ f({ modelType: ot.type })
285
+ ], D.prototype, "authModel", 2);
286
+ ke([
287
+ we({
288
288
  topic: "/app/kosdev.ddk/setup/steps",
289
289
  websocket: !0
290
290
  })
291
- ], L.prototype, "handleStepChanges", 1);
292
- L = Le([
293
- l(W)
294
- ], L);
295
- const wt = {
291
+ ], D.prototype, "handleStepChanges", 1);
292
+ D = ke([
293
+ l(B)
294
+ ], D);
295
+ const Rt = {
296
296
  registration: {
297
- [W]: {
298
- class: L,
297
+ [B]: {
298
+ class: D,
299
299
  singleton: !0
300
300
  },
301
- ...St.registration
301
+ ...Dt.registration
302
302
  },
303
- type: W,
304
- predicate: c(W),
305
- factory: d.Singleton.create(W)
306
- }, { URL: de } = h("AUTH_SERVICE"), { getOne: Et, getAll: Ct } = f.build({
307
- basePath: `${de}/api/app/kosdev.ddk/ncui/`
308
- }), De = p.createLogger({ name: "auth-service", group: "Services" }), ro = async () => {
309
- De.debug("sending GET for cuis");
310
- const e = await Ct({
311
- urlOverride: `${de}/api/app/kosdev.ddk/cui`
303
+ type: B,
304
+ predicate: c(B),
305
+ factory: u.Singleton.create(B)
306
+ }, { URL: pe } = g("AUTH_SERVICE"), { getOne: It, getAll: kt } = h.build({
307
+ basePath: `${pe}/api/app/kosdev.ddk/ncui/`
308
+ }), Fe = p.createLogger({ name: "auth-service", group: "Services" }), go = async () => {
309
+ Fe.debug("sending GET for cuis");
310
+ const e = await kt({
311
+ urlOverride: `${pe}/api/app/kosdev.ddk/cui`
312
312
  });
313
313
  if ((e == null ? void 0 : e.status) !== 200)
314
314
  throw new Error("Failed to retrieve cuis");
315
315
  return e.data;
316
- }, oo = async () => {
317
- De.debug("sending GET for navigation");
318
- const e = await Ct({
319
- urlOverride: `${de}/api/kos/descriptor/system:app/kondra.ncui.navigations`
316
+ }, ho = async () => {
317
+ Fe.debug("sending GET for navigation");
318
+ const e = await kt({
319
+ urlOverride: `${pe}/api/kos/descriptor/system:app/kondra.ncui.navigations`
320
320
  });
321
321
  if ((e == null ? void 0 : e.status) !== 200)
322
322
  throw new Error("Failed to retrieve navigation data");
323
323
  return e.data;
324
- }, so = async () => (De.debug("navigating to CUI"), await Et({
325
- urlOverride: `${de}/api/app/kosdev.ddk/cui/open`
326
- })), io = async () => (De.debug("navigating to NCUI"), await Et({
327
- urlOverride: `${de}/api/app/kosdev.ddk/ncui/open`
324
+ }, fo = async () => (Fe.debug("navigating to CUI"), await It({
325
+ urlOverride: `${pe}/api/app/kosdev.ddk/cui/open`
326
+ })), mo = async () => (Fe.debug("navigating to NCUI"), await It({
327
+ urlOverride: `${pe}/api/app/kosdev.ddk/ncui/open`
328
328
  }));
329
- var no = Object.defineProperty, ao = Object.getOwnPropertyDescriptor, S = (e, t, r, s) => {
330
- for (var o = s > 1 ? void 0 : s ? ao(t, r) : t, a = e.length - 1, n; a >= 0; a--)
331
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
332
- return s && o && no(t, r, o), o;
333
- };
334
- const N = "application-model", Lt = (e, t = "") => e.reduce((r, s) => {
335
- const o = t ? `${t}.${s.name}` : s.name;
336
- if (r[o] = { ...s, root: !t }, s.children) {
337
- const a = Lt(s.children, o);
329
+ var yo = Object.defineProperty, bo = Object.getOwnPropertyDescriptor, w = (e, t, r, i) => {
330
+ for (var o = i > 1 ? void 0 : i ? bo(t, r) : t, a = e.length - 1, n; a >= 0; a--)
331
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
332
+ return i && o && yo(t, r, o), o;
333
+ };
334
+ const K = "application-model", Ft = (e, t = "") => e.reduce((r, i) => {
335
+ const o = t ? `${t}.${i.name}` : i.name;
336
+ if (r[o] = { ...i, root: !t }, i.children) {
337
+ const a = Ft(i.children, o);
338
338
  Object.keys(a).forEach((n) => {
339
339
  r[n] = a[n];
340
340
  });
341
341
  }
342
342
  return r;
343
343
  }, {});
344
- let $ = class {
344
+ let T = class {
345
345
  constructor(e, t, r) {
346
- i(this, "id");
347
- i(this, "device");
348
- i(this, "authModel");
349
- i(this, "setupStepContainer");
350
- i(this, "door");
351
- i(this, "ncuiLanguage");
352
- i(this, "activeCui");
353
- i(this, "fallbackCui");
354
- i(this, "_cuis", []);
355
- i(this, "_navigationItems", []);
346
+ s(this, "id");
347
+ s(this, "device");
348
+ s(this, "authModel");
349
+ s(this, "setupStepContainer");
350
+ s(this, "door");
351
+ s(this, "ncuiLanguage");
352
+ s(this, "activeCui");
353
+ s(this, "fallbackCui");
354
+ s(this, "_cuis", []);
355
+ s(this, "_navigationItems", []);
356
356
  // @kosConfigProperty({
357
357
  // path: 'somewhere.enable.dial.animation',
358
358
  // attribute: 'enableDialAnimation',
@@ -368,9 +368,9 @@ let $ = class {
368
368
  // attribute: 'enableSidebarAnimation',
369
369
  // })
370
370
  // enableSidebarAnimation!: KosConfigProperty<boolean>;
371
- i(this, "languages");
372
- i(this, "logger");
373
- this.id = e, this.languages = [], this._cuis = [], this.logger = r.logger, this.door = Gr.instance("app:kosdev.ddk:service:door:door").options({
371
+ s(this, "languages");
372
+ s(this, "logger");
373
+ this.id = e, this.languages = [], this._cuis = [], this.logger = r.logger, this.door = io.instance("app:kosdev.ddk:service:door:door").options({
374
374
  doorPath: "app:kosdev.ddk:service:door:door"
375
375
  }).build();
376
376
  }
@@ -384,7 +384,7 @@ let $ = class {
384
384
  return this._cuis.reduce((e, t) => (e[t.name] = t, e), {});
385
385
  }
386
386
  get navigationItems() {
387
- return Lt(this._navigationItems);
387
+ return Ft(this._navigationItems);
388
388
  }
389
389
  get hasCuiDefined() {
390
390
  return !!this.activeCui.value || !!this.fallbackCui.value;
@@ -393,19 +393,19 @@ let $ = class {
393
393
  return this.door.isOpen;
394
394
  }
395
395
  async enter() {
396
- this.logger.info("navigating to NCUI"), await io();
396
+ this.logger.info("navigating to NCUI"), await mo();
397
397
  }
398
398
  async exit() {
399
- this.logger.info("navigating to CUI"), await so();
399
+ this.logger.info("navigating to CUI"), await fo();
400
400
  }
401
401
  // -------------------LIFECYCLE----------------------------
402
402
  async load() {
403
- var r, s;
403
+ var r, i;
404
404
  this.logger.debug(`loading application ${this.id}`);
405
- const e = await oo();
405
+ const e = await ho();
406
406
  this._navigationItems = e;
407
- const t = await ro();
408
- this._cuis = t, (r = this.setupStepContainer) != null && r.hasIncompletePreSteps && ((s = this.authModel) == null || s.forceRole("technician")), this.languages = [
407
+ const t = await go();
408
+ this._cuis = t, (r = this.setupStepContainer) != null && r.hasIncompletePreSteps && ((i = this.authModel) == null || i.forceRole("technician")), this.languages = [
409
409
  {
410
410
  name: "English",
411
411
  locale: "en"
@@ -413,87 +413,87 @@ let $ = class {
413
413
  ];
414
414
  }
415
415
  };
416
- S([
417
- g({ modelType: Cr.type })
418
- ], $.prototype, "device", 2);
419
- S([
420
- g({ modelType: Je.type })
421
- ], $.prototype, "authModel", 2);
422
- S([
423
- g({ modelType: wt.type })
424
- ], $.prototype, "setupStepContainer", 2);
425
- S([
426
- Se
427
- ], $.prototype, "door", 2);
428
- S([
429
- u({
416
+ w([
417
+ f({ modelType: Ur.type })
418
+ ], T.prototype, "device", 2);
419
+ w([
420
+ f({ modelType: ot.type })
421
+ ], T.prototype, "authModel", 2);
422
+ w([
423
+ f({ modelType: Rt.type })
424
+ ], T.prototype, "setupStepContainer", 2);
425
+ w([
426
+ Le
427
+ ], T.prototype, "door", 2);
428
+ w([
429
+ d({
430
430
  path: "app:kosdev.ddk:app",
431
431
  attribute: "ncui.ncuiLanguage"
432
432
  //updated attribute for language config property
433
433
  })
434
- ], $.prototype, "ncuiLanguage", 2);
435
- S([
436
- u({
434
+ ], T.prototype, "ncuiLanguage", 2);
435
+ w([
436
+ d({
437
437
  path: "app:kosdev.ddk:service:cui",
438
438
  attribute: "activeCui"
439
439
  })
440
- ], $.prototype, "activeCui", 2);
441
- S([
442
- u({
440
+ ], T.prototype, "activeCui", 2);
441
+ w([
442
+ d({
443
443
  path: "app:kosdev.ddk:service:cui",
444
444
  attribute: "fallbackCui"
445
445
  })
446
- ], $.prototype, "fallbackCui", 2);
447
- $ = S([
448
- l(N)
449
- ], $);
450
- const et = {
446
+ ], T.prototype, "fallbackCui", 2);
447
+ T = w([
448
+ l(K)
449
+ ], T);
450
+ const st = {
451
451
  registration: {
452
- [N]: {
453
- class: $,
452
+ [K]: {
453
+ class: T,
454
454
  singleton: !0
455
455
  }
456
456
  },
457
- type: N,
458
- predicate: c(N),
459
- factory: d.Singleton.create(
460
- N
457
+ type: K,
458
+ predicate: c(K),
459
+ factory: u.Singleton.create(
460
+ K
461
461
  )
462
- }, he = {
462
+ }, ye = {
463
463
  none: 999,
464
464
  crew: 0,
465
465
  technician: 1,
466
466
  manager: 2
467
- }, Dt = (e) => (t) => {
468
- if (t.type === ft)
467
+ }, xt = (e) => (t) => {
468
+ if (t.type === _t)
469
469
  return !1;
470
470
  const r = (t == null ? void 0 : t.role) || "technician";
471
471
  if (e && r) {
472
- const s = he[e.toLowerCase()] ?? he.crew, o = he[r.toLowerCase()] ?? he.crew;
473
- return s >= o;
472
+ const i = ye[e.toLowerCase()] ?? ye.crew, o = ye[r.toLowerCase()] ?? ye.crew;
473
+ return i >= o;
474
474
  }
475
475
  return !1;
476
476
  };
477
- var lo = Object.defineProperty, co = Object.getOwnPropertyDescriptor, F = (e, t, r, s) => {
478
- for (var o = s > 1 ? void 0 : s ? co(t, r) : t, a = e.length - 1, n; a >= 0; a--)
479
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
480
- return s && o && lo(t, r, o), o;
477
+ var vo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, j = (e, t, r, i) => {
478
+ for (var o = i > 1 ? void 0 : i ? _o(t, r) : t, a = e.length - 1, n; a >= 0; a--)
479
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
480
+ return i && o && vo(t, r, o), o;
481
481
  };
482
- const kt = "agitation-control-model", Ue = "resolve", uo = "agitate";
483
- let P = class {
482
+ const At = "agitation-control-model", Be = "resolve", $o = "agitate";
483
+ let M = class {
484
484
  constructor(e, t, r) {
485
- i(this, "id");
486
- i(this, "futureHandler");
487
- i(this, "logger");
488
- i(this, "troubleContainer");
489
- i(this, "_agitationFutureId");
490
- i(this, "_canExit", !0);
491
- i(this, "_exiting", !1);
492
- i(this, "_isFailed", !1);
493
- i(this, "disposer");
494
- i(this, "application");
495
- i(this, "inProgress", []);
496
- this.id = e, this.logger = r.logger, this.troubleContainer = t.companionParent, this.futureHandler = new Lr(this, Ue);
485
+ s(this, "id");
486
+ s(this, "futureHandler");
487
+ s(this, "logger");
488
+ s(this, "troubleContainer");
489
+ s(this, "_agitationFutureId");
490
+ s(this, "_canExit", !0);
491
+ s(this, "_exiting", !1);
492
+ s(this, "_isFailed", !1);
493
+ s(this, "disposer");
494
+ s(this, "application");
495
+ s(this, "inProgress", []);
496
+ this.id = e, this.logger = r.logger, this.troubleContainer = t.companionParent, this.futureHandler = new Vr(this, Be);
497
497
  }
498
498
  set isFailed(e) {
499
499
  this._isFailed = e;
@@ -522,23 +522,23 @@ let P = class {
522
522
  });
523
523
  }
524
524
  get readyToResolve() {
525
- const e = this.queuedTroubles.length, t = this.queuedTroubles.filter((s) => s.shouldDefer), r = e > 0 && t.length === 0;
525
+ const e = this.queuedTroubles.length, t = this.queuedTroubles.filter((i) => i.shouldDefer), r = e > 0 && t.length === 0;
526
526
  return this.isDoorClosed && r && this.exiting;
527
527
  }
528
528
  onFutureUpdate(e) {
529
- e.endState === b.Success ? (this.logger.debug(
529
+ e.endState === y.Success ? (this.logger.debug(
530
530
  `Resolve deferred troubles future ${e.id} completed successfully`
531
531
  ), this.queuedTroubles.forEach((t) => {
532
532
  t.clearDefer();
533
- }), y(() => {
533
+ }), v(() => {
534
534
  this._canExit = !0, this._isFailed = !1;
535
- })) : (e.endState === b.Fail || e.endState === b.Canceled || e.endState === b.Aborted) && (this.logger.error(`Resolve deferred troubles future ${e.id} failed`), this.clearAll(), y(() => {
535
+ })) : (e.endState === y.Fail || e.endState === y.Canceled || e.endState === y.Aborted) && (this.logger.error(`Resolve deferred troubles future ${e.id} failed`), this.clearAll(), v(() => {
536
536
  this._canExit = !1, this._isFailed = !0;
537
537
  }));
538
538
  }
539
539
  async resolveDeferredTroubles(e) {
540
- const t = this.queuedTroubles.filter((s) => !s.shouldDefer).map((s) => s.rawId).filter((s) => !this.inProgress.includes(s));
541
- return this.inProgress.push(...t), t.length === 0 ? void 0 : await we.bulkResolveTroubles(
540
+ const t = this.queuedTroubles.filter((i) => !i.shouldDefer).map((i) => i.rawId).filter((i) => !this.inProgress.includes(i));
541
+ return this.inProgress.push(...t), t.length === 0 ? void 0 : await De.bulkResolveTroubles(
542
542
  t,
543
543
  e
544
544
  );
@@ -548,23 +548,23 @@ let P = class {
548
548
  }
549
549
  get queuedTroubles() {
550
550
  return this.troubleContainer.troubles.getIndexByKey(
551
- it.INDEX_TROUBLES_BY_DEFERRED,
552
- it.TROUBLES_DEFERRED
551
+ ut.INDEX_TROUBLES_BY_DEFERRED,
552
+ ut.TROUBLES_DEFERRED
553
553
  );
554
554
  }
555
555
  get visibleTroubles() {
556
556
  const e = this.application.currentRole;
557
- return this.troubleContainer.troubles.data.filter(Dt(e)).filter((t) => t.type !== ft);
557
+ return this.troubleContainer.troubles.data.filter(xt(e)).filter((t) => t.type !== _t);
558
558
  }
559
559
  // -------------------LIFECYCLE----------------------------
560
560
  get future() {
561
561
  return this.futureHandler.future;
562
562
  }
563
563
  get resolveFuture() {
564
- return this.futureHandler.getFuture(Ue);
564
+ return this.futureHandler.getFuture(Be);
565
565
  }
566
566
  get agitateFuture() {
567
- return this.futureHandler.getFuture(uo);
567
+ return this.futureHandler.getFuture($o);
568
568
  }
569
569
  handleAgitationStarted(e) {
570
570
  this.logger.info(`Agitation started for ${e.path}`), this._agitationFutureId = String(e.futureId);
@@ -585,228 +585,228 @@ let P = class {
585
585
  this.logger.debug(`loading agitation-control ${this.id}`);
586
586
  }
587
587
  };
588
- F([
589
- g({ modelType: et.type })
590
- ], P.prototype, "application", 2);
591
- F([
592
- _({ alias: Ue })
593
- ], P.prototype, "resolveDeferredTroubles", 1);
594
- F([
595
- Me({ topic: mt.TOPIC_AGITATION_STARTED })
596
- ], P.prototype, "handleAgitationStarted", 1);
597
- F([
598
- Me({ topic: mt.TOPIC_AGITATION_ENDED })
599
- ], P.prototype, "handleAgitationEnded", 1);
600
- F([
601
- gt({
588
+ j([
589
+ f({ modelType: st.type })
590
+ ], M.prototype, "application", 2);
591
+ j([
592
+ b({ alias: Be })
593
+ ], M.prototype, "resolveDeferredTroubles", 1);
594
+ j([
595
+ we({ topic: $t.TOPIC_AGITATION_STARTED })
596
+ ], M.prototype, "handleAgitationStarted", 1);
597
+ j([
598
+ we({ topic: $t.TOPIC_AGITATION_ENDED })
599
+ ], M.prototype, "handleAgitationEnded", 1);
600
+ j([
601
+ bt({
602
602
  dependencies: (e) => [e.readyToResolve, e._agitationFutureId]
603
603
  })
604
- ], P.prototype, "handleReadyToResolve", 1);
605
- P = F([
606
- l(kt)
607
- ], P);
608
- const fi = new le({
609
- class: P,
610
- type: kt
604
+ ], M.prototype, "handleReadyToResolve", 1);
605
+ M = j([
606
+ l(At)
607
+ ], M);
608
+ const Cs = new de({
609
+ class: M,
610
+ type: At
611
611
  });
612
- var po = Object.defineProperty, go = Object.getOwnPropertyDescriptor, ue = (e, t, r, s) => {
613
- for (var o = s > 1 ? void 0 : s ? go(t, r) : t, a = e.length - 1, n; a >= 0; a--)
614
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
615
- return s && o && po(t, r, o), o;
612
+ var Po = Object.defineProperty, To = Object.getOwnPropertyDescriptor, ge = (e, t, r, i) => {
613
+ for (var o = i > 1 ? void 0 : i ? To(t, r) : t, a = e.length - 1, n; a >= 0; a--)
614
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
615
+ return i && o && Po(t, r, o), o;
616
616
  };
617
- const z = "animation-model";
618
- let E = class {
617
+ const Y = "animation-model";
618
+ let L = class {
619
619
  constructor(e, t, r) {
620
- i(this, "id");
621
- i(this, "logger");
622
- i(this, "disableAll");
623
- i(this, "enableDial");
624
- i(this, "enableModal");
625
- i(this, "enableSideBar");
620
+ s(this, "id");
621
+ s(this, "logger");
622
+ s(this, "disableAll");
623
+ s(this, "enableDial");
624
+ s(this, "enableModal");
625
+ s(this, "enableSideBar");
626
626
  this.id = e, this.logger = r.logger;
627
627
  }
628
628
  };
629
- ue([
630
- u({
629
+ ge([
630
+ d({
631
631
  path: "app:kosdev.ddk:app",
632
632
  attribute: "ncui.uiConfig.animations.disableAll"
633
633
  })
634
- ], E.prototype, "disableAll", 2);
635
- ue([
636
- u({
634
+ ], L.prototype, "disableAll", 2);
635
+ ge([
636
+ d({
637
637
  path: "app:kosdev.ddk:app",
638
638
  attribute: "ncui.uiConfig.animations.enableDial"
639
639
  })
640
- ], E.prototype, "enableDial", 2);
641
- ue([
642
- u({
640
+ ], L.prototype, "enableDial", 2);
641
+ ge([
642
+ d({
643
643
  path: "app:kosdev.ddk:app",
644
644
  attribute: "ncui.uiConfig.animations.enableModal"
645
645
  })
646
- ], E.prototype, "enableModal", 2);
647
- ue([
648
- u({
646
+ ], L.prototype, "enableModal", 2);
647
+ ge([
648
+ d({
649
649
  path: "app:kosdev.ddk:app",
650
650
  attribute: "ncui.uiConfig.animations.enableSideBar"
651
651
  })
652
- ], E.prototype, "enableSideBar", 2);
653
- E = ue([
654
- l(z)
655
- ], E);
656
- const ho = {
652
+ ], L.prototype, "enableSideBar", 2);
653
+ L = ge([
654
+ l(Y)
655
+ ], L);
656
+ const Oo = {
657
657
  registration: {
658
- [z]: {
659
- class: E,
658
+ [Y]: {
659
+ class: L,
660
660
  singleton: !0
661
661
  }
662
662
  },
663
- type: z,
664
- predicate: c(z),
665
- factory: d.Singleton.create(z)
666
- }, { URL: fo } = h("ANIMATION_SERVICE"), { getAll: mo } = f.build({
667
- basePath: `${fo}/api/animation`
668
- }), yo = p.createLogger({
663
+ type: Y,
664
+ predicate: c(Y),
665
+ factory: u.Singleton.create(Y)
666
+ }, { URL: Mo } = g("ANIMATION_SERVICE"), { getAll: So } = h.build({
667
+ basePath: `${Mo}/api/animation`
668
+ }), Co = p.createLogger({
669
669
  name: "animation-service",
670
670
  group: "Services"
671
- }), bo = async () => (yo.debug("sending GET for animation"), await mo({})), mi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
671
+ }), wo = async () => (Co.debug("sending GET for animation"), await So({})), ws = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
672
672
  __proto__: null,
673
- getAnimations: bo
674
- }, Symbol.toStringTag, { value: "Module" })), { URL: A } = h("FCM-PUMP_SERVICE"), { postModel: pe } = f.build({
675
- basePath: `${A}/api/fcm-pump`
673
+ getAnimations: wo
674
+ }, Symbol.toStringTag, { value: "Module" })), { URL: U } = g("FCM-PUMP_SERVICE"), { postModel: he } = h.build({
675
+ basePath: `${U}/api/fcm-pump`
676
676
  }), m = p.createLogger({
677
677
  name: "fcm-pump-service",
678
678
  group: "Services"
679
- }), It = async (e) => {
680
- var t, r, s, o, a;
679
+ }), jt = async (e) => {
680
+ var t, r, i, o, a;
681
681
  m.debug(
682
682
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
683
683
  );
684
684
  try {
685
- const n = await pe({
685
+ const n = await he({
686
686
  model: {},
687
- urlOverride: `${A}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
687
+ urlOverride: `${U}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
688
688
  });
689
689
  return m.debug("performElectricalTest - response:", n), ((n == null ? void 0 : n.status) === 200 || (n == null ? void 0 : n.status) === 499) && ((t = n.data) != null && t.error) ? [n.data.error || "unknownError", n.data] : [void 0, n == null ? void 0 : n.data];
690
690
  } catch (n) {
691
691
  if (m.error(
692
692
  `performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
693
693
  n
694
- ), n instanceof qe) {
695
- const w = ((s = (r = n.payload) == null ? void 0 : r.data) == null ? void 0 : s.error) || ((o = n.payload) == null ? void 0 : o.error) || "unknownError";
696
- return [w, ((a = n.payload) == null ? void 0 : a.data) || { error: w }];
694
+ ), n instanceof et) {
695
+ const E = ((i = (r = n.payload) == null ? void 0 : r.data) == null ? void 0 : i.error) || ((o = n.payload) == null ? void 0 : o.error) || "unknownError";
696
+ return [E, ((a = n.payload) == null ? void 0 : a.data) || { error: E }];
697
697
  }
698
698
  }
699
699
  return ["unknownError", { error: "unknownError" }];
700
- }, Rt = async (e, t) => {
700
+ }, Ut = async (e, t) => {
701
701
  m.debug(
702
702
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
703
703
  );
704
704
  try {
705
- const r = await pe({
705
+ const r = await he({
706
706
  model: {},
707
- urlOverride: `${A}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
707
+ urlOverride: `${U}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
708
708
  tracker: t
709
709
  });
710
- return m.debug("performPreCalibrate - response:", r), r != null && r.data && C.initiateFuture(r.data), r == null ? void 0 : r.data;
710
+ return m.debug("performPreCalibrate - response:", r), r != null && r.data && $.initiateFuture(r.data), r == null ? void 0 : r.data;
711
711
  } catch (r) {
712
712
  m.error(
713
713
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
714
714
  r
715
715
  );
716
- const s = {
716
+ const i = {
717
717
  id: t || "",
718
- endState: b.Fail,
718
+ endState: y.Fail,
719
719
  tracker: t,
720
720
  reason: "Failed to resolve trouble"
721
721
  };
722
- return C.initiateFuture(s), s;
722
+ return $.initiateFuture(i), i;
723
723
  }
724
- }, Ft = async (e, t) => {
724
+ }, Vt = async (e, t) => {
725
725
  m.debug(
726
726
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
727
727
  );
728
728
  try {
729
- const r = await pe({
729
+ const r = await he({
730
730
  model: {},
731
- urlOverride: `${A}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
731
+ urlOverride: `${U}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
732
732
  tracker: t
733
733
  });
734
- return m.debug("performPreCalibrate - response:", r), r != null && r.data && C.initiateFuture(r.data), r == null ? void 0 : r.data;
734
+ return m.debug("performPreCalibrate - response:", r), r != null && r.data && $.initiateFuture(r.data), r == null ? void 0 : r.data;
735
735
  } catch (r) {
736
736
  m.error(
737
737
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`,
738
738
  r
739
739
  );
740
- const s = {
740
+ const i = {
741
741
  id: t || "",
742
- endState: b.Fail,
742
+ endState: y.Fail,
743
743
  tracker: t,
744
744
  reason: "Failed to resolve trouble"
745
745
  };
746
- return C.initiateFuture(s), s;
746
+ return $.initiateFuture(i), i;
747
747
  }
748
- }, At = async (e, t, r) => {
748
+ }, Ht = async (e, t, r) => {
749
749
  m.debug(
750
750
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
751
751
  );
752
752
  try {
753
- const s = await pe({
753
+ const i = await he({
754
754
  model: {},
755
- urlOverride: `${A}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
755
+ urlOverride: `${U}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
756
756
  tracker: r
757
757
  });
758
- return m.debug("performVerify - response:", s), s != null && s.data && C.initiateFuture(s.data), s == null ? void 0 : s.data;
759
- } catch (s) {
758
+ return m.debug("performVerify - response:", i), i != null && i.data && $.initiateFuture(i.data), i == null ? void 0 : i.data;
759
+ } catch (i) {
760
760
  m.error(
761
761
  `performVerify - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
762
- s
762
+ i
763
763
  );
764
764
  const o = {
765
765
  id: r || "",
766
- endState: b.Fail,
766
+ endState: y.Fail,
767
767
  tracker: r,
768
768
  reason: "Failed to resolve trouble"
769
769
  };
770
- return C.initiateFuture(o), o;
770
+ return $.initiateFuture(o), o;
771
771
  }
772
- }, xt = async (e, t, r) => {
772
+ }, Wt = async (e, t, r) => {
773
773
  m.debug(
774
774
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
775
775
  );
776
776
  try {
777
- const s = await pe({
777
+ const i = await he({
778
778
  model: {},
779
- urlOverride: `${A}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
779
+ urlOverride: `${U}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
780
780
  });
781
- return m.debug("performPreCalibrate - response:", s), s == null ? void 0 : s.data;
782
- } catch (s) {
781
+ return m.debug("performPreCalibrate - response:", i), i == null ? void 0 : i.data;
782
+ } catch (i) {
783
783
  m.error(
784
784
  `performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
785
- s
785
+ i
786
786
  );
787
787
  return;
788
788
  }
789
- }, yi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
789
+ }, Es = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
790
790
  __proto__: null,
791
- performCalibrate: Ft,
792
- performComplete: xt,
793
- performElectricalTest: It,
794
- performPreCalibrate: Rt,
795
- performVerify: At
791
+ performCalibrate: Vt,
792
+ performComplete: Wt,
793
+ performElectricalTest: jt,
794
+ performPreCalibrate: Ut,
795
+ performVerify: Ht
796
796
  }, Symbol.toStringTag, { value: "Module" }));
797
- var vo = Object.defineProperty, _o = Object.getOwnPropertyDescriptor, ke = (e, t, r, s) => {
798
- for (var o = s > 1 ? void 0 : s ? _o(t, r) : t, a = e.length - 1, n; a >= 0; a--)
799
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
800
- return s && o && vo(t, r, o), o;
797
+ var Eo = Object.defineProperty, Lo = Object.getOwnPropertyDescriptor, xe = (e, t, r, i) => {
798
+ for (var o = i > 1 ? void 0 : i ? Lo(t, r) : t, a = e.length - 1, n; a >= 0; a--)
799
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
800
+ return i && o && Eo(t, r, o), o;
801
801
  };
802
- const jt = "fcm-pump-model", $o = p.createLogger({ name: "fcm-pump-model" });
803
- let D = class {
802
+ const zt = "fcm-pump-model", Do = p.createLogger({ name: "fcm-pump-model" });
803
+ let R = class {
804
804
  constructor(e, t, r) {
805
- i(this, "id");
806
- i(this, "logger");
807
- i(this, "pumpModel");
808
- i(this, "futureHandler");
809
- this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new ce(this);
805
+ s(this, "id");
806
+ s(this, "logger");
807
+ s(this, "pumpModel");
808
+ s(this, "futureHandler");
809
+ this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new A(this);
810
810
  }
811
811
  get future() {
812
812
  return this.futureHandler.future;
@@ -827,23 +827,23 @@ let D = class {
827
827
  return this.pumpModel.performIntent(e);
828
828
  }
829
829
  async performElectricalTest() {
830
- const [e, t] = await It(this.pumpModel.path);
831
- return e && $o.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
830
+ const [e, t] = await jt(this.pumpModel.path);
831
+ return e && Do.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
832
832
  }
833
833
  getChildren() {
834
834
  return [...this.futureHandler.allFutures];
835
835
  }
836
836
  async performPreCalibrate(e) {
837
- return Rt(this.pumpModel.path, e);
837
+ return Ut(this.pumpModel.path, e);
838
838
  }
839
839
  async performCalibrate(e) {
840
- return Ft(this.pumpModel.path, e);
840
+ return Vt(this.pumpModel.path, e);
841
841
  }
842
842
  async performVerify(e, t) {
843
- return At(this.pumpModel.path, e, t);
843
+ return Ht(this.pumpModel.path, e, t);
844
844
  }
845
845
  async performComplete(e, t) {
846
- return xt(this.pumpModel.path, e, t);
846
+ return Wt(this.pumpModel.path, e, t);
847
847
  }
848
848
  // -------------------LIFECYCLE----------------------------
849
849
  async init() {
@@ -853,38 +853,38 @@ let D = class {
853
853
  this.logger.debug(`loading fcm-pump ${this.id}`);
854
854
  }
855
855
  };
856
- ke([
857
- _()
858
- ], D.prototype, "performPreCalibrate", 1);
859
- ke([
860
- _()
861
- ], D.prototype, "performCalibrate", 1);
862
- ke([
863
- _()
864
- ], D.prototype, "performVerify", 1);
865
- D = ke([
866
- l(jt)
867
- ], D);
868
- const Ut = new Ye({
869
- class: D,
870
- type: jt
856
+ xe([
857
+ b()
858
+ ], R.prototype, "performPreCalibrate", 1);
859
+ xe([
860
+ b()
861
+ ], R.prototype, "performCalibrate", 1);
862
+ xe([
863
+ b()
864
+ ], R.prototype, "performVerify", 1);
865
+ R = xe([
866
+ l(zt)
867
+ ], R);
868
+ const Nt = new Ee({
869
+ class: R,
870
+ type: zt
871
871
  });
872
- var To = Object.defineProperty, Po = Object.getOwnPropertyDescriptor, Vt = (e, t, r, s) => {
873
- for (var o = s > 1 ? void 0 : s ? Po(t, r) : t, a = e.length - 1, n; a >= 0; a--)
874
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
875
- return s && o && To(t, r, o), o;
872
+ var Ro = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, Bt = (e, t, r, i) => {
873
+ for (var o = i > 1 ? void 0 : i ? Io(t, r) : t, a = e.length - 1, n; a >= 0; a--)
874
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
875
+ return i && o && Ro(t, r, o), o;
876
876
  };
877
- const B = "carb-water-model";
878
- let ye = class {
877
+ const q = "carb-water-model";
878
+ let _e = class {
879
879
  constructor(e, t, r) {
880
- i(this, "id");
881
- i(this, "assemblyModel");
882
- i(this, "logger");
880
+ s(this, "id");
881
+ s(this, "assemblyModel");
882
+ s(this, "logger");
883
883
  this.id = e, this.logger = r.logger;
884
884
  }
885
885
  getPump() {
886
886
  const t = this.assemblyModel.getHoldersByGroup("carb")[0].pumps.data[0];
887
- return ht(t, Ut.type);
887
+ return vt(t, Nt.type);
888
888
  }
889
889
  // -------------------LIFECYCLE----------------------------
890
890
  async init() {
@@ -894,104 +894,104 @@ let ye = class {
894
894
  this.logger.debug(`loading carb-water ${this.id}`);
895
895
  }
896
896
  };
897
- Vt([
898
- g({ modelType: Ce.type })
899
- ], ye.prototype, "assemblyModel", 2);
900
- ye = Vt([
901
- l(B)
902
- ], ye);
903
- const Oo = {
897
+ Bt([
898
+ f({ modelType: Ie.type })
899
+ ], _e.prototype, "assemblyModel", 2);
900
+ _e = Bt([
901
+ l(q)
902
+ ], _e);
903
+ const ko = {
904
904
  registration: {
905
- [B]: {
906
- class: ye,
905
+ [q]: {
906
+ class: _e,
907
907
  singleton: !1
908
908
  }
909
909
  },
910
- type: B,
911
- predicate: c(B),
912
- factory: d.Factory.create(B)
913
- }, { URL: x } = h("COPY-LOGS_SERVICE"), { getAll: Mo, getOne: So, postModel: Ht, deleteModel: wo } = f.build({
914
- basePath: `${x}/api/copy-logs`
915
- }), be = p.createLogger({
910
+ type: q,
911
+ predicate: c(q),
912
+ factory: u.Factory.create(q)
913
+ }, { URL: V } = g("COPY-LOGS_SERVICE"), { getAll: Fo, getOne: xo, postModel: Kt, deleteModel: Ao } = h.build({
914
+ basePath: `${V}/api/copy-logs`
915
+ }), $e = p.createLogger({
916
916
  name: "copy-logs-service",
917
917
  group: "Services"
918
- }), Wt = async (e, t) => {
919
- const r = await wo({
918
+ }), Yt = async (e, t) => {
919
+ const r = await Ao({
920
920
  tracker: t,
921
921
  id: e,
922
- urlOverride: `${x}/api/app/kosdev.ddk/copyLogs/${e}`
922
+ urlOverride: `${V}/api/app/kosdev.ddk/copyLogs/${e}`
923
923
  });
924
924
  if (!(r != null && r.data))
925
925
  throw new Error("No response from server");
926
926
  return r.data;
927
- }, Nt = async (e, t) => {
928
- const r = await Ht({
927
+ }, qt = async (e, t) => {
928
+ const r = await Kt({
929
929
  model: {},
930
930
  tracker: t,
931
- urlOverride: `${x}/api/app/kosdev.ddk/copyLogs/eraseAndCopy/${e}`
931
+ urlOverride: `${V}/api/app/kosdev.ddk/copyLogs/eraseAndCopy/${e}`
932
932
  });
933
933
  if (!(r != null && r.data))
934
934
  throw new Error("No response from server");
935
935
  return r.data;
936
- }, zt = async (e, t) => {
937
- const r = await Ht({
936
+ }, Gt = async (e, t) => {
937
+ const r = await Kt({
938
938
  model: {},
939
939
  tracker: t,
940
- urlOverride: `${x}/api/app/kosdev.ddk/copyLogs/${e}`
940
+ urlOverride: `${V}/api/app/kosdev.ddk/copyLogs/${e}`
941
941
  });
942
942
  if (!(r != null && r.data))
943
943
  throw new Error("No response from server");
944
944
  return r.data;
945
- }, Bt = async () => {
946
- be.debug("sending GET for copy-logs");
945
+ }, Qt = async () => {
946
+ $e.debug("sending GET for copy-logs");
947
947
  try {
948
- const e = await Mo({
949
- urlOverride: `${x}/api/app/kosdev.ddk/copyLogs/volumes/size`
948
+ const e = await Fo({
949
+ urlOverride: `${V}/api/app/kosdev.ddk/copyLogs/volumes/size`
950
950
  });
951
951
  return [void 0, e == null ? void 0 : e.data];
952
952
  } catch (e) {
953
- if (e instanceof qe)
954
- return be.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
953
+ if (e instanceof et)
954
+ return $e.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
955
955
  }
956
956
  return ["unknownError", void 0];
957
- }, Kt = async () => {
958
- be.debug("sending GET for log file size");
957
+ }, Xt = async () => {
958
+ $e.debug("sending GET for log file size");
959
959
  try {
960
- const e = await So({
961
- urlOverride: `${x}/api/app/kosdev.ddk/copyLogs/files/size`
960
+ const e = await xo({
961
+ urlOverride: `${V}/api/app/kosdev.ddk/copyLogs/files/size`
962
962
  });
963
963
  return [void 0, e == null ? void 0 : e.data];
964
964
  } catch (e) {
965
- if (e instanceof qe)
966
- return be.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
965
+ if (e instanceof et)
966
+ return $e.error(`Error fetching log file size: ${e.payload.error}`), [e.payload.error, void 0];
967
967
  }
968
968
  return ["unknownError", void 0];
969
- }, bi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
969
+ }, Ls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
970
970
  __proto__: null,
971
- copyLogFromVolume: zt,
972
- eraseAndCopyLogsToVolume: Nt,
973
- eraseVolume: Wt,
974
- getLogFileSize: Kt,
975
- getVolumes: Bt
971
+ copyLogFromVolume: Gt,
972
+ eraseAndCopyLogsToVolume: qt,
973
+ eraseVolume: Yt,
974
+ getLogFileSize: Xt,
975
+ getVolumes: Qt
976
976
  }, Symbol.toStringTag, { value: "Module" }));
977
- var Eo = Object.defineProperty, Co = Object.getOwnPropertyDescriptor, j = (e, t, r, s) => {
978
- for (var o = s > 1 ? void 0 : s ? Co(t, r) : t, a = e.length - 1, n; a >= 0; a--)
979
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
980
- return s && o && Eo(t, r, o), o;
977
+ var jo = Object.defineProperty, Uo = Object.getOwnPropertyDescriptor, H = (e, t, r, i) => {
978
+ for (var o = i > 1 ? void 0 : i ? Uo(t, r) : t, a = e.length - 1, n; a >= 0; a--)
979
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
980
+ return i && o && jo(t, r, o), o;
981
981
  };
982
- const Yt = "copy-logs-model";
983
- let O = class {
982
+ const Jt = "copy-logs-model";
983
+ let S = class {
984
984
  constructor(e, t, r) {
985
- i(this, "id");
986
- i(this, "logger");
987
- i(this, "_volumes");
988
- i(this, "futureHandler");
989
- i(this, "storageDeviceContainer");
990
- i(this, "_activeVolume");
991
- i(this, "_logFileSize", 0);
992
- i(this, "_actionState", "idle");
993
- i(this, "copyProgress");
994
- this.id = e, this.logger = r.logger, this._volumes = new kr(), this.futureHandler = new ce(this), this._activeVolume = void 0, this.copyProgress = {
985
+ s(this, "id");
986
+ s(this, "logger");
987
+ s(this, "_volumes");
988
+ s(this, "futureHandler");
989
+ s(this, "storageDeviceContainer");
990
+ s(this, "_activeVolume");
991
+ s(this, "_logFileSize", 0);
992
+ s(this, "_actionState", "idle");
993
+ s(this, "copyProgress");
994
+ this.id = e, this.logger = r.logger, this._volumes = new Wr(), this.futureHandler = new A(this), this._activeVolume = void 0, this.copyProgress = {
995
995
  bytesCopied: 0,
996
996
  bytesToCopy: 0,
997
997
  filesCopied: 0,
@@ -1034,19 +1034,19 @@ let O = class {
1034
1034
  }
1035
1035
  get diskFull() {
1036
1036
  var e;
1037
- return ((e = this.future) == null ? void 0 : e.status) === b.Success && this.copyProgress.filesSkipped > 0;
1037
+ return ((e = this.future) == null ? void 0 : e.status) === y.Success && this.copyProgress.filesSkipped > 0;
1038
1038
  }
1039
1039
  onFutureUpdate(e) {
1040
- this.logger.info(`Future update: ${e.status}`), e.status === b.Success && (this.logger.info(`Future success: ${e.status}`), this.diskFull && y(() => {
1041
- e.endState = b.Fail, e.reason = "errDiskFull";
1042
- })), e.status === b.Fail && this.logger.error(`Future failed: ${e.status}`), e.note === "copy" ? y(() => {
1040
+ this.logger.info(`Future update: ${e.status}`), e.status === y.Success && (this.logger.info(`Future success: ${e.status}`), this.diskFull && v(() => {
1041
+ e.endState = y.Fail, e.reason = "errDiskFull";
1042
+ })), e.status === y.Fail && this.logger.error(`Future failed: ${e.status}`), e.note === "copy" ? v(() => {
1043
1043
  this._actionState = "copying", this.copyProgress = e.clientData || {
1044
1044
  bytesCopied: 0,
1045
1045
  bytesToCopy: 0,
1046
1046
  filesCopied: 0,
1047
1047
  filesSkipped: 0
1048
1048
  };
1049
- }) : (this._actionState = "erasing", y(() => {
1049
+ }) : (this._actionState = "erasing", v(() => {
1050
1050
  this.copyProgress = {
1051
1051
  bytesCopied: 0,
1052
1052
  bytesToCopy: 0,
@@ -1059,31 +1059,31 @@ let O = class {
1059
1059
  var t;
1060
1060
  if (!e)
1061
1061
  throw new Error("No tracker provided");
1062
- if (y(() => {
1062
+ if (v(() => {
1063
1063
  this._actionState = "erasing";
1064
1064
  }), !this._activeVolume)
1065
1065
  throw this.logger.error("No active volume selected"), new Error("No active volume selected");
1066
- return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), Nt(this._activeVolume.id, e);
1066
+ return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), qt(this._activeVolume.id, e);
1067
1067
  }
1068
1068
  async eraseVolume(e) {
1069
1069
  var t;
1070
1070
  if (!e)
1071
1071
  throw new Error("No tracker provided");
1072
- if (y(() => {
1072
+ if (v(() => {
1073
1073
  this._actionState = "erasing";
1074
1074
  }), !this._activeVolume)
1075
1075
  throw this.logger.error("No active volume selected"), new Error("No active volume selected");
1076
- return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), Wt(this._activeVolume.id, e);
1076
+ return this.logger.info(`Erasing volume ${(t = this._activeVolume) == null ? void 0 : t.name}`), Yt(this._activeVolume.id, e);
1077
1077
  }
1078
1078
  async copyLogs(e) {
1079
1079
  var t;
1080
1080
  if (!e)
1081
1081
  throw new Error("No tracker provided");
1082
- if (y(() => {
1082
+ if (v(() => {
1083
1083
  this._actionState = "copying";
1084
1084
  }), !this._activeVolume)
1085
1085
  throw this.logger.error("No active volume selected"), new Error("No active volume selected");
1086
- return this.logger.info(`Copying logs to ${(t = this._activeVolume) == null ? void 0 : t.name}`), zt(this._activeVolume.id, e);
1086
+ return this.logger.info(`Copying logs to ${(t = this._activeVolume) == null ? void 0 : t.name}`), Gt(this._activeVolume.id, e);
1087
1087
  }
1088
1088
  handleInsertion() {
1089
1089
  this.inserted ? this.syncVolumes() : (this._volumes.clear(), this.clearActiveVolume());
@@ -1092,7 +1092,7 @@ let O = class {
1092
1092
  this.logger.debug(`initializing copy-logs ${this.id}`);
1093
1093
  }
1094
1094
  async syncVolumes() {
1095
- const [e, t] = await Bt(), [r, s] = await Kt();
1095
+ const [e, t] = await Qt(), [r, i] = await Xt();
1096
1096
  if (r) {
1097
1097
  this.logger.error(`Error fetching log file size: ${r}`);
1098
1098
  return;
@@ -1112,7 +1112,7 @@ let O = class {
1112
1112
  };
1113
1113
  this._volumes.addModel(n);
1114
1114
  }
1115
- }), t.length === 1 ? this.updateActiveVolume(this._volumes.data[0]) : this.clearActiveVolume()), s && (this.logger.info(`Log file size: ${s}`), this.updateLogFileSize(parseInt(s, 10)));
1115
+ }), t.length === 1 ? this.updateActiveVolume(this._volumes.data[0]) : this.clearActiveVolume()), i && (this.logger.info(`Log file size: ${i}`), this.updateLogFileSize(parseInt(i, 10)));
1116
1116
  }
1117
1117
  async activate() {
1118
1118
  this.logger.debug(`activating copy-logs ${this.id}`), await this.syncVolumes();
@@ -1121,77 +1121,77 @@ let O = class {
1121
1121
  this.logger.debug(`loading copy-logs ${this.id}`);
1122
1122
  }
1123
1123
  };
1124
- j([
1125
- g({ modelType: Dr.type })
1126
- ], O.prototype, "storageDeviceContainer", 2);
1127
- j([
1128
- _()
1129
- ], O.prototype, "eraseAndCopyVolume", 1);
1130
- j([
1131
- _()
1132
- ], O.prototype, "eraseVolume", 1);
1133
- j([
1134
- _()
1135
- ], O.prototype, "copyLogs", 1);
1136
- j([
1137
- gt({
1124
+ H([
1125
+ f({ modelType: Hr.type })
1126
+ ], S.prototype, "storageDeviceContainer", 2);
1127
+ H([
1128
+ b()
1129
+ ], S.prototype, "eraseAndCopyVolume", 1);
1130
+ H([
1131
+ b()
1132
+ ], S.prototype, "eraseVolume", 1);
1133
+ H([
1134
+ b()
1135
+ ], S.prototype, "copyLogs", 1);
1136
+ H([
1137
+ bt({
1138
1138
  dependencies: (e) => [e.inserted]
1139
1139
  })
1140
- ], O.prototype, "handleInsertion", 1);
1141
- O = j([
1142
- l(Yt)
1143
- ], O);
1144
- const vi = new le({
1145
- class: O,
1146
- type: Yt
1147
- }), Gt = p.createLogger({
1140
+ ], S.prototype, "handleInsertion", 1);
1141
+ S = H([
1142
+ l(Jt)
1143
+ ], S);
1144
+ const Ds = new de({
1145
+ class: S,
1146
+ type: Jt
1147
+ }), Zt = p.createLogger({
1148
1148
  name: "dashboard-operations-service",
1149
1149
  group: "Services"
1150
- }), qt = async (e, t) => (Gt.debug("resolveAll"), await we.bulkResolveTroubles(
1150
+ }), er = async (e, t) => (Zt.debug("resolveAll"), await De.bulkResolveTroubles(
1151
1151
  e,
1152
1152
  t
1153
- )), Qt = async (e, t) => (Gt.debug("resolveTrouble"), await we.resolveTrouble(e, t)), _i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1153
+ )), tr = async (e, t) => (Zt.debug("resolveTrouble"), await De.resolveTrouble(e, t)), Rs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1154
1154
  __proto__: null,
1155
- resolveAll: qt,
1156
- resolveTrouble: Qt
1155
+ resolveAll: er,
1156
+ resolveTrouble: tr
1157
1157
  }, Symbol.toStringTag, { value: "Module" }));
1158
- var Lo = Object.defineProperty, Do = Object.getOwnPropertyDescriptor, Ie = (e, t, r, s) => {
1159
- for (var o = s > 1 ? void 0 : s ? Do(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1160
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1161
- return s && o && Lo(t, r, o), o;
1158
+ var Vo = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, Ae = (e, t, r, i) => {
1159
+ for (var o = i > 1 ? void 0 : i ? Ho(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1160
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1161
+ return i && o && Vo(t, r, o), o;
1162
1162
  };
1163
- const K = "dashboard-operations-model";
1164
- function dt(e) {
1163
+ const G = "dashboard-operations-model";
1164
+ function ft(e) {
1165
1165
  return !e.deferred;
1166
1166
  }
1167
- function ut(e) {
1167
+ function mt(e) {
1168
1168
  return e.deferred;
1169
1169
  }
1170
- let k = class {
1170
+ let I = class {
1171
1171
  constructor(e, t, r) {
1172
- i(this, "id");
1173
- i(this, "troubles");
1174
- i(this, "futureHandler");
1175
- i(this, "logger");
1176
- this.id = e, this.futureHandler = new ce(this), this.logger = r.logger;
1172
+ s(this, "id");
1173
+ s(this, "troubles");
1174
+ s(this, "futureHandler");
1175
+ s(this, "logger");
1176
+ this.id = e, this.futureHandler = new A(this), this.logger = r.logger;
1177
1177
  }
1178
1178
  get troublesByType() {
1179
1179
  return this.troubles.troubles.data.reduce(
1180
- Ir,
1180
+ zr,
1181
1181
  {}
1182
1182
  );
1183
1183
  }
1184
1184
  get queuedPurgeTroubles() {
1185
- return this.purgeTroubles.filter(ut);
1185
+ return this.purgeTroubles.filter(mt);
1186
1186
  }
1187
1187
  get queuedPrimeTroubles() {
1188
- return this.primeTroubles.filter(ut);
1188
+ return this.primeTroubles.filter(mt);
1189
1189
  }
1190
1190
  get resolvablePrimeTroubles() {
1191
- return this.primeTroubles.filter(dt);
1191
+ return this.primeTroubles.filter(ft);
1192
1192
  }
1193
1193
  get resolvablePurgeTroubles() {
1194
- return this.purgeTroubles.filter(dt);
1194
+ return this.purgeTroubles.filter(ft);
1195
1195
  }
1196
1196
  get hasResolvablePurgeTroubles() {
1197
1197
  return this.resolvablePurgeTroubles.length > 0;
@@ -1206,10 +1206,10 @@ let k = class {
1206
1206
  return this.primeTroubles.length > 0;
1207
1207
  }
1208
1208
  get purgeTroubles() {
1209
- return this.troublesByType[nt] || [];
1209
+ return this.troublesByType[dt] || [];
1210
1210
  }
1211
1211
  get primeTroubles() {
1212
- return this.troublesByType[Vr] || [];
1212
+ return this.troublesByType[Qr] || [];
1213
1213
  }
1214
1214
  get future() {
1215
1215
  return this.futureHandler.getFuture();
@@ -1217,17 +1217,17 @@ let k = class {
1217
1217
  async resolveAllTroubles(e, t) {
1218
1218
  if (!t)
1219
1219
  throw new Error("No tracker provided");
1220
- const r = e === nt ? this.purgeTroubles : this.primeTroubles;
1220
+ const r = e === dt ? this.purgeTroubles : this.primeTroubles;
1221
1221
  r.filter((n) => n.shouldDefer).forEach((n) => {
1222
1222
  this.logger.info(`Deferring trouble ${n.rawId}`), n.defer();
1223
1223
  });
1224
1224
  const o = r.filter((n) => !n.shouldDefer).map((n) => n.rawId);
1225
- return o.length === 0 ? void 0 : await qt(o, t);
1225
+ return o.length === 0 ? void 0 : await er(o, t);
1226
1226
  }
1227
1227
  async resolveTrouble(e, t) {
1228
1228
  if (!t)
1229
1229
  throw new Error("No tracker provided");
1230
- return await Qt(e, t);
1230
+ return await tr(e, t);
1231
1231
  }
1232
1232
  // -------------------LIFECYCLE----------------------------
1233
1233
  async init() {
@@ -1237,39 +1237,39 @@ let k = class {
1237
1237
  this.logger.debug(`loading dashboard-operations ${this.id}`);
1238
1238
  }
1239
1239
  };
1240
- Ie([
1241
- g({ modelType: Qe.type })
1242
- ], k.prototype, "troubles", 2);
1243
- Ie([
1244
- _()
1245
- ], k.prototype, "resolveAllTroubles", 1);
1246
- Ie([
1247
- _()
1248
- ], k.prototype, "resolveTrouble", 1);
1249
- k = Ie([
1250
- l(K)
1251
- ], k);
1252
- const tt = {
1240
+ Ae([
1241
+ f({ modelType: tt.type })
1242
+ ], I.prototype, "troubles", 2);
1243
+ Ae([
1244
+ b()
1245
+ ], I.prototype, "resolveAllTroubles", 1);
1246
+ Ae([
1247
+ b()
1248
+ ], I.prototype, "resolveTrouble", 1);
1249
+ I = Ae([
1250
+ l(G)
1251
+ ], I);
1252
+ const nt = {
1253
1253
  registration: {
1254
- [K]: {
1255
- class: k,
1254
+ [G]: {
1255
+ class: I,
1256
1256
  singleton: !0
1257
1257
  }
1258
1258
  },
1259
- type: K,
1260
- predicate: c(K),
1261
- factory: d.Singleton.create(K)
1259
+ type: G,
1260
+ predicate: c(G),
1261
+ factory: u.Singleton.create(G)
1262
1262
  };
1263
- var ko = Object.defineProperty, Io = Object.getOwnPropertyDescriptor, Ro = (e, t, r, s) => {
1264
- for (var o = s > 1 ? void 0 : s ? Io(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1265
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1266
- return s && o && ko(t, r, o), o;
1263
+ var Wo = Object.defineProperty, zo = Object.getOwnPropertyDescriptor, No = (e, t, r, i) => {
1264
+ for (var o = i > 1 ? void 0 : i ? zo(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1265
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1266
+ return i && o && Wo(t, r, o), o;
1267
1267
  };
1268
- const Y = "dispenser-model";
1269
- let Ve = class {
1268
+ const Q = "dispenser-model";
1269
+ let Ke = class {
1270
1270
  constructor(e, t, r) {
1271
- i(this, "id");
1272
- i(this, "logger");
1271
+ s(this, "id");
1272
+ s(this, "logger");
1273
1273
  this.id = e, this.logger = r.logger;
1274
1274
  }
1275
1275
  updateModel() {
@@ -1282,39 +1282,39 @@ let Ve = class {
1282
1282
  this.logger.debug(`loading dispenser ${this.id}`);
1283
1283
  }
1284
1284
  };
1285
- Ve = Ro([
1286
- l(Y)
1287
- ], Ve);
1288
- const Fo = {
1285
+ Ke = No([
1286
+ l(Q)
1287
+ ], Ke);
1288
+ const Bo = {
1289
1289
  registration: {
1290
- [Y]: {
1291
- class: Ve,
1290
+ [Q]: {
1291
+ class: Ke,
1292
1292
  singleton: !0
1293
1293
  }
1294
1294
  },
1295
- type: Y,
1296
- predicate: c(Y),
1297
- factory: d.Singleton.create(Y)
1298
- }, { URL: Ao } = h("DISPENSER_SERVICE"), { getAll: xo } = f.build({
1299
- basePath: `${Ao}/api/dispenser`
1300
- }), jo = p.createLogger({
1295
+ type: Q,
1296
+ predicate: c(Q),
1297
+ factory: u.Singleton.create(Q)
1298
+ }, { URL: Ko } = g("DISPENSER_SERVICE"), { getAll: Yo } = h.build({
1299
+ basePath: `${Ko}/api/dispenser`
1300
+ }), qo = p.createLogger({
1301
1301
  name: "dispenser-service",
1302
1302
  group: "Services"
1303
- }), Uo = async () => (jo.debug("sending GET for dispenser"), await xo({})), $i = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1303
+ }), Go = async () => (qo.debug("sending GET for dispenser"), await Yo({})), Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1304
1304
  __proto__: null,
1305
- getDispensers: Uo
1305
+ getDispensers: Go
1306
1306
  }, Symbol.toStringTag, { value: "Module" }));
1307
- var Vo = Object.defineProperty, Ho = Object.getOwnPropertyDescriptor, Xt = (e, t, r, s) => {
1308
- for (var o = s > 1 ? void 0 : s ? Ho(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1309
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1310
- return s && o && Vo(t, r, o), o;
1307
+ var Qo = Object.defineProperty, Xo = Object.getOwnPropertyDescriptor, rr = (e, t, r, i) => {
1308
+ for (var o = i > 1 ? void 0 : i ? Xo(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1309
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1310
+ return i && o && Qo(t, r, o), o;
1311
1311
  };
1312
- const G = "dispenser-info-model";
1313
- let ve = class {
1312
+ const X = "dispenser-info-model";
1313
+ let Pe = class {
1314
1314
  constructor(e, t, r) {
1315
- i(this, "logger");
1316
- i(this, "id");
1317
- i(this, "name");
1315
+ s(this, "logger");
1316
+ s(this, "id");
1317
+ s(this, "name");
1318
1318
  this.id = e, this.logger = r.logger;
1319
1319
  }
1320
1320
  // -------------------LIFECYCLE----------------------------
@@ -1325,47 +1325,47 @@ let ve = class {
1325
1325
  this.logger.debug(`loading dispenser-info ${this.id}`);
1326
1326
  }
1327
1327
  };
1328
- Xt([
1329
- u({
1328
+ rr([
1329
+ d({
1330
1330
  path: "kos:device",
1331
1331
  attribute: "name"
1332
1332
  })
1333
- ], ve.prototype, "name", 2);
1334
- ve = Xt([
1335
- l(G)
1336
- ], ve);
1337
- const Wo = {
1333
+ ], Pe.prototype, "name", 2);
1334
+ Pe = rr([
1335
+ l(X)
1336
+ ], Pe);
1337
+ const Jo = {
1338
1338
  registration: {
1339
- [G]: {
1340
- class: ve,
1339
+ [X]: {
1340
+ class: Pe,
1341
1341
  singleton: !1
1342
1342
  }
1343
1343
  },
1344
- type: G,
1345
- predicate: c(G),
1346
- factory: d.Factory.create(
1347
- G
1344
+ type: X,
1345
+ predicate: c(X),
1346
+ factory: u.Factory.create(
1347
+ X
1348
1348
  )
1349
- }, { URL: No } = h("DISPENSER-INFO_SERVICE"), { getAll: zo } = f.build({
1350
- basePath: `${No}/api/dispenser-info`
1351
- }), Bo = p.createLogger({
1349
+ }, { URL: Zo } = g("DISPENSER-INFO_SERVICE"), { getAll: ei } = h.build({
1350
+ basePath: `${Zo}/api/dispenser-info`
1351
+ }), ti = p.createLogger({
1352
1352
  name: "dispenser-info-service",
1353
1353
  group: "Services"
1354
- }), Ko = async () => (Bo.debug("sending GET for dispenser-info"), await zo({})), Ti = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1354
+ }), ri = async () => (ti.debug("sending GET for dispenser-info"), await ei({})), ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1355
1355
  __proto__: null,
1356
- getDispenserInfos: Ko
1356
+ getDispenserInfos: ri
1357
1357
  }, Symbol.toStringTag, { value: "Module" }));
1358
- var Yo = Object.defineProperty, Go = Object.getOwnPropertyDescriptor, qo = (e, t, r, s) => {
1359
- for (var o = s > 1 ? void 0 : s ? Go(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1360
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1361
- return s && o && Yo(t, r, o), o;
1358
+ var oi = Object.defineProperty, ii = Object.getOwnPropertyDescriptor, si = (e, t, r, i) => {
1359
+ for (var o = i > 1 ? void 0 : i ? ii(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1360
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1361
+ return i && o && oi(t, r, o), o;
1362
1362
  };
1363
- const q = "enrollment-model";
1364
- let He = class {
1363
+ const J = "enrollment-model";
1364
+ let Ye = class {
1365
1365
  constructor(e, t, r) {
1366
- i(this, "id");
1367
- i(this, "logger");
1368
- i(this, "enrolled");
1366
+ s(this, "id");
1367
+ s(this, "logger");
1368
+ s(this, "enrolled");
1369
1369
  this.id = e, this.logger = r.logger, this.enrolled = !1;
1370
1370
  }
1371
1371
  updateModel(e) {
@@ -1379,77 +1379,77 @@ let He = class {
1379
1379
  this.logger.debug(`loading enrollment ${this.id}`);
1380
1380
  }
1381
1381
  };
1382
- He = qo([
1383
- l(q)
1384
- ], He);
1385
- const Qo = {
1382
+ Ye = si([
1383
+ l(J)
1384
+ ], Ye);
1385
+ const ni = {
1386
1386
  registration: {
1387
- [q]: {
1388
- class: He,
1387
+ [J]: {
1388
+ class: Ye,
1389
1389
  singleton: !0
1390
1390
  }
1391
1391
  },
1392
- type: q,
1393
- predicate: c(q),
1394
- factory: d.Singleton.create(q)
1395
- }, { URL: Xo } = h("ENROLLMENT_SERVICE"), { getAll: Jo } = f.build({
1396
- basePath: `${Xo}/api/enrollment`
1397
- }), Zo = p.createLogger({
1392
+ type: J,
1393
+ predicate: c(J),
1394
+ factory: u.Singleton.create(J)
1395
+ }, { URL: ai } = g("ENROLLMENT_SERVICE"), { getAll: li } = h.build({
1396
+ basePath: `${ai}/api/enrollment`
1397
+ }), ci = p.createLogger({
1398
1398
  name: "enrollment-service",
1399
1399
  group: "Services"
1400
- }), es = async () => (Zo.debug("sending GET for enrollment"), await Jo({})), Pi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1400
+ }), ui = async () => (ci.debug("sending GET for enrollment"), await li({})), Fs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1401
1401
  __proto__: null,
1402
- getEnrollments: es
1403
- }, Symbol.toStringTag, { value: "Module" })), Oi = (e) => e.toLowerCase().includes("micros"), Mi = (e) => !e.toLowerCase().includes("micros"), Si = (e) => (t) => {
1402
+ getEnrollments: ui
1403
+ }, Symbol.toStringTag, { value: "Module" })), xs = (e) => e.toLowerCase().includes("micros"), As = (e) => !e.toLowerCase().includes("micros"), js = (e) => (t) => {
1404
1404
  const r = e == null ? void 0 : e.getHoldersByGroup(t);
1405
- return r ? r.map((s) => ({ id: s.id, name: s.ingredientName, path: s.path })) : null;
1406
- }, wi = ["water", "carb", "ns", "nss"], ne = "dashboardKeyFactory", xe = [];
1407
- Rr(ne, {
1405
+ return r ? r.map((i) => ({ id: i.id, name: i.ingredientName, path: i.path })) : null;
1406
+ }, Us = ["water", "carb", "ns", "nss"], ce = "dashboardKeyFactory", ze = [];
1407
+ Nr(ce, {
1408
1408
  register: (e, t) => {
1409
- xe.includes(t) || xe.push(t);
1409
+ ze.includes(t) || ze.push(t);
1410
1410
  },
1411
1411
  execute: (e, t) => {
1412
- const r = xe.sort((s, o) => s.rank - o.rank);
1413
- for (const s of r) {
1414
- const o = s.factory(t);
1412
+ const r = ze.sort((i, o) => i.rank - o.rank);
1413
+ for (const i of r) {
1414
+ const o = i.factory(t);
1415
1415
  if (o)
1416
1416
  return o;
1417
1417
  }
1418
1418
  }
1419
1419
  });
1420
- const ts = (e) => {
1421
- Ee[ne].register(
1422
- ne,
1420
+ const di = (e) => {
1421
+ Re[ce].register(
1422
+ ce,
1423
1423
  e
1424
1424
  );
1425
- }, rs = (e) => Ee[ne].execute(
1426
- ne,
1425
+ }, pi = (e) => Re[ce].execute(
1426
+ ce,
1427
1427
  e
1428
1428
  );
1429
- Ee.registerDashboardKeyFactory = ts;
1430
- Ee.executeDashboardKeyFactory = rs;
1431
- const We = 3600, Jt = 60, Ei = (e) => {
1432
- const t = Math.floor(e / We), r = Math.floor(e % We / Jt);
1429
+ Re.registerDashboardKeyFactory = di;
1430
+ Re.executeDashboardKeyFactory = pi;
1431
+ const qe = 3600, or = 60, Vs = (e) => {
1432
+ const t = Math.floor(e / qe), r = Math.floor(e % qe / or);
1433
1433
  return { hours: t, minutes: r };
1434
- }, Ci = (e, t) => e * We + t * Jt, os = (e) => {
1435
- const r = (/* @__PURE__ */ new Date()).valueOf() - e.valueOf(), s = Math.floor(r / (1e3 * 60)), o = Math.floor(s / 60), a = Math.floor(o / 24), n = s % 60, w = o % 24;
1436
- let ge = "";
1437
- return a > 0 && (ge += `${a} day${a > 1 ? "s" : ""} `), w > 0 && (ge += `${w} hour${w > 1 ? "s" : ""} `), (n > 0 || a === 0 && w === 0) && (ge += `${n} minute${n > 1 ? "s" : ""} `), ge;
1434
+ }, Hs = (e, t) => e * qe + t * or, gi = (e) => {
1435
+ const r = (/* @__PURE__ */ new Date()).valueOf() - e.valueOf(), i = Math.floor(r / (1e3 * 60)), o = Math.floor(i / 60), a = Math.floor(o / 24), n = i % 60, E = o % 24;
1436
+ let me = "";
1437
+ return a > 0 && (me += `${a} day${a > 1 ? "s" : ""} `), E > 0 && (me += `${E} hour${E > 1 ? "s" : ""} `), (n > 0 || a === 0 && E === 0) && (me += `${n} minute${n > 1 ? "s" : ""} `), me;
1438
1438
  };
1439
- var ss = Object.defineProperty, is = Object.getOwnPropertyDescriptor, Re = (e, t, r, s) => {
1440
- for (var o = s > 1 ? void 0 : s ? is(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1441
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1442
- return s && o && ss(t, r, o), o;
1439
+ var hi = Object.defineProperty, fi = Object.getOwnPropertyDescriptor, je = (e, t, r, i) => {
1440
+ for (var o = i > 1 ? void 0 : i ? fi(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1441
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1442
+ return i && o && hi(t, r, o), o;
1443
1443
  };
1444
- const Q = "ingredient-summary-model";
1445
- let I = class {
1444
+ const Z = "ingredient-summary-model";
1445
+ let k = class {
1446
1446
  constructor(e, t, r) {
1447
- i(this, "id");
1448
- i(this, "assemblyModel");
1449
- i(this, "dashboardOperationModel");
1450
- i(this, "appModel");
1451
- i(this, "logger");
1452
- this.id = e, this.logger = r.logger, this.dashboardOperationModel = tt.factory({});
1447
+ s(this, "id");
1448
+ s(this, "assemblyModel");
1449
+ s(this, "dashboardOperationModel");
1450
+ s(this, "appModel");
1451
+ s(this, "logger");
1452
+ this.id = e, this.logger = r.logger, this.dashboardOperationModel = nt.factory({});
1453
1453
  }
1454
1454
  get highPriorityHolders() {
1455
1455
  return this.assemblyModel.allHolders.filter(
@@ -1457,10 +1457,10 @@ let I = class {
1457
1457
  );
1458
1458
  }
1459
1459
  get actionRequiredHolders() {
1460
- const e = this.appModel.currentRole, t = Dt(e);
1460
+ const e = this.appModel.currentRole, t = xt(e);
1461
1461
  return this.assemblyModel.allHolders.filter((r) => {
1462
- const s = r.troubles.filter(t);
1463
- return s.length > 0 && s.find((o) => o.resolvable);
1462
+ const i = r.troubles.filter(t);
1463
+ return i.length > 0 && i.find((o) => o.resolvable);
1464
1464
  });
1465
1465
  }
1466
1466
  get lowLevelHolders() {
@@ -1477,42 +1477,42 @@ let I = class {
1477
1477
  this.logger.debug(`loading ingredient-summary ${this.id}`);
1478
1478
  }
1479
1479
  };
1480
- Re([
1481
- g({ modelType: Ce.type })
1482
- ], I.prototype, "assemblyModel", 2);
1483
- Re([
1484
- g({ modelType: tt.type })
1485
- ], I.prototype, "dashboardOperationModel", 2);
1486
- Re([
1487
- g({ modelType: et.type })
1488
- ], I.prototype, "appModel", 2);
1489
- I = Re([
1490
- l(Q)
1491
- ], I);
1492
- const ns = {
1480
+ je([
1481
+ f({ modelType: Ie.type })
1482
+ ], k.prototype, "assemblyModel", 2);
1483
+ je([
1484
+ f({ modelType: nt.type })
1485
+ ], k.prototype, "dashboardOperationModel", 2);
1486
+ je([
1487
+ f({ modelType: st.type })
1488
+ ], k.prototype, "appModel", 2);
1489
+ k = je([
1490
+ l(Z)
1491
+ ], k);
1492
+ const mi = {
1493
1493
  registration: {
1494
- [Q]: {
1495
- class: I,
1494
+ [Z]: {
1495
+ class: k,
1496
1496
  singleton: !1
1497
1497
  }
1498
1498
  },
1499
- type: Q,
1500
- predicate: c(Q),
1501
- factory: d.Factory.create(
1502
- Q
1499
+ type: Z,
1500
+ predicate: c(Z),
1501
+ factory: u.Factory.create(
1502
+ Z
1503
1503
  )
1504
1504
  };
1505
- var as = Object.defineProperty, ls = Object.getOwnPropertyDescriptor, cs = (e, t, r, s) => {
1506
- for (var o = s > 1 ? void 0 : s ? ls(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1507
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1508
- return s && o && as(t, r, o), o;
1505
+ var yi = Object.defineProperty, bi = Object.getOwnPropertyDescriptor, vi = (e, t, r, i) => {
1506
+ for (var o = i > 1 ? void 0 : i ? bi(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1507
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1508
+ return i && o && yi(t, r, o), o;
1509
1509
  };
1510
- const Zt = "lfcv-pump-model";
1511
- let Ne = class {
1510
+ const ir = "lfcv-pump-model";
1511
+ let Ge = class {
1512
1512
  constructor(e, t, r) {
1513
- i(this, "id");
1514
- i(this, "logger");
1515
- i(this, "pumpModel");
1513
+ s(this, "id");
1514
+ s(this, "logger");
1515
+ s(this, "pumpModel");
1516
1516
  this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent;
1517
1517
  }
1518
1518
  get name() {
@@ -1538,43 +1538,43 @@ let Ne = class {
1538
1538
  this.logger.debug(`loading lfcv-pump ${this.id}`);
1539
1539
  }
1540
1540
  };
1541
- Ne = cs([
1542
- l(Zt)
1543
- ], Ne);
1544
- const Li = new Ye({
1545
- class: Ne,
1546
- type: Zt
1547
- }), { URL: ds } = h("LFCV-PUMP_SERVICE"), { getAll: us } = f.build({
1548
- basePath: `${ds}/api/lfcv-pump`
1549
- }), ps = p.createLogger({
1541
+ Ge = vi([
1542
+ l(ir)
1543
+ ], Ge);
1544
+ const Ws = new Ee({
1545
+ class: Ge,
1546
+ type: ir
1547
+ }), { URL: _i } = g("LFCV-PUMP_SERVICE"), { getAll: $i } = h.build({
1548
+ basePath: `${_i}/api/lfcv-pump`
1549
+ }), Pi = p.createLogger({
1550
1550
  name: "lfcv-pump-service",
1551
1551
  group: "Services"
1552
- }), gs = async () => (ps.debug("sending GET for lfcv-pump"), await us({})), Di = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1552
+ }), Ti = async () => (Pi.debug("sending GET for lfcv-pump"), await $i({})), zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1553
1553
  __proto__: null,
1554
- getLfcvPumps: gs
1555
- }, Symbol.toStringTag, { value: "Module" })), { URL: rt } = h("LOCKOUT_SERVICE"), { postModel: er } = f.build({
1556
- basePath: `${rt}/api/app/kosdev.ddk/lockout`
1557
- }), tr = p.createLogger({ name: "lockout-service", group: "Services" }), hs = async () => (tr.info("lock"), await er({
1554
+ getLfcvPumps: Ti
1555
+ }, Symbol.toStringTag, { value: "Module" })), { URL: at } = g("LOCKOUT_SERVICE"), { postModel: sr } = h.build({
1556
+ basePath: `${at}/api/app/kosdev.ddk/lockout`
1557
+ }), nr = p.createLogger({ name: "lockout-service", group: "Services" }), Oi = async () => (nr.info("lock"), await sr({
1558
1558
  model: {},
1559
- urlOverride: `${rt}/api/app/kosdev.ddk/lockout/lockNow`
1560
- })), rr = async (e) => {
1561
- tr.info("unlock");
1562
- const t = await er({
1559
+ urlOverride: `${at}/api/app/kosdev.ddk/lockout/lockNow`
1560
+ })), ar = async (e) => {
1561
+ nr.info("unlock");
1562
+ const t = await sr({
1563
1563
  model: {},
1564
- urlOverride: `${rt}/api/app/kosdev.ddk/lockout/unlock/${e}`
1564
+ urlOverride: `${at}/api/app/kosdev.ddk/lockout/unlock/${e}`
1565
1565
  });
1566
1566
  return t == null ? void 0 : t.data;
1567
- }, ki = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1567
+ }, Ns = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1568
1568
  __proto__: null,
1569
- lock: hs,
1570
- unlock: rr
1569
+ lock: Oi,
1570
+ unlock: ar
1571
1571
  }, Symbol.toStringTag, { value: "Module" }));
1572
- var fs = Object.defineProperty, ms = Object.getOwnPropertyDescriptor, U = (e, t, r, s) => {
1573
- for (var o = s > 1 ? void 0 : s ? ms(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1574
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1575
- return s && o && fs(t, r, o), o;
1572
+ var Mi = Object.defineProperty, Si = Object.getOwnPropertyDescriptor, W = (e, t, r, i) => {
1573
+ for (var o = i > 1 ? void 0 : i ? Si(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1574
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1575
+ return i && o && Mi(t, r, o), o;
1576
1576
  };
1577
- const or = "lockout-model", ys = [
1577
+ const lr = "lockout-model", Ci = [
1578
1578
  { day: "monday", lock: "dayWiseLockConfigMap.Mon.enabled", open: "dayWiseLockConfigMap.Mon.unlockTime", close: "dayWiseLockConfigMap.Mon.lockTime" },
1579
1579
  { day: "tuesday", lock: "dayWiseLockConfigMap.Tue.enabled", open: "dayWiseLockConfigMap.Tue.unlockTime", close: "dayWiseLockConfigMap.Tue.lockTime" },
1580
1580
  { day: "wednesday", lock: "dayWiseLockConfigMap.Wed.enabled", open: "dayWiseLockConfigMap.Wed.unlockTime", close: "dayWiseLockConfigMap.Wed.lockTime" },
@@ -1583,11 +1583,11 @@ const or = "lockout-model", ys = [
1583
1583
  { day: "saturday", lock: "dayWiseLockConfigMap.Sat.enabled", open: "dayWiseLockConfigMap.Sat.unlockTime", close: "dayWiseLockConfigMap.Sat.lockTime" },
1584
1584
  { day: "sunday", lock: "dayWiseLockConfigMap.Sun.enabled", open: "dayWiseLockConfigMap.Sun.unlockTime", close: "dayWiseLockConfigMap.Sun.lockTime" }
1585
1585
  ];
1586
- let M = class {
1586
+ let C = class {
1587
1587
  constructor(e, t, r) {
1588
- i(this, "id");
1589
- i(this, "logger");
1590
- i(this, "dayEnabledList", [
1588
+ s(this, "id");
1589
+ s(this, "logger");
1590
+ s(this, "dayEnabledList", [
1591
1591
  "dayWiseLockConfigMap.Sun.enabled",
1592
1592
  "dayWiseLockConfigMap.Mon.enabled",
1593
1593
  "dayWiseLockConfigMap.Tue.enabled",
@@ -1596,7 +1596,7 @@ let M = class {
1596
1596
  "dayWiseLockConfigMap.Fri.enabled",
1597
1597
  "dayWiseLockConfigMap.Sat.enabled"
1598
1598
  ]);
1599
- i(this, "dayOpenAtList", [
1599
+ s(this, "dayOpenAtList", [
1600
1600
  "dayWiseLockConfigMap.Sun.unlockTime",
1601
1601
  "dayWiseLockConfigMap.Mon.unlockTime",
1602
1602
  "dayWiseLockConfigMap.Tue.unlockTime",
@@ -1605,7 +1605,7 @@ let M = class {
1605
1605
  "dayWiseLockConfigMap.Fri.unlockTime",
1606
1606
  "dayWiseLockConfigMap.Sat.unlockTime"
1607
1607
  ]);
1608
- i(this, "dayCloseAtList", [
1608
+ s(this, "dayCloseAtList", [
1609
1609
  "dayWiseLockConfigMap.Sun.lockTime",
1610
1610
  "dayWiseLockConfigMap.Mon.lockTime",
1611
1611
  "dayWiseLockConfigMap.Tue.lockTime",
@@ -1614,12 +1614,12 @@ let M = class {
1614
1614
  "dayWiseLockConfigMap.Fri.lockTime",
1615
1615
  "dayWiseLockConfigMap.Sat.lockTime"
1616
1616
  ]);
1617
- i(this, "saveMap");
1618
- i(this, "pin");
1619
- i(this, "nextLockSkipped");
1620
- i(this, "nextLockTime");
1621
- i(this, "nextUnLockTime");
1622
- i(this, "cuiLockout");
1617
+ s(this, "saveMap");
1618
+ s(this, "pin");
1619
+ s(this, "nextLockSkipped");
1620
+ s(this, "nextLockTime");
1621
+ s(this, "nextUnLockTime");
1622
+ s(this, "cuiLockout");
1623
1623
  this.id = e, this.logger = r.logger, this.saveMap = /* @__PURE__ */ new Map();
1624
1624
  }
1625
1625
  get enabled() {
@@ -1629,7 +1629,7 @@ let M = class {
1629
1629
  return t || r;
1630
1630
  }
1631
1631
  get schedule() {
1632
- return ys;
1632
+ return Ci;
1633
1633
  }
1634
1634
  getProp(e) {
1635
1635
  return this.saveMap.get(e);
@@ -1646,7 +1646,7 @@ let M = class {
1646
1646
  this.nextLockSkipped.updateProperty("0");
1647
1647
  }
1648
1648
  async unlock(e) {
1649
- return await rr(e);
1649
+ return await ar(e);
1650
1650
  }
1651
1651
  async save() {
1652
1652
  return this.saveMap.forEach((e, t) => {
@@ -1668,60 +1668,60 @@ let M = class {
1668
1668
  this.logger.debug(`loading lockout ${this.id}`);
1669
1669
  }
1670
1670
  };
1671
- U([
1672
- u({
1671
+ W([
1672
+ d({
1673
1673
  path: "app:kosdev.ddk:service:cuiLockout",
1674
1674
  attribute: "pin"
1675
1675
  })
1676
- ], M.prototype, "pin", 2);
1677
- U([
1678
- u({
1676
+ ], C.prototype, "pin", 2);
1677
+ W([
1678
+ d({
1679
1679
  path: "app:kosdev.ddk:service:cuiLockout",
1680
1680
  attribute: "nextLockSkipped"
1681
1681
  })
1682
- ], M.prototype, "nextLockSkipped", 2);
1683
- U([
1684
- u({
1682
+ ], C.prototype, "nextLockSkipped", 2);
1683
+ W([
1684
+ d({
1685
1685
  path: "app:kosdev.ddk:service:cuiLockout",
1686
1686
  attribute: "nextLockTime"
1687
1687
  })
1688
- ], M.prototype, "nextLockTime", 2);
1689
- U([
1690
- u({
1688
+ ], C.prototype, "nextLockTime", 2);
1689
+ W([
1690
+ d({
1691
1691
  path: "app:kosdev.ddk:service:cuiLockout",
1692
1692
  attribute: "nextUnLockTime"
1693
1693
  })
1694
- ], M.prototype, "nextUnLockTime", 2);
1695
- U([
1696
- Fr({ path: "app:kosdev.ddk:service:cuiLockout" })
1697
- ], M.prototype, "cuiLockout", 2);
1698
- M = U([
1699
- l(or)
1700
- ], M);
1701
- const Ii = new le({
1702
- class: M,
1703
- type: or
1704
- }), bs = async (e, t) => await we.bulkResolveTroubles(
1694
+ ], C.prototype, "nextUnLockTime", 2);
1695
+ W([
1696
+ Br({ path: "app:kosdev.ddk:service:cuiLockout" })
1697
+ ], C.prototype, "cuiLockout", 2);
1698
+ C = W([
1699
+ l(lr)
1700
+ ], C);
1701
+ const Bs = new de({
1702
+ class: C,
1703
+ type: lr
1704
+ }), wi = async (e, t) => await De.bulkResolveTroubles(
1705
1705
  e,
1706
1706
  t
1707
1707
  );
1708
- var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, Fe = (e, t, r, s) => {
1709
- for (var o = s > 1 ? void 0 : s ? _s(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1710
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1711
- return s && o && vs(t, r, o), o;
1708
+ var Ei = Object.defineProperty, Li = Object.getOwnPropertyDescriptor, Ue = (e, t, r, i) => {
1709
+ for (var o = i > 1 ? void 0 : i ? Li(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1710
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1711
+ return i && o && Ei(t, r, o), o;
1712
1712
  };
1713
- const X = "macro-assignment-model", pt = "PurgeTrouble", $s = "PrimeTrouble";
1714
- let R = class {
1713
+ const ee = "macro-assignment-model", yt = "PurgeTrouble", Di = "PrimeTrouble";
1714
+ let F = class {
1715
1715
  constructor(e, t, r) {
1716
- i(this, "id");
1717
- i(this, "logger");
1716
+ s(this, "id");
1717
+ s(this, "logger");
1718
1718
  /**
1719
1719
  * futureHandler is used to handle async operations
1720
1720
  */
1721
- i(this, "futureHandler");
1722
- i(this, "holders");
1723
- i(this, "ingredients");
1724
- this.id = e, this.futureHandler = new ce(), this.logger = r.logger;
1721
+ s(this, "futureHandler");
1722
+ s(this, "holders");
1723
+ s(this, "ingredients");
1724
+ this.id = e, this.futureHandler = new A(), this.logger = r.logger;
1725
1725
  }
1726
1726
  /**
1727
1727
  * shortcut to the current running future
@@ -1751,14 +1751,14 @@ let R = class {
1751
1751
  */
1752
1752
  get holderPurgeTroubles() {
1753
1753
  return this.macroHolders.reduce((t, r) => {
1754
- const s = r.troublesByType[pt] || [];
1755
- return t = [...t, ...s], t;
1754
+ const i = r.troublesByType[yt] || [];
1755
+ return t = [...t, ...i], t;
1756
1756
  }, []);
1757
1757
  }
1758
1758
  get holderPrimeTroubles() {
1759
1759
  return this.macroHolders.reduce((t, r) => {
1760
- const s = r.troublesByType[$s] || [];
1761
- return t = [...t, ...s], t;
1760
+ const i = r.troublesByType[Di] || [];
1761
+ return t = [...t, ...i], t;
1762
1762
  }, []);
1763
1763
  }
1764
1764
  /**
@@ -1793,52 +1793,52 @@ let R = class {
1793
1793
  async resolveAll(e, t) {
1794
1794
  if (!t)
1795
1795
  throw new Error("No tracker provided");
1796
- const s = (e === pt ? this.holderPurgeTroubles : this.holderPrimeTroubles).map((a) => a.rawId);
1797
- return await bs(s, t);
1798
- }
1799
- };
1800
- Fe([
1801
- g({ modelType: jr.type })
1802
- ], R.prototype, "holders", 2);
1803
- Fe([
1804
- g({ modelType: Ur.type })
1805
- ], R.prototype, "ingredients", 2);
1806
- Fe([
1807
- _()
1808
- ], R.prototype, "resolveAll", 1);
1809
- R = Fe([
1810
- l(X)
1811
- ], R);
1812
- const Ts = {
1796
+ const i = (e === yt ? this.holderPurgeTroubles : this.holderPrimeTroubles).map((a) => a.rawId);
1797
+ return await wi(i, t);
1798
+ }
1799
+ };
1800
+ Ue([
1801
+ f({ modelType: qr.type })
1802
+ ], F.prototype, "holders", 2);
1803
+ Ue([
1804
+ f({ modelType: Gr.type })
1805
+ ], F.prototype, "ingredients", 2);
1806
+ Ue([
1807
+ b()
1808
+ ], F.prototype, "resolveAll", 1);
1809
+ F = Ue([
1810
+ l(ee)
1811
+ ], F);
1812
+ const Ri = {
1813
1813
  registration: {
1814
- [X]: {
1815
- class: R,
1814
+ [ee]: {
1815
+ class: F,
1816
1816
  singleton: !0
1817
1817
  }
1818
1818
  },
1819
- type: X,
1820
- predicate: c(X),
1821
- factory: d.Singleton.create(
1822
- X
1819
+ type: ee,
1820
+ predicate: c(ee),
1821
+ factory: u.Singleton.create(
1822
+ ee
1823
1823
  )
1824
1824
  };
1825
- var Ps = Object.defineProperty, Os = Object.getOwnPropertyDescriptor, Ms = (e, t, r, s) => {
1826
- for (var o = s > 1 ? void 0 : s ? Os(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1827
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1828
- return s && o && Ps(t, r, o), o;
1825
+ var Ii = Object.defineProperty, ki = Object.getOwnPropertyDescriptor, Fi = (e, t, r, i) => {
1826
+ for (var o = i > 1 ? void 0 : i ? ki(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1827
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1828
+ return i && o && Ii(t, r, o), o;
1829
1829
  };
1830
- const J = "network-test-model";
1831
- let ze = class {
1830
+ const te = "network-test-model";
1831
+ let Qe = class {
1832
1832
  constructor(e, t, r) {
1833
- i(this, "id");
1834
- i(this, "group");
1835
- i(this, "passed");
1836
- i(this, "inProgress");
1837
- i(this, "failureTime");
1838
- i(this, "timestamp");
1839
- i(this, "name");
1840
- i(this, "results");
1841
- i(this, "logger");
1833
+ s(this, "id");
1834
+ s(this, "group");
1835
+ s(this, "passed");
1836
+ s(this, "inProgress");
1837
+ s(this, "failureTime");
1838
+ s(this, "timestamp");
1839
+ s(this, "name");
1840
+ s(this, "results");
1841
+ s(this, "logger");
1842
1842
  this.id = e, this.logger = r.logger, this.group = t.group, this.passed = !1, this.inProgress = !1, this.name = t.name, this.results = [];
1843
1843
  }
1844
1844
  updateModel(e) {
@@ -1852,58 +1852,58 @@ let ze = class {
1852
1852
  this.logger.debug(`loading network-test ${this.id}`);
1853
1853
  }
1854
1854
  };
1855
- ze = Ms([
1856
- l(J)
1857
- ], ze);
1858
- const sr = {
1855
+ Qe = Fi([
1856
+ l(te)
1857
+ ], Qe);
1858
+ const cr = {
1859
1859
  registration: {
1860
- [J]: {
1861
- class: ze,
1860
+ [te]: {
1861
+ class: Qe,
1862
1862
  singleton: !1
1863
1863
  }
1864
1864
  },
1865
- type: J,
1866
- predicate: c(J),
1867
- factory: d.Factory.create(J)
1868
- }, { URL: Ae } = h("NETWORK-TEST_SERVICE"), { getAll: Ss, getOne: ir } = f.build({
1869
- basePath: `${Ae}/api/app/ncui/network/tests`
1870
- }), ws = p.createLogger({
1865
+ type: te,
1866
+ predicate: c(te),
1867
+ factory: u.Factory.create(te)
1868
+ }, { URL: Ve } = g("NETWORK-TEST_SERVICE"), { getAll: xi, getOne: ur } = h.build({
1869
+ basePath: `${Ve}/api/app/ncui/network/tests`
1870
+ }), Ai = p.createLogger({
1871
1871
  name: "network-test-service",
1872
1872
  group: "Services"
1873
- }), nr = async () => {
1874
- ws.debug("sending GET for network-test");
1875
- const e = await Ss({
1876
- urlOverride: `${Ae}/api/app/kosdev.ddk/network/tests`
1873
+ }), dr = async () => {
1874
+ Ai.debug("sending GET for network-test");
1875
+ const e = await xi({
1876
+ urlOverride: `${Ve}/api/app/kosdev.ddk/network/tests`
1877
1877
  });
1878
1878
  return e == null ? void 0 : e.data;
1879
- }, ar = async () => {
1880
- const e = await ir({
1881
- urlOverride: `${Ae}/api/app/kosdev.ddk/network/reports`
1879
+ }, pr = async () => {
1880
+ const e = await ur({
1881
+ urlOverride: `${Ve}/api/app/kosdev.ddk/network/reports`
1882
1882
  });
1883
1883
  return e == null ? void 0 : e.data;
1884
- }, lr = async (e, t) => await ir({
1885
- urlOverride: `${Ae}/api/app/kosdev.ddk/network/tests/run/group/${e}`,
1884
+ }, gr = async (e, t) => await ur({
1885
+ urlOverride: `${Ve}/api/app/kosdev.ddk/network/tests/run/group/${e}`,
1886
1886
  tracker: t
1887
- }), Ri = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1887
+ }), Ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1888
1888
  __proto__: null,
1889
- getNetworkTests: nr,
1890
- getTestsReports: ar,
1891
- performGroupTest: lr
1889
+ getNetworkTests: dr,
1890
+ getTestsReports: pr,
1891
+ performGroupTest: gr
1892
1892
  }, Symbol.toStringTag, { value: "Module" }));
1893
- var Es = Object.defineProperty, Cs = Object.getOwnPropertyDescriptor, ot = (e, t, r, s) => {
1894
- for (var o = s > 1 ? void 0 : s ? Cs(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1895
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
1896
- return s && o && Es(t, r, o), o;
1893
+ var ji = Object.defineProperty, Ui = Object.getOwnPropertyDescriptor, lt = (e, t, r, i) => {
1894
+ for (var o = i > 1 ? void 0 : i ? Ui(t, r) : t, a = e.length - 1, n; a >= 0; a--)
1895
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
1896
+ return i && o && ji(t, r, o), o;
1897
1897
  };
1898
- const Z = "network-test-container-model";
1899
- let ae = class {
1898
+ const re = "network-test-container-model";
1899
+ let ue = class {
1900
1900
  constructor(e, t, r) {
1901
- i(this, "id");
1902
- i(this, "logger");
1903
- i(this, "lastTested");
1904
- i(this, "futureHandler");
1905
- i(this, "models");
1906
- this.id = e, this.logger = r.logger, this.futureHandler = new ce(this), this.models = new Ge({
1901
+ s(this, "id");
1902
+ s(this, "logger");
1903
+ s(this, "lastTested");
1904
+ s(this, "futureHandler");
1905
+ s(this, "models");
1906
+ this.id = e, this.logger = r.logger, this.futureHandler = new A(this), this.models = new Ze({
1907
1907
  parentId: e,
1908
1908
  indexMap: {
1909
1909
  group: "group"
@@ -1929,19 +1929,19 @@ let ae = class {
1929
1929
  );
1930
1930
  }
1931
1931
  getLastTested(e) {
1932
- const t = this.models.getIndexByKey("group", e).map((s) => s.timestamp && new Date(s.timestamp)), r = Math.max(
1933
- ...t.map((s) => s ? s.getTime() : 0)
1932
+ const t = this.models.getIndexByKey("group", e).map((i) => i.timestamp && new Date(i.timestamp)), r = Math.max(
1933
+ ...t.map((i) => i ? i.getTime() : 0)
1934
1934
  );
1935
- return r ? os(new Date(r)) : "";
1935
+ return r ? gi(new Date(r)) : "";
1936
1936
  }
1937
1937
  async load() {
1938
1938
  this.logger.debug(`loading network-test-container container ${this.id}`);
1939
- const e = await nr(), t = await ar();
1939
+ const e = await dr(), t = await pr();
1940
1940
  e && e.forEach((r) => {
1941
- const s = sr.factory(r.id)(r);
1942
- this.addModel(s);
1941
+ const i = cr.factory(r.id)(r);
1942
+ this.addModel(i);
1943
1943
  }), e && t && e.forEach((r) => {
1944
- const s = t == null ? void 0 : t[r.group], o = s == null ? void 0 : s[r.id], a = this.getModel(r.id);
1944
+ const i = t == null ? void 0 : t[r.group], o = i == null ? void 0 : i[r.id], a = this.getModel(r.id);
1945
1945
  if (a && o) {
1946
1946
  const n = {
1947
1947
  group: o.group,
@@ -1959,16 +1959,16 @@ let ae = class {
1959
1959
  async performTest(e, t) {
1960
1960
  if (!t)
1961
1961
  throw new Error("No tracker provided");
1962
- const r = await lr(e, t);
1962
+ const r = await gr(e, t);
1963
1963
  return r == null ? void 0 : r.data;
1964
1964
  }
1965
1965
  onFutureUpdate(e) {
1966
1966
  const { clientData: t } = e;
1967
1967
  t && t.forEach((r) => {
1968
- const s = this.getModel(r.id);
1969
- if (y(() => {
1968
+ const i = this.getModel(r.id);
1969
+ if (v(() => {
1970
1970
  this.lastTested = this.lastTested > new Date(r.timestamp) ? this.lastTested : new Date(r.timestamp);
1971
- }), s) {
1971
+ }), i) {
1972
1972
  const o = {
1973
1973
  group: r.group,
1974
1974
  name: r.name,
@@ -1978,45 +1978,45 @@ let ae = class {
1978
1978
  timestamp: new Date(r.timestamp),
1979
1979
  results: r.results
1980
1980
  };
1981
- y(() => {
1982
- s.updateModel(o);
1981
+ v(() => {
1982
+ i.updateModel(o);
1983
1983
  });
1984
1984
  }
1985
1985
  });
1986
1986
  }
1987
1987
  };
1988
- ot([
1989
- Se
1990
- ], ae.prototype, "models", 2);
1991
- ot([
1992
- _()
1993
- ], ae.prototype, "performTest", 1);
1994
- ae = ot([
1995
- l(Z)
1996
- ], ae);
1997
- const Ls = {
1988
+ lt([
1989
+ Le
1990
+ ], ue.prototype, "models", 2);
1991
+ lt([
1992
+ b()
1993
+ ], ue.prototype, "performTest", 1);
1994
+ ue = lt([
1995
+ l(re)
1996
+ ], ue);
1997
+ const Vi = {
1998
1998
  registration: {
1999
- [Z]: {
2000
- class: ae,
1999
+ [re]: {
2000
+ class: ue,
2001
2001
  singleton: !0
2002
2002
  },
2003
- ...sr.registration
2003
+ ...cr.registration
2004
2004
  },
2005
- type: Z,
2006
- predicate: c(Z),
2007
- factory: d.Singleton.create(Z)
2005
+ type: re,
2006
+ predicate: c(re),
2007
+ factory: u.Singleton.create(re)
2008
2008
  };
2009
- var Ds = Object.defineProperty, ks = Object.getOwnPropertyDescriptor, cr = (e, t, r, s) => {
2010
- for (var o = s > 1 ? void 0 : s ? ks(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2011
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2012
- return s && o && Ds(t, r, o), o;
2009
+ var Hi = Object.defineProperty, Wi = Object.getOwnPropertyDescriptor, hr = (e, t, r, i) => {
2010
+ for (var o = i > 1 ? void 0 : i ? Wi(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2011
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2012
+ return i && o && Hi(t, r, o), o;
2013
2013
  };
2014
- const ee = "nutritive-sweetener-model";
2015
- let _e = class {
2014
+ const oe = "nutritive-sweetener-model";
2015
+ let Te = class {
2016
2016
  constructor(e, t, r) {
2017
- i(this, "id");
2018
- i(this, "assemblyModel");
2019
- i(this, "logger");
2017
+ s(this, "id");
2018
+ s(this, "assemblyModel");
2019
+ s(this, "logger");
2020
2020
  this.id = e, this.logger = r.logger;
2021
2021
  }
2022
2022
  getHolder() {
@@ -2033,43 +2033,43 @@ let _e = class {
2033
2033
  this.logger.debug(`loading nutritive-sweetener ${this.id}`);
2034
2034
  }
2035
2035
  };
2036
- cr([
2037
- g({ modelType: Ce.type })
2038
- ], _e.prototype, "assemblyModel", 2);
2039
- _e = cr([
2040
- l(ee)
2041
- ], _e);
2042
- const Is = {
2036
+ hr([
2037
+ f({ modelType: Ie.type })
2038
+ ], Te.prototype, "assemblyModel", 2);
2039
+ Te = hr([
2040
+ l(oe)
2041
+ ], Te);
2042
+ const zi = {
2043
2043
  registration: {
2044
- [ee]: {
2045
- class: _e,
2044
+ [oe]: {
2045
+ class: Te,
2046
2046
  singleton: !1
2047
2047
  }
2048
2048
  },
2049
- type: ee,
2050
- predicate: c(ee),
2051
- factory: d.Factory.create(ee)
2049
+ type: oe,
2050
+ predicate: c(oe),
2051
+ factory: u.Factory.create(oe)
2052
2052
  };
2053
- var Rs = Object.defineProperty, Fs = Object.getOwnPropertyDescriptor, dr = (e, t, r, s) => {
2054
- for (var o = s > 1 ? void 0 : s ? Fs(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2055
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2056
- return s && o && Rs(t, r, o), o;
2053
+ var Ni = Object.defineProperty, Bi = Object.getOwnPropertyDescriptor, fr = (e, t, r, i) => {
2054
+ for (var o = i > 1 ? void 0 : i ? Bi(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2055
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2056
+ return i && o && Ni(t, r, o), o;
2057
2057
  };
2058
- const te = "plain-water-model";
2059
- let $e = class {
2058
+ const ie = "plain-water-model";
2059
+ let Oe = class {
2060
2060
  constructor(e, t, r) {
2061
- i(this, "id");
2062
- i(this, "assemblyModel");
2063
- i(this, "logger");
2061
+ s(this, "id");
2062
+ s(this, "assemblyModel");
2063
+ s(this, "logger");
2064
2064
  this.id = e, this.logger = r.logger;
2065
2065
  }
2066
2066
  getHolder() {
2067
2067
  return this.assemblyModel.getHoldersByGroup("water")[0];
2068
2068
  }
2069
2069
  getPump() {
2070
- var s, o;
2071
- const e = this.getHolder(), t = (o = (s = e == null ? void 0 : e.pumps) == null ? void 0 : s.data) == null ? void 0 : o[0];
2072
- return ht(t, Ut.type);
2070
+ var i, o;
2071
+ const e = this.getHolder(), t = (o = (i = e == null ? void 0 : e.pumps) == null ? void 0 : i.data) == null ? void 0 : o[0];
2072
+ return vt(t, Nt.type);
2073
2073
  }
2074
2074
  // -------------------LIFECYCLE----------------------------
2075
2075
  async init() {
@@ -2079,45 +2079,45 @@ let $e = class {
2079
2079
  this.logger.debug(`loading plain-water ${this.id}`);
2080
2080
  }
2081
2081
  };
2082
- dr([
2083
- g({ modelType: Ce.type })
2084
- ], $e.prototype, "assemblyModel", 2);
2085
- $e = dr([
2086
- l(te)
2087
- ], $e);
2088
- const As = {
2082
+ fr([
2083
+ f({ modelType: Ie.type })
2084
+ ], Oe.prototype, "assemblyModel", 2);
2085
+ Oe = fr([
2086
+ l(ie)
2087
+ ], Oe);
2088
+ const Ki = {
2089
2089
  registration: {
2090
- [te]: {
2091
- class: $e,
2090
+ [ie]: {
2091
+ class: Oe,
2092
2092
  singleton: !1
2093
2093
  }
2094
2094
  },
2095
- type: te,
2096
- predicate: c(te),
2097
- factory: d.Factory.create(te)
2098
- }, { URL: ur } = h("REBOOT_SERVICE"), { postModel: xs } = f.build({
2099
- basePath: `${ur}/api/reboot`
2100
- }), js = p.createLogger({ name: "reboot-service", group: "Services" }), pr = async () => (js.debug("sending POST call for Reboot Dispenser"), await xs({
2101
- urlOverride: `${ur}/api/app/kosdev.ddk/ncui/reboot`,
2095
+ type: ie,
2096
+ predicate: c(ie),
2097
+ factory: u.Factory.create(ie)
2098
+ }, { URL: mr } = g("REBOOT_SERVICE"), { postModel: Yi } = h.build({
2099
+ basePath: `${mr}/api/reboot`
2100
+ }), qi = p.createLogger({ name: "reboot-service", group: "Services" }), yr = async () => (qi.debug("sending POST call for Reboot Dispenser"), await Yi({
2101
+ urlOverride: `${mr}/api/app/kosdev.ddk/ncui/reboot`,
2102
2102
  model: {}
2103
- })), Fi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2103
+ })), Ys = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2104
2104
  __proto__: null,
2105
- rebootDispenser: pr
2105
+ rebootDispenser: yr
2106
2106
  }, Symbol.toStringTag, { value: "Module" }));
2107
- var Us = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, Hs = (e, t, r, s) => {
2108
- for (var o = s > 1 ? void 0 : s ? Vs(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2109
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2110
- return s && o && Us(t, r, o), o;
2107
+ var Gi = Object.defineProperty, Qi = Object.getOwnPropertyDescriptor, Xi = (e, t, r, i) => {
2108
+ for (var o = i > 1 ? void 0 : i ? Qi(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2109
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2110
+ return i && o && Gi(t, r, o), o;
2111
2111
  };
2112
- const re = "reboot-model";
2113
- let Be = class {
2112
+ const se = "reboot-model";
2113
+ let Xe = class {
2114
2114
  constructor(e, t, r) {
2115
- i(this, "id");
2116
- i(this, "logger");
2115
+ s(this, "id");
2116
+ s(this, "logger");
2117
2117
  this.id = e, this.logger = r.logger;
2118
2118
  }
2119
2119
  async completeReboot() {
2120
- await pr();
2120
+ await yr();
2121
2121
  }
2122
2122
  updateModel() {
2123
2123
  }
@@ -2129,39 +2129,39 @@ let Be = class {
2129
2129
  this.logger.debug(`loading reboot ${this.id}`);
2130
2130
  }
2131
2131
  };
2132
- Be = Hs([
2133
- l(re)
2134
- ], Be);
2135
- const Ws = {
2132
+ Xe = Xi([
2133
+ l(se)
2134
+ ], Xe);
2135
+ const Ji = {
2136
2136
  registration: {
2137
- [re]: {
2138
- class: Be,
2137
+ [se]: {
2138
+ class: Xe,
2139
2139
  singleton: !1
2140
2140
  }
2141
2141
  },
2142
- type: re,
2143
- predicate: c(re),
2144
- factory: d.Factory.create(re)
2142
+ type: se,
2143
+ predicate: c(se),
2144
+ factory: u.Factory.create(se)
2145
2145
  };
2146
- var Ns = Object.defineProperty, zs = Object.getOwnPropertyDescriptor, T = (e, t, r, s) => {
2147
- for (var o = s > 1 ? void 0 : s ? zs(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2148
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2149
- return s && o && Ns(t, r, o), o;
2146
+ var Zi = Object.defineProperty, es = Object.getOwnPropertyDescriptor, O = (e, t, r, i) => {
2147
+ for (var o = i > 1 ? void 0 : i ? es(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2148
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2149
+ return i && o && Zi(t, r, o), o;
2150
2150
  };
2151
- const oe = "settings-model";
2152
- let v = class {
2151
+ const ne = "settings-model";
2152
+ let P = class {
2153
2153
  constructor(e, t, r) {
2154
- i(this, "id");
2155
- i(this, "logger");
2156
- i(this, "ncuiLanguageData");
2157
- i(this, "resolveDelaysMs");
2158
- i(this, "dateFormat");
2159
- i(this, "timeFormat");
2160
- i(this, "hidePlainWaterBev");
2161
- i(this, "hideCarbWaterBev");
2162
- i(this, "ncuiLanguage");
2163
- i(this, "name");
2164
- i(this, "activateAndRebootTime");
2154
+ s(this, "id");
2155
+ s(this, "logger");
2156
+ s(this, "ncuiLanguageData");
2157
+ s(this, "resolveDelaysMs");
2158
+ s(this, "dateFormat");
2159
+ s(this, "timeFormat");
2160
+ s(this, "hidePlainWaterBev");
2161
+ s(this, "hideCarbWaterBev");
2162
+ s(this, "ncuiLanguage");
2163
+ s(this, "name");
2164
+ s(this, "activateAndRebootTime");
2165
2165
  this.id = e, this.logger = r.logger;
2166
2166
  }
2167
2167
  updateModel(e) {
@@ -2197,96 +2197,96 @@ let v = class {
2197
2197
  };
2198
2198
  }
2199
2199
  };
2200
- T([
2201
- u({
2200
+ O([
2201
+ d({
2202
2202
  path: "system:app",
2203
2203
  attribute: "resolveDelaysMs"
2204
2204
  // optionsExpander: () => [],
2205
2205
  })
2206
- ], v.prototype, "resolveDelaysMs", 2);
2207
- T([
2208
- u({
2206
+ ], P.prototype, "resolveDelaysMs", 2);
2207
+ O([
2208
+ d({
2209
2209
  path: "system:app",
2210
2210
  attribute: "dateFormat"
2211
2211
  // optionsExpander: () => [],
2212
2212
  })
2213
- ], v.prototype, "dateFormat", 2);
2214
- T([
2215
- u({
2213
+ ], P.prototype, "dateFormat", 2);
2214
+ O([
2215
+ d({
2216
2216
  path: "system:app",
2217
2217
  attribute: "timeFormat"
2218
2218
  // optionsExpander: () => [],
2219
2219
  })
2220
- ], v.prototype, "timeFormat", 2);
2221
- T([
2222
- u({
2220
+ ], P.prototype, "timeFormat", 2);
2221
+ O([
2222
+ d({
2223
2223
  path: "app:kosdev.ddk:app",
2224
2224
  attribute: "ncui.hidePlainWaterBev"
2225
2225
  })
2226
- ], v.prototype, "hidePlainWaterBev", 2);
2227
- T([
2228
- u({
2226
+ ], P.prototype, "hidePlainWaterBev", 2);
2227
+ O([
2228
+ d({
2229
2229
  path: "app:kosdev.ddk:app",
2230
2230
  attribute: "ncui.hideCarbWaterBev"
2231
2231
  })
2232
- ], v.prototype, "hideCarbWaterBev", 2);
2233
- T([
2234
- u({
2232
+ ], P.prototype, "hideCarbWaterBev", 2);
2233
+ O([
2234
+ d({
2235
2235
  path: "app:kosdev.ddk:app",
2236
2236
  attribute: "ncui.ncuiLanguage"
2237
2237
  })
2238
- ], v.prototype, "ncuiLanguage", 2);
2239
- T([
2240
- u({
2238
+ ], P.prototype, "ncuiLanguage", 2);
2239
+ O([
2240
+ d({
2241
2241
  path: "kos:device",
2242
2242
  attribute: "name"
2243
2243
  })
2244
- ], v.prototype, "name", 2);
2245
- T([
2246
- u({
2244
+ ], P.prototype, "name", 2);
2245
+ O([
2246
+ d({
2247
2247
  path: "kos:service:OTA",
2248
2248
  attribute: "activateAndRebootTime"
2249
2249
  })
2250
- ], v.prototype, "activateAndRebootTime", 2);
2251
- v = T([
2252
- l(oe)
2253
- ], v);
2254
- const Bs = {
2250
+ ], P.prototype, "activateAndRebootTime", 2);
2251
+ P = O([
2252
+ l(ne)
2253
+ ], P);
2254
+ const ts = {
2255
2255
  registration: {
2256
- [oe]: {
2257
- class: v,
2256
+ [ne]: {
2257
+ class: P,
2258
2258
  singleton: !0
2259
2259
  }
2260
2260
  },
2261
- type: oe,
2262
- predicate: c(oe),
2263
- factory: d.Singleton.create(oe)
2264
- }, { URL: gr } = h("SETTINGS_SERVICE"), { getAll: hr } = f.build({
2265
- basePath: `${gr}/api/settings`
2266
- }), Ks = p.createLogger({
2261
+ type: ne,
2262
+ predicate: c(ne),
2263
+ factory: u.Singleton.create(ne)
2264
+ }, { URL: br } = g("SETTINGS_SERVICE"), { getAll: vr } = h.build({
2265
+ basePath: `${br}/api/settings`
2266
+ }), rs = p.createLogger({
2267
2267
  name: "settings-service",
2268
2268
  group: "Services"
2269
- }), Ys = async () => (Ks.debug("sending GET for settings"), await hr({})), Gs = async () => await hr({
2270
- urlOverride: `${gr}api/app/kosdev.ddk/ncui/languages`
2271
- }), Ai = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2269
+ }), os = async () => (rs.debug("sending GET for settings"), await vr({})), is = async () => await vr({
2270
+ urlOverride: `${br}api/app/kosdev.ddk/ncui/languages`
2271
+ }), qs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2272
2272
  __proto__: null,
2273
- getNcuiLanguage: Gs,
2274
- getSettings: Ys
2273
+ getNcuiLanguage: is,
2274
+ getSettings: os
2275
2275
  }, Symbol.toStringTag, { value: "Module" }));
2276
- var qs = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, Xs = (e, t, r, s) => {
2277
- for (var o = s > 1 ? void 0 : s ? Qs(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2278
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2279
- return s && o && qs(t, r, o), o;
2276
+ var ss = Object.defineProperty, ns = Object.getOwnPropertyDescriptor, as = (e, t, r, i) => {
2277
+ for (var o = i > 1 ? void 0 : i ? ns(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2278
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2279
+ return i && o && ss(t, r, o), o;
2280
2280
  };
2281
- const se = "utilities-model";
2282
- let Ke = class {
2281
+ const ae = "utilities-model";
2282
+ let Je = class {
2283
2283
  constructor(e, t, r) {
2284
- i(this, "id");
2285
- i(this, "name");
2286
- i(this, "options");
2287
- i(this, "roles");
2288
- i(this, "columnId");
2289
- i(this, "logger");
2284
+ s(this, "id");
2285
+ s(this, "name");
2286
+ s(this, "options");
2287
+ s(this, "roles");
2288
+ s(this, "columnId");
2289
+ s(this, "logger");
2290
2290
  this.id = e, this.logger = r.logger, this.name = t.name, this.options = t.options, this.roles = t == null ? void 0 : t.roles, this.columnId = t.columnId;
2291
2291
  }
2292
2292
  updateModel(e) {
@@ -2306,46 +2306,46 @@ let Ke = class {
2306
2306
  this.logger.debug(`loading utilities ${this.id}`);
2307
2307
  }
2308
2308
  };
2309
- Ke = Xs([
2310
- l(se)
2311
- ], Ke);
2312
- const fr = {
2309
+ Je = as([
2310
+ l(ae)
2311
+ ], Je);
2312
+ const _r = {
2313
2313
  registration: {
2314
- [se]: {
2315
- class: Ke,
2314
+ [ae]: {
2315
+ class: Je,
2316
2316
  singleton: !1
2317
2317
  }
2318
2318
  },
2319
- type: se,
2320
- predicate: c(se),
2321
- factory: d.Factory.create(se)
2322
- }, { URL: mr } = h("UTILITIES_SERVICE"), { getAll: Js } = f.build({
2323
- basePath: `${mr}/api/utilities`
2324
- }), Zs = p.createLogger({
2319
+ type: ae,
2320
+ predicate: c(ae),
2321
+ factory: u.Factory.create(ae)
2322
+ }, { URL: $r } = g("UTILITIES_SERVICE"), { getAll: ls } = h.build({
2323
+ basePath: `${$r}/api/utilities`
2324
+ }), cs = p.createLogger({
2325
2325
  name: "utilities-service",
2326
2326
  group: "Services"
2327
- }), yr = async () => {
2328
- Zs.debug("sending GET for utilities");
2329
- const e = await Js({
2330
- urlOverride: `${mr}/api/kos/descriptor/system:app/kondra.ncui.utilities`
2327
+ }), Pr = async () => {
2328
+ cs.debug("sending GET for utilities");
2329
+ const e = await ls({
2330
+ urlOverride: `${$r}/api/kos/descriptor/system:app/kondra.ncui.utilities`
2331
2331
  });
2332
2332
  return e == null ? void 0 : e.data;
2333
- }, xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2333
+ }, Gs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2334
2334
  __proto__: null,
2335
- getUtilities: yr
2335
+ getUtilities: Pr
2336
2336
  }, Symbol.toStringTag, { value: "Module" }));
2337
- var ei = Object.defineProperty, ti = Object.getOwnPropertyDescriptor, br = (e, t, r, s) => {
2338
- for (var o = s > 1 ? void 0 : s ? ti(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2339
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2340
- return s && o && ei(t, r, o), o;
2337
+ var us = Object.defineProperty, ds = Object.getOwnPropertyDescriptor, Tr = (e, t, r, i) => {
2338
+ for (var o = i > 1 ? void 0 : i ? ds(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2339
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2340
+ return i && o && us(t, r, o), o;
2341
2341
  };
2342
- const ie = "utilities-container-model";
2343
- let Te = class {
2342
+ const le = "utilities-container-model";
2343
+ let Me = class {
2344
2344
  constructor(e, t, r) {
2345
- i(this, "id");
2346
- i(this, "logger");
2347
- i(this, "_models");
2348
- this.id = e, this.logger = r.logger, this._models = new Ge({
2345
+ s(this, "id");
2346
+ s(this, "logger");
2347
+ s(this, "_models");
2348
+ this.id = e, this.logger = r.logger, this._models = new Ze({
2349
2349
  parentId: e,
2350
2350
  sortKey: "id",
2351
2351
  indexMap: {
@@ -2377,13 +2377,13 @@ let Te = class {
2377
2377
  // -------------------LIFECYCLE----------------------------
2378
2378
  async load() {
2379
2379
  this.logger.debug(`loading utilities-container container ${this.id}`);
2380
- const e = await yr();
2380
+ const e = await Pr();
2381
2381
  e == null || e.forEach((t, r) => {
2382
- t.forEach((s) => {
2382
+ t.forEach((i) => {
2383
2383
  const o = {
2384
- ...s,
2384
+ ...i,
2385
2385
  columnId: String(r)
2386
- }, a = fr.factory(s.name)(
2386
+ }, a = _r.factory(i.name)(
2387
2387
  o
2388
2388
  );
2389
2389
  this.addModel(a);
@@ -2391,57 +2391,57 @@ let Te = class {
2391
2391
  });
2392
2392
  }
2393
2393
  };
2394
- br([
2395
- Se
2396
- ], Te.prototype, "_models", 2);
2397
- Te = br([
2398
- l(ie)
2399
- ], Te);
2400
- const ri = {
2394
+ Tr([
2395
+ Le
2396
+ ], Me.prototype, "_models", 2);
2397
+ Me = Tr([
2398
+ l(le)
2399
+ ], Me);
2400
+ const ps = {
2401
2401
  registration: {
2402
- [ie]: {
2403
- class: Te,
2402
+ [le]: {
2403
+ class: Me,
2404
2404
  singleton: !0
2405
2405
  },
2406
- ...fr.registration
2406
+ ..._r.registration
2407
2407
  },
2408
- type: ie,
2409
- predicate: c(ie),
2410
- factory: d.Singleton.create(ie)
2411
- }, ji = {
2412
- ...ho.registration,
2413
- ...et.registration,
2414
- ...Je.registration,
2408
+ type: le,
2409
+ predicate: c(le),
2410
+ factory: u.Singleton.create(le)
2411
+ }, Qs = {
2415
2412
  ...Oo.registration,
2416
- ...tt.registration,
2417
- ...Fo.registration,
2418
- ...Wo.registration,
2419
- ...Qo.registration,
2420
- ...ns.registration,
2421
- ...Ts.registration,
2422
- ...Ls.registration,
2423
- ...Is.registration,
2424
- ...As.registration,
2425
- ...Ws.registration,
2426
- ...Bs.registration,
2427
- ...wt.registration,
2428
- ...ri.registration
2429
- };
2430
- var oi = Object.defineProperty, si = Object.getOwnPropertyDescriptor, vr = (e, t, r, s) => {
2431
- for (var o = s > 1 ? void 0 : s ? si(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2432
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2433
- return s && o && oi(t, r, o), o;
2434
- };
2435
- const _r = "trouble-action-model";
2436
- let Pe = class {
2413
+ ...st.registration,
2414
+ ...ot.registration,
2415
+ ...ko.registration,
2416
+ ...nt.registration,
2417
+ ...Bo.registration,
2418
+ ...Jo.registration,
2419
+ ...ni.registration,
2420
+ ...mi.registration,
2421
+ ...Ri.registration,
2422
+ ...Vi.registration,
2423
+ ...zi.registration,
2424
+ ...Ki.registration,
2425
+ ...Ji.registration,
2426
+ ...ts.registration,
2427
+ ...Rt.registration,
2428
+ ...ps.registration
2429
+ };
2430
+ var gs = Object.defineProperty, hs = Object.getOwnPropertyDescriptor, Or = (e, t, r, i) => {
2431
+ for (var o = i > 1 ? void 0 : i ? hs(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2432
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2433
+ return i && o && gs(t, r, o), o;
2434
+ };
2435
+ const Mr = "trouble-action-model";
2436
+ let Se = class {
2437
2437
  constructor(e, t, r) {
2438
- i(this, "id");
2439
- i(this, "logger");
2440
- i(this, "troubleContainer");
2441
- i(this, "disposer");
2442
- i(this, "state");
2443
- i(this, "troubleActionData");
2444
- this.id = e, this.logger = r.logger, this.state = Ar(), this.troubleActionData = t.definitions.reduce((s, o) => (s[o.troubleType] = o, s), {});
2438
+ s(this, "id");
2439
+ s(this, "logger");
2440
+ s(this, "troubleContainer");
2441
+ s(this, "disposer");
2442
+ s(this, "state");
2443
+ s(this, "troubleActionData");
2444
+ this.id = e, this.logger = r.logger, this.state = Kr(), this.troubleActionData = t.definitions.reduce((i, o) => (i[o.troubleType] = o, i), {});
2445
2445
  }
2446
2446
  // -------------------LIFECYCLE----------------------------
2447
2447
  get activeTrouble() {
@@ -2459,11 +2459,11 @@ let Pe = class {
2459
2459
  return (e = this.activeTrouble) == null ? void 0 : e.type;
2460
2460
  }
2461
2461
  async init() {
2462
- this.logger.debug(`initializing trouble-action ${this.id}`), this.disposer = xr(() => {
2462
+ this.logger.debug(`initializing trouble-action ${this.id}`), this.disposer = Yr(() => {
2463
2463
  const e = this.troubleContainer.troubles.data.reduce((t, r) => {
2464
- const s = r.type;
2465
- if (this.troubleActionData[s]) {
2466
- const o = this.troubleActionData[s].stateKey ?? s, a = this.troubleActionData[s].stateValue ?? s;
2464
+ const i = r.type;
2465
+ if (this.troubleActionData[i]) {
2466
+ const o = this.troubleActionData[i].stateKey ?? i, a = this.troubleActionData[i].stateValue ?? i;
2467
2467
  t[o] = a;
2468
2468
  }
2469
2469
  return t;
@@ -2484,34 +2484,34 @@ let Pe = class {
2484
2484
  this.logger.debug(`loading trouble-action ${this.id}`);
2485
2485
  }
2486
2486
  };
2487
- vr([
2488
- g({ modelType: Qe.type })
2489
- ], Pe.prototype, "troubleContainer", 2);
2490
- Pe = vr([
2491
- l(_r)
2492
- ], Pe);
2493
- const Ui = new le({
2494
- class: Pe,
2495
- type: _r
2496
- }), { URL: $r } = h("START_SERVICE"), { getOne: ii } = f.build({
2497
- basePath: `${$r}/api/start`
2498
- }), ni = p.createLogger({ name: "start-service", group: "Services" }), Tr = async () => (ni.debug("navigating to NCUI"), await ii({
2499
- urlOverride: `${$r}/api/app/kosdev.ddk/ncui/open`
2500
- })), Vi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2487
+ Or([
2488
+ f({ modelType: tt.type })
2489
+ ], Se.prototype, "troubleContainer", 2);
2490
+ Se = Or([
2491
+ l(Mr)
2492
+ ], Se);
2493
+ const Xs = new de({
2494
+ class: Se,
2495
+ type: Mr
2496
+ }), { URL: Sr } = g("START_SERVICE"), { getOne: fs } = h.build({
2497
+ basePath: `${Sr}/api/start`
2498
+ }), ms = p.createLogger({ name: "start-service", group: "Services" }), Cr = async () => (ms.debug("navigating to NCUI"), await fs({
2499
+ urlOverride: `${Sr}/api/app/kosdev.ddk/ncui/open`
2500
+ })), Js = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2501
2501
  __proto__: null,
2502
- navigateToNCui: Tr
2502
+ navigateToNCui: Cr
2503
2503
  }, Symbol.toStringTag, { value: "Module" }));
2504
- var ai = Object.defineProperty, li = Object.getOwnPropertyDescriptor, Pr = (e, t, r, s) => {
2505
- for (var o = s > 1 ? void 0 : s ? li(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2506
- (n = e[a]) && (o = (s ? n(t, r, o) : n(o)) || o);
2507
- return s && o && ai(t, r, o), o;
2504
+ var ys = Object.defineProperty, bs = Object.getOwnPropertyDescriptor, wr = (e, t, r, i) => {
2505
+ for (var o = i > 1 ? void 0 : i ? bs(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2506
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2507
+ return i && o && ys(t, r, o), o;
2508
2508
  };
2509
- const Or = "start-model";
2510
- let Oe = class {
2509
+ const Er = "start-model";
2510
+ let Ce = class {
2511
2511
  constructor(e, t, r) {
2512
- i(this, "id");
2513
- i(this, "logger");
2514
- i(this, "troubles");
2512
+ s(this, "id");
2513
+ s(this, "logger");
2514
+ s(this, "troubles");
2515
2515
  this.id = e, this.logger = r.logger;
2516
2516
  }
2517
2517
  get firmwareFailed() {
@@ -2527,7 +2527,7 @@ let Oe = class {
2527
2527
  ).length > 0;
2528
2528
  }
2529
2529
  async navigate() {
2530
- await Tr();
2530
+ await Cr();
2531
2531
  }
2532
2532
  // -------------------LIFECYCLE----------------------------
2533
2533
  async init() {
@@ -2537,73 +2537,257 @@ let Oe = class {
2537
2537
  this.logger.debug(`loading start ${this.id}`);
2538
2538
  }
2539
2539
  };
2540
- Pr([
2541
- g({ modelType: Qe.type })
2542
- ], Oe.prototype, "troubles", 2);
2543
- Oe = Pr([
2544
- l(Or)
2545
- ], Oe);
2546
- const Hi = new le({
2547
- class: Oe,
2548
- type: Or
2540
+ wr([
2541
+ f({ modelType: tt.type })
2542
+ ], Ce.prototype, "troubles", 2);
2543
+ Ce = wr([
2544
+ l(Er)
2545
+ ], Ce);
2546
+ const Zs = new de({
2547
+ class: Ce,
2548
+ type: Er
2549
+ }), { URL: fe } = g("SPM-PUMP_SERVICE"), { postModel: He } = h.build({
2550
+ basePath: `${fe}/api/spm-pump`
2551
+ }), _ = p.createLogger({
2552
+ name: "spm-pump-service",
2553
+ group: "Services"
2554
+ }), Lr = async (e, t) => {
2555
+ _.debug(
2556
+ `performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
2557
+ );
2558
+ try {
2559
+ const r = await He({
2560
+ model: {},
2561
+ urlOverride: `${fe}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
2562
+ tracker: t
2563
+ });
2564
+ return _.debug("performPreCalibrate - response:", r), r != null && r.data && $.initiateFuture(r.data), r == null ? void 0 : r.data;
2565
+ } catch (r) {
2566
+ _.error(
2567
+ `performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
2568
+ r
2569
+ );
2570
+ const i = {
2571
+ id: t || "",
2572
+ endState: y.Fail,
2573
+ tracker: t,
2574
+ reason: "Failed to resolve trouble"
2575
+ };
2576
+ return $.initiateFuture(i), i;
2577
+ }
2578
+ }, Dr = async (e, t) => {
2579
+ _.debug(
2580
+ `performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
2581
+ );
2582
+ try {
2583
+ const r = await He({
2584
+ model: {},
2585
+ urlOverride: `${fe}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
2586
+ tracker: t
2587
+ });
2588
+ return _.debug("performCalibrate - response:", r), r != null && r.data && $.initiateFuture(r.data), r == null ? void 0 : r.data;
2589
+ } catch (r) {
2590
+ _.error(
2591
+ `performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
2592
+ r
2593
+ );
2594
+ const i = {
2595
+ id: t || "",
2596
+ endState: y.Fail,
2597
+ tracker: t,
2598
+ reason: "Failed to resolve trouble"
2599
+ };
2600
+ return $.initiateFuture(i), i;
2601
+ }
2602
+ }, Rr = async (e, t, r, i) => {
2603
+ _.debug(
2604
+ `performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
2605
+ );
2606
+ try {
2607
+ const o = await He({
2608
+ model: {
2609
+ ...r,
2610
+ // commandedCalibrationVolume: 0,
2611
+ measuredCalibrationVolume: t
2612
+ // measuredVerificationVolume: 0,
2613
+ // newCalibrationValue: 0,
2614
+ // pouredCalibrationVolume: 0,
2615
+ },
2616
+ urlOverride: `${fe}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
2617
+ tracker: i
2618
+ });
2619
+ return _.debug("performVerify - response:", o), o != null && o.data && $.initiateFuture(o.data), o == null ? void 0 : o.data;
2620
+ } catch (o) {
2621
+ _.error(
2622
+ `performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`,
2623
+ o
2624
+ );
2625
+ const a = {
2626
+ id: i || "",
2627
+ endState: y.Fail,
2628
+ tracker: i,
2629
+ reason: "Failed to resolve trouble"
2630
+ };
2631
+ return $.initiateFuture(a), a;
2632
+ }
2633
+ }, Ir = async (e, t, r, i) => {
2634
+ _.debug(
2635
+ `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
2636
+ );
2637
+ try {
2638
+ const o = await He({
2639
+ model: {
2640
+ ...i,
2641
+ // commandedCalibrationVolume: 0,
2642
+ measuredCalibrationVolume: t,
2643
+ measuredVerificationVolume: r
2644
+ // newCalibrationValue: 0,
2645
+ // pouredCalibrationVolume: 0,
2646
+ },
2647
+ urlOverride: `${fe}/api/ext/freestyle/microCalibration/pour/${e}/complete`
2648
+ });
2649
+ return _.debug("performComplete - response:", o), o == null ? void 0 : o.data;
2650
+ } catch (o) {
2651
+ _.error(
2652
+ `performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
2653
+ o
2654
+ );
2655
+ return;
2656
+ }
2657
+ }, en = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2658
+ __proto__: null,
2659
+ performCalibrate: Dr,
2660
+ performComplete: Ir,
2661
+ performPreCalibrate: Lr,
2662
+ performVerify: Rr
2663
+ }, Symbol.toStringTag, { value: "Module" }));
2664
+ var vs = Object.defineProperty, _s = Object.getOwnPropertyDescriptor, We = (e, t, r, i) => {
2665
+ for (var o = i > 1 ? void 0 : i ? _s(t, r) : t, a = e.length - 1, n; a >= 0; a--)
2666
+ (n = e[a]) && (o = (i ? n(t, r, o) : n(o)) || o);
2667
+ return i && o && vs(t, r, o), o;
2668
+ };
2669
+ const kr = "spm-pump-model";
2670
+ let x = class {
2671
+ constructor(e, t, r) {
2672
+ s(this, "id");
2673
+ s(this, "logger");
2674
+ s(this, "pump");
2675
+ s(this, "futureHandler");
2676
+ this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new A(this);
2677
+ }
2678
+ get name() {
2679
+ return this.pump.name;
2680
+ }
2681
+ get canPour() {
2682
+ return this.pump.canPour;
2683
+ }
2684
+ get isPouring() {
2685
+ return this.pump.isPouring;
2686
+ }
2687
+ async cancelPour() {
2688
+ return this.pump.cancelPour();
2689
+ }
2690
+ performIntent(e) {
2691
+ return this.pump.performIntent(e);
2692
+ }
2693
+ get future() {
2694
+ return this.futureHandler.future;
2695
+ }
2696
+ async performPreCalibrate(e) {
2697
+ return Lr(this.pump.path, e);
2698
+ }
2699
+ async performCalibrate(e) {
2700
+ return Dr(this.pump.path, e);
2701
+ }
2702
+ async performVerify(e, t, r) {
2703
+ return Rr(this.pump.path, e, t, r);
2704
+ }
2705
+ async performComplete(e, t, r) {
2706
+ return Ir(this.pump.path, e, t, r);
2707
+ }
2708
+ // -------------------LIFECYCLE----------------------------
2709
+ async init() {
2710
+ this.logger.debug(`initializing spm-pump ${this.id}`);
2711
+ }
2712
+ async load() {
2713
+ this.logger.debug(`loading spm-pump ${this.id}`);
2714
+ }
2715
+ };
2716
+ We([
2717
+ b()
2718
+ ], x.prototype, "performPreCalibrate", 1);
2719
+ We([
2720
+ b()
2721
+ ], x.prototype, "performCalibrate", 1);
2722
+ We([
2723
+ b()
2724
+ ], x.prototype, "performVerify", 1);
2725
+ x = We([
2726
+ l(kr)
2727
+ ], x);
2728
+ const tn = new Ee({
2729
+ class: x,
2730
+ type: kr
2549
2731
  });
2550
2732
  export {
2551
- fi as AgitationControl,
2552
- ho as Animation,
2553
- mi as AnimationServices,
2554
- et as Application,
2555
- Je as Auth,
2556
- gi as AuthServices,
2557
- Oo as CarbWater,
2558
- vi as CopyLogs,
2559
- bi as CopyLogsServices,
2560
- ji as DDKModels,
2561
- tt as DashboardOperations,
2562
- _i as DashboardOperationsServices,
2563
- Fo as Dispenser,
2564
- Wo as DispenserInfo,
2565
- Ti as DispenserInfoServices,
2566
- $i as DispenserServices,
2567
- Gr as Door,
2568
- ne as EXTENSION_POINT_DASHBOARD_KEY_FACTORY,
2569
- Qo as Enrollment,
2570
- Pi as EnrollmentServices,
2571
- Ut as FcmPump,
2572
- yi as FcmPumpServices,
2573
- ns as IngredientSummary,
2574
- Li as LfcvPump,
2575
- Di as LfcvPumpServices,
2576
- Ii as Lockout,
2577
- ki as LockoutServices,
2578
- wi as MACRO_KEYS,
2579
- Ts as MacroAssignment,
2580
- sr as NetworkTest,
2581
- Ls as NetworkTestContainer,
2582
- Ri as NetworkTestServices,
2583
- Is as NutritiveSweetener,
2584
- As as PlainWater,
2585
- Ws as Reboot,
2586
- Fi as RebootServices,
2587
- Bs as Settings,
2588
- Ai as SettingsServices,
2589
- St as SetupStep,
2590
- wt as SetupStepContainer,
2591
- hi as SetupStepServices,
2592
- Hi as Start,
2593
- Vi as StartServices,
2594
- Vr as TROUBLE_TYPE_PRIME,
2595
- nt as TROUBLE_TYPE_PURGE,
2596
- Ui as TroubleActionManager,
2597
- fr as Utilities,
2598
- ri as UtilitiesContainer,
2599
- xi as UtilitiesServices,
2600
- os as calculateTimeDifference,
2601
- rs as executeDashboardKeyFactory,
2602
- Mi as isMacroGroup,
2603
- Oi as isMicroGroup,
2604
- Si as macroHolderMap,
2605
- ts as registerDashboardKeyFactory,
2606
- Ci as toSeconds,
2607
- Ei as toTimeComponents,
2608
- Dt as troubleVisibilityFilter
2733
+ Cs as AgitationControl,
2734
+ Oo as Animation,
2735
+ ws as AnimationServices,
2736
+ st as Application,
2737
+ ot as Auth,
2738
+ Ms as AuthServices,
2739
+ ko as CarbWater,
2740
+ Ds as CopyLogs,
2741
+ Ls as CopyLogsServices,
2742
+ Qs as DDKModels,
2743
+ nt as DashboardOperations,
2744
+ Rs as DashboardOperationsServices,
2745
+ Bo as Dispenser,
2746
+ Jo as DispenserInfo,
2747
+ ks as DispenserInfoServices,
2748
+ Is as DispenserServices,
2749
+ io as Door,
2750
+ ce as EXTENSION_POINT_DASHBOARD_KEY_FACTORY,
2751
+ ni as Enrollment,
2752
+ Fs as EnrollmentServices,
2753
+ Nt as FcmPump,
2754
+ Es as FcmPumpServices,
2755
+ mi as IngredientSummary,
2756
+ Ws as LfcvPump,
2757
+ zs as LfcvPumpServices,
2758
+ Bs as Lockout,
2759
+ Ns as LockoutServices,
2760
+ Us as MACRO_KEYS,
2761
+ Ri as MacroAssignment,
2762
+ cr as NetworkTest,
2763
+ Vi as NetworkTestContainer,
2764
+ Ks as NetworkTestServices,
2765
+ zi as NutritiveSweetener,
2766
+ Ki as PlainWater,
2767
+ Ji as Reboot,
2768
+ Ys as RebootServices,
2769
+ ts as Settings,
2770
+ qs as SettingsServices,
2771
+ Dt as SetupStep,
2772
+ Rt as SetupStepContainer,
2773
+ Ss as SetupStepServices,
2774
+ tn as SpmPump,
2775
+ en as SpmPumpServices,
2776
+ Zs as Start,
2777
+ Js as StartServices,
2778
+ Qr as TROUBLE_TYPE_PRIME,
2779
+ dt as TROUBLE_TYPE_PURGE,
2780
+ Xs as TroubleActionManager,
2781
+ _r as Utilities,
2782
+ ps as UtilitiesContainer,
2783
+ Gs as UtilitiesServices,
2784
+ gi as calculateTimeDifference,
2785
+ pi as executeDashboardKeyFactory,
2786
+ As as isMacroGroup,
2787
+ xs as isMicroGroup,
2788
+ js as macroHolderMap,
2789
+ di as registerDashboardKeyFactory,
2790
+ Hs as toSeconds,
2791
+ Vs as toTimeComponents,
2792
+ xt as troubleVisibilityFilter
2609
2793
  };