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