@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5163 → 0.1.0-dev.5167
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/{extension-utils-DABHO8qx.cjs → extension-utils-CIeLBxMW.cjs} +2 -2
- package/{extension-utils-DABHO8qx.cjs.map → extension-utils-CIeLBxMW.cjs.map} +1 -1
- package/{extension-utils-CARIyqNK.js → extension-utils-mrQ_wiPv.js} +11 -11
- package/{extension-utils-CARIyqNK.js.map → extension-utils-mrQ_wiPv.js.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +36 -33
- package/models/utils/openapi-index.d.ts +2 -2
- package/models/utils/services/freestyle/1.6.5/openapi.d.ts +1462 -0
- package/models/utils/services/freestyle/1.6.5/service.d.ts +118 -0
- package/models/utils/services/freestyle/1.6.5/service.d.ts.map +1 -0
- package/models/utils/services/freestyle/1.8.1/openapi.d.ts +1656 -0
- package/models/utils/services/freestyle/1.8.1/service.d.ts +118 -0
- package/models/utils/services/freestyle/1.8.1/service.d.ts.map +1 -0
- package/models/utils/services/handle/1.8.1/openapi.d.ts +237 -0
- package/models/utils/services/handle/1.8.1/service.d.ts +118 -0
- package/models/utils/services/handle/1.8.1/service.d.ts.map +1 -0
- package/models/utils/services-index.d.ts +3 -0
- package/models/utils/services-index.d.ts.map +1 -1
- package/models.cjs +1 -1
- package/models.js +30 -27
- package/package.json +4 -4
- package/{service-VUszslQD.cjs → service-DrOwtgpN.cjs} +2 -2
- package/service-DrOwtgpN.cjs.map +1 -0
- package/{service-C0WOCTr1.js → service-Rmefh9Kc.js} +497 -467
- package/service-Rmefh9Kc.js.map +1 -0
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/{use-nutrition-info-BWyJAXF6.js → use-nutrition-info-Cb4qW_qq.js} +2 -2
- package/{use-nutrition-info-BWyJAXF6.js.map → use-nutrition-info-Cb4qW_qq.js.map} +1 -1
- package/{use-nutrition-info-BRX7H5o6.cjs → use-nutrition-info-DOOjBBqm.cjs} +2 -2
- package/{use-nutrition-info-BRX7H5o6.cjs.map → use-nutrition-info-DOOjBBqm.cjs.map} +1 -1
- package/service-C0WOCTr1.js.map +0 -1
- package/service-VUszslQD.cjs.map +0 -1
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (e, t, r) => (
|
|
4
|
-
import { resolveServiceUrl as A, ServiceFactory as w, KosLog as $, createPropKey as x, kosStateProp as
|
|
5
|
-
import { PourState as d, Assembly as
|
|
6
|
-
const { URL:
|
|
7
|
-
basePath: `${
|
|
1
|
+
var Pt = Object.defineProperty;
|
|
2
|
+
var vt = (e, t, r) => t in e ? Pt(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var i = (e, t, r) => (vt(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { resolveServiceUrl as A, ServiceFactory as w, KosLog as $, createPropKey as x, kosStateProp as E, kosConfigProperty as b, kosStateEntry as be, kosStateExit as Tt, kosStateGuard as Pe, kosFuture as I, kosModel as f, kosLoggerAware as re, kosCompanion as xe, kosFutureAware as Ue, kosStateMachine as _t, DependencyLifecycle as je, KosModelContainer as It, kosChild as qe, kosModelEffect as ve, EventBus as Z, KosModelRegistrationFactory as C, SingletonKosModelRegistrationFactory as Te, FetchError as _e, FutureManager as y, FutureEndState as U, FutureHandler as Ge, kosParentAware as Ve, KosFeatureFlags as ue, getKosCompanionModel as $t, getKosModelSync as R, kosContainerAware as Ct, KosContextManager as Ot, kosAction as W, KOS_MODEL_ID as O, kosMultipleFutureAware as Et, kosTopicHandler as St, modelTypeEventTopicFactory as At, RegistrationManager as m, registerCoreModels as wt, Trouble as Mt, ExtensionManager as ce, EXTENSION_TROUBLE_DATA_MAPPER as de, createClient as V, kosServiceRequest as H } from "@kosdev-code/kos-ui-sdk";
|
|
5
|
+
import { PourState as d, Assembly as He, KosModelRegistry as Rt, registerDispenseModels as Dt, Nozzle as Lt, Pump as Ft, Holder as zt, PumpContainer as Nt, PumpIndex as xt } from "@kosdev-code/kos-dispense-sdk";
|
|
6
|
+
const { URL: Be } = A("ICE_AGITATOR_SERVICE"), { postModel: Ut } = w.build({
|
|
7
|
+
basePath: `${Be}/api/ext/freestyle/ice`
|
|
8
8
|
});
|
|
9
9
|
$.createLogger({
|
|
10
10
|
name: "carb-tank-service",
|
|
11
11
|
group: "Services"
|
|
12
12
|
});
|
|
13
|
-
const
|
|
14
|
-
const r = await
|
|
13
|
+
const jt = async (e, t) => {
|
|
14
|
+
const r = await Ut({
|
|
15
15
|
model: {},
|
|
16
16
|
tracker: t,
|
|
17
|
-
urlOverride: `${
|
|
17
|
+
urlOverride: `${Be}/api/handle/${e}/test`
|
|
18
18
|
});
|
|
19
19
|
if (!(r != null && r.data))
|
|
20
20
|
throw new Error("No response from server");
|
|
21
21
|
return r == null ? void 0 : r.data;
|
|
22
22
|
};
|
|
23
|
-
var
|
|
24
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
23
|
+
var Ke = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, Gt = (e, t, r) => t in e ? Ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, P = (e, t, r, o) => {
|
|
24
|
+
for (var a = o > 1 ? void 0 : o ? qt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
25
25
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
26
|
-
return o && a &&
|
|
27
|
-
},
|
|
28
|
-
const
|
|
26
|
+
return o && a && Ke(t, r, a), a;
|
|
27
|
+
}, Vt = (e, t, r) => (Gt(e, t + "", r), r);
|
|
28
|
+
const Ht = "carb-agitator-model", Ie = x("statePath");
|
|
29
29
|
let g = class {
|
|
30
30
|
constructor(e, t, r) {
|
|
31
31
|
i(this, "id");
|
|
@@ -97,25 +97,25 @@ let g = class {
|
|
|
97
97
|
handleTestCarbTank(e) {
|
|
98
98
|
if (!e)
|
|
99
99
|
throw new Error("No tracker provided");
|
|
100
|
-
return this.logger.info(`testing carb tank: ${this.id}`),
|
|
100
|
+
return this.logger.info(`testing carb tank: ${this.id}`), jt(this.path, e);
|
|
101
101
|
}
|
|
102
102
|
};
|
|
103
|
-
|
|
103
|
+
Vt(g, "Registration");
|
|
104
104
|
P([
|
|
105
|
-
|
|
106
|
-
path:
|
|
105
|
+
E({
|
|
106
|
+
path: Ie,
|
|
107
107
|
attribute: "highProbeWet"
|
|
108
108
|
})
|
|
109
109
|
], g.prototype, "highProbeWet", 2);
|
|
110
110
|
P([
|
|
111
|
-
|
|
112
|
-
path:
|
|
111
|
+
E({
|
|
112
|
+
path: Ie,
|
|
113
113
|
attribute: "lowProbeWet"
|
|
114
114
|
})
|
|
115
115
|
], g.prototype, "lowProbeWet", 2);
|
|
116
116
|
P([
|
|
117
|
-
|
|
118
|
-
path:
|
|
117
|
+
E({
|
|
118
|
+
path: Ie,
|
|
119
119
|
attribute: "filling"
|
|
120
120
|
})
|
|
121
121
|
], g.prototype, "filling", 2);
|
|
@@ -126,43 +126,43 @@ P([
|
|
|
126
126
|
})
|
|
127
127
|
], g.prototype, "enabled", 2);
|
|
128
128
|
P([
|
|
129
|
-
|
|
129
|
+
be(
|
|
130
130
|
"ACTIVATING"
|
|
131
131
|
/* ACTIVATING */
|
|
132
132
|
)
|
|
133
133
|
], g.prototype, "handleActivationStart", 1);
|
|
134
134
|
P([
|
|
135
|
-
|
|
135
|
+
Tt(
|
|
136
136
|
"ACTIVATING"
|
|
137
137
|
/* ACTIVATING */
|
|
138
138
|
)
|
|
139
139
|
], g.prototype, "handleActivationComplete", 1);
|
|
140
140
|
P([
|
|
141
|
-
|
|
141
|
+
be(
|
|
142
142
|
"INITIALIZED"
|
|
143
143
|
/* INITIALIZED */
|
|
144
144
|
)
|
|
145
145
|
], g.prototype, "handleInitialized", 1);
|
|
146
146
|
P([
|
|
147
|
-
|
|
147
|
+
be(
|
|
148
148
|
"SKIPPED"
|
|
149
149
|
/* SKIPPED */
|
|
150
150
|
)
|
|
151
151
|
], g.prototype, "handleSkipped", 1);
|
|
152
152
|
P([
|
|
153
|
-
|
|
153
|
+
Pe({ allowedStates: [
|
|
154
154
|
"UNINITIALIZED"
|
|
155
155
|
/* UNINITIALIZED */
|
|
156
156
|
] })
|
|
157
157
|
], g.prototype, "activateCarbTank", 1);
|
|
158
158
|
P([
|
|
159
|
-
|
|
159
|
+
Pe({ allowedStates: [
|
|
160
160
|
"UNINITIALIZED"
|
|
161
161
|
/* UNINITIALIZED */
|
|
162
162
|
] })
|
|
163
163
|
], g.prototype, "skip", 1);
|
|
164
164
|
P([
|
|
165
|
-
|
|
165
|
+
Pe({
|
|
166
166
|
allowedStates: [
|
|
167
167
|
"INITIALIZED",
|
|
168
168
|
"SKIPPED"
|
|
@@ -171,14 +171,14 @@ P([
|
|
|
171
171
|
})
|
|
172
172
|
], g.prototype, "reset", 1);
|
|
173
173
|
P([
|
|
174
|
-
|
|
174
|
+
I()
|
|
175
175
|
], g.prototype, "handleTestCarbTank", 1);
|
|
176
176
|
g = P([
|
|
177
|
-
f({ modelTypeId:
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
f({ modelTypeId: Ht, singleton: !1 }),
|
|
178
|
+
re(),
|
|
179
|
+
xe({ mode: "composition", lifecycle: je.LOAD }),
|
|
180
|
+
Ue(),
|
|
181
|
+
_t(
|
|
182
182
|
{
|
|
183
183
|
initial: "UNINITIALIZED",
|
|
184
184
|
states: {
|
|
@@ -215,19 +215,19 @@ g = P([
|
|
|
215
215
|
}
|
|
216
216
|
)
|
|
217
217
|
], g);
|
|
218
|
-
const
|
|
219
|
-
var
|
|
220
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
218
|
+
const Ye = g.Registration;
|
|
219
|
+
var Bt = Object.defineProperty, Kt = Object.getOwnPropertyDescriptor, We = (e, t, r, o) => {
|
|
220
|
+
for (var a = o > 1 ? void 0 : o ? Kt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
221
221
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
222
|
-
return o && a &&
|
|
222
|
+
return o && a && Bt(t, r, a), a;
|
|
223
223
|
};
|
|
224
|
-
const
|
|
225
|
-
let
|
|
224
|
+
const Ze = "cartridge-agitator-container-model";
|
|
225
|
+
let k = class {
|
|
226
226
|
constructor(e, t, r) {
|
|
227
227
|
i(this, "id");
|
|
228
228
|
i(this, "logger");
|
|
229
229
|
i(this, "_models");
|
|
230
|
-
this.id = e, this.logger = r.logger, this._models = new
|
|
230
|
+
this.id = e, this.logger = r.logger, this._models = new It({
|
|
231
231
|
parentId: e
|
|
232
232
|
});
|
|
233
233
|
}
|
|
@@ -258,34 +258,34 @@ let W = class {
|
|
|
258
258
|
);
|
|
259
259
|
}
|
|
260
260
|
};
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
],
|
|
264
|
-
|
|
265
|
-
f(
|
|
266
|
-
],
|
|
267
|
-
const { URL:
|
|
268
|
-
basePath: `${
|
|
269
|
-
}),
|
|
270
|
-
const r = await
|
|
261
|
+
We([
|
|
262
|
+
qe
|
|
263
|
+
], k.prototype, "_models", 2);
|
|
264
|
+
k = We([
|
|
265
|
+
f(Ze)
|
|
266
|
+
], k);
|
|
267
|
+
const { URL: ke } = A("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Yt } = w.build({
|
|
268
|
+
basePath: `${ke}/api/ext/freestyle/freestyle/ice`
|
|
269
|
+
}), Wt = async (e, t) => {
|
|
270
|
+
const r = await Yt({
|
|
271
271
|
model: {},
|
|
272
272
|
tracker: t,
|
|
273
|
-
urlOverride: `${
|
|
273
|
+
urlOverride: `${ke}/api/handle/${e}/test`
|
|
274
274
|
});
|
|
275
275
|
if (!(r != null && r.data))
|
|
276
276
|
throw new Error("No response from server");
|
|
277
277
|
return r.data;
|
|
278
278
|
};
|
|
279
|
-
var
|
|
280
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
279
|
+
var Zt = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, ae = (e, t, r, o) => {
|
|
280
|
+
for (var a = o > 1 ? void 0 : o ? kt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
281
281
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
282
|
-
return o && a &&
|
|
282
|
+
return o && a && Zt(t, r, a), a;
|
|
283
283
|
};
|
|
284
|
-
const
|
|
285
|
-
class
|
|
284
|
+
const Je = "cartridge-agitator-model";
|
|
285
|
+
class J {
|
|
286
286
|
}
|
|
287
|
-
i(
|
|
288
|
-
const
|
|
287
|
+
i(J, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), i(J, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
|
|
288
|
+
const Jt = x("statePath");
|
|
289
289
|
let F = class {
|
|
290
290
|
constructor(e, t) {
|
|
291
291
|
i(this, "id");
|
|
@@ -301,48 +301,48 @@ let F = class {
|
|
|
301
301
|
async testAgitate(e) {
|
|
302
302
|
if (!e)
|
|
303
303
|
throw new Error("No tracker provided");
|
|
304
|
-
return this.logger.info(`agitating cartridge-agitator ${this.id}`),
|
|
304
|
+
return this.logger.info(`agitating cartridge-agitator ${this.id}`), Wt(this.path, e);
|
|
305
305
|
}
|
|
306
306
|
handleAgitation() {
|
|
307
307
|
var e;
|
|
308
|
-
this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`),
|
|
308
|
+
this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), Z.publish(J.TOPIC_AGITATION_STARTED, {
|
|
309
309
|
path: this.path,
|
|
310
310
|
futureId: (e = this.future) == null ? void 0 : e.futureId
|
|
311
|
-
})) :
|
|
311
|
+
})) : Z.publish(J.TOPIC_AGITATION_ENDED, {
|
|
312
312
|
path: this.path
|
|
313
313
|
});
|
|
314
314
|
}
|
|
315
315
|
};
|
|
316
|
-
|
|
317
|
-
|
|
316
|
+
ae([
|
|
317
|
+
E({ path: Jt, attribute: "agitating" })
|
|
318
318
|
], F.prototype, "agitating", 2);
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
ae([
|
|
320
|
+
I()
|
|
321
321
|
], F.prototype, "testAgitate", 1);
|
|
322
|
-
|
|
323
|
-
|
|
322
|
+
ae([
|
|
323
|
+
ve({
|
|
324
324
|
dependencies: (e) => [e.isAgitating]
|
|
325
325
|
})
|
|
326
326
|
], F.prototype, "handleAgitation", 1);
|
|
327
|
-
F =
|
|
328
|
-
f(
|
|
329
|
-
|
|
330
|
-
|
|
327
|
+
F = ae([
|
|
328
|
+
f(Je),
|
|
329
|
+
Ue(),
|
|
330
|
+
re()
|
|
331
331
|
], F);
|
|
332
|
-
const
|
|
332
|
+
const Qe = new C({
|
|
333
333
|
class: F,
|
|
334
|
-
type:
|
|
335
|
-
}),
|
|
336
|
-
class:
|
|
337
|
-
type:
|
|
334
|
+
type: Je
|
|
335
|
+
}), $e = new Te({
|
|
336
|
+
class: k,
|
|
337
|
+
type: Ze
|
|
338
338
|
});
|
|
339
|
-
|
|
340
|
-
var
|
|
341
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
339
|
+
$e.addRelatedModel(Qe);
|
|
340
|
+
var Xe = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, Xt = (e, t, r) => t in e ? Xe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, oe = (e, t, r, o) => {
|
|
341
|
+
for (var a = o > 1 ? void 0 : o ? Qt(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
342
342
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
343
|
-
return o && a &&
|
|
344
|
-
},
|
|
345
|
-
const
|
|
343
|
+
return o && a && Xe(t, r, a), a;
|
|
344
|
+
}, er = (e, t, r) => (Xt(e, t + "", r), r);
|
|
345
|
+
const tr = "cgp-pump-model", Ce = x("statePath");
|
|
346
346
|
let D = class {
|
|
347
347
|
constructor(e, t) {
|
|
348
348
|
i(this, "highProbeWet");
|
|
@@ -357,66 +357,66 @@ let D = class {
|
|
|
357
357
|
return this.state.path;
|
|
358
358
|
}
|
|
359
359
|
};
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
path:
|
|
360
|
+
er(D, "Registration");
|
|
361
|
+
oe([
|
|
362
|
+
E({
|
|
363
|
+
path: Ce,
|
|
364
364
|
attribute: "highProbeWet"
|
|
365
365
|
})
|
|
366
366
|
], D.prototype, "highProbeWet", 2);
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
path:
|
|
367
|
+
oe([
|
|
368
|
+
E({
|
|
369
|
+
path: Ce,
|
|
370
370
|
attribute: "lowProbeWet"
|
|
371
371
|
})
|
|
372
372
|
], D.prototype, "lowProbeWet", 2);
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
path:
|
|
373
|
+
oe([
|
|
374
|
+
E({
|
|
375
|
+
path: Ce,
|
|
376
376
|
attribute: "filling"
|
|
377
377
|
})
|
|
378
378
|
], D.prototype, "filling", 2);
|
|
379
|
-
D =
|
|
380
|
-
f({ modelTypeId:
|
|
381
|
-
|
|
379
|
+
D = oe([
|
|
380
|
+
f({ modelTypeId: tr, singleton: !1 }),
|
|
381
|
+
xe({
|
|
382
382
|
mode: "composition"
|
|
383
383
|
}),
|
|
384
|
-
|
|
384
|
+
re()
|
|
385
385
|
], D);
|
|
386
|
-
const
|
|
387
|
-
basePath: `${
|
|
386
|
+
const rr = D.Registration, { URL: j } = A("FCM-PUMP_SERVICE"), { postModel: B } = w.build({
|
|
387
|
+
basePath: `${j}/api/fcm-pump`
|
|
388
388
|
}), h = $.createLogger({
|
|
389
389
|
name: "fcm-pump-service",
|
|
390
390
|
group: "Services"
|
|
391
|
-
}),
|
|
391
|
+
}), ar = async (e) => {
|
|
392
392
|
var t, r, o, a, n;
|
|
393
393
|
h.debug(
|
|
394
394
|
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
395
395
|
);
|
|
396
396
|
try {
|
|
397
|
-
const s = await
|
|
397
|
+
const s = await B({
|
|
398
398
|
model: {},
|
|
399
|
-
urlOverride: `${
|
|
399
|
+
urlOverride: `${j}/api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`
|
|
400
400
|
});
|
|
401
401
|
return h.debug("performElectricalTest - response:", s), ((s == null ? void 0 : s.status) === 200 || (s == null ? void 0 : s.status) === 499) && ((t = s.data) != null && t.error) ? [s.data.error || "unknownError", s.data] : [void 0, s == null ? void 0 : s.data];
|
|
402
402
|
} catch (s) {
|
|
403
403
|
if (h.error(
|
|
404
404
|
`performElectricalTest - sending POST request to /api/ext/freestyle/fcm/diagnostics/${e}/electricalTest`,
|
|
405
405
|
s
|
|
406
|
-
), s instanceof
|
|
406
|
+
), s instanceof _e) {
|
|
407
407
|
const u = ((o = (r = s.payload) == null ? void 0 : r.data) == null ? void 0 : o.error) || ((a = s.payload) == null ? void 0 : a.error) || "unknownError";
|
|
408
408
|
return [u, ((n = s.payload) == null ? void 0 : n.data) || { error: u }];
|
|
409
409
|
}
|
|
410
410
|
}
|
|
411
411
|
return ["unknownError", { error: "unknownError" }];
|
|
412
|
-
},
|
|
412
|
+
}, or = async (e, t) => {
|
|
413
413
|
h.debug(
|
|
414
414
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/preCalibrate`
|
|
415
415
|
);
|
|
416
416
|
try {
|
|
417
|
-
const r = await
|
|
417
|
+
const r = await B({
|
|
418
418
|
model: {},
|
|
419
|
-
urlOverride: `${
|
|
419
|
+
urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/preCalibrate`,
|
|
420
420
|
tracker: t
|
|
421
421
|
});
|
|
422
422
|
return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
@@ -433,14 +433,14 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
|
|
|
433
433
|
};
|
|
434
434
|
return y.initiateFuture(o), o;
|
|
435
435
|
}
|
|
436
|
-
},
|
|
436
|
+
}, ir = async (e, t) => {
|
|
437
437
|
h.debug(
|
|
438
438
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/calibrate`
|
|
439
439
|
);
|
|
440
440
|
try {
|
|
441
|
-
const r = await
|
|
441
|
+
const r = await B({
|
|
442
442
|
model: {},
|
|
443
|
-
urlOverride: `${
|
|
443
|
+
urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/calibrate`,
|
|
444
444
|
tracker: t
|
|
445
445
|
});
|
|
446
446
|
return h.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
@@ -457,14 +457,14 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
|
|
|
457
457
|
};
|
|
458
458
|
return y.initiateFuture(o), o;
|
|
459
459
|
}
|
|
460
|
-
},
|
|
460
|
+
}, sr = async (e, t, r) => {
|
|
461
461
|
h.debug(
|
|
462
462
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/verify/${t}`
|
|
463
463
|
);
|
|
464
464
|
try {
|
|
465
|
-
const o = await
|
|
465
|
+
const o = await B({
|
|
466
466
|
model: {},
|
|
467
|
-
urlOverride: `${
|
|
467
|
+
urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/verify/${t}`,
|
|
468
468
|
tracker: r
|
|
469
469
|
});
|
|
470
470
|
return h.debug("performVerify - response:", o), o != null && o.data && y.initiateFuture(o.data), o == null ? void 0 : o.data;
|
|
@@ -481,16 +481,16 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
|
|
|
481
481
|
};
|
|
482
482
|
return y.initiateFuture(a), a;
|
|
483
483
|
}
|
|
484
|
-
},
|
|
484
|
+
}, nr = (e) => e ? e.data === "success" || !e.data ? "success" : e.data : "error", lr = async (e, t, r) => {
|
|
485
485
|
h.debug(
|
|
486
486
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
487
487
|
);
|
|
488
488
|
try {
|
|
489
|
-
const o = await
|
|
489
|
+
const o = await B({
|
|
490
490
|
model: {},
|
|
491
|
-
urlOverride: `${
|
|
491
|
+
urlOverride: `${j}/api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`
|
|
492
492
|
});
|
|
493
|
-
return h.debug("performPreCalibrate - response:", o),
|
|
493
|
+
return h.debug("performPreCalibrate - response:", o), nr(o == null ? void 0 : o.data);
|
|
494
494
|
} catch (o) {
|
|
495
495
|
h.error(
|
|
496
496
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/fcm/calibration/${e}/complete/${t}/${r}`,
|
|
@@ -499,19 +499,19 @@ const Jt = D.Registration, { URL: G } = A("FCM-PUMP_SERVICE"), { postModel: V }
|
|
|
499
499
|
return;
|
|
500
500
|
}
|
|
501
501
|
};
|
|
502
|
-
var
|
|
503
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
502
|
+
var ur = Object.defineProperty, cr = Object.getOwnPropertyDescriptor, ie = (e, t, r, o) => {
|
|
503
|
+
for (var a = o > 1 ? void 0 : o ? cr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
504
504
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
505
|
-
return o && a &&
|
|
505
|
+
return o && a && ur(t, r, a), a;
|
|
506
506
|
};
|
|
507
|
-
const
|
|
508
|
-
let
|
|
507
|
+
const et = "fcm-pump-model", dr = $.createLogger({ name: "fcm-pump-model" });
|
|
508
|
+
let z = class {
|
|
509
509
|
constructor(e, t, r) {
|
|
510
510
|
i(this, "id");
|
|
511
511
|
i(this, "logger");
|
|
512
512
|
i(this, "pumpModel");
|
|
513
513
|
i(this, "futureHandler");
|
|
514
|
-
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new
|
|
514
|
+
this.id = e, this.logger = r.logger, this.pumpModel = t.companionParent, this.futureHandler = new Ge(this);
|
|
515
515
|
}
|
|
516
516
|
get future() {
|
|
517
517
|
return this.futureHandler.future;
|
|
@@ -532,23 +532,23 @@ let N = class {
|
|
|
532
532
|
return this.pumpModel.performIntent(e);
|
|
533
533
|
}
|
|
534
534
|
async performElectricalTest() {
|
|
535
|
-
const [e, t] = await
|
|
536
|
-
return e &&
|
|
535
|
+
const [e, t] = await ar(this.pumpModel.path);
|
|
536
|
+
return e && dr.error(`Failed to perform electrical test on pump ${this.id}`, e), t;
|
|
537
537
|
}
|
|
538
538
|
getChildren() {
|
|
539
539
|
return [...this.futureHandler.allFutures];
|
|
540
540
|
}
|
|
541
541
|
async performPreCalibrate(e) {
|
|
542
|
-
return
|
|
542
|
+
return or(this.pumpModel.path, e);
|
|
543
543
|
}
|
|
544
544
|
async performCalibrate(e) {
|
|
545
|
-
return
|
|
545
|
+
return ir(this.pumpModel.path, e);
|
|
546
546
|
}
|
|
547
547
|
async performVerify(e, t) {
|
|
548
|
-
return
|
|
548
|
+
return sr(this.pumpModel.path, e, t);
|
|
549
549
|
}
|
|
550
550
|
async performComplete(e, t) {
|
|
551
|
-
return
|
|
551
|
+
return lr(this.pumpModel.path, e, t);
|
|
552
552
|
}
|
|
553
553
|
// -------------------LIFECYCLE----------------------------
|
|
554
554
|
async init() {
|
|
@@ -558,29 +558,29 @@ let N = class {
|
|
|
558
558
|
this.logger.debug(`loading fcm-pump ${this.id}`);
|
|
559
559
|
}
|
|
560
560
|
};
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
],
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
],
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
],
|
|
570
|
-
|
|
571
|
-
f(
|
|
572
|
-
],
|
|
573
|
-
const
|
|
574
|
-
class:
|
|
575
|
-
type:
|
|
561
|
+
ie([
|
|
562
|
+
I()
|
|
563
|
+
], z.prototype, "performPreCalibrate", 1);
|
|
564
|
+
ie([
|
|
565
|
+
I()
|
|
566
|
+
], z.prototype, "performCalibrate", 1);
|
|
567
|
+
ie([
|
|
568
|
+
I()
|
|
569
|
+
], z.prototype, "performVerify", 1);
|
|
570
|
+
z = ie([
|
|
571
|
+
f(et)
|
|
572
|
+
], z);
|
|
573
|
+
const pr = new C({
|
|
574
|
+
class: z,
|
|
575
|
+
type: et
|
|
576
576
|
});
|
|
577
|
-
var
|
|
578
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
577
|
+
var gr = Object.defineProperty, hr = Object.getOwnPropertyDescriptor, tt = (e, t, r, o) => {
|
|
578
|
+
for (var a = o > 1 ? void 0 : o ? hr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
579
579
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
580
|
-
return o && a &&
|
|
580
|
+
return o && a && gr(t, r, a), a;
|
|
581
581
|
};
|
|
582
|
-
const
|
|
583
|
-
let
|
|
582
|
+
const rt = "freestyle-assembly-model", fr = "iceAgitator", mr = "carbTank", yr = "remoteTrays";
|
|
583
|
+
let Q = class {
|
|
584
584
|
constructor(e, t, r) {
|
|
585
585
|
i(this, "id");
|
|
586
586
|
i(this, "_carbTankModel");
|
|
@@ -642,45 +642,45 @@ let k = class {
|
|
|
642
642
|
}
|
|
643
643
|
// -------------------LIFECYCLE----------------------------
|
|
644
644
|
get supportsRemoteTrays() {
|
|
645
|
-
return
|
|
645
|
+
return ue.isFeatureEnabled(yr);
|
|
646
646
|
}
|
|
647
647
|
get supportsIce() {
|
|
648
|
-
return
|
|
648
|
+
return ue.isFeatureEnabled(fr);
|
|
649
649
|
}
|
|
650
650
|
get supportsCarb() {
|
|
651
|
-
return
|
|
651
|
+
return ue.isFeatureEnabled(mr);
|
|
652
652
|
}
|
|
653
653
|
async init() {
|
|
654
654
|
this.logger.debug(`initializing freestyle-assembly ${this.id}`);
|
|
655
655
|
}
|
|
656
656
|
async ready() {
|
|
657
|
-
const e =
|
|
657
|
+
const e = $t(
|
|
658
658
|
this.assembly,
|
|
659
|
-
|
|
659
|
+
Ye.type
|
|
660
660
|
);
|
|
661
661
|
this._carbTankModel = e;
|
|
662
662
|
}
|
|
663
663
|
};
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
],
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
f(
|
|
670
|
-
],
|
|
671
|
-
const
|
|
672
|
-
class:
|
|
673
|
-
type:
|
|
664
|
+
tt([
|
|
665
|
+
qe
|
|
666
|
+
], Q.prototype, "_remoteTrays", 2);
|
|
667
|
+
Q = tt([
|
|
668
|
+
Ve(),
|
|
669
|
+
f(rt)
|
|
670
|
+
], Q);
|
|
671
|
+
const ge = new Te({
|
|
672
|
+
class: Q,
|
|
673
|
+
type: rt
|
|
674
674
|
});
|
|
675
|
-
var
|
|
676
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
675
|
+
var br = Object.defineProperty, Pr = Object.getOwnPropertyDescriptor, at = (e, t, r, o) => {
|
|
676
|
+
for (var a = o > 1 ? void 0 : o ? Pr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
677
677
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
678
|
-
return o && a &&
|
|
678
|
+
return o && a && br(t, r, a), a;
|
|
679
679
|
};
|
|
680
|
-
const
|
|
680
|
+
const ot = "remote-tray-model";
|
|
681
681
|
x("holderPath");
|
|
682
|
-
const
|
|
683
|
-
let
|
|
682
|
+
const vr = x("configPath");
|
|
683
|
+
let X = class {
|
|
684
684
|
constructor(e, t, r) {
|
|
685
685
|
/** Unique identifier for the remote tray instance */
|
|
686
686
|
i(this, "id");
|
|
@@ -770,50 +770,50 @@ let Q = class {
|
|
|
770
770
|
this.logger.debug(`loading remote-tray ${this.id}`);
|
|
771
771
|
}
|
|
772
772
|
};
|
|
773
|
-
|
|
773
|
+
at([
|
|
774
774
|
b({
|
|
775
|
-
path:
|
|
775
|
+
path: vr,
|
|
776
776
|
attribute: "enabled"
|
|
777
777
|
})
|
|
778
|
-
],
|
|
779
|
-
|
|
780
|
-
f(
|
|
781
|
-
],
|
|
782
|
-
const
|
|
783
|
-
class:
|
|
784
|
-
type:
|
|
778
|
+
], X.prototype, "remoteTrayEnabled", 2);
|
|
779
|
+
X = at([
|
|
780
|
+
f(ot)
|
|
781
|
+
], X);
|
|
782
|
+
const q = new C({
|
|
783
|
+
class: X,
|
|
784
|
+
type: ot
|
|
785
785
|
});
|
|
786
|
-
var
|
|
787
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
786
|
+
var Tr = Object.getOwnPropertyDescriptor, _r = (e, t, r, o) => {
|
|
787
|
+
for (var a = o > 1 ? void 0 : o ? Tr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
788
788
|
(s = e[n]) && (a = s(a) || a);
|
|
789
789
|
return a;
|
|
790
790
|
};
|
|
791
|
-
const
|
|
792
|
-
let
|
|
791
|
+
const it = "remote-tray-container-model";
|
|
792
|
+
let he = class {
|
|
793
793
|
constructor(e) {
|
|
794
794
|
i(this, "id");
|
|
795
795
|
this.id = e;
|
|
796
796
|
}
|
|
797
797
|
};
|
|
798
|
-
|
|
799
|
-
f(
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
],
|
|
803
|
-
const
|
|
804
|
-
class:
|
|
805
|
-
type:
|
|
798
|
+
he = _r([
|
|
799
|
+
f(it),
|
|
800
|
+
re(),
|
|
801
|
+
Ct()
|
|
802
|
+
], he);
|
|
803
|
+
const Oe = new Te({
|
|
804
|
+
class: he,
|
|
805
|
+
type: it
|
|
806
806
|
});
|
|
807
|
-
|
|
808
|
-
var
|
|
809
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
807
|
+
Oe.addRelatedModel(q);
|
|
808
|
+
var Ir = Object.getOwnPropertyDescriptor, $r = (e, t, r, o) => {
|
|
809
|
+
for (var a = o > 1 ? void 0 : o ? Ir(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
810
810
|
(s = e[n]) && (a = s(a) || a);
|
|
811
811
|
return a;
|
|
812
812
|
};
|
|
813
|
-
const
|
|
814
|
-
function
|
|
815
|
-
const t =
|
|
816
|
-
|
|
813
|
+
const st = "freestyle-holder-model";
|
|
814
|
+
function Cr(e) {
|
|
815
|
+
const t = Ot.getContext(e), r = t == null ? void 0 : t.get(
|
|
816
|
+
ge.type
|
|
817
817
|
);
|
|
818
818
|
if (!r) {
|
|
819
819
|
$.error("Freestyle assembly not found");
|
|
@@ -821,14 +821,14 @@ function Ir(e) {
|
|
|
821
821
|
}
|
|
822
822
|
return r;
|
|
823
823
|
}
|
|
824
|
-
async function
|
|
824
|
+
async function Or(e, t) {
|
|
825
825
|
if (!e || !t)
|
|
826
826
|
return;
|
|
827
827
|
const r = await e[t]();
|
|
828
828
|
if (r != null && r.tracker)
|
|
829
829
|
return y.getFuture(r.tracker);
|
|
830
830
|
}
|
|
831
|
-
let
|
|
831
|
+
let fe = class {
|
|
832
832
|
constructor(e, t, r) {
|
|
833
833
|
i(this, "id");
|
|
834
834
|
i(this, "logger");
|
|
@@ -844,20 +844,20 @@ let ge = class {
|
|
|
844
844
|
if (!this.holder.data.agitated)
|
|
845
845
|
return;
|
|
846
846
|
this.future = void 0;
|
|
847
|
-
const e =
|
|
847
|
+
const e = Cr(this.id);
|
|
848
848
|
if (!e)
|
|
849
849
|
return;
|
|
850
850
|
if (!e.defaultCartridgeAgitator) {
|
|
851
851
|
this.logger.error("Agitator not found");
|
|
852
852
|
return;
|
|
853
853
|
}
|
|
854
|
-
return this.future = await
|
|
854
|
+
return this.future = await Or(
|
|
855
855
|
e.defaultCartridgeAgitator,
|
|
856
856
|
"testAgitate"
|
|
857
857
|
), this.future;
|
|
858
858
|
}
|
|
859
859
|
get isRemote() {
|
|
860
|
-
const e = `${
|
|
860
|
+
const e = `${q.type}-${this.holder.path}`, t = R(e);
|
|
861
861
|
return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
|
|
862
862
|
}
|
|
863
863
|
// -------------------LIFECYCLE----------------------------
|
|
@@ -868,51 +868,51 @@ let ge = class {
|
|
|
868
868
|
this.logger.debug(`loading freestyle-holder ${this.id}`);
|
|
869
869
|
}
|
|
870
870
|
};
|
|
871
|
-
|
|
872
|
-
f(
|
|
873
|
-
],
|
|
874
|
-
const
|
|
875
|
-
class:
|
|
876
|
-
type:
|
|
877
|
-
}), { URL:
|
|
878
|
-
basePath: `${
|
|
879
|
-
}),
|
|
871
|
+
fe = $r([
|
|
872
|
+
f(st)
|
|
873
|
+
], fe);
|
|
874
|
+
const Ae = new C({
|
|
875
|
+
class: fe,
|
|
876
|
+
type: st
|
|
877
|
+
}), { URL: Er } = A("FREESTYLE-NOZZLE_SERVICE"), { getOne: Sr } = w.build({
|
|
878
|
+
basePath: `${Er}/api/freestyle-nozzle`
|
|
879
|
+
}), Y = $.createLogger({
|
|
880
880
|
name: "freestyle-nozzle-service",
|
|
881
881
|
group: "Services"
|
|
882
882
|
});
|
|
883
|
-
class
|
|
883
|
+
class Ar extends Error {
|
|
884
884
|
constructor(t) {
|
|
885
885
|
super(t), this.name = "NutritionInfoError";
|
|
886
886
|
}
|
|
887
887
|
}
|
|
888
|
-
class
|
|
888
|
+
class we extends Error {
|
|
889
889
|
constructor(t) {
|
|
890
890
|
super(t), this.name = "InvalidRequestError";
|
|
891
891
|
}
|
|
892
892
|
}
|
|
893
|
-
const
|
|
894
|
-
if (
|
|
895
|
-
throw
|
|
893
|
+
const wr = async (e, t, r, o = "http://localhost:8081") => {
|
|
894
|
+
if (Y.debug("sending GET for freestyle-nozzle"), !t)
|
|
895
|
+
throw Y.error("Invalid freestyle-nozzle request: beverageId is required"), new we("No beverageId provided");
|
|
896
896
|
if (!r || r.length === 0)
|
|
897
|
-
throw
|
|
898
|
-
const a = await
|
|
897
|
+
throw Y.error("Invalid freestyle-nozzle request: volumes are required"), new we("No volumes provided");
|
|
898
|
+
const a = await Sr({
|
|
899
899
|
urlOverride: `${o}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
|
|
900
900
|
","
|
|
901
901
|
)}`
|
|
902
902
|
});
|
|
903
903
|
if (!(a != null && a.data))
|
|
904
|
-
throw
|
|
904
|
+
throw Y.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
|
|
905
905
|
if (a.data.error)
|
|
906
|
-
throw new
|
|
906
|
+
throw new Ar(a.data.error);
|
|
907
907
|
return a.data;
|
|
908
908
|
};
|
|
909
|
-
var
|
|
910
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
909
|
+
var Mr = Object.defineProperty, Rr = Object.getOwnPropertyDescriptor, nt = (e, t, r, o) => {
|
|
910
|
+
for (var a = o > 1 ? void 0 : o ? Rr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
911
911
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
912
|
-
return o && a &&
|
|
912
|
+
return o && a && Mr(t, r, a), a;
|
|
913
913
|
};
|
|
914
|
-
const
|
|
915
|
-
let
|
|
914
|
+
const lt = "freestyle-nozzle-model";
|
|
915
|
+
let ee = class {
|
|
916
916
|
constructor(e, t, r) {
|
|
917
917
|
i(this, "id");
|
|
918
918
|
i(this, "logger");
|
|
@@ -937,12 +937,12 @@ let X = class {
|
|
|
937
937
|
);
|
|
938
938
|
const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
|
|
939
939
|
try {
|
|
940
|
-
const r = await
|
|
940
|
+
const r = await wr(
|
|
941
941
|
t,
|
|
942
942
|
e,
|
|
943
943
|
this._cupSizes
|
|
944
944
|
);
|
|
945
|
-
|
|
945
|
+
W(() => {
|
|
946
946
|
this._nutritionInfo = r;
|
|
947
947
|
});
|
|
948
948
|
} catch (r) {
|
|
@@ -961,54 +961,54 @@ let X = class {
|
|
|
961
961
|
this.logger.debug(`loading freestyle-nozzle ${this.id}`);
|
|
962
962
|
}
|
|
963
963
|
};
|
|
964
|
-
|
|
965
|
-
|
|
964
|
+
nt([
|
|
965
|
+
ve({
|
|
966
966
|
dependencies: (e) => [
|
|
967
967
|
e.selectedPourable.beverage
|
|
968
968
|
]
|
|
969
969
|
})
|
|
970
|
-
],
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
f(
|
|
974
|
-
],
|
|
975
|
-
const
|
|
976
|
-
class:
|
|
977
|
-
type:
|
|
978
|
-
}), { URL:
|
|
979
|
-
basePath: `${
|
|
980
|
-
}),
|
|
970
|
+
], ee.prototype, "handleBeverageSelection", 1);
|
|
971
|
+
ee = nt([
|
|
972
|
+
Ve(),
|
|
973
|
+
f(lt)
|
|
974
|
+
], ee);
|
|
975
|
+
const Me = new C({
|
|
976
|
+
class: ee,
|
|
977
|
+
type: lt
|
|
978
|
+
}), { URL: ut } = A("PUMP_SERVICE"), { postModel: Dr } = w.build({
|
|
979
|
+
basePath: `${ut}/api/ext/freestyle/microCalibration`
|
|
980
|
+
}), pe = $.createLogger({
|
|
981
981
|
name: "freestyle-pump-service",
|
|
982
982
|
group: "Services"
|
|
983
|
-
}),
|
|
983
|
+
}), Lr = async (e, t) => {
|
|
984
984
|
var r, o, a, n, s;
|
|
985
|
-
|
|
985
|
+
pe.debug(
|
|
986
986
|
`replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
987
987
|
);
|
|
988
988
|
try {
|
|
989
|
-
const u = await
|
|
989
|
+
const u = await Dr({
|
|
990
990
|
model: {},
|
|
991
|
-
urlOverride: `${
|
|
991
|
+
urlOverride: `${ut}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
992
992
|
});
|
|
993
|
-
return
|
|
993
|
+
return pe.debug("replacePump - response:", u), ((u == null ? void 0 : u.status) === 200 || (u == null ? void 0 : u.status) === 499) && ((r = u.data) != null && r.error) ? [u.data.error || "unknownError", u.data] : [void 0, u == null ? void 0 : u.data];
|
|
994
994
|
} catch (u) {
|
|
995
|
-
if (
|
|
995
|
+
if (pe.error(
|
|
996
996
|
`replacePump - sending POST request to /api/cal/${e}/code/${t}`,
|
|
997
997
|
u
|
|
998
|
-
), u instanceof
|
|
998
|
+
), u instanceof _e) {
|
|
999
999
|
const S = ((a = (o = u.payload) == null ? void 0 : o.data) == null ? void 0 : a.error) || ((n = u.payload) == null ? void 0 : n.error) || "unknownError";
|
|
1000
1000
|
return [S, ((s = u.payload) == null ? void 0 : s.data) || { error: S }];
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
1003
|
return ["unknownError", { error: "unknownError" }];
|
|
1004
1004
|
};
|
|
1005
|
-
var
|
|
1006
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1005
|
+
var Fr = Object.getOwnPropertyDescriptor, zr = (e, t, r, o) => {
|
|
1006
|
+
for (var a = o > 1 ? void 0 : o ? Fr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1007
1007
|
(s = e[n]) && (a = s(a) || a);
|
|
1008
1008
|
return a;
|
|
1009
1009
|
};
|
|
1010
|
-
const
|
|
1011
|
-
let
|
|
1010
|
+
const ct = "freestyle-pump-model";
|
|
1011
|
+
let me = class {
|
|
1012
1012
|
constructor(e, t, r) {
|
|
1013
1013
|
i(this, "id");
|
|
1014
1014
|
i(this, "logger");
|
|
@@ -1017,30 +1017,30 @@ let he = class {
|
|
|
1017
1017
|
}
|
|
1018
1018
|
// -------------------LIFECYCLE----------------------------
|
|
1019
1019
|
async replacePump(e) {
|
|
1020
|
-
const [t, r] = await
|
|
1020
|
+
const [t, r] = await Lr(this.pump.path, e);
|
|
1021
1021
|
return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
|
|
1022
1022
|
}
|
|
1023
1023
|
};
|
|
1024
|
-
|
|
1025
|
-
f(
|
|
1026
|
-
],
|
|
1027
|
-
const
|
|
1028
|
-
class:
|
|
1029
|
-
type:
|
|
1030
|
-
}), { URL: L } = A("ICE_AGITATOR_SERVICE"), { getAll:
|
|
1024
|
+
me = zr([
|
|
1025
|
+
f(ct)
|
|
1026
|
+
], me);
|
|
1027
|
+
const Re = new C({
|
|
1028
|
+
class: me,
|
|
1029
|
+
type: ct
|
|
1030
|
+
}), { URL: L } = A("ICE_AGITATOR_SERVICE"), { getAll: dt, postModel: se } = w.build({
|
|
1031
1031
|
basePath: `${L}/api/ext/freestyle/ice`
|
|
1032
|
-
}),
|
|
1032
|
+
}), pt = $.createLogger({
|
|
1033
1033
|
name: "ice-agitator-service",
|
|
1034
1034
|
group: "Services"
|
|
1035
|
-
}),
|
|
1035
|
+
}), Nr = async (e) => (pt.debug("sending GET for ice types"), await dt({
|
|
1036
1036
|
urlOverride: `${L}/api/handle/${e}/types`
|
|
1037
|
-
})),
|
|
1037
|
+
})), xr = async (e, t) => (pt.debug("sending POST for ice types"), await se({
|
|
1038
1038
|
urlOverride: `${L}/api/handle/${e}/type/${t}`,
|
|
1039
1039
|
model: {}
|
|
1040
|
-
})),
|
|
1040
|
+
})), Ur = async (e) => await dt({
|
|
1041
1041
|
urlOverride: `${L}/api/kos/config/details/${e}/4`
|
|
1042
|
-
}),
|
|
1043
|
-
const r = await
|
|
1042
|
+
}), jr = async (e, t) => {
|
|
1043
|
+
const r = await se({
|
|
1044
1044
|
model: {},
|
|
1045
1045
|
tracker: t,
|
|
1046
1046
|
urlOverride: `${L}/api/handle/${e}/pour`
|
|
@@ -1048,8 +1048,8 @@ const we = new C({
|
|
|
1048
1048
|
if (!(r != null && r.data))
|
|
1049
1049
|
throw new Error("No response from server");
|
|
1050
1050
|
return r == null ? void 0 : r.data;
|
|
1051
|
-
},
|
|
1052
|
-
const r = await
|
|
1051
|
+
}, qr = async (e, t) => {
|
|
1052
|
+
const r = await se({
|
|
1053
1053
|
model: {},
|
|
1054
1054
|
tracker: t,
|
|
1055
1055
|
urlOverride: `${L}/api/handle/${e}/test/agitation`
|
|
@@ -1057,8 +1057,8 @@ const we = new C({
|
|
|
1057
1057
|
if (!(r != null && r.data))
|
|
1058
1058
|
throw new Error("No response from server");
|
|
1059
1059
|
return r == null ? void 0 : r.data;
|
|
1060
|
-
},
|
|
1061
|
-
const r = await
|
|
1060
|
+
}, Gr = async (e, t) => {
|
|
1061
|
+
const r = await se({
|
|
1062
1062
|
model: {},
|
|
1063
1063
|
tracker: t,
|
|
1064
1064
|
urlOverride: `${L}/api/handle/${e}/test/gate`
|
|
@@ -1067,15 +1067,15 @@ const we = new C({
|
|
|
1067
1067
|
throw new Error("No response from server");
|
|
1068
1068
|
return r == null ? void 0 : r.data;
|
|
1069
1069
|
};
|
|
1070
|
-
var
|
|
1071
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1070
|
+
var Vr = Object.defineProperty, Hr = Object.getOwnPropertyDescriptor, p = (e, t, r, o) => {
|
|
1071
|
+
for (var a = o > 1 ? void 0 : o ? Hr(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1072
1072
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1073
|
-
return o && a &&
|
|
1073
|
+
return o && a && Vr(t, r, a), a;
|
|
1074
1074
|
};
|
|
1075
|
-
class
|
|
1075
|
+
class te {
|
|
1076
1076
|
}
|
|
1077
|
-
i(
|
|
1078
|
-
const
|
|
1077
|
+
i(te, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), i(te, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
|
|
1078
|
+
const gt = "ice-agitator-model", ht = x("statePath");
|
|
1079
1079
|
let c = class {
|
|
1080
1080
|
constructor(e, t, r) {
|
|
1081
1081
|
i(this, "id");
|
|
@@ -1097,7 +1097,7 @@ let c = class {
|
|
|
1097
1097
|
i(this, "_allIceTypes");
|
|
1098
1098
|
i(this, "logger");
|
|
1099
1099
|
i(this, "currentState", d.IDLE);
|
|
1100
|
-
i(this, "resetDefaultValues", async () => await
|
|
1100
|
+
i(this, "resetDefaultValues", async () => await Ur(this.path));
|
|
1101
1101
|
this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
|
|
1102
1102
|
}
|
|
1103
1103
|
get iceTypes() {
|
|
@@ -1128,7 +1128,7 @@ let c = class {
|
|
|
1128
1128
|
return this.currentState === d.IDLE;
|
|
1129
1129
|
}
|
|
1130
1130
|
updateIfCurrent(e, t) {
|
|
1131
|
-
this.currentState === e &&
|
|
1131
|
+
this.currentState === e && W(() => {
|
|
1132
1132
|
this.currentState = t;
|
|
1133
1133
|
});
|
|
1134
1134
|
}
|
|
@@ -1137,7 +1137,7 @@ let c = class {
|
|
|
1137
1137
|
if (this.currentState === d.IDLE) {
|
|
1138
1138
|
if (this.updateIfCurrent(d.IDLE, d.POUR_STARTING), !e)
|
|
1139
1139
|
throw new Error("No tracker provided");
|
|
1140
|
-
const t = await
|
|
1140
|
+
const t = await jr(this.path, e);
|
|
1141
1141
|
return this.updateIfCurrent(d.POUR_STARTING, d.POURING), t != null && t.endState && this.updateIfCurrent(d.POURING, d.IDLE), t;
|
|
1142
1142
|
} else
|
|
1143
1143
|
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
@@ -1150,7 +1150,7 @@ let c = class {
|
|
|
1150
1150
|
* */
|
|
1151
1151
|
async cancelIceDispense() {
|
|
1152
1152
|
var e;
|
|
1153
|
-
this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()),
|
|
1153
|
+
this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), W(() => {
|
|
1154
1154
|
this.currentState = d.IDLE;
|
|
1155
1155
|
})) : this.logger.warn(
|
|
1156
1156
|
`Cannot cancel ice dispense in state ${this.currentState}`
|
|
@@ -1159,45 +1159,45 @@ let c = class {
|
|
|
1159
1159
|
async testAgitate(e) {
|
|
1160
1160
|
if (!e)
|
|
1161
1161
|
throw new Error("No tracker provided");
|
|
1162
|
-
return this.logger.info(`agitating ice-agitator ${this.id}`),
|
|
1162
|
+
return this.logger.info(`agitating ice-agitator ${this.id}`), qr(this.path, e);
|
|
1163
1163
|
}
|
|
1164
1164
|
async testGate(e) {
|
|
1165
1165
|
if (!e)
|
|
1166
1166
|
throw new Error("No tracker provided");
|
|
1167
|
-
return this.logger.info(`testing ice gate: ${this.id}`),
|
|
1167
|
+
return this.logger.info(`testing ice gate: ${this.id}`), Gr(this.path, e);
|
|
1168
1168
|
}
|
|
1169
1169
|
handleAgitationChange() {
|
|
1170
1170
|
var e;
|
|
1171
|
-
this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`),
|
|
1171
|
+
this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), Z.publish(te.TOPIC_AGITATION_STARTED, {
|
|
1172
1172
|
path: this.path,
|
|
1173
1173
|
futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
|
|
1174
|
-
})) :
|
|
1174
|
+
})) : Z.publish(te.TOPIC_AGITATION_ENDED, {
|
|
1175
1175
|
path: this.path
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
1178
1178
|
async updateIceType(e) {
|
|
1179
|
-
await
|
|
1179
|
+
await xr(this.path, e);
|
|
1180
1180
|
}
|
|
1181
1181
|
async init() {
|
|
1182
1182
|
this.logger.debug(`initializing ice-agitator ${this.id}`);
|
|
1183
1183
|
}
|
|
1184
1184
|
async load() {
|
|
1185
1185
|
this.logger.debug(`loading ice-agitator ${this.id}`);
|
|
1186
|
-
const e = await
|
|
1187
|
-
(e == null ? void 0 : e.status) === 200 &&
|
|
1186
|
+
const e = await Nr(this.path);
|
|
1187
|
+
(e == null ? void 0 : e.status) === 200 && W(() => {
|
|
1188
1188
|
this._allIceTypes = e.data || [];
|
|
1189
1189
|
});
|
|
1190
1190
|
}
|
|
1191
1191
|
};
|
|
1192
1192
|
p([
|
|
1193
1193
|
b({
|
|
1194
|
-
path:
|
|
1194
|
+
path: O,
|
|
1195
1195
|
attribute: "settings.volWithoutIceMl"
|
|
1196
1196
|
})
|
|
1197
1197
|
], c.prototype, "volWithoutIceMl", 2);
|
|
1198
1198
|
p([
|
|
1199
1199
|
b({
|
|
1200
|
-
path:
|
|
1200
|
+
path: O,
|
|
1201
1201
|
attribute: "settings.durationSec",
|
|
1202
1202
|
converter: {
|
|
1203
1203
|
to: "second"
|
|
@@ -1206,49 +1206,49 @@ p([
|
|
|
1206
1206
|
], c.prototype, "durationSec", 2);
|
|
1207
1207
|
p([
|
|
1208
1208
|
b({
|
|
1209
|
-
path:
|
|
1209
|
+
path: O,
|
|
1210
1210
|
attribute: "enableIceChuteClear"
|
|
1211
1211
|
})
|
|
1212
1212
|
], c.prototype, "enableIceChuteClear", 2);
|
|
1213
1213
|
p([
|
|
1214
1214
|
b({
|
|
1215
|
-
path:
|
|
1215
|
+
path: O,
|
|
1216
1216
|
attribute: "iceChuteClearDurationMs"
|
|
1217
1217
|
})
|
|
1218
1218
|
], c.prototype, "iceChuteClearDurationMs", 2);
|
|
1219
1219
|
p([
|
|
1220
1220
|
b({
|
|
1221
|
-
path:
|
|
1221
|
+
path: O,
|
|
1222
1222
|
attribute: "iceChuteClearIntervalSec"
|
|
1223
1223
|
})
|
|
1224
1224
|
], c.prototype, "iceChuteClearIntervalSec", 2);
|
|
1225
1225
|
p([
|
|
1226
1226
|
b({
|
|
1227
|
-
path:
|
|
1227
|
+
path: O,
|
|
1228
1228
|
attribute: "iceChuteClearRetryIntervalSec"
|
|
1229
1229
|
})
|
|
1230
1230
|
], c.prototype, "iceChuteClearRetryIntervalSec", 2);
|
|
1231
1231
|
p([
|
|
1232
1232
|
b({
|
|
1233
|
-
path:
|
|
1233
|
+
path: O,
|
|
1234
1234
|
attribute: "maxDispenseSec"
|
|
1235
1235
|
})
|
|
1236
1236
|
], c.prototype, "maxDispenseSec", 2);
|
|
1237
1237
|
p([
|
|
1238
1238
|
b({
|
|
1239
|
-
path:
|
|
1239
|
+
path: O,
|
|
1240
1240
|
attribute: "type"
|
|
1241
1241
|
})
|
|
1242
1242
|
], c.prototype, "type", 2);
|
|
1243
1243
|
p([
|
|
1244
1244
|
b({
|
|
1245
|
-
path:
|
|
1245
|
+
path: O,
|
|
1246
1246
|
attribute: "settings.dilutionOffset"
|
|
1247
1247
|
})
|
|
1248
1248
|
], c.prototype, "dilutionOffset", 2);
|
|
1249
1249
|
p([
|
|
1250
1250
|
b({
|
|
1251
|
-
path:
|
|
1251
|
+
path: O,
|
|
1252
1252
|
attribute: "settings.inactivitySec",
|
|
1253
1253
|
converter: {
|
|
1254
1254
|
to: "minute"
|
|
@@ -1256,42 +1256,42 @@ p([
|
|
|
1256
1256
|
})
|
|
1257
1257
|
], c.prototype, "inactivitySec", 2);
|
|
1258
1258
|
p([
|
|
1259
|
-
|
|
1259
|
+
E({ path: ht, attribute: "agitating" })
|
|
1260
1260
|
], c.prototype, "agitating", 2);
|
|
1261
1261
|
p([
|
|
1262
|
-
|
|
1262
|
+
E({ path: ht, attribute: "iceChuteOpen" })
|
|
1263
1263
|
], c.prototype, "iceChuteOpen", 2);
|
|
1264
1264
|
p([
|
|
1265
|
-
|
|
1265
|
+
I({ alias: "pour" })
|
|
1266
1266
|
], c.prototype, "pourIce", 1);
|
|
1267
1267
|
p([
|
|
1268
|
-
|
|
1268
|
+
I({ alias: "agitate" })
|
|
1269
1269
|
], c.prototype, "testAgitate", 1);
|
|
1270
1270
|
p([
|
|
1271
|
-
|
|
1271
|
+
I({
|
|
1272
1272
|
alias: "gate"
|
|
1273
1273
|
})
|
|
1274
1274
|
], c.prototype, "testGate", 1);
|
|
1275
1275
|
p([
|
|
1276
|
-
|
|
1276
|
+
ve({
|
|
1277
1277
|
dependencies: (e) => [e.isAgitating]
|
|
1278
1278
|
})
|
|
1279
1279
|
], c.prototype, "handleAgitationChange", 1);
|
|
1280
1280
|
c = p([
|
|
1281
|
-
f(
|
|
1282
|
-
|
|
1281
|
+
f(gt),
|
|
1282
|
+
Et()
|
|
1283
1283
|
], c);
|
|
1284
|
-
const
|
|
1284
|
+
const ft = new C({
|
|
1285
1285
|
class: c,
|
|
1286
|
-
type:
|
|
1286
|
+
type: gt
|
|
1287
1287
|
});
|
|
1288
|
-
var
|
|
1289
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1288
|
+
var Br = Object.getOwnPropertyDescriptor, Kr = (e, t, r, o) => {
|
|
1289
|
+
for (var a = o > 1 ? void 0 : o ? Br(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1290
1290
|
(s = e[n]) && (a = s(a) || a);
|
|
1291
1291
|
return a;
|
|
1292
1292
|
};
|
|
1293
|
-
const
|
|
1294
|
-
let
|
|
1293
|
+
const mt = "lfcv-pump-model";
|
|
1294
|
+
let ye = class {
|
|
1295
1295
|
constructor(e, t, r) {
|
|
1296
1296
|
i(this, "id");
|
|
1297
1297
|
i(this, "logger");
|
|
@@ -1321,30 +1321,30 @@ let fe = class {
|
|
|
1321
1321
|
this.logger.debug(`loading lfcv-pump ${this.id}`);
|
|
1322
1322
|
}
|
|
1323
1323
|
};
|
|
1324
|
-
|
|
1325
|
-
f(
|
|
1326
|
-
],
|
|
1327
|
-
const
|
|
1328
|
-
class:
|
|
1329
|
-
type:
|
|
1330
|
-
}), { URL:
|
|
1331
|
-
basePath: `${
|
|
1332
|
-
}),
|
|
1324
|
+
ye = Kr([
|
|
1325
|
+
f(mt)
|
|
1326
|
+
], ye);
|
|
1327
|
+
const Yr = new C({
|
|
1328
|
+
class: ye,
|
|
1329
|
+
type: mt
|
|
1330
|
+
}), { URL: Wr } = A("LFCV-PUMP_SERVICE"), { getAll: Zr } = w.build({
|
|
1331
|
+
basePath: `${Wr}/api/lfcv-pump`
|
|
1332
|
+
}), kr = $.createLogger({
|
|
1333
1333
|
name: "lfcv-pump-service",
|
|
1334
1334
|
group: "Services"
|
|
1335
|
-
}),
|
|
1336
|
-
basePath: `${
|
|
1335
|
+
}), Ta = async () => (kr.debug("sending GET for lfcv-pump"), await Zr({})), { URL: K } = A("SPM-PUMP_SERVICE"), { postModel: ne } = w.build({
|
|
1336
|
+
basePath: `${K}/api/spm-pump`
|
|
1337
1337
|
}), T = $.createLogger({
|
|
1338
1338
|
name: "spm-pump-service",
|
|
1339
1339
|
group: "Services"
|
|
1340
|
-
}),
|
|
1340
|
+
}), Jr = async (e, t) => {
|
|
1341
1341
|
T.debug(
|
|
1342
1342
|
`performPreCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`
|
|
1343
1343
|
);
|
|
1344
1344
|
try {
|
|
1345
|
-
const r = await
|
|
1345
|
+
const r = await ne({
|
|
1346
1346
|
model: {},
|
|
1347
|
-
urlOverride: `${
|
|
1347
|
+
urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/preCalibrate`,
|
|
1348
1348
|
tracker: t
|
|
1349
1349
|
});
|
|
1350
1350
|
return T.debug("performPreCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
@@ -1361,14 +1361,14 @@ const Br = new C({
|
|
|
1361
1361
|
};
|
|
1362
1362
|
return y.initiateFuture(o), o;
|
|
1363
1363
|
}
|
|
1364
|
-
},
|
|
1364
|
+
}, Qr = async (e, t) => {
|
|
1365
1365
|
T.debug(
|
|
1366
1366
|
`performCalibrate - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/calibrate`
|
|
1367
1367
|
);
|
|
1368
1368
|
try {
|
|
1369
|
-
const r = await
|
|
1369
|
+
const r = await ne({
|
|
1370
1370
|
model: {},
|
|
1371
|
-
urlOverride: `${
|
|
1371
|
+
urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/calibrate`,
|
|
1372
1372
|
tracker: t
|
|
1373
1373
|
});
|
|
1374
1374
|
return T.debug("performCalibrate - response:", r), r != null && r.data && y.initiateFuture(r.data), r == null ? void 0 : r.data;
|
|
@@ -1385,12 +1385,12 @@ const Br = new C({
|
|
|
1385
1385
|
};
|
|
1386
1386
|
return y.initiateFuture(o), o;
|
|
1387
1387
|
}
|
|
1388
|
-
},
|
|
1388
|
+
}, Xr = async (e, t, r, o) => {
|
|
1389
1389
|
T.debug(
|
|
1390
1390
|
`performVerify - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/verify`
|
|
1391
1391
|
);
|
|
1392
1392
|
try {
|
|
1393
|
-
const a = await
|
|
1393
|
+
const a = await ne({
|
|
1394
1394
|
model: {
|
|
1395
1395
|
...r,
|
|
1396
1396
|
// commandedCalibrationVolume: 0,
|
|
@@ -1399,7 +1399,7 @@ const Br = new C({
|
|
|
1399
1399
|
// newCalibrationValue: 0,
|
|
1400
1400
|
// pouredCalibrationVolume: 0,
|
|
1401
1401
|
},
|
|
1402
|
-
urlOverride: `${
|
|
1402
|
+
urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/verify`,
|
|
1403
1403
|
tracker: o
|
|
1404
1404
|
});
|
|
1405
1405
|
return T.debug("performVerify - response:", a), a != null && a.data && y.initiateFuture(a.data), a == null ? void 0 : a.data;
|
|
@@ -1416,13 +1416,13 @@ const Br = new C({
|
|
|
1416
1416
|
};
|
|
1417
1417
|
return y.initiateFuture(n), n;
|
|
1418
1418
|
}
|
|
1419
|
-
},
|
|
1419
|
+
}, ea = async (e, t, r, o) => {
|
|
1420
1420
|
var a, n, s, u, S;
|
|
1421
1421
|
T.debug(
|
|
1422
1422
|
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
1423
1423
|
);
|
|
1424
1424
|
try {
|
|
1425
|
-
const l = await
|
|
1425
|
+
const l = await ne({
|
|
1426
1426
|
model: {
|
|
1427
1427
|
...o,
|
|
1428
1428
|
// commandedCalibrationVolume: 0,
|
|
@@ -1431,33 +1431,33 @@ const Br = new C({
|
|
|
1431
1431
|
// newCalibrationValue: 0,
|
|
1432
1432
|
// pouredCalibrationVolume: 0,
|
|
1433
1433
|
},
|
|
1434
|
-
urlOverride: `${
|
|
1434
|
+
urlOverride: `${K}/api/ext/freestyle/microCalibration/pour/${e}/complete`
|
|
1435
1435
|
});
|
|
1436
1436
|
return T.debug("performComplete - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((a = l.data) != null && a.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
|
|
1437
1437
|
} catch (l) {
|
|
1438
1438
|
if (T.error(
|
|
1439
1439
|
`performComplete - sending POST request to /api/ext/freestyle/microCalibration/pour/${e}/complete`,
|
|
1440
1440
|
l
|
|
1441
|
-
), l instanceof
|
|
1441
|
+
), l instanceof _e) {
|
|
1442
1442
|
const v = ((s = (n = l.payload) == null ? void 0 : n.data) == null ? void 0 : s.error) || ((u = l.payload) == null ? void 0 : u.error) || "unknownError";
|
|
1443
1443
|
return [v, ((S = l.payload) == null ? void 0 : S.data) || { error: v }];
|
|
1444
1444
|
}
|
|
1445
1445
|
}
|
|
1446
1446
|
return ["unknownError", { error: "unknownError" }];
|
|
1447
1447
|
};
|
|
1448
|
-
var
|
|
1449
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1448
|
+
var ta = Object.defineProperty, ra = Object.getOwnPropertyDescriptor, le = (e, t, r, o) => {
|
|
1449
|
+
for (var a = o > 1 ? void 0 : o ? ra(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1450
1450
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1451
|
-
return o && a &&
|
|
1451
|
+
return o && a && ta(t, r, a), a;
|
|
1452
1452
|
};
|
|
1453
|
-
const
|
|
1454
|
-
let
|
|
1453
|
+
const yt = "spm-pump-model";
|
|
1454
|
+
let N = class {
|
|
1455
1455
|
constructor(e, t, r) {
|
|
1456
1456
|
i(this, "id");
|
|
1457
1457
|
i(this, "logger");
|
|
1458
1458
|
i(this, "pump");
|
|
1459
1459
|
i(this, "futureHandler");
|
|
1460
|
-
this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new
|
|
1460
|
+
this.id = e, this.logger = r.logger, this.pump = t.companionParent, this.futureHandler = new Ge(this);
|
|
1461
1461
|
}
|
|
1462
1462
|
get name() {
|
|
1463
1463
|
return this.pump.name;
|
|
@@ -1478,16 +1478,16 @@ let z = class {
|
|
|
1478
1478
|
return this.futureHandler.future;
|
|
1479
1479
|
}
|
|
1480
1480
|
async performPreCalibrate(e) {
|
|
1481
|
-
return
|
|
1481
|
+
return Jr(this.pump.path, e);
|
|
1482
1482
|
}
|
|
1483
1483
|
async performCalibrate(e) {
|
|
1484
|
-
return
|
|
1484
|
+
return Qr(this.pump.path, e);
|
|
1485
1485
|
}
|
|
1486
1486
|
async performVerify(e, t, r) {
|
|
1487
|
-
return
|
|
1487
|
+
return Xr(this.pump.path, e, t, r);
|
|
1488
1488
|
}
|
|
1489
1489
|
async performComplete(e, t, r) {
|
|
1490
|
-
return
|
|
1490
|
+
return ea(this.pump.path, e, t, r);
|
|
1491
1491
|
}
|
|
1492
1492
|
// -------------------LIFECYCLE----------------------------
|
|
1493
1493
|
async init() {
|
|
@@ -1497,32 +1497,32 @@ let z = class {
|
|
|
1497
1497
|
this.logger.debug(`loading spm-pump ${this.id}`);
|
|
1498
1498
|
}
|
|
1499
1499
|
};
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
],
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
],
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
],
|
|
1509
|
-
|
|
1510
|
-
f(
|
|
1511
|
-
],
|
|
1512
|
-
const
|
|
1513
|
-
class:
|
|
1514
|
-
type:
|
|
1500
|
+
le([
|
|
1501
|
+
I()
|
|
1502
|
+
], N.prototype, "performPreCalibrate", 1);
|
|
1503
|
+
le([
|
|
1504
|
+
I()
|
|
1505
|
+
], N.prototype, "performCalibrate", 1);
|
|
1506
|
+
le([
|
|
1507
|
+
I()
|
|
1508
|
+
], N.prototype, "performVerify", 1);
|
|
1509
|
+
N = le([
|
|
1510
|
+
f(yt)
|
|
1511
|
+
], N);
|
|
1512
|
+
const aa = new C({
|
|
1513
|
+
class: N,
|
|
1514
|
+
type: yt
|
|
1515
1515
|
});
|
|
1516
|
-
var
|
|
1517
|
-
for (var a = o > 1 ? void 0 : o ?
|
|
1516
|
+
var oa = Object.defineProperty, ia = Object.getOwnPropertyDescriptor, Ee = (e, t, r, o) => {
|
|
1517
|
+
for (var a = o > 1 ? void 0 : o ? ia(t, r) : t, n = e.length - 1, s; n >= 0; n--)
|
|
1518
1518
|
(s = e[n]) && (a = (o ? s(t, r, a) : s(a)) || a);
|
|
1519
|
-
return o && a &&
|
|
1519
|
+
return o && a && oa(t, r, a), a;
|
|
1520
1520
|
};
|
|
1521
|
-
const
|
|
1521
|
+
const Se = "agitation-required-trouble-model", sa = (e) => {
|
|
1522
1522
|
if (e.data.agitationRequired)
|
|
1523
|
-
return
|
|
1524
|
-
},
|
|
1525
|
-
let
|
|
1523
|
+
return Se;
|
|
1524
|
+
}, na = "InsufficientAgitationTrouble";
|
|
1525
|
+
let G = class {
|
|
1526
1526
|
constructor(e, t, r) {
|
|
1527
1527
|
i(this, "id");
|
|
1528
1528
|
i(this, "logger");
|
|
@@ -1550,7 +1550,7 @@ let q = class {
|
|
|
1550
1550
|
var o, a;
|
|
1551
1551
|
if (!this.holder)
|
|
1552
1552
|
return !0;
|
|
1553
|
-
const t = (((o = this.holder) == null ? void 0 : o.troublesByType[
|
|
1553
|
+
const t = (((o = this.holder) == null ? void 0 : o.troublesByType[na]) || []).length > 0;
|
|
1554
1554
|
return !!((a = this.agitateBeforePour) != null && a.value) && t;
|
|
1555
1555
|
}
|
|
1556
1556
|
get deferred() {
|
|
@@ -1563,35 +1563,35 @@ let q = class {
|
|
|
1563
1563
|
this._deferred = !1;
|
|
1564
1564
|
}
|
|
1565
1565
|
};
|
|
1566
|
-
|
|
1566
|
+
Ee([
|
|
1567
1567
|
b({
|
|
1568
1568
|
path: "app:kosdev.ddk:app",
|
|
1569
1569
|
attribute: "ncui.agitateBeforePour"
|
|
1570
1570
|
})
|
|
1571
|
-
],
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
topic:
|
|
1575
|
-
lifecycle:
|
|
1571
|
+
], G.prototype, "agitateBeforePour", 2);
|
|
1572
|
+
Ee([
|
|
1573
|
+
St({
|
|
1574
|
+
topic: At(He.type),
|
|
1575
|
+
lifecycle: je.INIT
|
|
1576
1576
|
})
|
|
1577
|
-
],
|
|
1578
|
-
|
|
1579
|
-
f(
|
|
1580
|
-
],
|
|
1581
|
-
const
|
|
1582
|
-
class:
|
|
1583
|
-
type:
|
|
1584
|
-
}),
|
|
1585
|
-
iceAgitator:
|
|
1586
|
-
},
|
|
1587
|
-
const t =
|
|
1577
|
+
], G.prototype, "updateHolder", 1);
|
|
1578
|
+
G = Ee([
|
|
1579
|
+
f(Se)
|
|
1580
|
+
], G);
|
|
1581
|
+
const la = new C({
|
|
1582
|
+
class: G,
|
|
1583
|
+
type: Se
|
|
1584
|
+
}), ua = ["iceAgitator"], ca = {
|
|
1585
|
+
iceAgitator: ft.factory
|
|
1586
|
+
}, da = $.createLogger({ name: "freestyle-assembly-data-mapper" }), _a = async (e) => {
|
|
1587
|
+
const t = $e.instance().options({}).build(), r = Oe.instance().options({}).build(), o = e.assemblies.reduce((s, u) => {
|
|
1588
1588
|
var S;
|
|
1589
|
-
return
|
|
1589
|
+
return ua.forEach((l) => {
|
|
1590
1590
|
var M;
|
|
1591
1591
|
const v = u[l];
|
|
1592
1592
|
if (v) {
|
|
1593
|
-
const
|
|
1594
|
-
s[l] =
|
|
1593
|
+
const bt = ca[l](v.path);
|
|
1594
|
+
s[l] = bt({
|
|
1595
1595
|
name: v.name,
|
|
1596
1596
|
path: v.path,
|
|
1597
1597
|
statePath: ((M = v.state) == null ? void 0 : M.path) || ""
|
|
@@ -1599,7 +1599,7 @@ const ia = new C({
|
|
|
1599
1599
|
}
|
|
1600
1600
|
}), (S = u.cartridgeAgitators) == null || S.forEach((l) => {
|
|
1601
1601
|
var M;
|
|
1602
|
-
const v =
|
|
1602
|
+
const v = Qe.instance(
|
|
1603
1603
|
l.path
|
|
1604
1604
|
).options({
|
|
1605
1605
|
name: l.name,
|
|
@@ -1608,8 +1608,8 @@ const ia = new C({
|
|
|
1608
1608
|
}).build();
|
|
1609
1609
|
t.addModel(v);
|
|
1610
1610
|
}), u.remoteTrays && u.remoteTrays.forEach((l) => {
|
|
1611
|
-
|
|
1612
|
-
const v = `${
|
|
1611
|
+
da.info(`Found remote tray ${l.name} with path ${l.path}`);
|
|
1612
|
+
const v = `${q.type}-${l.holderPath}`, M = q.instance(v).options({
|
|
1613
1613
|
holderPath: l.holderPath,
|
|
1614
1614
|
configPath: l.path,
|
|
1615
1615
|
name: l.name
|
|
@@ -1624,19 +1624,19 @@ const ia = new C({
|
|
|
1624
1624
|
supportsCarb: n,
|
|
1625
1625
|
supportsIce: a
|
|
1626
1626
|
};
|
|
1627
|
-
},
|
|
1627
|
+
}, pa = (e) => () => (wt(e)(), Dt(e)(), Me.register(), ge.register(), ft.register(), Ye.register(), $e.register(), aa.register(), pr.register(), Yr.register(), rr.register(), Re.register(), Ae.register(), q.register(), Oe.register(), m.companion.register(e)(
|
|
1628
|
+
Lt.type,
|
|
1629
|
+
Me.type
|
|
1630
|
+
), m.companion.register(e)(
|
|
1631
|
+
He.type,
|
|
1632
|
+
ge.type
|
|
1633
|
+
), la.register(), m.companion.register(e)(
|
|
1628
1634
|
Mt.type,
|
|
1635
|
+
sa
|
|
1636
|
+
), m.companion.register(e)(Ft.type, Re.type), m.companion.register(e)(
|
|
1637
|
+
zt.type,
|
|
1629
1638
|
Ae.type
|
|
1630
|
-
),
|
|
1631
|
-
je.type,
|
|
1632
|
-
de.type
|
|
1633
|
-
), ia.register(), m.companion.register(e)(
|
|
1634
|
-
St.type,
|
|
1635
|
-
aa
|
|
1636
|
-
), m.companion.register(e)(Rt.type, we.type), m.companion.register(e)(
|
|
1637
|
-
Dt.type,
|
|
1638
|
-
Oe.type
|
|
1639
|
-
), le[ue].register(
|
|
1639
|
+
), ce[de].register(
|
|
1640
1640
|
"EnjoyByTrouble",
|
|
1641
1641
|
async (t) => {
|
|
1642
1642
|
if (t.data.enjoyByDate) {
|
|
@@ -1649,21 +1649,21 @@ const ia = new C({
|
|
|
1649
1649
|
}
|
|
1650
1650
|
return {};
|
|
1651
1651
|
}
|
|
1652
|
-
),
|
|
1652
|
+
), ce[de].register(
|
|
1653
1653
|
"SuperPumpRequiredTrouble",
|
|
1654
1654
|
// This is the trouble type
|
|
1655
1655
|
async (t) => {
|
|
1656
1656
|
const { model: r } = R(
|
|
1657
|
-
|
|
1657
|
+
Nt.type
|
|
1658
1658
|
);
|
|
1659
1659
|
return r ? {
|
|
1660
1660
|
superPumps: r.models.getIndexByKey(
|
|
1661
|
-
|
|
1661
|
+
xt.byType,
|
|
1662
1662
|
"microSuper"
|
|
1663
1663
|
).map((n) => n.name).join(", ")
|
|
1664
1664
|
} : {};
|
|
1665
1665
|
}
|
|
1666
|
-
),
|
|
1666
|
+
), ce[de].register(
|
|
1667
1667
|
"MicroPumpAirDetectTrouble",
|
|
1668
1668
|
async (t) => {
|
|
1669
1669
|
if (t.ifaces.includes("container"))
|
|
@@ -1687,73 +1687,103 @@ const ia = new C({
|
|
|
1687
1687
|
model: m.model.register(e),
|
|
1688
1688
|
companion: m.companion.register(e),
|
|
1689
1689
|
legacy: m.model.registerLegacyModel(e)
|
|
1690
|
-
}),
|
|
1691
|
-
...
|
|
1690
|
+
}), _ = {
|
|
1691
|
+
...Rt
|
|
1692
1692
|
};
|
|
1693
|
-
|
|
1694
|
-
models:
|
|
1693
|
+
_.freestyle = {
|
|
1694
|
+
models: pa(_)
|
|
1695
1695
|
};
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
const
|
|
1701
|
-
function
|
|
1702
|
-
return
|
|
1696
|
+
_.preload = m.model.preloadModel(_);
|
|
1697
|
+
_.model = m.model.register(_);
|
|
1698
|
+
_.companion = m.companion.register(_);
|
|
1699
|
+
_.legacy = m.model.registerLegacyModel(_);
|
|
1700
|
+
const Ia = _;
|
|
1701
|
+
function ga(e) {
|
|
1702
|
+
return H(e);
|
|
1703
|
+
}
|
|
1704
|
+
const De = V(), $a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1705
|
+
__proto__: null,
|
|
1706
|
+
api: De,
|
|
1707
|
+
default: De,
|
|
1708
|
+
kosServiceRequest: ga
|
|
1709
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1710
|
+
function ha(e) {
|
|
1711
|
+
return H(e);
|
|
1712
|
+
}
|
|
1713
|
+
const Le = V(), Ca = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1714
|
+
__proto__: null,
|
|
1715
|
+
api: Le,
|
|
1716
|
+
default: Le,
|
|
1717
|
+
kosServiceRequest: ha
|
|
1718
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1719
|
+
function fa(e) {
|
|
1720
|
+
return H(e);
|
|
1721
|
+
}
|
|
1722
|
+
const Fe = V(), Oa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1723
|
+
__proto__: null,
|
|
1724
|
+
api: Fe,
|
|
1725
|
+
default: Fe,
|
|
1726
|
+
kosServiceRequest: fa
|
|
1727
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
1728
|
+
function ma(e) {
|
|
1729
|
+
return H(e);
|
|
1703
1730
|
}
|
|
1704
|
-
const
|
|
1731
|
+
const ze = V(), Ea = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1705
1732
|
__proto__: null,
|
|
1706
|
-
api:
|
|
1707
|
-
default:
|
|
1708
|
-
kosServiceRequest:
|
|
1733
|
+
api: ze,
|
|
1734
|
+
default: ze,
|
|
1735
|
+
kosServiceRequest: ma
|
|
1709
1736
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1710
|
-
function
|
|
1711
|
-
return
|
|
1737
|
+
function ya(e) {
|
|
1738
|
+
return H(e);
|
|
1712
1739
|
}
|
|
1713
|
-
const
|
|
1740
|
+
const Ne = V(), Sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1714
1741
|
__proto__: null,
|
|
1715
|
-
api:
|
|
1716
|
-
default:
|
|
1717
|
-
kosServiceRequest:
|
|
1742
|
+
api: Ne,
|
|
1743
|
+
default: Ne,
|
|
1744
|
+
kosServiceRequest: ya
|
|
1718
1745
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1719
1746
|
export {
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1747
|
+
na as A,
|
|
1748
|
+
Qr as B,
|
|
1749
|
+
Ye as C,
|
|
1750
|
+
ea as D,
|
|
1751
|
+
Jr as E,
|
|
1752
|
+
pr as F,
|
|
1753
|
+
Xr as G,
|
|
1754
|
+
_a as H,
|
|
1755
|
+
te as I,
|
|
1756
|
+
fr as J,
|
|
1757
|
+
Ia as K,
|
|
1758
|
+
Yr as L,
|
|
1759
|
+
Ar as N,
|
|
1760
|
+
Oe as R,
|
|
1761
|
+
aa as S,
|
|
1762
|
+
$e as a,
|
|
1763
|
+
J as b,
|
|
1764
|
+
Qe as c,
|
|
1765
|
+
rr as d,
|
|
1766
|
+
ge as e,
|
|
1767
|
+
Ae as f,
|
|
1768
|
+
Me as g,
|
|
1769
|
+
Re as h,
|
|
1770
|
+
ft as i,
|
|
1771
|
+
la as j,
|
|
1772
|
+
Ca as k,
|
|
1773
|
+
Oa as l,
|
|
1774
|
+
Ea as m,
|
|
1775
|
+
Sa as n,
|
|
1776
|
+
q as o,
|
|
1777
|
+
ir as p,
|
|
1778
|
+
lr as q,
|
|
1779
|
+
pa as r,
|
|
1780
|
+
$a as s,
|
|
1781
|
+
ar as t,
|
|
1782
|
+
or as u,
|
|
1783
|
+
sr as v,
|
|
1784
|
+
we as w,
|
|
1785
|
+
wr as x,
|
|
1786
|
+
Lr as y,
|
|
1787
|
+
Ta as z
|
|
1758
1788
|
};
|
|
1759
|
-
//# sourceMappingURL=service-
|
|
1789
|
+
//# sourceMappingURL=service-Rmefh9Kc.js.map
|