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