@kosdev-code/kos-freestyle-sdk 0.1.0-dev.5072 → 0.1.0-dev.5092
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-BE0Y1Zlv.js → extension-utils-m2DUoUsn.js} +2 -2
- package/{extension-utils-BE0Y1Zlv.js.map → extension-utils-m2DUoUsn.js.map} +1 -1
- package/{extension-utils-BVDLwtKr.cjs → extension-utils-z9pjqLGA.cjs} +2 -2
- package/{extension-utils-BVDLwtKr.cjs.map → extension-utils-z9pjqLGA.cjs.map} +1 -1
- package/{freestyle-registration-manager-z0aYdMcC.js → freestyle-registration-manager-CymJYnwk.js} +585 -394
- package/freestyle-registration-manager-CymJYnwk.js.map +1 -0
- package/freestyle-registration-manager-Dt77hR6f.cjs +2 -0
- package/freestyle-registration-manager-Dt77hR6f.cjs.map +1 -0
- package/index.cjs +1 -1
- package/index.js +3 -3
- package/models/models/carb-agitator/carb-agitator-model.d.ts +38 -6
- package/models/models/carb-agitator/carb-agitator-model.d.ts.map +1 -1
- package/models/models/carb-agitator/index.d.ts +1 -1
- package/models/models/carb-agitator/index.d.ts.map +1 -1
- package/models/models/carb-agitator/services/carb-tank-services.d.ts +4 -0
- package/models/models/carb-agitator/services/carb-tank-services.d.ts.map +1 -0
- package/models/models/carb-agitator/types/index.d.ts +1 -8
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts +4 -2
- package/models/models/freestyle-assembly/freestyle-assembly-model.d.ts.map +1 -1
- package/models/models/types/assembly.d.ts +7 -3
- package/models/models/types/assembly.d.ts.map +1 -1
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts +1 -5
- package/models/utils/extensions/assembly/assembly-data-mapper.d.ts.map +1 -1
- package/models.cjs +1 -1
- package/models.js +2 -2
- package/package.json +4 -4
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/{use-nutrition-info-CjXNGbCN.js → use-nutrition-info-BFA7IT1r.js} +2 -2
- package/{use-nutrition-info-CjXNGbCN.js.map → use-nutrition-info-BFA7IT1r.js.map} +1 -1
- package/{use-nutrition-info-DjIGT-mE.cjs → use-nutrition-info-BfMITXJ8.cjs} +2 -2
- package/{use-nutrition-info-DjIGT-mE.cjs.map → use-nutrition-info-BfMITXJ8.cjs.map} +1 -1
- package/freestyle-registration-manager-CDbljuRk.cjs +0 -2
- package/freestyle-registration-manager-CDbljuRk.cjs.map +0 -1
- package/freestyle-registration-manager-z0aYdMcC.js.map +0 -1
- package/models/models/carb-agitator/carb-agitator-registration.d.ts +0 -84
- package/models/models/carb-agitator/carb-agitator-registration.d.ts.map +0 -1
package/{freestyle-registration-manager-z0aYdMcC.js → freestyle-registration-manager-CymJYnwk.js}
RENAMED
|
@@ -1,49 +1,233 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (e, t, r) => (
|
|
4
|
-
import {
|
|
5
|
-
import { PourState as c, Assembly as
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
var ke = Object.defineProperty;
|
|
2
|
+
var xe = (e, t, r) => t in e ? ke(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var o = (e, t, r) => (xe(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { resolveServiceUrl as M, ServiceFactory as D, KosLog as C, createPropKey as R, kosStateProp as O, kosConfigProperty as y, kosStateEntry as ee, kosStateExit as He, kosStateGuard as te, kosFuture as N, kosModel as b, kosLoggerAware as re, kosCompanion as Ve, kosFutureAware as pe, kosStateMachine as Ye, DependencyLifecycle as ye, KosModelContainer as qe, kosChild as fe, kosModelEffect as ae, EventBus as F, KosModelRegistrationFactory as _, SingletonKosModelRegistrationFactory as oe, kosParentAware as me, KosFeatureFlags as V, getKosCompanionModel as Ze, getKosModelSync as v, kosContainerAware as We, KosContextManager as Qe, FutureManager as Xe, kosAction as L, FetchError as Je, KOS_MODEL_ID as I, kosMultipleFutureAware as et, kosTopicHandler as tt, modelTypeEventTopicFactory as rt, RegistrationManager as p, registerCoreModels as at, Trouble as ot, ExtensionManager as Y, EXTENSION_TROUBLE_DATA_MAPPER as q } from "@kosdev-code/kos-ui-sdk";
|
|
5
|
+
import { PourState as c, Assembly as be, KosModelRegistry as it, registerDispenseModels as st, Nozzle as nt, Pump as lt, Holder as dt, PumpContainer as ct, PumpIndex as ut } from "@kosdev-code/kos-dispense-sdk";
|
|
6
|
+
const { URL: Ie } = M("ICE_AGITATOR_SERVICE"), { postModel: gt } = D.build({
|
|
7
|
+
basePath: `${Ie}/api/ext/freestyle/ice`
|
|
8
|
+
});
|
|
9
|
+
C.createLogger({
|
|
10
|
+
name: "carb-tank-service",
|
|
11
|
+
group: "Services"
|
|
12
|
+
});
|
|
13
|
+
const ht = async (e, t) => {
|
|
14
|
+
const r = await gt({
|
|
15
|
+
model: {},
|
|
16
|
+
tracker: t,
|
|
17
|
+
urlOverride: `${Ie}/api/handle/${e}/test`
|
|
18
|
+
});
|
|
19
|
+
if (!(r != null && r.data))
|
|
20
|
+
throw new Error("No response from server");
|
|
21
|
+
return r == null ? void 0 : r.data;
|
|
10
22
|
};
|
|
11
|
-
|
|
12
|
-
|
|
23
|
+
var Pe = Object.defineProperty, pt = Object.getOwnPropertyDescriptor, yt = (e, t, r) => t in e ? Pe(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, f = (e, t, r, i) => {
|
|
24
|
+
for (var a = i > 1 ? void 0 : i ? pt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
25
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
26
|
+
return i && a && Pe(t, r, a), a;
|
|
27
|
+
}, ft = (e, t, r) => (yt(e, t + "", r), r);
|
|
28
|
+
const mt = "carb-agitator-model", ie = R("statePath");
|
|
29
|
+
let g = class {
|
|
13
30
|
constructor(e, t, r) {
|
|
14
31
|
o(this, "id");
|
|
15
32
|
o(this, "name");
|
|
16
33
|
o(this, "path");
|
|
17
|
-
o(this, "
|
|
18
|
-
this
|
|
34
|
+
o(this, "statePath");
|
|
35
|
+
o(this, "highProbeWet");
|
|
36
|
+
o(this, "lowProbeWet");
|
|
37
|
+
o(this, "filling");
|
|
38
|
+
o(this, "enabled");
|
|
39
|
+
var a;
|
|
40
|
+
this.id = e, this.name = t.name, this.path = ((a = r.kosContext.get("assembly-feature-carbTank")) == null ? void 0 : a.path) || "";
|
|
41
|
+
const i = r.kosContext.get("assembly-state-path-carbTank");
|
|
42
|
+
this.statePath = i;
|
|
19
43
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
this.
|
|
44
|
+
get holder() {
|
|
45
|
+
var t;
|
|
46
|
+
return (t = this.getCompanionParent()) == null ? void 0 : t.getHoldersByGroup("carb")[0];
|
|
23
47
|
}
|
|
24
|
-
|
|
25
|
-
|
|
48
|
+
get pump() {
|
|
49
|
+
var e;
|
|
50
|
+
return (e = this.holder) == null ? void 0 : e.pumps.data[0];
|
|
51
|
+
}
|
|
52
|
+
get isFilling() {
|
|
53
|
+
return !!this.filling.value;
|
|
54
|
+
}
|
|
55
|
+
get isCarbInitialized() {
|
|
56
|
+
return !!this.enabled.value;
|
|
57
|
+
}
|
|
58
|
+
get canActivate() {
|
|
59
|
+
return !this.enabled.value;
|
|
60
|
+
}
|
|
61
|
+
get canProceed() {
|
|
62
|
+
return this.isInState(
|
|
63
|
+
"INITIALIZED"
|
|
64
|
+
/* INITIALIZED */
|
|
65
|
+
) || this.isInState(
|
|
66
|
+
"SKIPPED"
|
|
67
|
+
/* SKIPPED */
|
|
68
|
+
);
|
|
69
|
+
}
|
|
70
|
+
handleActivationStart() {
|
|
71
|
+
this.logger.info("Carb tank activation started");
|
|
72
|
+
}
|
|
73
|
+
handleActivationComplete() {
|
|
74
|
+
this.logger.info("Carb tank initialized");
|
|
75
|
+
}
|
|
76
|
+
handleInitialized() {
|
|
77
|
+
this.logger.info("Carb tank ready to proceed");
|
|
78
|
+
}
|
|
79
|
+
handleSkipped() {
|
|
80
|
+
this.logger.info("Proceeding without carbinator");
|
|
81
|
+
}
|
|
82
|
+
async activateCarbTank() {
|
|
83
|
+
this.transition("ACTIVATE"), this.enabled.updateProperty(!0), this.transition("ACTIVATION_COMPLETE");
|
|
84
|
+
}
|
|
85
|
+
async deactivateCarbTank() {
|
|
86
|
+
this.enabled.updateProperty(!1), this.transition("RESET");
|
|
87
|
+
}
|
|
88
|
+
skip() {
|
|
89
|
+
this.transition("SKIP");
|
|
90
|
+
}
|
|
91
|
+
reset() {
|
|
92
|
+
this.enabled.updateProperty(!1), this.transition("RESET");
|
|
93
|
+
}
|
|
94
|
+
toggleCarbTank() {
|
|
95
|
+
this.enabled.value ? this.deactivateCarbTank() : this.activateCarbTank();
|
|
96
|
+
}
|
|
97
|
+
handleTestCarbTank(e) {
|
|
98
|
+
if (!e)
|
|
99
|
+
throw new Error("No tracker provided");
|
|
100
|
+
return this.logger.info(`testing carb tank: ${this.id}`), ht(this.path, e);
|
|
26
101
|
}
|
|
27
102
|
};
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
103
|
+
ft(g, "Registration");
|
|
104
|
+
f([
|
|
105
|
+
O({
|
|
106
|
+
path: ie,
|
|
107
|
+
attribute: "highProbeWet"
|
|
108
|
+
})
|
|
109
|
+
], g.prototype, "highProbeWet", 2);
|
|
110
|
+
f([
|
|
111
|
+
O({
|
|
112
|
+
path: ie,
|
|
113
|
+
attribute: "lowProbeWet"
|
|
114
|
+
})
|
|
115
|
+
], g.prototype, "lowProbeWet", 2);
|
|
116
|
+
f([
|
|
117
|
+
O({
|
|
118
|
+
path: ie,
|
|
119
|
+
attribute: "filling"
|
|
120
|
+
})
|
|
121
|
+
], g.prototype, "filling", 2);
|
|
122
|
+
f([
|
|
123
|
+
y({
|
|
124
|
+
path: "assembly:core:board:macksm:carbTank:carbTank",
|
|
125
|
+
attribute: "enabled"
|
|
126
|
+
})
|
|
127
|
+
], g.prototype, "enabled", 2);
|
|
128
|
+
f([
|
|
129
|
+
ee(
|
|
130
|
+
"ACTIVATING"
|
|
131
|
+
/* ACTIVATING */
|
|
132
|
+
)
|
|
133
|
+
], g.prototype, "handleActivationStart", 1);
|
|
134
|
+
f([
|
|
135
|
+
He(
|
|
136
|
+
"ACTIVATING"
|
|
137
|
+
/* ACTIVATING */
|
|
138
|
+
)
|
|
139
|
+
], g.prototype, "handleActivationComplete", 1);
|
|
140
|
+
f([
|
|
141
|
+
ee(
|
|
142
|
+
"INITIALIZED"
|
|
143
|
+
/* INITIALIZED */
|
|
144
|
+
)
|
|
145
|
+
], g.prototype, "handleInitialized", 1);
|
|
146
|
+
f([
|
|
147
|
+
ee(
|
|
148
|
+
"SKIPPED"
|
|
149
|
+
/* SKIPPED */
|
|
150
|
+
)
|
|
151
|
+
], g.prototype, "handleSkipped", 1);
|
|
152
|
+
f([
|
|
153
|
+
te({ allowedStates: [
|
|
154
|
+
"UNINITIALIZED"
|
|
155
|
+
/* UNINITIALIZED */
|
|
156
|
+
] })
|
|
157
|
+
], g.prototype, "activateCarbTank", 1);
|
|
158
|
+
f([
|
|
159
|
+
te({ allowedStates: [
|
|
160
|
+
"UNINITIALIZED"
|
|
161
|
+
/* UNINITIALIZED */
|
|
162
|
+
] })
|
|
163
|
+
], g.prototype, "skip", 1);
|
|
164
|
+
f([
|
|
165
|
+
te({
|
|
166
|
+
allowedStates: [
|
|
167
|
+
"INITIALIZED",
|
|
168
|
+
"SKIPPED"
|
|
169
|
+
/* SKIPPED */
|
|
170
|
+
]
|
|
171
|
+
})
|
|
172
|
+
], g.prototype, "reset", 1);
|
|
173
|
+
f([
|
|
174
|
+
N()
|
|
175
|
+
], g.prototype, "handleTestCarbTank", 1);
|
|
176
|
+
g = f([
|
|
177
|
+
b({ modelTypeId: mt, singleton: !1 }),
|
|
178
|
+
re(),
|
|
179
|
+
Ve({ mode: "composition", lifecycle: ye.LOAD }),
|
|
180
|
+
pe(),
|
|
181
|
+
Ye(
|
|
182
|
+
{
|
|
183
|
+
initial: "UNINITIALIZED",
|
|
184
|
+
states: {
|
|
185
|
+
UNINITIALIZED: {
|
|
186
|
+
on: {
|
|
187
|
+
ACTIVATE: "ACTIVATING",
|
|
188
|
+
SKIP: "SKIPPED"
|
|
189
|
+
/* SKIPPED */
|
|
190
|
+
}
|
|
191
|
+
},
|
|
192
|
+
ACTIVATING: {
|
|
193
|
+
on: {
|
|
194
|
+
ACTIVATION_COMPLETE: "INITIALIZED"
|
|
195
|
+
/* INITIALIZED */
|
|
196
|
+
}
|
|
197
|
+
},
|
|
198
|
+
INITIALIZED: {
|
|
199
|
+
on: {
|
|
200
|
+
RESET: "UNINITIALIZED"
|
|
201
|
+
/* UNINITIALIZED */
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
SKIPPED: {
|
|
205
|
+
on: {
|
|
206
|
+
RESET: "UNINITIALIZED"
|
|
207
|
+
/* UNINITIALIZED */
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
throwOnInvalid: !1
|
|
214
|
+
// Graceful handling for button clicks
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
], g);
|
|
218
|
+
const Te = g.Registration;
|
|
219
|
+
var bt = Object.defineProperty, It = Object.getOwnPropertyDescriptor, ve = (e, t, r, i) => {
|
|
220
|
+
for (var a = i > 1 ? void 0 : i ? It(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
221
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
222
|
+
return i && a && bt(t, r, a), a;
|
|
39
223
|
};
|
|
40
|
-
const
|
|
41
|
-
let
|
|
224
|
+
const _e = "cartridge-agitator-container-model";
|
|
225
|
+
let G = class {
|
|
42
226
|
constructor(e, t, r) {
|
|
43
227
|
o(this, "id");
|
|
44
228
|
o(this, "logger");
|
|
45
229
|
o(this, "_models");
|
|
46
|
-
this.id = e, this.logger = r.logger, this._models = new
|
|
230
|
+
this.id = e, this.logger = r.logger, this._models = new qe({
|
|
47
231
|
parentId: e
|
|
48
232
|
});
|
|
49
233
|
}
|
|
@@ -74,35 +258,35 @@ let S = class {
|
|
|
74
258
|
);
|
|
75
259
|
}
|
|
76
260
|
};
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
],
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
],
|
|
83
|
-
const { URL:
|
|
84
|
-
basePath: `${
|
|
85
|
-
}),
|
|
86
|
-
const r = await
|
|
261
|
+
ve([
|
|
262
|
+
fe
|
|
263
|
+
], G.prototype, "_models", 2);
|
|
264
|
+
G = ve([
|
|
265
|
+
b(_e)
|
|
266
|
+
], G);
|
|
267
|
+
const { URL: Ee } = M("CARTRIDGE_AGITATOR_SERVICE"), { postModel: Pt } = D.build({
|
|
268
|
+
basePath: `${Ee}/api/ext/freestyle/freestyle/ice`
|
|
269
|
+
}), Tt = async (e, t) => {
|
|
270
|
+
const r = await Pt({
|
|
87
271
|
model: {},
|
|
88
272
|
tracker: t,
|
|
89
|
-
urlOverride: `${
|
|
273
|
+
urlOverride: `${Ee}/api/handle/${e}/test`
|
|
90
274
|
});
|
|
91
275
|
if (!(r != null && r.data))
|
|
92
276
|
throw new Error("No response from server");
|
|
93
277
|
return r.data;
|
|
94
278
|
};
|
|
95
|
-
var
|
|
96
|
-
for (var a =
|
|
97
|
-
(n = e[
|
|
98
|
-
return
|
|
279
|
+
var vt = Object.defineProperty, _t = Object.getOwnPropertyDescriptor, x = (e, t, r, i) => {
|
|
280
|
+
for (var a = i > 1 ? void 0 : i ? _t(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
281
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
282
|
+
return i && a && vt(t, r, a), a;
|
|
99
283
|
};
|
|
100
|
-
const
|
|
101
|
-
class
|
|
284
|
+
const Ae = "cartridge-agitator-model";
|
|
285
|
+
class U {
|
|
102
286
|
}
|
|
103
|
-
o(
|
|
104
|
-
const
|
|
105
|
-
let
|
|
287
|
+
o(U, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/agitation-started"), o(U, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/agitation-ended");
|
|
288
|
+
const Et = R("statePath");
|
|
289
|
+
let A = class {
|
|
106
290
|
constructor(e, t) {
|
|
107
291
|
o(this, "id");
|
|
108
292
|
o(this, "agitating");
|
|
@@ -117,51 +301,52 @@ let T = class {
|
|
|
117
301
|
async testAgitate(e) {
|
|
118
302
|
if (!e)
|
|
119
303
|
throw new Error("No tracker provided");
|
|
120
|
-
return this.logger.info(`agitating cartridge-agitator ${this.id}`),
|
|
304
|
+
return this.logger.info(`agitating cartridge-agitator ${this.id}`), Tt(this.path, e);
|
|
121
305
|
}
|
|
122
306
|
handleAgitation() {
|
|
123
307
|
var e;
|
|
124
|
-
this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`),
|
|
308
|
+
this.isAgitating ? (this.logger.info(`agitating cartridge-agitator ${this.id}`), F.publish(U.TOPIC_AGITATION_STARTED, {
|
|
125
309
|
path: this.path,
|
|
126
310
|
futureId: (e = this.future) == null ? void 0 : e.futureId
|
|
127
|
-
})) :
|
|
311
|
+
})) : F.publish(U.TOPIC_AGITATION_ENDED, {
|
|
128
312
|
path: this.path
|
|
129
313
|
});
|
|
130
314
|
}
|
|
131
315
|
};
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
],
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
],
|
|
138
|
-
|
|
139
|
-
|
|
316
|
+
x([
|
|
317
|
+
O({ path: Et, attribute: "agitating" })
|
|
318
|
+
], A.prototype, "agitating", 2);
|
|
319
|
+
x([
|
|
320
|
+
N()
|
|
321
|
+
], A.prototype, "testAgitate", 1);
|
|
322
|
+
x([
|
|
323
|
+
ae({
|
|
140
324
|
dependencies: (e) => [e.isAgitating]
|
|
141
325
|
})
|
|
142
|
-
],
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
],
|
|
148
|
-
const
|
|
149
|
-
class:
|
|
150
|
-
type:
|
|
151
|
-
}),
|
|
152
|
-
class:
|
|
153
|
-
type:
|
|
326
|
+
], A.prototype, "handleAgitation", 1);
|
|
327
|
+
A = x([
|
|
328
|
+
b(Ae),
|
|
329
|
+
pe(),
|
|
330
|
+
re()
|
|
331
|
+
], A);
|
|
332
|
+
const Ce = new _({
|
|
333
|
+
class: A,
|
|
334
|
+
type: Ae
|
|
335
|
+
}), se = new oe({
|
|
336
|
+
class: G,
|
|
337
|
+
type: _e
|
|
154
338
|
});
|
|
155
|
-
|
|
156
|
-
var
|
|
157
|
-
for (var a =
|
|
158
|
-
(n = e[
|
|
159
|
-
return
|
|
339
|
+
se.addRelatedModel(Ce);
|
|
340
|
+
var At = Object.defineProperty, Ct = Object.getOwnPropertyDescriptor, Oe = (e, t, r, i) => {
|
|
341
|
+
for (var a = i > 1 ? void 0 : i ? Ct(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
342
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
343
|
+
return i && a && At(t, r, a), a;
|
|
160
344
|
};
|
|
161
|
-
const
|
|
162
|
-
let
|
|
345
|
+
const $e = "freestyle-assembly-model", Ot = "iceAgitator", $t = "carbTank", wt = "remoteTrays";
|
|
346
|
+
let j = class {
|
|
163
347
|
constructor(e, t, r) {
|
|
164
348
|
o(this, "id");
|
|
349
|
+
o(this, "_carbTankModel");
|
|
165
350
|
o(this, "logger");
|
|
166
351
|
o(this, "assembly");
|
|
167
352
|
o(this, "_remoteTrays");
|
|
@@ -197,8 +382,8 @@ let D = class {
|
|
|
197
382
|
get iceAgitator() {
|
|
198
383
|
return this.assembly.iceAgitator;
|
|
199
384
|
}
|
|
200
|
-
get
|
|
201
|
-
return this.
|
|
385
|
+
get carbTank() {
|
|
386
|
+
return this._carbTankModel;
|
|
202
387
|
}
|
|
203
388
|
get cartridgeAgitators() {
|
|
204
389
|
return this.assembly.cartridgeAgitators;
|
|
@@ -220,38 +405,45 @@ let D = class {
|
|
|
220
405
|
}
|
|
221
406
|
// -------------------LIFECYCLE----------------------------
|
|
222
407
|
get supportsRemoteTrays() {
|
|
223
|
-
return
|
|
408
|
+
return V.isFeatureEnabled(wt);
|
|
224
409
|
}
|
|
225
410
|
get supportsIce() {
|
|
226
|
-
return
|
|
411
|
+
return V.isFeatureEnabled(Ot);
|
|
227
412
|
}
|
|
228
413
|
get supportsCarb() {
|
|
229
|
-
return
|
|
414
|
+
return V.isFeatureEnabled($t);
|
|
230
415
|
}
|
|
231
416
|
async init() {
|
|
232
417
|
this.logger.debug(`initializing freestyle-assembly ${this.id}`);
|
|
233
418
|
}
|
|
419
|
+
async ready() {
|
|
420
|
+
const e = Ze(
|
|
421
|
+
this.assembly,
|
|
422
|
+
Te.type
|
|
423
|
+
);
|
|
424
|
+
this._carbTankModel = e;
|
|
425
|
+
}
|
|
234
426
|
};
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
],
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
],
|
|
242
|
-
const W = new
|
|
243
|
-
class:
|
|
244
|
-
type:
|
|
427
|
+
Oe([
|
|
428
|
+
fe
|
|
429
|
+
], j.prototype, "_remoteTrays", 2);
|
|
430
|
+
j = Oe([
|
|
431
|
+
me(),
|
|
432
|
+
b($e)
|
|
433
|
+
], j);
|
|
434
|
+
const W = new oe({
|
|
435
|
+
class: j,
|
|
436
|
+
type: $e
|
|
245
437
|
});
|
|
246
|
-
var
|
|
247
|
-
for (var a =
|
|
248
|
-
(n = e[
|
|
249
|
-
return
|
|
438
|
+
var St = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, we = (e, t, r, i) => {
|
|
439
|
+
for (var a = i > 1 ? void 0 : i ? Mt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
440
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
441
|
+
return i && a && St(t, r, a), a;
|
|
250
442
|
};
|
|
251
|
-
const
|
|
252
|
-
|
|
253
|
-
const
|
|
254
|
-
let
|
|
443
|
+
const Se = "remote-tray-model";
|
|
444
|
+
R("holderPath");
|
|
445
|
+
const Dt = R("configPath");
|
|
446
|
+
let B = class {
|
|
255
447
|
constructor(e, t, r) {
|
|
256
448
|
/** Unique identifier for the remote tray instance */
|
|
257
449
|
o(this, "id");
|
|
@@ -341,65 +533,65 @@ let z = class {
|
|
|
341
533
|
this.logger.debug(`loading remote-tray ${this.id}`);
|
|
342
534
|
}
|
|
343
535
|
};
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
path:
|
|
536
|
+
we([
|
|
537
|
+
y({
|
|
538
|
+
path: Dt,
|
|
347
539
|
attribute: "enabled"
|
|
348
540
|
})
|
|
349
|
-
],
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
],
|
|
353
|
-
const
|
|
354
|
-
class:
|
|
355
|
-
type:
|
|
541
|
+
], B.prototype, "remoteTrayEnabled", 2);
|
|
542
|
+
B = we([
|
|
543
|
+
b(Se)
|
|
544
|
+
], B);
|
|
545
|
+
const w = new _({
|
|
546
|
+
class: B,
|
|
547
|
+
type: Se
|
|
356
548
|
});
|
|
357
|
-
var
|
|
358
|
-
for (var a =
|
|
359
|
-
(n = e[
|
|
549
|
+
var Rt = Object.getOwnPropertyDescriptor, Nt = (e, t, r, i) => {
|
|
550
|
+
for (var a = i > 1 ? void 0 : i ? Rt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
551
|
+
(n = e[s]) && (a = n(a) || a);
|
|
360
552
|
return a;
|
|
361
553
|
};
|
|
362
|
-
const
|
|
363
|
-
let
|
|
554
|
+
const Me = "remote-tray-container-model";
|
|
555
|
+
let Q = class {
|
|
364
556
|
constructor(e) {
|
|
365
557
|
o(this, "id");
|
|
366
558
|
this.id = e;
|
|
367
559
|
}
|
|
368
560
|
};
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
],
|
|
374
|
-
const
|
|
375
|
-
class:
|
|
376
|
-
type:
|
|
561
|
+
Q = Nt([
|
|
562
|
+
b(Me),
|
|
563
|
+
re(),
|
|
564
|
+
We()
|
|
565
|
+
], Q);
|
|
566
|
+
const ne = new oe({
|
|
567
|
+
class: Q,
|
|
568
|
+
type: Me
|
|
377
569
|
});
|
|
378
|
-
|
|
379
|
-
var
|
|
380
|
-
for (var a =
|
|
381
|
-
(n = e[
|
|
570
|
+
ne.addRelatedModel(w);
|
|
571
|
+
var zt = Object.getOwnPropertyDescriptor, Lt = (e, t, r, i) => {
|
|
572
|
+
for (var a = i > 1 ? void 0 : i ? zt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
573
|
+
(n = e[s]) && (a = n(a) || a);
|
|
382
574
|
return a;
|
|
383
575
|
};
|
|
384
|
-
const
|
|
385
|
-
function
|
|
386
|
-
const t =
|
|
576
|
+
const De = "freestyle-holder-model";
|
|
577
|
+
function Ft(e) {
|
|
578
|
+
const t = Qe.getContext(e), r = t == null ? void 0 : t.get(
|
|
387
579
|
W.type
|
|
388
580
|
);
|
|
389
581
|
if (!r) {
|
|
390
|
-
|
|
582
|
+
C.error("Freestyle assembly not found");
|
|
391
583
|
return;
|
|
392
584
|
}
|
|
393
585
|
return r;
|
|
394
586
|
}
|
|
395
|
-
async function
|
|
587
|
+
async function Gt(e, t) {
|
|
396
588
|
if (!e || !t)
|
|
397
589
|
return;
|
|
398
590
|
const r = await e[t]();
|
|
399
591
|
if (r != null && r.tracker)
|
|
400
|
-
return
|
|
592
|
+
return Xe.getFuture(r.tracker);
|
|
401
593
|
}
|
|
402
|
-
let
|
|
594
|
+
let X = class {
|
|
403
595
|
constructor(e, t, r) {
|
|
404
596
|
o(this, "id");
|
|
405
597
|
o(this, "logger");
|
|
@@ -415,20 +607,20 @@ let Q = class {
|
|
|
415
607
|
if (!this.holder.data.agitated)
|
|
416
608
|
return;
|
|
417
609
|
this.future = void 0;
|
|
418
|
-
const e =
|
|
610
|
+
const e = Ft(this.id);
|
|
419
611
|
if (!e)
|
|
420
612
|
return;
|
|
421
613
|
if (!e.defaultCartridgeAgitator) {
|
|
422
614
|
this.logger.error("Agitator not found");
|
|
423
615
|
return;
|
|
424
616
|
}
|
|
425
|
-
return this.future = await
|
|
617
|
+
return this.future = await Gt(
|
|
426
618
|
e.defaultCartridgeAgitator,
|
|
427
619
|
"testAgitate"
|
|
428
620
|
), this.future;
|
|
429
621
|
}
|
|
430
622
|
get isRemote() {
|
|
431
|
-
const e = `${
|
|
623
|
+
const e = `${w.type}-${this.holder.path}`, t = v(e);
|
|
432
624
|
return t != null && t.model ? !!t.model.remoteTrayEnabled.value : !1;
|
|
433
625
|
}
|
|
434
626
|
// -------------------LIFECYCLE----------------------------
|
|
@@ -439,51 +631,51 @@ let Q = class {
|
|
|
439
631
|
this.logger.debug(`loading freestyle-holder ${this.id}`);
|
|
440
632
|
}
|
|
441
633
|
};
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
],
|
|
445
|
-
const
|
|
446
|
-
class:
|
|
447
|
-
type:
|
|
448
|
-
}), { URL:
|
|
449
|
-
basePath: `${
|
|
450
|
-
}),
|
|
634
|
+
X = Lt([
|
|
635
|
+
b(De)
|
|
636
|
+
], X);
|
|
637
|
+
const ce = new _({
|
|
638
|
+
class: X,
|
|
639
|
+
type: De
|
|
640
|
+
}), { URL: Ut } = M("FREESTYLE-NOZZLE_SERVICE"), { getOne: jt } = D.build({
|
|
641
|
+
basePath: `${Ut}/api/freestyle-nozzle`
|
|
642
|
+
}), z = C.createLogger({
|
|
451
643
|
name: "freestyle-nozzle-service",
|
|
452
644
|
group: "Services"
|
|
453
645
|
});
|
|
454
|
-
class
|
|
646
|
+
class Bt extends Error {
|
|
455
647
|
constructor(t) {
|
|
456
648
|
super(t), this.name = "NutritionInfoError";
|
|
457
649
|
}
|
|
458
650
|
}
|
|
459
|
-
class
|
|
651
|
+
class ue extends Error {
|
|
460
652
|
constructor(t) {
|
|
461
653
|
super(t), this.name = "InvalidRequestError";
|
|
462
654
|
}
|
|
463
655
|
}
|
|
464
|
-
const
|
|
465
|
-
if (
|
|
466
|
-
throw
|
|
656
|
+
const Kt = async (e, t, r, i = "http://localhost:8081") => {
|
|
657
|
+
if (z.debug("sending GET for freestyle-nozzle"), !t)
|
|
658
|
+
throw z.error("Invalid freestyle-nozzle request: beverageId is required"), new ue("No beverageId provided");
|
|
467
659
|
if (!r || r.length === 0)
|
|
468
|
-
throw
|
|
469
|
-
const a = await
|
|
470
|
-
urlOverride: `${
|
|
660
|
+
throw z.error("Invalid freestyle-nozzle request: volumes are required"), new ue("No volumes provided");
|
|
661
|
+
const a = await jt({
|
|
662
|
+
urlOverride: `${i}${e}/pipeline/beverage/engine/nutrition/${t}?volumes=${r.join(
|
|
471
663
|
","
|
|
472
664
|
)}`
|
|
473
665
|
});
|
|
474
666
|
if (!(a != null && a.data))
|
|
475
|
-
throw
|
|
667
|
+
throw z.error("Failed to retrieve freestyle-nozzle data"), new Error("Failed to retrieve freestyle-nozzle data");
|
|
476
668
|
if (a.data.error)
|
|
477
|
-
throw new
|
|
669
|
+
throw new Bt(a.data.error);
|
|
478
670
|
return a.data;
|
|
479
671
|
};
|
|
480
|
-
var
|
|
481
|
-
for (var a =
|
|
482
|
-
(n = e[
|
|
483
|
-
return
|
|
672
|
+
var kt = Object.defineProperty, xt = Object.getOwnPropertyDescriptor, Re = (e, t, r, i) => {
|
|
673
|
+
for (var a = i > 1 ? void 0 : i ? xt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
674
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
675
|
+
return i && a && kt(t, r, a), a;
|
|
484
676
|
};
|
|
485
|
-
const
|
|
486
|
-
let
|
|
677
|
+
const Ne = "freestyle-nozzle-model";
|
|
678
|
+
let K = class {
|
|
487
679
|
constructor(e, t, r) {
|
|
488
680
|
o(this, "id");
|
|
489
681
|
o(this, "logger");
|
|
@@ -508,12 +700,12 @@ let N = class {
|
|
|
508
700
|
);
|
|
509
701
|
const e = this.nozzleModel.selectedPourable.beverage.rawId, t = this.nozzleModel.urlPrefix;
|
|
510
702
|
try {
|
|
511
|
-
const r = await
|
|
703
|
+
const r = await Kt(
|
|
512
704
|
t,
|
|
513
705
|
e,
|
|
514
706
|
this._cupSizes
|
|
515
707
|
);
|
|
516
|
-
|
|
708
|
+
L(() => {
|
|
517
709
|
this._nutritionInfo = r;
|
|
518
710
|
});
|
|
519
711
|
} catch (r) {
|
|
@@ -532,54 +724,54 @@ let N = class {
|
|
|
532
724
|
this.logger.debug(`loading freestyle-nozzle ${this.id}`);
|
|
533
725
|
}
|
|
534
726
|
};
|
|
535
|
-
|
|
536
|
-
|
|
727
|
+
Re([
|
|
728
|
+
ae({
|
|
537
729
|
dependencies: (e) => [
|
|
538
730
|
e.selectedPourable.beverage
|
|
539
731
|
]
|
|
540
732
|
})
|
|
541
|
-
],
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
],
|
|
546
|
-
const
|
|
547
|
-
class:
|
|
548
|
-
type:
|
|
549
|
-
}), { URL:
|
|
550
|
-
basePath: `${
|
|
551
|
-
}),
|
|
733
|
+
], K.prototype, "handleBeverageSelection", 1);
|
|
734
|
+
K = Re([
|
|
735
|
+
me(),
|
|
736
|
+
b(Ne)
|
|
737
|
+
], K);
|
|
738
|
+
const ge = new _({
|
|
739
|
+
class: K,
|
|
740
|
+
type: Ne
|
|
741
|
+
}), { URL: ze } = M("PUMP_SERVICE"), { postModel: Ht } = D.build({
|
|
742
|
+
basePath: `${ze}/api/ext/freestyle/microCalibration`
|
|
743
|
+
}), Z = C.createLogger({
|
|
552
744
|
name: "freestyle-pump-service",
|
|
553
745
|
group: "Services"
|
|
554
|
-
}),
|
|
555
|
-
var r,
|
|
556
|
-
|
|
746
|
+
}), Vt = async (e, t) => {
|
|
747
|
+
var r, i, a, s, n;
|
|
748
|
+
Z.debug(
|
|
557
749
|
`replacePump - sending POST request to /api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
558
750
|
);
|
|
559
751
|
try {
|
|
560
|
-
const l = await
|
|
752
|
+
const l = await Ht({
|
|
561
753
|
model: {},
|
|
562
|
-
urlOverride: `${
|
|
754
|
+
urlOverride: `${ze}/api/ext/freestyle/microCalibration/cal/${e}/code/${t}`
|
|
563
755
|
});
|
|
564
|
-
return
|
|
756
|
+
return Z.debug("replacePump - response:", l), ((l == null ? void 0 : l.status) === 200 || (l == null ? void 0 : l.status) === 499) && ((r = l.data) != null && r.error) ? [l.data.error || "unknownError", l.data] : [void 0, l == null ? void 0 : l.data];
|
|
565
757
|
} catch (l) {
|
|
566
|
-
if (
|
|
758
|
+
if (Z.error(
|
|
567
759
|
`replacePump - sending POST request to /api/cal/${e}/code/${t}`,
|
|
568
760
|
l
|
|
569
|
-
), l instanceof
|
|
570
|
-
const
|
|
571
|
-
return [
|
|
761
|
+
), l instanceof Je) {
|
|
762
|
+
const $ = ((a = (i = l.payload) == null ? void 0 : i.data) == null ? void 0 : a.error) || ((s = l.payload) == null ? void 0 : s.error) || "unknownError";
|
|
763
|
+
return [$, ((n = l.payload) == null ? void 0 : n.data) || { error: $ }];
|
|
572
764
|
}
|
|
573
765
|
}
|
|
574
766
|
return ["unknownError", { error: "unknownError" }];
|
|
575
767
|
};
|
|
576
|
-
var
|
|
577
|
-
for (var a =
|
|
578
|
-
(n = e[
|
|
768
|
+
var Yt = Object.getOwnPropertyDescriptor, qt = (e, t, r, i) => {
|
|
769
|
+
for (var a = i > 1 ? void 0 : i ? Yt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
770
|
+
(n = e[s]) && (a = n(a) || a);
|
|
579
771
|
return a;
|
|
580
772
|
};
|
|
581
|
-
const
|
|
582
|
-
let
|
|
773
|
+
const Le = "freestyle-pump-model";
|
|
774
|
+
let J = class {
|
|
583
775
|
constructor(e, t, r) {
|
|
584
776
|
o(this, "id");
|
|
585
777
|
o(this, "logger");
|
|
@@ -588,65 +780,65 @@ let X = class {
|
|
|
588
780
|
}
|
|
589
781
|
// -------------------LIFECYCLE----------------------------
|
|
590
782
|
async replacePump(e) {
|
|
591
|
-
const [t, r] = await
|
|
783
|
+
const [t, r] = await Vt(this.pump.path, e);
|
|
592
784
|
return t && this.logger.error(`Failed to replace the pump, ${this.pump.id}`, t), [t, r];
|
|
593
785
|
}
|
|
594
786
|
};
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
],
|
|
598
|
-
const
|
|
599
|
-
class:
|
|
600
|
-
type:
|
|
601
|
-
}), { URL:
|
|
602
|
-
basePath: `${
|
|
603
|
-
}),
|
|
787
|
+
J = qt([
|
|
788
|
+
b(Le)
|
|
789
|
+
], J);
|
|
790
|
+
const he = new _({
|
|
791
|
+
class: J,
|
|
792
|
+
type: Le
|
|
793
|
+
}), { URL: E } = M("ICE_AGITATOR_SERVICE"), { getAll: Fe, postModel: H } = D.build({
|
|
794
|
+
basePath: `${E}/api/ext/freestyle/ice`
|
|
795
|
+
}), Ge = C.createLogger({
|
|
604
796
|
name: "ice-agitator-service",
|
|
605
797
|
group: "Services"
|
|
606
|
-
}),
|
|
607
|
-
urlOverride: `${
|
|
608
|
-
})),
|
|
609
|
-
urlOverride: `${
|
|
798
|
+
}), Zt = async (e) => (Ge.debug("sending GET for ice types"), await Fe({
|
|
799
|
+
urlOverride: `${E}/api/handle/${e}/types`
|
|
800
|
+
})), Wt = async (e, t) => (Ge.debug("sending POST for ice types"), await H({
|
|
801
|
+
urlOverride: `${E}/api/handle/${e}/type/${t}`,
|
|
610
802
|
model: {}
|
|
611
|
-
})),
|
|
612
|
-
urlOverride: `${
|
|
613
|
-
}),
|
|
614
|
-
const r = await
|
|
803
|
+
})), Qt = async (e) => await Fe({
|
|
804
|
+
urlOverride: `${E}/api/kos/config/details/${e}/4`
|
|
805
|
+
}), Xt = async (e, t) => {
|
|
806
|
+
const r = await H({
|
|
615
807
|
model: {},
|
|
616
808
|
tracker: t,
|
|
617
|
-
urlOverride: `${
|
|
809
|
+
urlOverride: `${E}/api/handle/${e}/pour`
|
|
618
810
|
});
|
|
619
811
|
if (!(r != null && r.data))
|
|
620
812
|
throw new Error("No response from server");
|
|
621
813
|
return r == null ? void 0 : r.data;
|
|
622
|
-
},
|
|
623
|
-
const r = await
|
|
814
|
+
}, Jt = async (e, t) => {
|
|
815
|
+
const r = await H({
|
|
624
816
|
model: {},
|
|
625
817
|
tracker: t,
|
|
626
|
-
urlOverride: `${
|
|
818
|
+
urlOverride: `${E}/api/handle/${e}/test/agitation`
|
|
627
819
|
});
|
|
628
820
|
if (!(r != null && r.data))
|
|
629
821
|
throw new Error("No response from server");
|
|
630
822
|
return r == null ? void 0 : r.data;
|
|
631
|
-
},
|
|
632
|
-
const r = await
|
|
823
|
+
}, er = async (e, t) => {
|
|
824
|
+
const r = await H({
|
|
633
825
|
model: {},
|
|
634
826
|
tracker: t,
|
|
635
|
-
urlOverride: `${
|
|
827
|
+
urlOverride: `${E}/api/handle/${e}/test/gate`
|
|
636
828
|
});
|
|
637
829
|
if (!(r != null && r.data))
|
|
638
830
|
throw new Error("No response from server");
|
|
639
831
|
return r == null ? void 0 : r.data;
|
|
640
832
|
};
|
|
641
|
-
var
|
|
642
|
-
for (var a =
|
|
643
|
-
(n = e[
|
|
644
|
-
return
|
|
833
|
+
var tr = Object.defineProperty, rr = Object.getOwnPropertyDescriptor, u = (e, t, r, i) => {
|
|
834
|
+
for (var a = i > 1 ? void 0 : i ? rr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
835
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
836
|
+
return i && a && tr(t, r, a), a;
|
|
645
837
|
};
|
|
646
|
-
class
|
|
838
|
+
class k {
|
|
647
839
|
}
|
|
648
|
-
o(
|
|
649
|
-
const
|
|
840
|
+
o(k, "TOPIC_AGITATION_STARTED", "/kos/events/ddk/ice-agitation-started"), o(k, "TOPIC_AGITATION_ENDED", "/kos/events/ddk/ice-agitation-ended");
|
|
841
|
+
const Ue = "ice-agitator-model", je = R("statePath");
|
|
650
842
|
let d = class {
|
|
651
843
|
constructor(e, t, r) {
|
|
652
844
|
o(this, "id");
|
|
@@ -668,7 +860,7 @@ let d = class {
|
|
|
668
860
|
o(this, "_allIceTypes");
|
|
669
861
|
o(this, "logger");
|
|
670
862
|
o(this, "currentState", c.IDLE);
|
|
671
|
-
o(this, "resetDefaultValues", async () => await
|
|
863
|
+
o(this, "resetDefaultValues", async () => await Qt(this.path));
|
|
672
864
|
this.id = e, this.name = t.name, this.path = t.path, this.statePath = t.statePath, this._allIceTypes = [], this.logger = r.logger;
|
|
673
865
|
}
|
|
674
866
|
get iceTypes() {
|
|
@@ -699,7 +891,7 @@ let d = class {
|
|
|
699
891
|
return this.currentState === c.IDLE;
|
|
700
892
|
}
|
|
701
893
|
updateIfCurrent(e, t) {
|
|
702
|
-
this.currentState === e &&
|
|
894
|
+
this.currentState === e && L(() => {
|
|
703
895
|
this.currentState = t;
|
|
704
896
|
});
|
|
705
897
|
}
|
|
@@ -708,7 +900,7 @@ let d = class {
|
|
|
708
900
|
if (this.currentState === c.IDLE) {
|
|
709
901
|
if (this.updateIfCurrent(c.IDLE, c.POUR_STARTING), !e)
|
|
710
902
|
throw new Error("No tracker provided");
|
|
711
|
-
const t = await
|
|
903
|
+
const t = await Xt(this.path, e);
|
|
712
904
|
return this.updateIfCurrent(c.POUR_STARTING, c.POURING), t != null && t.endState && this.updateIfCurrent(c.POURING, c.IDLE), t;
|
|
713
905
|
} else
|
|
714
906
|
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
@@ -721,7 +913,7 @@ let d = class {
|
|
|
721
913
|
* */
|
|
722
914
|
async cancelIceDispense() {
|
|
723
915
|
var e;
|
|
724
|
-
this.currentState === c.POURING || this.currentState === c.POUR_STARTING ? (this.currentState = c.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()),
|
|
916
|
+
this.currentState === c.POURING || this.currentState === c.POUR_STARTING ? (this.currentState = c.POUR_CANCELING, await ((e = this.pourFuture) == null ? void 0 : e.cancelFuture()), L(() => {
|
|
725
917
|
this.currentState = c.IDLE;
|
|
726
918
|
})) : this.logger.warn(
|
|
727
919
|
`Cannot cancel ice dispense in state ${this.currentState}`
|
|
@@ -730,142 +922,142 @@ let d = class {
|
|
|
730
922
|
async testAgitate(e) {
|
|
731
923
|
if (!e)
|
|
732
924
|
throw new Error("No tracker provided");
|
|
733
|
-
return this.logger.info(`agitating ice-agitator ${this.id}`),
|
|
925
|
+
return this.logger.info(`agitating ice-agitator ${this.id}`), Jt(this.path, e);
|
|
734
926
|
}
|
|
735
927
|
async testGate(e) {
|
|
736
928
|
if (!e)
|
|
737
929
|
throw new Error("No tracker provided");
|
|
738
|
-
return this.logger.info(`testing ice gate: ${this.id}`),
|
|
930
|
+
return this.logger.info(`testing ice gate: ${this.id}`), er(this.path, e);
|
|
739
931
|
}
|
|
740
932
|
handleAgitationChange() {
|
|
741
933
|
var e;
|
|
742
|
-
this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`),
|
|
934
|
+
this.isAgitating ? (this.logger.info(`agitating ice-agitator ${this.id}`), F.publish(k.TOPIC_AGITATION_STARTED, {
|
|
743
935
|
path: this.path,
|
|
744
936
|
futureId: (e = this.futureHandler.future) == null ? void 0 : e.futureId
|
|
745
|
-
})) :
|
|
937
|
+
})) : F.publish(k.TOPIC_AGITATION_ENDED, {
|
|
746
938
|
path: this.path
|
|
747
939
|
});
|
|
748
940
|
}
|
|
749
941
|
async updateIceType(e) {
|
|
750
|
-
await
|
|
942
|
+
await Wt(this.path, e);
|
|
751
943
|
}
|
|
752
944
|
async init() {
|
|
753
945
|
this.logger.debug(`initializing ice-agitator ${this.id}`);
|
|
754
946
|
}
|
|
755
947
|
async load() {
|
|
756
948
|
this.logger.debug(`loading ice-agitator ${this.id}`);
|
|
757
|
-
const e = await
|
|
758
|
-
(e == null ? void 0 : e.status) === 200 &&
|
|
949
|
+
const e = await Zt(this.path);
|
|
950
|
+
(e == null ? void 0 : e.status) === 200 && L(() => {
|
|
759
951
|
this._allIceTypes = e.data || [];
|
|
760
952
|
});
|
|
761
953
|
}
|
|
762
954
|
};
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
path:
|
|
955
|
+
u([
|
|
956
|
+
y({
|
|
957
|
+
path: I,
|
|
766
958
|
attribute: "settings.volWithoutIceMl"
|
|
767
959
|
})
|
|
768
960
|
], d.prototype, "volWithoutIceMl", 2);
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
path:
|
|
961
|
+
u([
|
|
962
|
+
y({
|
|
963
|
+
path: I,
|
|
772
964
|
attribute: "settings.durationSec",
|
|
773
965
|
converter: {
|
|
774
966
|
to: "second"
|
|
775
967
|
}
|
|
776
968
|
})
|
|
777
969
|
], d.prototype, "durationSec", 2);
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
path:
|
|
970
|
+
u([
|
|
971
|
+
y({
|
|
972
|
+
path: I,
|
|
781
973
|
attribute: "enableIceChuteClear"
|
|
782
974
|
})
|
|
783
975
|
], d.prototype, "enableIceChuteClear", 2);
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
path:
|
|
976
|
+
u([
|
|
977
|
+
y({
|
|
978
|
+
path: I,
|
|
787
979
|
attribute: "iceChuteClearDurationMs"
|
|
788
980
|
})
|
|
789
981
|
], d.prototype, "iceChuteClearDurationMs", 2);
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
path:
|
|
982
|
+
u([
|
|
983
|
+
y({
|
|
984
|
+
path: I,
|
|
793
985
|
attribute: "iceChuteClearIntervalSec"
|
|
794
986
|
})
|
|
795
987
|
], d.prototype, "iceChuteClearIntervalSec", 2);
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
path:
|
|
988
|
+
u([
|
|
989
|
+
y({
|
|
990
|
+
path: I,
|
|
799
991
|
attribute: "iceChuteClearRetryIntervalSec"
|
|
800
992
|
})
|
|
801
993
|
], d.prototype, "iceChuteClearRetryIntervalSec", 2);
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
path:
|
|
994
|
+
u([
|
|
995
|
+
y({
|
|
996
|
+
path: I,
|
|
805
997
|
attribute: "maxDispenseSec"
|
|
806
998
|
})
|
|
807
999
|
], d.prototype, "maxDispenseSec", 2);
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
path:
|
|
1000
|
+
u([
|
|
1001
|
+
y({
|
|
1002
|
+
path: I,
|
|
811
1003
|
attribute: "type"
|
|
812
1004
|
})
|
|
813
1005
|
], d.prototype, "type", 2);
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
path:
|
|
1006
|
+
u([
|
|
1007
|
+
y({
|
|
1008
|
+
path: I,
|
|
817
1009
|
attribute: "settings.dilutionOffset"
|
|
818
1010
|
})
|
|
819
1011
|
], d.prototype, "dilutionOffset", 2);
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
path:
|
|
1012
|
+
u([
|
|
1013
|
+
y({
|
|
1014
|
+
path: I,
|
|
823
1015
|
attribute: "settings.inactivitySec",
|
|
824
1016
|
converter: {
|
|
825
1017
|
to: "minute"
|
|
826
1018
|
}
|
|
827
1019
|
})
|
|
828
1020
|
], d.prototype, "inactivitySec", 2);
|
|
829
|
-
|
|
830
|
-
|
|
1021
|
+
u([
|
|
1022
|
+
O({ path: je, attribute: "agitating" })
|
|
831
1023
|
], d.prototype, "agitating", 2);
|
|
832
|
-
|
|
833
|
-
|
|
1024
|
+
u([
|
|
1025
|
+
O({ path: je, attribute: "iceChuteOpen" })
|
|
834
1026
|
], d.prototype, "iceChuteOpen", 2);
|
|
835
|
-
|
|
836
|
-
|
|
1027
|
+
u([
|
|
1028
|
+
N({ alias: "pour" })
|
|
837
1029
|
], d.prototype, "pourIce", 1);
|
|
838
|
-
|
|
839
|
-
|
|
1030
|
+
u([
|
|
1031
|
+
N({ alias: "agitate" })
|
|
840
1032
|
], d.prototype, "testAgitate", 1);
|
|
841
|
-
|
|
842
|
-
|
|
1033
|
+
u([
|
|
1034
|
+
N({
|
|
843
1035
|
alias: "gate"
|
|
844
1036
|
})
|
|
845
1037
|
], d.prototype, "testGate", 1);
|
|
846
|
-
|
|
847
|
-
|
|
1038
|
+
u([
|
|
1039
|
+
ae({
|
|
848
1040
|
dependencies: (e) => [e.isAgitating]
|
|
849
1041
|
})
|
|
850
1042
|
], d.prototype, "handleAgitationChange", 1);
|
|
851
|
-
d =
|
|
852
|
-
|
|
853
|
-
|
|
1043
|
+
d = u([
|
|
1044
|
+
b(Ue),
|
|
1045
|
+
et()
|
|
854
1046
|
], d);
|
|
855
|
-
const
|
|
1047
|
+
const Be = new _({
|
|
856
1048
|
class: d,
|
|
857
|
-
type:
|
|
1049
|
+
type: Ue
|
|
858
1050
|
});
|
|
859
|
-
var
|
|
860
|
-
for (var a =
|
|
861
|
-
(n = e[
|
|
862
|
-
return
|
|
1051
|
+
var ar = Object.defineProperty, or = Object.getOwnPropertyDescriptor, le = (e, t, r, i) => {
|
|
1052
|
+
for (var a = i > 1 ? void 0 : i ? or(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1053
|
+
(n = e[s]) && (a = (i ? n(t, r, a) : n(a)) || a);
|
|
1054
|
+
return i && a && ar(t, r, a), a;
|
|
863
1055
|
};
|
|
864
|
-
const
|
|
1056
|
+
const de = "agitation-required-trouble-model", ir = (e) => {
|
|
865
1057
|
if (e.data.agitationRequired)
|
|
866
|
-
return
|
|
867
|
-
},
|
|
868
|
-
let
|
|
1058
|
+
return de;
|
|
1059
|
+
}, sr = "InsufficientAgitationTrouble";
|
|
1060
|
+
let S = class {
|
|
869
1061
|
constructor(e, t, r) {
|
|
870
1062
|
o(this, "id");
|
|
871
1063
|
o(this, "logger");
|
|
@@ -890,10 +1082,10 @@ let E = class {
|
|
|
890
1082
|
}
|
|
891
1083
|
}
|
|
892
1084
|
get shouldDefer() {
|
|
893
|
-
var
|
|
1085
|
+
var i, a;
|
|
894
1086
|
if (!this.holder)
|
|
895
1087
|
return !0;
|
|
896
|
-
const t = (((
|
|
1088
|
+
const t = (((i = this.holder) == null ? void 0 : i.troublesByType[sr]) || []).length > 0;
|
|
897
1089
|
return !!((a = this.agitateBeforePour) != null && a.value) && t;
|
|
898
1090
|
}
|
|
899
1091
|
get deferred() {
|
|
@@ -906,81 +1098,80 @@ let E = class {
|
|
|
906
1098
|
this._deferred = !1;
|
|
907
1099
|
}
|
|
908
1100
|
};
|
|
909
|
-
|
|
910
|
-
|
|
1101
|
+
le([
|
|
1102
|
+
y({
|
|
911
1103
|
path: "app:kosdev.ddk:app",
|
|
912
1104
|
attribute: "ncui.agitateBeforePour"
|
|
913
1105
|
})
|
|
914
|
-
],
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
topic:
|
|
918
|
-
lifecycle:
|
|
1106
|
+
], S.prototype, "agitateBeforePour", 2);
|
|
1107
|
+
le([
|
|
1108
|
+
tt({
|
|
1109
|
+
topic: rt(be.type),
|
|
1110
|
+
lifecycle: ye.INIT
|
|
919
1111
|
})
|
|
920
|
-
],
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
],
|
|
924
|
-
const
|
|
925
|
-
class:
|
|
926
|
-
type:
|
|
927
|
-
}),
|
|
928
|
-
iceAgitator:
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
const P = l[u];
|
|
1112
|
+
], S.prototype, "updateHolder", 1);
|
|
1113
|
+
S = le([
|
|
1114
|
+
b(de)
|
|
1115
|
+
], S);
|
|
1116
|
+
const nr = new _({
|
|
1117
|
+
class: S,
|
|
1118
|
+
type: de
|
|
1119
|
+
}), lr = ["iceAgitator"], dr = {
|
|
1120
|
+
iceAgitator: Be.factory
|
|
1121
|
+
}, cr = C.createLogger({ name: "freestyle-assembly-data-mapper" }), yr = async (e) => {
|
|
1122
|
+
const t = se.instance().options({}).build(), r = ne.instance().options({}).build(), i = e.assemblies.reduce((n, l) => {
|
|
1123
|
+
var $;
|
|
1124
|
+
return lr.forEach((h) => {
|
|
1125
|
+
var T;
|
|
1126
|
+
const P = l[h];
|
|
936
1127
|
if (P) {
|
|
937
|
-
const
|
|
938
|
-
n[
|
|
1128
|
+
const Ke = dr[h](P.path);
|
|
1129
|
+
n[h] = Ke({
|
|
939
1130
|
name: P.name,
|
|
940
1131
|
path: P.path,
|
|
941
|
-
statePath: ((
|
|
1132
|
+
statePath: ((T = P.state) == null ? void 0 : T.path) || ""
|
|
942
1133
|
});
|
|
943
1134
|
}
|
|
944
|
-
}), (
|
|
945
|
-
var
|
|
946
|
-
const P =
|
|
947
|
-
|
|
1135
|
+
}), ($ = l.cartridgeAgitators) == null || $.forEach((h) => {
|
|
1136
|
+
var T;
|
|
1137
|
+
const P = Ce.instance(
|
|
1138
|
+
h.path
|
|
948
1139
|
).options({
|
|
949
|
-
name:
|
|
950
|
-
path:
|
|
951
|
-
statePath: ((
|
|
1140
|
+
name: h.name,
|
|
1141
|
+
path: h.path,
|
|
1142
|
+
statePath: ((T = h.state) == null ? void 0 : T.path) || ""
|
|
952
1143
|
}).build();
|
|
953
1144
|
t.addModel(P);
|
|
954
|
-
}), l.remoteTrays && l.remoteTrays.forEach((
|
|
955
|
-
|
|
956
|
-
const P = `${
|
|
957
|
-
holderPath:
|
|
958
|
-
configPath:
|
|
959
|
-
name:
|
|
1145
|
+
}), l.remoteTrays && l.remoteTrays.forEach((h) => {
|
|
1146
|
+
cr.info(`Found remote tray ${h.name} with path ${h.path}`);
|
|
1147
|
+
const P = `${w.type}-${h.holderPath}`, T = w.instance(P).options({
|
|
1148
|
+
holderPath: h.holderPath,
|
|
1149
|
+
configPath: h.path,
|
|
1150
|
+
name: h.name
|
|
960
1151
|
}).build();
|
|
961
|
-
r.addModel(
|
|
1152
|
+
r.addModel(T);
|
|
962
1153
|
}), n;
|
|
963
|
-
}, {}), a = !!
|
|
1154
|
+
}, {}), a = !!i.iceAgitator, s = !!i.carbTank;
|
|
964
1155
|
return {
|
|
965
|
-
...
|
|
1156
|
+
...i,
|
|
966
1157
|
cartridgeAgitators: t,
|
|
967
1158
|
remoteTrays: r,
|
|
968
|
-
supportsCarb:
|
|
1159
|
+
supportsCarb: s,
|
|
969
1160
|
supportsIce: a
|
|
970
1161
|
};
|
|
971
|
-
},
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
),
|
|
975
|
-
|
|
1162
|
+
}, ur = (e) => () => (at(e)(), st(e)(), ge.register(), W.register(), Be.register(), Te.register(), se.register(), he.register(), ce.register(), w.register(), ne.register(), p.companion.register(e)(
|
|
1163
|
+
nt.type,
|
|
1164
|
+
ge.type
|
|
1165
|
+
), p.companion.register(e)(
|
|
1166
|
+
be.type,
|
|
976
1167
|
W.type
|
|
977
|
-
),
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
),
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
),
|
|
1168
|
+
), nr.register(), p.companion.register(e)(
|
|
1169
|
+
ot.type,
|
|
1170
|
+
ir
|
|
1171
|
+
), p.companion.register(e)(lt.type, he.type), p.companion.register(e)(
|
|
1172
|
+
dt.type,
|
|
1173
|
+
ce.type
|
|
1174
|
+
), Y[q].register(
|
|
984
1175
|
"EnjoyByTrouble",
|
|
985
1176
|
async (t) => {
|
|
986
1177
|
if (t.data.enjoyByDate) {
|
|
@@ -993,21 +1184,21 @@ const Wt = new b({
|
|
|
993
1184
|
}
|
|
994
1185
|
return {};
|
|
995
1186
|
}
|
|
996
|
-
),
|
|
1187
|
+
), Y[q].register(
|
|
997
1188
|
"SuperPumpRequiredTrouble",
|
|
998
1189
|
// This is the trouble type
|
|
999
1190
|
async (t) => {
|
|
1000
1191
|
const { model: r } = v(
|
|
1001
|
-
|
|
1192
|
+
ct.type
|
|
1002
1193
|
);
|
|
1003
1194
|
return r ? {
|
|
1004
1195
|
superPumps: r.models.getIndexByKey(
|
|
1005
|
-
|
|
1196
|
+
ut.byType,
|
|
1006
1197
|
"microSuper"
|
|
1007
|
-
).map((
|
|
1198
|
+
).map((s) => s.name).join(", ")
|
|
1008
1199
|
} : {};
|
|
1009
1200
|
}
|
|
1010
|
-
),
|
|
1201
|
+
), Y[q].register(
|
|
1011
1202
|
"MicroPumpAirDetectTrouble",
|
|
1012
1203
|
async (t) => {
|
|
1013
1204
|
if (t.ifaces.includes("container"))
|
|
@@ -1017,53 +1208,53 @@ const Wt = new b({
|
|
|
1017
1208
|
t.data.pumpPath
|
|
1018
1209
|
);
|
|
1019
1210
|
if (r) {
|
|
1020
|
-
const
|
|
1211
|
+
const i = r.ingredientId ? v(r.ingredientId).model : void 0;
|
|
1021
1212
|
return {
|
|
1022
1213
|
ingredientId: r.ingredientId,
|
|
1023
|
-
ingredientName: (
|
|
1214
|
+
ingredientName: (i == null ? void 0 : i.name) || ""
|
|
1024
1215
|
};
|
|
1025
1216
|
}
|
|
1026
1217
|
}
|
|
1027
1218
|
return {};
|
|
1028
1219
|
}
|
|
1029
1220
|
), {
|
|
1030
|
-
preload:
|
|
1031
|
-
model:
|
|
1032
|
-
companion:
|
|
1033
|
-
legacy:
|
|
1034
|
-
}),
|
|
1035
|
-
...
|
|
1221
|
+
preload: p.model.preloadModel(e),
|
|
1222
|
+
model: p.model.register(e),
|
|
1223
|
+
companion: p.companion.register(e),
|
|
1224
|
+
legacy: p.model.registerLegacyModel(e)
|
|
1225
|
+
}), m = {
|
|
1226
|
+
...it
|
|
1036
1227
|
};
|
|
1037
|
-
|
|
1038
|
-
models:
|
|
1228
|
+
m.freestyle = {
|
|
1229
|
+
models: ur(m)
|
|
1039
1230
|
};
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
const
|
|
1231
|
+
m.preload = p.model.preloadModel(m);
|
|
1232
|
+
m.model = p.model.register(m);
|
|
1233
|
+
m.companion = p.companion.register(m);
|
|
1234
|
+
m.legacy = p.model.registerLegacyModel(m);
|
|
1235
|
+
const fr = m;
|
|
1045
1236
|
export {
|
|
1046
|
-
|
|
1047
|
-
|
|
1237
|
+
sr as A,
|
|
1238
|
+
Te as C,
|
|
1048
1239
|
W as F,
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1240
|
+
k as I,
|
|
1241
|
+
fr as K,
|
|
1242
|
+
Bt as N,
|
|
1243
|
+
ne as R,
|
|
1244
|
+
se as a,
|
|
1245
|
+
U as b,
|
|
1246
|
+
Ce as c,
|
|
1247
|
+
ce as d,
|
|
1248
|
+
ge as e,
|
|
1249
|
+
he as f,
|
|
1250
|
+
Be as g,
|
|
1251
|
+
nr as h,
|
|
1252
|
+
w as i,
|
|
1253
|
+
ue as j,
|
|
1254
|
+
Kt as k,
|
|
1255
|
+
Vt as l,
|
|
1256
|
+
yr as m,
|
|
1257
|
+
Ot as n,
|
|
1258
|
+
ur as r
|
|
1068
1259
|
};
|
|
1069
|
-
//# sourceMappingURL=freestyle-registration-manager-
|
|
1260
|
+
//# sourceMappingURL=freestyle-registration-manager-CymJYnwk.js.map
|