@kosdev-code/kos-dispense-sdk 2.1.16 → 2.1.18
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/dispense-registration-manager-DDyKjPWB.cjs +2 -0
- package/dispense-registration-manager-DDyKjPWB.cjs.map +1 -0
- package/{dispense-registration-manager-CB_nSTZw.js → dispense-registration-manager-DgMTZL-g.js} +812 -713
- package/dispense-registration-manager-DgMTZL-g.js.map +1 -0
- package/{extension-utils-DUel3wIz.cjs → extension-utils-BceaRPqX.cjs} +2 -2
- package/{extension-utils-DUel3wIz.cjs.map → extension-utils-BceaRPqX.cjs.map} +1 -1
- package/{extension-utils-CkYqorcG.js → extension-utils-mvxA4D4h.js} +2 -2
- package/{extension-utils-CkYqorcG.js.map → extension-utils-mvxA4D4h.js.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +3 -3
- package/models/models/assembly/assembly-model.d.ts.map +1 -1
- package/models/models/assembly/pump-utils.d.ts.map +1 -1
- package/models/models/generic-pour/generic-pour-model.d.ts +10 -5
- package/models/models/generic-pour/generic-pour-model.d.ts.map +1 -1
- package/models/models/nozzle/nozzle-model.d.ts +10 -6
- package/models/models/nozzle/nozzle-model.d.ts.map +1 -1
- package/models/models/pump/pump-model.d.ts.map +1 -1
- package/models/models/pump/types/index.d.ts +4 -0
- package/models/models/types/assembly.d.ts +4 -0
- package/models/models/types/assembly.d.ts.map +1 -1
- package/models/models/types/pouring.d.ts +1 -3
- package/models/models/types/pouring.d.ts.map +1 -1
- package/models/utils/service.d.ts +8 -8
- package/models.cjs +1 -1
- package/models.js +2 -2
- package/package.json +2 -2
- package/{pump-provider-86479YU2.cjs → pump-provider-BSdtHuOD.cjs} +2 -2
- package/{pump-provider-86479YU2.cjs.map → pump-provider-BSdtHuOD.cjs.map} +1 -1
- package/{pump-provider-DSyiDoPF.js → pump-provider-C-Zclv9X.js} +2 -2
- package/{pump-provider-DSyiDoPF.js.map → pump-provider-C-Zclv9X.js.map} +1 -1
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/dispense-registration-manager-BZ5L3AWX.cjs +0 -2
- package/dispense-registration-manager-BZ5L3AWX.cjs.map +0 -1
- package/dispense-registration-manager-CB_nSTZw.js.map +0 -1
package/{dispense-registration-manager-CB_nSTZw.js → dispense-registration-manager-DgMTZL-g.js}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var o = (e, t, r) => (
|
|
4
|
-
import { kosModel as
|
|
1
|
+
var ut = Object.defineProperty;
|
|
2
|
+
var Pt = (e, t, r) => t in e ? ut(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var o = (e, t, r) => (Pt(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
|
+
import { kosModel as y, Kos as v, isKosModel as b, resolveServiceUrl as D, ServiceFactory as S, KosLog as m, KosModelContainer as T, KosExtensionUtils as U, kosChild as _, FetchError as yt, ExtensionManager as P, EXTENSION_TROUBLE_MAPPER as Me, EXTENSION_TROUBLE_DATA_MAPPER as te, getKosModelSync as x, kosDependency as Be, kosTroubleAware as It, kosAction as O, kosTopicHandler as re, DependencyLifecycle as pe, getKosModel as Ge, FutureManager as he, kosFuture as ge, FutureHandler as je, EXTENSION_FEATURE_FLAG_RESOLVER as mt, isKosDataModel as ft, ChildModels as vt, KosFeatureFlags as bt, kosParentAware as Ot, createPropKey as _t, kosStateEntry as ue, kosStateExit as Pe, kosStateGuard as ae, kosLoggerAware as Fe, kosStateMachine as He, MultipleFutureHandler as Et, arraysEqual as Mt, getAllKosCompanionModels as z, EventBus as $, KosContextManager as wt, destroyKosModel as Rt, SingletonKosModelRegistrationFactory as Ct, kosFutureAware as $t, ObservableData as Te, KosModelRegistrationFactory as Nt, KosModelRegistry as Dt, RegistrationManager as R, registerCoreModels as St, registerLegacyModel as Tt } from "@kosdev-code/kos-ui-sdk";
|
|
5
5
|
import "react";
|
|
6
|
-
var
|
|
7
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
6
|
+
var g = /* @__PURE__ */ ((e) => (e.IngredientLoader = "kos.ingredient.loader", e.IngredientMapper = "kos.ingredient.mapper", e.IngredientIndex = "kos.ingredient.index", e.IngredientTypeMapper = "kos.ingredient.type.mapper", e.HolderTypeMapper = "kos.holder.type.mapper", e.HolderMapper = "kos.holder.mapper", e.HolderIndex = "kos.holder.index", e.HolderIngredientMapper = "kos.holder.ingredient.mapper", e.AvailabilityMapper = "kos.availability.mapper", e.AvailabilityLoader = "kos.availability.loader", e.SelectedPourableMapper = "kos.selected.pourable.mapper", e.AssemblyMapper = "kos.assembly.mapper", e.BoardMapper = "kos.board.mapper", e.BoardIndex = "kos.board.index", e.PumpIndex = "kos.pump.index", e.AssemblyFeatureFlags = "kos.assembly.feature.flags", e))(g || {}), L = /* @__PURE__ */ ((e) => (e.Nozzle = "nozzle-model", e.Availability = "availability-model", e.Holder = "holder-model", e.HolderContainer = "holder-container-model", e.IngredientContainer = "ingredient-container-model", e.Ingredient = "ingredient-model", e.Pump = "pump-model", e.PumpContainer = "pump-container-model", e))(L || {}), Lt = Object.getOwnPropertyDescriptor, At = (e, t, r, a) => {
|
|
7
|
+
for (var i = a > 1 ? void 0 : a ? Lt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
8
8
|
(n = e[s]) && (i = n(i) || i);
|
|
9
9
|
return i;
|
|
10
10
|
};
|
|
11
|
-
const
|
|
12
|
-
let
|
|
11
|
+
const H = "ingredient-model";
|
|
12
|
+
let be = class {
|
|
13
13
|
constructor(e, {
|
|
14
14
|
name: t,
|
|
15
15
|
type: r,
|
|
@@ -36,39 +36,39 @@ let me = class {
|
|
|
36
36
|
// -------------------LIFECYCLE----------------------------
|
|
37
37
|
// -------------------ENTITY----------------------------
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
],
|
|
42
|
-
const
|
|
39
|
+
be = At([
|
|
40
|
+
y(H)
|
|
41
|
+
], be);
|
|
42
|
+
const Ve = {
|
|
43
43
|
registration: {
|
|
44
|
-
[
|
|
45
|
-
class:
|
|
44
|
+
[H]: {
|
|
45
|
+
class: be,
|
|
46
46
|
singleton: !1
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
type:
|
|
50
|
-
predicate: b(
|
|
51
|
-
factory: v.Factory.create(
|
|
52
|
-
}, { URL:
|
|
53
|
-
basePath: `${
|
|
54
|
-
}), zt = async () => await
|
|
55
|
-
urlOverride: `${
|
|
49
|
+
type: H,
|
|
50
|
+
predicate: b(H),
|
|
51
|
+
factory: v.Factory.create(H)
|
|
52
|
+
}, { URL: Ke } = D("INGREDIENT_SERVICE"), { getOne: Ut } = S.build({
|
|
53
|
+
basePath: `${Ke}/api/ext/dispense/ingredients`
|
|
54
|
+
}), zt = async () => await Ut({
|
|
55
|
+
urlOverride: `${Ke}/api/ext/dispense/ingredients`
|
|
56
56
|
});
|
|
57
|
-
var
|
|
58
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
57
|
+
var xt = Object.defineProperty, Bt = Object.getOwnPropertyDescriptor, ke = (e, t, r, a) => {
|
|
58
|
+
for (var i = a > 1 ? void 0 : a ? Bt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
59
59
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
60
|
-
return a && i &&
|
|
60
|
+
return a && i && xt(t, r, i), i;
|
|
61
61
|
};
|
|
62
|
-
const
|
|
63
|
-
let
|
|
62
|
+
const V = "ingredient-container-model", Gt = m.createLogger({ name: "ingredient-container-model" });
|
|
63
|
+
let se = class {
|
|
64
64
|
constructor(e, t) {
|
|
65
65
|
o(this, "id");
|
|
66
66
|
o(this, "ingredients");
|
|
67
|
-
this.id = e, this.ingredients = new
|
|
67
|
+
this.id = e, this.ingredients = new T({
|
|
68
68
|
indexMap: {
|
|
69
69
|
ingredientType: "type"
|
|
70
70
|
},
|
|
71
|
-
extensionId:
|
|
71
|
+
extensionId: g.IngredientIndex,
|
|
72
72
|
parentId: e
|
|
73
73
|
});
|
|
74
74
|
}
|
|
@@ -80,131 +80,131 @@ let ie = class {
|
|
|
80
80
|
}
|
|
81
81
|
async load(e) {
|
|
82
82
|
var i;
|
|
83
|
-
|
|
83
|
+
Gt.debug(`loading ingredient container ${this.id}`);
|
|
84
84
|
const t = await zt();
|
|
85
85
|
if ((t == null ? void 0 : t.status) !== 200)
|
|
86
86
|
throw new Error("Failed to load ingredients");
|
|
87
|
-
const r = await
|
|
87
|
+
const r = await U.executeLoaderExtension({
|
|
88
88
|
context: e,
|
|
89
|
-
extension:
|
|
89
|
+
extension: g.IngredientLoader
|
|
90
90
|
}), a = (t == null ? void 0 : t.data) ?? {};
|
|
91
91
|
for (const s of Object.keys(a))
|
|
92
92
|
for (const n of ((i = t == null ? void 0 : t.data) == null ? void 0 : i[s]) || []) {
|
|
93
|
-
const
|
|
94
|
-
extension:
|
|
93
|
+
const l = await U.executeDataMapperExtension({
|
|
94
|
+
extension: g.IngredientMapper,
|
|
95
95
|
data: n,
|
|
96
96
|
contextData: r
|
|
97
|
-
}),
|
|
98
|
-
extension:
|
|
97
|
+
}), c = await U.executePropertyMapperExtension({
|
|
98
|
+
extension: g.IngredientTypeMapper,
|
|
99
99
|
data: n,
|
|
100
100
|
contextData: r
|
|
101
101
|
}), p = {
|
|
102
102
|
...n,
|
|
103
|
-
type:
|
|
104
|
-
...
|
|
105
|
-
data:
|
|
106
|
-
},
|
|
103
|
+
type: c || n.type,
|
|
104
|
+
...l,
|
|
105
|
+
data: l
|
|
106
|
+
}, u = Ve.factory(n.id)(
|
|
107
107
|
p
|
|
108
108
|
);
|
|
109
|
-
this.ingredients.addModel(
|
|
109
|
+
this.ingredients.addModel(u);
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
// -------------------ENTITY----------------------------
|
|
113
113
|
};
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
],
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
],
|
|
120
|
-
const
|
|
114
|
+
ke([
|
|
115
|
+
_
|
|
116
|
+
], se.prototype, "ingredients", 2);
|
|
117
|
+
se = ke([
|
|
118
|
+
y(V)
|
|
119
|
+
], se);
|
|
120
|
+
const Ye = {
|
|
121
121
|
registration: {
|
|
122
|
-
[
|
|
123
|
-
class:
|
|
122
|
+
[V]: {
|
|
123
|
+
class: se,
|
|
124
124
|
singleton: !0
|
|
125
125
|
}
|
|
126
126
|
},
|
|
127
|
-
type:
|
|
128
|
-
predicate: b(
|
|
129
|
-
factory: v.Singleton.create(
|
|
130
|
-
}, { URL:
|
|
131
|
-
basePath: `${
|
|
132
|
-
}),
|
|
127
|
+
type: V,
|
|
128
|
+
predicate: b(V),
|
|
129
|
+
factory: v.Singleton.create(V)
|
|
130
|
+
}, { URL: ye } = D("HOLDER_SERVICE"), { getAll: jt, postModel: Ze, deleteModel: Ft } = S.build({
|
|
131
|
+
basePath: `${ye}/api/kos/holders`
|
|
132
|
+
}), Ht = m.createLogger({
|
|
133
133
|
name: "holder-service",
|
|
134
134
|
group: "Services"
|
|
135
|
-
}),
|
|
135
|
+
}), da = async () => await jt({}), Vt = async (e, t) => {
|
|
136
136
|
if (!e || !t)
|
|
137
137
|
throw new Error("Missing holderPath or ingredientId");
|
|
138
|
-
return await
|
|
138
|
+
return await Ze({
|
|
139
139
|
model: { holderPath: e, ingredientId: t },
|
|
140
|
-
urlOverride: `${
|
|
140
|
+
urlOverride: `${ye}/api/ext/dispense/assignments`
|
|
141
141
|
});
|
|
142
|
-
},
|
|
142
|
+
}, Kt = async (e) => {
|
|
143
143
|
if (!e)
|
|
144
144
|
throw new Error("Missing holderPath");
|
|
145
|
-
return await
|
|
145
|
+
return await Ft({
|
|
146
146
|
id: e,
|
|
147
|
-
urlOverride: `${
|
|
147
|
+
urlOverride: `${ye}/api/ext/dispense/assignments/${e}`
|
|
148
148
|
});
|
|
149
|
-
},
|
|
149
|
+
}, kt = async (e) => {
|
|
150
150
|
if (!e)
|
|
151
151
|
throw new Error("Missing holderPath");
|
|
152
|
-
return
|
|
152
|
+
return Ht.debug(
|
|
153
153
|
`sending POST request to /api/ext/dispense/pumpEvents/replaceLine/${e}`
|
|
154
|
-
), await
|
|
154
|
+
), await Ze({
|
|
155
155
|
model: {},
|
|
156
|
-
urlOverride: `${
|
|
156
|
+
urlOverride: `${ye}/api/ext/dispense/pumpEvents/replaceLine/${e}`
|
|
157
157
|
});
|
|
158
|
-
}, { URL:
|
|
158
|
+
}, { URL: ne } = D("ASSIGNMENT_SERVICE"), { getAll: Yt, postModel: Xe, deleteModel: Zt } = S.build({
|
|
159
159
|
destinationAddress: "",
|
|
160
|
-
basePath: `${
|
|
161
|
-
}),
|
|
162
|
-
var i, s, n,
|
|
163
|
-
const r = JSON.stringify(t), a = `${
|
|
160
|
+
basePath: `${ne}/api/ext/dispense/assignments`
|
|
161
|
+
}), oe = window.kosUseFos, la = async () => await Yt({ fos: oe }), Xt = async (e, t) => {
|
|
162
|
+
var i, s, n, l;
|
|
163
|
+
const r = JSON.stringify(t), a = `${ne}/api/ext/dispense/assignments`;
|
|
164
164
|
try {
|
|
165
|
-
const
|
|
165
|
+
const c = await Xe({
|
|
166
166
|
model: { holderPath: e, factoryJson: r },
|
|
167
167
|
urlOverride: a
|
|
168
168
|
});
|
|
169
|
-
return (
|
|
170
|
-
} catch (
|
|
171
|
-
if (
|
|
169
|
+
return (c == null ? void 0 : c.status) === 200 && ((i = c == null ? void 0 : c.data) != null && i.error) ? [c.data.error || "unknownError", c.data] : [void 0, c == null ? void 0 : c.data];
|
|
170
|
+
} catch (c) {
|
|
171
|
+
if (c instanceof yt)
|
|
172
172
|
return [
|
|
173
|
-
((n = (s =
|
|
174
|
-
(
|
|
173
|
+
((n = (s = c.payload) == null ? void 0 : s.data) == null ? void 0 : n.error) || "unknownError",
|
|
174
|
+
(l = c.payload) == null ? void 0 : l.data
|
|
175
175
|
];
|
|
176
176
|
}
|
|
177
177
|
return ["unknownError", void 0];
|
|
178
|
-
},
|
|
179
|
-
const t =
|
|
180
|
-
return await
|
|
178
|
+
}, ca = async (e) => {
|
|
179
|
+
const t = oe ? `${ne}/api/ingredients/assignments/${e.holderPath}` : `${ne}/api/ext/dispense/assignments`;
|
|
180
|
+
return await Xe({
|
|
181
181
|
model: { ...e, fuelGauge: 680 },
|
|
182
|
-
fos:
|
|
182
|
+
fos: oe,
|
|
183
183
|
urlOverride: t
|
|
184
184
|
});
|
|
185
|
-
},
|
|
186
|
-
var
|
|
187
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
185
|
+
}, pa = async (e) => await Zt({ id: e, fos: oe });
|
|
186
|
+
var Jt = Object.defineProperty, qt = Object.getOwnPropertyDescriptor, we = (e, t, r, a) => {
|
|
187
|
+
for (var i = a > 1 ? void 0 : a ? qt(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
188
188
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
189
|
-
return a && i &&
|
|
189
|
+
return a && i && Jt(t, r, i), i;
|
|
190
190
|
};
|
|
191
|
-
const
|
|
192
|
-
|
|
191
|
+
const K = L.Holder, Le = m.createLogger({ name: "holder-model" });
|
|
192
|
+
P[Me].register(
|
|
193
193
|
"holder",
|
|
194
194
|
async (e) => {
|
|
195
195
|
const t = [];
|
|
196
196
|
return t.push(...e.data.holderPaths), t;
|
|
197
197
|
}
|
|
198
198
|
);
|
|
199
|
-
|
|
199
|
+
P[te].register(
|
|
200
200
|
"pump",
|
|
201
201
|
async (e) => {
|
|
202
202
|
if (e.data.pumpPath) {
|
|
203
|
-
const { model: t } =
|
|
203
|
+
const { model: t } = x(
|
|
204
204
|
e.data.pumpPath
|
|
205
205
|
);
|
|
206
206
|
if (t) {
|
|
207
|
-
const r = t.ingredientId ?
|
|
207
|
+
const r = t.ingredientId ? x(t.ingredientId).model : void 0;
|
|
208
208
|
return {
|
|
209
209
|
ingredientId: t.ingredientId,
|
|
210
210
|
ingredientName: (r == null ? void 0 : r.displayName) ?? ((r == null ? void 0 : r.name) || ""),
|
|
@@ -215,17 +215,17 @@ u[q].register(
|
|
|
215
215
|
return {};
|
|
216
216
|
}
|
|
217
217
|
);
|
|
218
|
-
|
|
218
|
+
P[te].register(
|
|
219
219
|
"holder",
|
|
220
220
|
async (e) => e.data.holderNames.length > 0 ? {
|
|
221
221
|
holderName: e.data.holderNames[0] || ""
|
|
222
222
|
} : {}
|
|
223
223
|
);
|
|
224
|
-
|
|
224
|
+
P[te].register(
|
|
225
225
|
"container",
|
|
226
226
|
async (e) => {
|
|
227
227
|
if (e.data.ingredients.length > 0) {
|
|
228
|
-
const t = e.data.ingredients[0], { model: r } =
|
|
228
|
+
const t = e.data.ingredients[0], { model: r } = x(t);
|
|
229
229
|
return {
|
|
230
230
|
ingredientName: (r == null ? void 0 : r.displayName) ?? ((r == null ? void 0 : r.name) || ""),
|
|
231
231
|
ingredients: e.data.ingredients ? e.data.ingredients : [],
|
|
@@ -235,14 +235,14 @@ u[q].register(
|
|
|
235
235
|
return {};
|
|
236
236
|
}
|
|
237
237
|
);
|
|
238
|
-
class
|
|
238
|
+
class Wt extends Error {
|
|
239
239
|
constructor(r, a) {
|
|
240
240
|
super(a);
|
|
241
241
|
o(this, "type");
|
|
242
242
|
this.name = "AssignmentError", this.type = r;
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
let
|
|
245
|
+
let ee = class {
|
|
246
246
|
constructor(e, {
|
|
247
247
|
path: t,
|
|
248
248
|
name: r,
|
|
@@ -250,10 +250,10 @@ let J = class {
|
|
|
250
250
|
ingredientId: i,
|
|
251
251
|
ingredientType: s,
|
|
252
252
|
slice: n,
|
|
253
|
-
group:
|
|
254
|
-
data:
|
|
253
|
+
group: l,
|
|
254
|
+
data: c,
|
|
255
255
|
enjoyByDate: p
|
|
256
|
-
},
|
|
256
|
+
}, u) {
|
|
257
257
|
o(this, "id");
|
|
258
258
|
o(this, "path");
|
|
259
259
|
o(this, "name");
|
|
@@ -267,10 +267,10 @@ let J = class {
|
|
|
267
267
|
o(this, "enjoyByDate");
|
|
268
268
|
o(this, "pumps");
|
|
269
269
|
o(this, "ingredientContainer");
|
|
270
|
-
this.id = e, this.path = t, this.name = r, this.ingredientType = s, this.ingredientSource = a, this.ingredientId = i, this.group =
|
|
270
|
+
this.id = e, this.path = t, this.name = r, this.ingredientType = s, this.ingredientSource = a, this.ingredientId = i, this.group = l, this.slice = n, this.enjoyByDate = p, this.data = c, this.pumps = new T({
|
|
271
271
|
parentId: e,
|
|
272
272
|
sortKey: "path"
|
|
273
|
-
}), this.logger =
|
|
273
|
+
}), this.logger = u.logger;
|
|
274
274
|
}
|
|
275
275
|
updateModel({
|
|
276
276
|
path: e,
|
|
@@ -280,10 +280,10 @@ let J = class {
|
|
|
280
280
|
ingredientType: i,
|
|
281
281
|
group: s,
|
|
282
282
|
slice: n,
|
|
283
|
-
enjoyByDate:
|
|
284
|
-
data:
|
|
283
|
+
enjoyByDate: l,
|
|
284
|
+
data: c
|
|
285
285
|
}) {
|
|
286
|
-
this.path = e, this.name = t, this.ingredientId = a, this.ingredientType = i, this.ingredientSource = r, this.enjoyByDate =
|
|
286
|
+
this.path = e, this.name = t, this.ingredientId = a, this.ingredientType = i, this.ingredientSource = r, this.enjoyByDate = l, this.slice = n, this.group = s, this.data = c;
|
|
287
287
|
}
|
|
288
288
|
get hasEnjoyByDate() {
|
|
289
289
|
return !!this.enjoyByDate && !this.unassigned;
|
|
@@ -371,7 +371,7 @@ let J = class {
|
|
|
371
371
|
return this.hasMaxVolume && this.hasRemainingVolume;
|
|
372
372
|
}
|
|
373
373
|
updateIngredient(e) {
|
|
374
|
-
this.ingredientId !== e &&
|
|
374
|
+
this.ingredientId !== e && O(() => {
|
|
375
375
|
this.ingredientId = e;
|
|
376
376
|
});
|
|
377
377
|
}
|
|
@@ -383,33 +383,33 @@ let J = class {
|
|
|
383
383
|
if (!e)
|
|
384
384
|
throw new Error("Invalid override");
|
|
385
385
|
try {
|
|
386
|
-
const [t, r] = await
|
|
386
|
+
const [t, r] = await Xt(this.path, e);
|
|
387
387
|
if (t)
|
|
388
|
-
throw new
|
|
388
|
+
throw new Wt(
|
|
389
389
|
t,
|
|
390
390
|
`Failed to perform rfid override on holder ${this.id}`
|
|
391
391
|
);
|
|
392
|
-
return
|
|
392
|
+
return O(() => {
|
|
393
393
|
this.ingredientId = r == null ? void 0 : r.ingredientId;
|
|
394
394
|
}), r;
|
|
395
395
|
} catch (t) {
|
|
396
|
-
throw
|
|
396
|
+
throw Le.error(`Failed to perform rfid override on holder ${this.id}`, t), t;
|
|
397
397
|
}
|
|
398
398
|
}
|
|
399
399
|
async assignIngredient(e) {
|
|
400
400
|
try {
|
|
401
|
-
e ? await
|
|
401
|
+
e ? await Vt(this.path, e) : await Kt(this.path), O(() => {
|
|
402
402
|
this.ingredientId = e;
|
|
403
403
|
});
|
|
404
404
|
} catch (t) {
|
|
405
|
-
throw
|
|
405
|
+
throw Le.error(`Failed to perform assign ingredient to holder ${this.id}`, t), t;
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
get shouldDefer() {
|
|
409
409
|
return this.troubles.some((e) => e.shouldDefer);
|
|
410
410
|
}
|
|
411
411
|
async replaceLine() {
|
|
412
|
-
await
|
|
412
|
+
await kt(this.path);
|
|
413
413
|
}
|
|
414
414
|
// -------------------LIFECYCLE----------------------------
|
|
415
415
|
// ----------------------------------
|
|
@@ -431,70 +431,70 @@ let J = class {
|
|
|
431
431
|
// }
|
|
432
432
|
// -------------------ENTITY----------------------------
|
|
433
433
|
};
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
],
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
],
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
],
|
|
444
|
-
const
|
|
434
|
+
we([
|
|
435
|
+
_
|
|
436
|
+
], ee.prototype, "pumps", 2);
|
|
437
|
+
we([
|
|
438
|
+
Be({ modelType: Ye.type })
|
|
439
|
+
], ee.prototype, "ingredientContainer", 2);
|
|
440
|
+
ee = we([
|
|
441
|
+
y(K),
|
|
442
|
+
It()
|
|
443
|
+
], ee);
|
|
444
|
+
const Je = {
|
|
445
445
|
registration: {
|
|
446
|
-
[
|
|
447
|
-
class:
|
|
446
|
+
[K]: {
|
|
447
|
+
class: ee,
|
|
448
448
|
singleton: !1
|
|
449
449
|
}
|
|
450
450
|
},
|
|
451
|
-
type:
|
|
452
|
-
predicate: b(
|
|
453
|
-
factory: v.Factory.create(
|
|
454
|
-
},
|
|
451
|
+
type: K,
|
|
452
|
+
predicate: b(K),
|
|
453
|
+
factory: v.Factory.create(K)
|
|
454
|
+
}, Qt = async (e, t) => {
|
|
455
455
|
var Se;
|
|
456
|
-
const r =
|
|
457
|
-
|
|
456
|
+
const r = P.propertyMapper.executeMapper(
|
|
457
|
+
g.HolderIngredientMapper,
|
|
458
458
|
t
|
|
459
|
-
), a =
|
|
460
|
-
|
|
459
|
+
), a = P.propertyMapper.executeMapper(
|
|
460
|
+
g.HolderTypeMapper,
|
|
461
461
|
t
|
|
462
|
-
) || t.ingType, i = await
|
|
463
|
-
extension:
|
|
462
|
+
) || t.ingType, i = await U.executeDataMapperExtension({
|
|
463
|
+
extension: g.HolderMapper,
|
|
464
464
|
data: t,
|
|
465
465
|
contextData: {}
|
|
466
|
-
}), { name: s, path: n, ingredientId:
|
|
466
|
+
}), { name: s, path: n, ingredientId: l, ingType: c, ingSource: p, slice: u, ...F } = t, h = { ...F, ...i }, M = u || { pos: 0 }, C = {
|
|
467
467
|
name: s,
|
|
468
468
|
path: n,
|
|
469
|
-
ingredientId: r ||
|
|
470
|
-
ingredientType: a ||
|
|
469
|
+
ingredientId: r || l,
|
|
470
|
+
ingredientType: a || c,
|
|
471
471
|
ingredientSource: p,
|
|
472
472
|
enjoyByDate: (Se = t.container) != null && Se.enjoyByDate ? new Date(t.container.enjoyByDate) : void 0,
|
|
473
|
-
slice:
|
|
473
|
+
slice: M,
|
|
474
474
|
group: e,
|
|
475
|
-
data:
|
|
475
|
+
data: h
|
|
476
476
|
};
|
|
477
|
-
return
|
|
478
|
-
}, { URL:
|
|
479
|
-
basePath: `${
|
|
480
|
-
}),
|
|
477
|
+
return Je.factory(t.path)(C);
|
|
478
|
+
}, { URL: er } = D("ASSEMBLY_SERVICE"), { getOne: tr } = S.build({
|
|
479
|
+
basePath: `${er}/api/kos/device/assemblies`
|
|
480
|
+
}), rr = m.createLogger({
|
|
481
481
|
name: "assembly-service",
|
|
482
482
|
group: "Services"
|
|
483
|
-
}),
|
|
484
|
-
var
|
|
485
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
483
|
+
}), qe = async () => (rr.debug("sending GET for assembly"), await tr({}));
|
|
484
|
+
var ar = Object.defineProperty, ir = Object.getOwnPropertyDescriptor, Ie = (e, t, r, a) => {
|
|
485
|
+
for (var i = a > 1 ? void 0 : a ? ir(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
486
486
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
487
|
-
return a && i &&
|
|
487
|
+
return a && i && ar(t, r, i), i;
|
|
488
488
|
};
|
|
489
|
-
const
|
|
490
|
-
let
|
|
489
|
+
const k = "board-container-model", We = "/kos/hardware/board/linked", Qe = "/kos/hardware/board/unlinked";
|
|
490
|
+
let B = class {
|
|
491
491
|
constructor(e, t, r) {
|
|
492
492
|
o(this, "id");
|
|
493
493
|
o(this, "logger");
|
|
494
494
|
o(this, "models");
|
|
495
|
-
this.id = e, this.logger = r.logger, this.models = new
|
|
495
|
+
this.id = e, this.logger = r.logger, this.models = new T({
|
|
496
496
|
parentId: e,
|
|
497
|
-
extensionId:
|
|
497
|
+
extensionId: g.BoardIndex
|
|
498
498
|
});
|
|
499
499
|
}
|
|
500
500
|
get boardList() {
|
|
@@ -517,59 +517,59 @@ let L = class {
|
|
|
517
517
|
r.updateModel(e);
|
|
518
518
|
}
|
|
519
519
|
handleBoardLinkEvent(e) {
|
|
520
|
-
this.logger.debug(`handling ${
|
|
520
|
+
this.logger.debug(`handling ${We} event ${e}`), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
|
|
521
521
|
}
|
|
522
522
|
handleBoardUnlinkEvent(e) {
|
|
523
523
|
this.logger.debug(
|
|
524
|
-
`handling ${
|
|
524
|
+
`handling ${Qe} event ${e}`
|
|
525
525
|
), e ? this.updateBoard(e) : this.logger.debug("- boardLinkEvent is undefined");
|
|
526
526
|
}
|
|
527
527
|
};
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
],
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
lifecycle:
|
|
534
|
-
topic:
|
|
528
|
+
Ie([
|
|
529
|
+
_
|
|
530
|
+
], B.prototype, "models", 2);
|
|
531
|
+
Ie([
|
|
532
|
+
re({
|
|
533
|
+
lifecycle: pe.INIT,
|
|
534
|
+
topic: We,
|
|
535
535
|
websocket: !0
|
|
536
536
|
})
|
|
537
|
-
],
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
lifecycle:
|
|
541
|
-
topic:
|
|
537
|
+
], B.prototype, "handleBoardLinkEvent", 1);
|
|
538
|
+
Ie([
|
|
539
|
+
re({
|
|
540
|
+
lifecycle: pe.INIT,
|
|
541
|
+
topic: Qe,
|
|
542
542
|
websocket: !0
|
|
543
543
|
})
|
|
544
|
-
],
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
],
|
|
548
|
-
const
|
|
549
|
-
const t = e.data.boardPath, { model: r } =
|
|
544
|
+
], B.prototype, "handleBoardUnlinkEvent", 1);
|
|
545
|
+
B = Ie([
|
|
546
|
+
y(k)
|
|
547
|
+
], B);
|
|
548
|
+
const sr = async (e) => {
|
|
549
|
+
const t = e.data.boardPath, { model: r } = x(t);
|
|
550
550
|
return {
|
|
551
551
|
boardName: (r == null ? void 0 : r.name) || ""
|
|
552
552
|
};
|
|
553
553
|
};
|
|
554
|
-
var
|
|
555
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
554
|
+
var nr = Object.defineProperty, or = Object.getOwnPropertyDescriptor, et = (e, t, r, a) => {
|
|
555
|
+
for (var i = a > 1 ? void 0 : a ? or(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
556
556
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
557
|
-
return a && i &&
|
|
557
|
+
return a && i && nr(t, r, i), i;
|
|
558
558
|
};
|
|
559
|
-
const
|
|
560
|
-
var
|
|
561
|
-
let
|
|
559
|
+
const Y = L.PumpContainer;
|
|
560
|
+
var tt = /* @__PURE__ */ ((e) => (e.byBoard = "byBoard", e.byType = "byType", e.byNozzle = "byNozzle", e))(tt || {});
|
|
561
|
+
let de = class {
|
|
562
562
|
constructor(e, t) {
|
|
563
563
|
o(this, "id");
|
|
564
564
|
o(this, "pumps");
|
|
565
|
-
this.id = e, this.pumps = new
|
|
565
|
+
this.id = e, this.pumps = new T({
|
|
566
566
|
indexMap: {
|
|
567
567
|
byNozzle: (r) => r.nozzlePaths,
|
|
568
568
|
byBoard: (r) => r.boardPath,
|
|
569
569
|
byType: "type"
|
|
570
570
|
},
|
|
571
571
|
parentId: e,
|
|
572
|
-
extensionId:
|
|
572
|
+
extensionId: g.PumpIndex
|
|
573
573
|
});
|
|
574
574
|
}
|
|
575
575
|
/**
|
|
@@ -606,69 +606,69 @@ let ne = class {
|
|
|
606
606
|
}
|
|
607
607
|
// -------------------ENTITY----------------------------
|
|
608
608
|
};
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
],
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
],
|
|
615
|
-
const
|
|
609
|
+
et([
|
|
610
|
+
_
|
|
611
|
+
], de.prototype, "pumps", 2);
|
|
612
|
+
de = et([
|
|
613
|
+
y(Y)
|
|
614
|
+
], de);
|
|
615
|
+
const Re = {
|
|
616
616
|
registration: {
|
|
617
|
-
[
|
|
618
|
-
class:
|
|
617
|
+
[Y]: {
|
|
618
|
+
class: de,
|
|
619
619
|
singleton: !0
|
|
620
620
|
}
|
|
621
621
|
},
|
|
622
|
-
type:
|
|
623
|
-
predicate: b(
|
|
622
|
+
type: Y,
|
|
623
|
+
predicate: b(Y),
|
|
624
624
|
factory: v.Singleton.create(
|
|
625
|
-
|
|
625
|
+
Y
|
|
626
626
|
)
|
|
627
|
-
},
|
|
628
|
-
const t = [], { model: r } = await
|
|
627
|
+
}, rt = async (e) => {
|
|
628
|
+
const t = [], { model: r } = await Ge(e);
|
|
629
629
|
return r && (t.push(r.boardPath), t.push(r.nozzlePath), t.push(r.holderPath)), t;
|
|
630
|
-
},
|
|
630
|
+
}, dr = async (e) => {
|
|
631
631
|
const t = [], r = e.data.pumpPath;
|
|
632
632
|
t.push(r);
|
|
633
|
-
const a = await
|
|
633
|
+
const a = await rt(r);
|
|
634
634
|
return [...t, ...a];
|
|
635
|
-
},
|
|
635
|
+
}, lr = async (e) => {
|
|
636
636
|
const t = [], r = e.data.boardPath;
|
|
637
637
|
t.push(e.data.boardPath);
|
|
638
|
-
const a = await
|
|
639
|
-
|
|
638
|
+
const a = await Ge(
|
|
639
|
+
Re.type
|
|
640
640
|
);
|
|
641
641
|
if (a != null && a.model) {
|
|
642
642
|
const s = a.model.models.getIndexByKey(
|
|
643
|
-
|
|
643
|
+
tt.byBoard,
|
|
644
644
|
r
|
|
645
645
|
).map(
|
|
646
|
-
(
|
|
646
|
+
(l) => rt(l.path)
|
|
647
647
|
);
|
|
648
|
-
(await Promise.allSettled(s)).forEach((
|
|
649
|
-
|
|
648
|
+
(await Promise.allSettled(s)).forEach((l) => {
|
|
649
|
+
l.status === "fulfilled" && l.value.forEach((c) => t.push(c));
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
652
|
return Array.from(new Set(t));
|
|
653
653
|
};
|
|
654
|
-
var
|
|
655
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
654
|
+
var cr = Object.getOwnPropertyDescriptor, pr = (e, t, r, a) => {
|
|
655
|
+
for (var i = a > 1 ? void 0 : a ? cr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
656
656
|
(n = e[s]) && (i = n(i) || i);
|
|
657
657
|
return i;
|
|
658
658
|
};
|
|
659
|
-
const
|
|
660
|
-
const { type: r, name: a, path: i, linked: s, instanceId: n, link:
|
|
661
|
-
t.type = r, t.name = a, t.path = i, t.linked = s, t.link = Object.freeze(
|
|
659
|
+
const Z = "board-model", Ae = (e, t) => {
|
|
660
|
+
const { type: r, name: a, path: i, linked: s, instanceId: n, link: l, ...c } = e;
|
|
661
|
+
t.type = r, t.name = a, t.path = i, t.linked = s, t.link = Object.freeze(l), t.instanceId = n, Object.assign(t, c);
|
|
662
662
|
};
|
|
663
|
-
|
|
663
|
+
P[Me].register(
|
|
664
664
|
"board",
|
|
665
|
-
|
|
665
|
+
lr
|
|
666
666
|
);
|
|
667
|
-
|
|
667
|
+
P[te].register(
|
|
668
668
|
"board",
|
|
669
|
-
|
|
669
|
+
sr
|
|
670
670
|
);
|
|
671
|
-
let
|
|
671
|
+
let Oe = class {
|
|
672
672
|
constructor(e, t, r) {
|
|
673
673
|
o(this, "id");
|
|
674
674
|
o(this, "type");
|
|
@@ -677,10 +677,10 @@ let fe = class {
|
|
|
677
677
|
o(this, "linked");
|
|
678
678
|
o(this, "instanceId");
|
|
679
679
|
o(this, "logger");
|
|
680
|
-
this.id = e, this.logger = r.logger,
|
|
680
|
+
this.id = e, this.logger = r.logger, Ae(t, this);
|
|
681
681
|
}
|
|
682
682
|
updateModel(e) {
|
|
683
|
-
|
|
683
|
+
Ae(e, this);
|
|
684
684
|
}
|
|
685
685
|
// -------------------LIFECYCLE----------------------------
|
|
686
686
|
async init() {
|
|
@@ -690,58 +690,58 @@ let fe = class {
|
|
|
690
690
|
this.logger.debug(`loading board ${this.id}`);
|
|
691
691
|
}
|
|
692
692
|
};
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
],
|
|
696
|
-
const
|
|
693
|
+
Oe = pr([
|
|
694
|
+
y(Z)
|
|
695
|
+
], Oe);
|
|
696
|
+
const at = {
|
|
697
697
|
registration: {
|
|
698
|
-
[
|
|
699
|
-
class:
|
|
698
|
+
[Z]: {
|
|
699
|
+
class: Oe,
|
|
700
700
|
singleton: !1
|
|
701
701
|
}
|
|
702
702
|
},
|
|
703
|
-
type:
|
|
704
|
-
predicate: b(
|
|
705
|
-
factory: v.Factory.create(
|
|
706
|
-
},
|
|
703
|
+
type: Z,
|
|
704
|
+
predicate: b(Z),
|
|
705
|
+
factory: v.Factory.create(Z)
|
|
706
|
+
}, it = {
|
|
707
707
|
registration: {
|
|
708
|
-
[
|
|
709
|
-
class:
|
|
708
|
+
[k]: {
|
|
709
|
+
class: B,
|
|
710
710
|
singleton: !0
|
|
711
711
|
},
|
|
712
|
-
...
|
|
712
|
+
...at.registration
|
|
713
713
|
},
|
|
714
|
-
type:
|
|
715
|
-
predicate: b(
|
|
714
|
+
type: k,
|
|
715
|
+
predicate: b(k),
|
|
716
716
|
factory: v.Singleton.create(
|
|
717
|
-
|
|
717
|
+
k
|
|
718
718
|
)
|
|
719
719
|
};
|
|
720
|
-
var
|
|
721
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
720
|
+
var hr = Object.defineProperty, gr = Object.getOwnPropertyDescriptor, me = (e, t, r, a) => {
|
|
721
|
+
for (var i = a > 1 ? void 0 : a ? gr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
722
722
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
723
|
-
return a && i &&
|
|
723
|
+
return a && i && hr(t, r, i), i;
|
|
724
724
|
};
|
|
725
|
-
const
|
|
726
|
-
let
|
|
725
|
+
const X = L.HolderContainer, ur = "/kos/insertion/insert/start", Pr = "/kos/insertion/insert/complete", yr = "/kos/insertion/insert/update", Ir = "/kos/insertion/remove", mr = "/kos/pumpEvent/replaceLine", fr = "/kos/handle/*";
|
|
726
|
+
let G = class {
|
|
727
727
|
constructor(e, t, r) {
|
|
728
728
|
o(this, "id");
|
|
729
729
|
o(this, "holders");
|
|
730
730
|
o(this, "logger");
|
|
731
|
-
this.id = e, this.holders = new
|
|
731
|
+
this.id = e, this.holders = new T({
|
|
732
732
|
indexMap: {
|
|
733
733
|
nozzle: (a) => a.nozzlePaths,
|
|
734
734
|
group: "group"
|
|
735
735
|
},
|
|
736
736
|
parentId: e,
|
|
737
|
-
extensionId:
|
|
737
|
+
extensionId: g.HolderIndex
|
|
738
738
|
}), this.logger = r.logger;
|
|
739
739
|
}
|
|
740
740
|
updateModel() {
|
|
741
741
|
}
|
|
742
742
|
handleHolderEvents(e) {
|
|
743
743
|
var r, a, i;
|
|
744
|
-
|
|
744
|
+
m.ifDebug(
|
|
745
745
|
() => this.logger.debug("Received holder change event", JSON.stringify(e))
|
|
746
746
|
);
|
|
747
747
|
const t = this.holders.getModel(e.path);
|
|
@@ -750,18 +750,18 @@ let x = class {
|
|
|
750
750
|
), t.slice.currentVolMl = (r = e.slice) == null ? void 0 : r.currentVolMl, t.slice.maxVolMl = (a = e.slice) == null ? void 0 : a.maxVolMl, (i = e == null ? void 0 : e.container) != null && i.enjoyByDate ? t.enjoyByDate = new Date(e.container.enjoyByDate) : t.enjoyByDate = void 0);
|
|
751
751
|
}
|
|
752
752
|
handleInsertion(e) {
|
|
753
|
-
|
|
753
|
+
m.ifDebug(
|
|
754
754
|
() => this.logger.debug("Received insertion event", JSON.stringify(e))
|
|
755
755
|
), (Array.isArray(e) ? e : [e]).forEach((r) => {
|
|
756
|
-
|
|
757
|
-
var s, n,
|
|
756
|
+
O(() => {
|
|
757
|
+
var s, n, l;
|
|
758
758
|
const a = r.ingredientId, i = this.holders.getModel(r.path);
|
|
759
759
|
i && (this.logger.info(
|
|
760
760
|
`Received insertion event for holder ${i.path}`
|
|
761
|
-
), i.updateIngredient(a), i.slice.currentVolMl = (s = r.slice) == null ? void 0 : s.currentVolMl, i.slice.maxVolMl = (n = r.slice) == null ? void 0 : n.maxVolMl, (
|
|
762
|
-
|
|
763
|
-
const p = i.pumps.getModel(
|
|
764
|
-
p && (p.ingredientId =
|
|
761
|
+
), i.updateIngredient(a), i.slice.currentVolMl = (s = r.slice) == null ? void 0 : s.currentVolMl, i.slice.maxVolMl = (n = r.slice) == null ? void 0 : n.maxVolMl, (l = r == null ? void 0 : r.container) != null && l.enjoyByDate ? i.enjoyByDate = new Date(r.container.enjoyByDate) : i.enjoyByDate = void 0, r.pumps.forEach((c) => {
|
|
762
|
+
O(() => {
|
|
763
|
+
const p = i.pumps.getModel(c.path);
|
|
764
|
+
p && (p.ingredientId = c.ingredientId, p.inserted = c.inserted, p.prevIngredientId = c.prevIngredientId);
|
|
765
765
|
});
|
|
766
766
|
}));
|
|
767
767
|
});
|
|
@@ -769,92 +769,92 @@ let x = class {
|
|
|
769
769
|
}
|
|
770
770
|
// -------------------ENTITY----------------------------
|
|
771
771
|
};
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
],
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
topic:
|
|
772
|
+
me([
|
|
773
|
+
_
|
|
774
|
+
], G.prototype, "holders", 2);
|
|
775
|
+
me([
|
|
776
|
+
re({
|
|
777
|
+
topic: fr,
|
|
778
778
|
websocket: !0,
|
|
779
779
|
condition: (e, t) => t.holders.getModel(e.path) !== void 0
|
|
780
780
|
})
|
|
781
|
-
],
|
|
782
|
-
|
|
783
|
-
|
|
781
|
+
], G.prototype, "handleHolderEvents", 1);
|
|
782
|
+
me([
|
|
783
|
+
re({
|
|
784
784
|
topic: [
|
|
785
|
-
pr,
|
|
786
|
-
hr,
|
|
787
785
|
ur,
|
|
788
|
-
|
|
789
|
-
yr
|
|
786
|
+
Pr,
|
|
787
|
+
yr,
|
|
788
|
+
Ir,
|
|
789
|
+
mr
|
|
790
790
|
],
|
|
791
791
|
websocket: !0
|
|
792
792
|
})
|
|
793
|
-
],
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
],
|
|
797
|
-
const
|
|
793
|
+
], G.prototype, "handleInsertion", 1);
|
|
794
|
+
G = me([
|
|
795
|
+
y(X)
|
|
796
|
+
], G);
|
|
797
|
+
const st = {
|
|
798
798
|
registration: {
|
|
799
|
-
[
|
|
800
|
-
class:
|
|
799
|
+
[X]: {
|
|
800
|
+
class: G,
|
|
801
801
|
singleton: !0
|
|
802
802
|
}
|
|
803
803
|
},
|
|
804
|
-
type:
|
|
805
|
-
predicate: b(
|
|
804
|
+
type: X,
|
|
805
|
+
predicate: b(X),
|
|
806
806
|
factory: v.Singleton.create(
|
|
807
|
-
|
|
807
|
+
X
|
|
808
808
|
)
|
|
809
|
-
},
|
|
810
|
-
const t = await
|
|
811
|
-
extension:
|
|
809
|
+
}, vr = m.createLogger({ name: "board-utils" }), br = async (e) => {
|
|
810
|
+
const t = await U.executeDataMapperExtension({
|
|
811
|
+
extension: g.BoardMapper,
|
|
812
812
|
data: e,
|
|
813
813
|
contextData: {}
|
|
814
|
-
}), { type: r, name: a, path: i, linked: s, instanceId: n, ...
|
|
814
|
+
}), { type: r, name: a, path: i, linked: s, instanceId: n, ...l } = e, c = { ...l, ...t }, p = {
|
|
815
815
|
type: r,
|
|
816
816
|
name: a,
|
|
817
817
|
path: i,
|
|
818
818
|
linked: s,
|
|
819
819
|
instanceId: n,
|
|
820
|
-
...
|
|
821
|
-
},
|
|
822
|
-
return
|
|
823
|
-
},
|
|
824
|
-
|
|
825
|
-
const r = await
|
|
820
|
+
...c
|
|
821
|
+
}, u = at.factory(e.path)(p);
|
|
822
|
+
return u.updateModel(p), u;
|
|
823
|
+
}, Or = (e) => async (t) => {
|
|
824
|
+
vr.debug(`adding board ${t.name}`);
|
|
825
|
+
const r = await br(t);
|
|
826
826
|
e.addModel(r);
|
|
827
827
|
};
|
|
828
|
-
var d = /* @__PURE__ */ ((e) => (e.IDLE = "IDLE", e.POURING = "POURING", e.POUR_STARTING = "POUR_STARTING", e.POUR_CANCELING = "POUR_CANCELING", e
|
|
829
|
-
const { URL:
|
|
830
|
-
basePath: `${
|
|
828
|
+
var d = /* @__PURE__ */ ((e) => (e.IDLE = "IDLE", e.POURING = "POURING", e.POUR_STARTING = "POUR_STARTING", e.POUR_CANCELING = "POUR_CANCELING", e))(d || {});
|
|
829
|
+
const { URL: Ce } = D("PUMP_SERVICE"), { postModel: _r, getOne: Er } = S.build({
|
|
830
|
+
basePath: `${Ce}/api/kos/holders`
|
|
831
831
|
});
|
|
832
|
-
|
|
832
|
+
m.createLogger({
|
|
833
833
|
name: "pump-service",
|
|
834
834
|
group: "Services"
|
|
835
835
|
});
|
|
836
|
-
const
|
|
836
|
+
const Mr = async ({
|
|
837
837
|
intent: e,
|
|
838
838
|
pumpId: t,
|
|
839
839
|
tracker: r
|
|
840
840
|
}) => {
|
|
841
|
-
const a = `${
|
|
842
|
-
return i != null && i.data &&
|
|
843
|
-
},
|
|
844
|
-
const r = `${
|
|
841
|
+
const a = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/pour/${t}/${e}`, i = await _r({ model: {}, urlOverride: a, tracker: r });
|
|
842
|
+
return i != null && i.data && he.initiateFuture(i.data), i;
|
|
843
|
+
}, wr = async (e, t) => {
|
|
844
|
+
const r = `${Ce}/api/ext/dispense/nozzle/nozzle/pipeline/ingredient/intent/${e}/${t}/volume`, a = await Er({ urlOverride: r });
|
|
845
845
|
return a != null && a.data ? a.data : { volume: -1 };
|
|
846
846
|
};
|
|
847
|
-
var
|
|
848
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
847
|
+
var Rr = Object.defineProperty, Cr = Object.getOwnPropertyDescriptor, nt = (e, t, r, a) => {
|
|
848
|
+
for (var i = a > 1 ? void 0 : a ? Cr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
849
849
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
850
|
-
return a && i &&
|
|
850
|
+
return a && i && Rr(t, r, i), i;
|
|
851
851
|
};
|
|
852
|
-
const
|
|
853
|
-
|
|
852
|
+
const J = L.Pump;
|
|
853
|
+
P[Me].register(
|
|
854
854
|
"pump",
|
|
855
|
-
|
|
855
|
+
dr
|
|
856
856
|
);
|
|
857
|
-
let
|
|
857
|
+
let le = class {
|
|
858
858
|
constructor(e, t) {
|
|
859
859
|
o(this, "id");
|
|
860
860
|
o(this, "inserted");
|
|
@@ -868,6 +868,7 @@ let oe = class {
|
|
|
868
868
|
o(this, "name");
|
|
869
869
|
o(this, "path");
|
|
870
870
|
o(this, "prevIngredientId");
|
|
871
|
+
o(this, "state");
|
|
871
872
|
o(this, "futureHandler");
|
|
872
873
|
o(this, "currentState", d.IDLE);
|
|
873
874
|
this.id = e;
|
|
@@ -877,13 +878,14 @@ let oe = class {
|
|
|
877
878
|
boardPath: i,
|
|
878
879
|
nozzlePath: s,
|
|
879
880
|
name: n,
|
|
880
|
-
path:
|
|
881
|
-
childPump:
|
|
881
|
+
path: l,
|
|
882
|
+
childPump: c,
|
|
882
883
|
virtual: p,
|
|
883
|
-
prevIngredientId:
|
|
884
|
-
|
|
884
|
+
prevIngredientId: u,
|
|
885
|
+
state: F,
|
|
886
|
+
...h
|
|
885
887
|
} = t;
|
|
886
|
-
this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath = a, this.boardPath = i, this.nozzlePath = s, this.name = n, this.path =
|
|
888
|
+
this.inserted = r, this.type = t.type, this.ingredientId = t.ingredientId, this.holderPath = a, this.boardPath = i, this.nozzlePath = s, this.name = n, this.path = l, this.childPump = !!c, this.virtual = !!p, this.prevIngredientId = u, this.state = F, Object.assign(this, h), this.futureHandler = new je(this);
|
|
887
889
|
}
|
|
888
890
|
updateModel(e) {
|
|
889
891
|
const {
|
|
@@ -893,10 +895,10 @@ let oe = class {
|
|
|
893
895
|
nozzlePath: i,
|
|
894
896
|
childPump: s,
|
|
895
897
|
name: n,
|
|
896
|
-
path:
|
|
897
|
-
...
|
|
898
|
+
path: l,
|
|
899
|
+
...c
|
|
898
900
|
} = e;
|
|
899
|
-
this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath = a, this.nozzlePath = i, this.childPump = this.childPump ? this.childPump : !!s, this.name = n, this.path =
|
|
901
|
+
this.inserted = t, this.type = e.type, this.ingredientId = e.ingredientId, this.holderPath = r, this.boardPath = a, this.nozzlePath = i, this.childPump = this.childPump ? this.childPump : !!s, this.name = n, this.path = l, this.prevIngredientId = e.prevIngredientId, Object.assign(this, c);
|
|
900
902
|
}
|
|
901
903
|
// -------------------LIFECYCLE----------------------------
|
|
902
904
|
get pouringState() {
|
|
@@ -911,21 +913,21 @@ let oe = class {
|
|
|
911
913
|
return !!this.ingredientId && !this.isPouring;
|
|
912
914
|
}
|
|
913
915
|
onFutureUpdate(e) {
|
|
914
|
-
e.endState &&
|
|
916
|
+
e.endState && O(() => {
|
|
915
917
|
this.currentState = d.IDLE;
|
|
916
918
|
});
|
|
917
919
|
}
|
|
918
920
|
async cancelPour() {
|
|
919
921
|
var e;
|
|
920
|
-
this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.future) == null ? void 0 : e.cancelFuture()),
|
|
922
|
+
this.currentState === d.POURING || this.currentState === d.POUR_STARTING ? (this.currentState = d.POUR_CANCELING, await ((e = this.future) == null ? void 0 : e.cancelFuture()), O(() => {
|
|
921
923
|
this.currentState = d.IDLE;
|
|
922
|
-
})) :
|
|
924
|
+
})) : m.warn(`Cannot cancel pour in state ${this.currentState}`);
|
|
923
925
|
}
|
|
924
926
|
get future() {
|
|
925
927
|
return this.futureHandler.future;
|
|
926
928
|
}
|
|
927
929
|
async resolveIntentVolume(e) {
|
|
928
|
-
return await
|
|
930
|
+
return await wr(this.path, e);
|
|
929
931
|
}
|
|
930
932
|
async performIntent(e, t) {
|
|
931
933
|
const r = typeof e == "string" ? e : e.intent;
|
|
@@ -935,39 +937,39 @@ let oe = class {
|
|
|
935
937
|
if (this.currentState === d.IDLE) {
|
|
936
938
|
if (this.currentState = d.POUR_STARTING, !t)
|
|
937
939
|
throw new Error("No tracker provided");
|
|
938
|
-
const a = await
|
|
940
|
+
const a = await Mr({
|
|
939
941
|
tracker: t,
|
|
940
942
|
intent: r,
|
|
941
943
|
pumpId: this.path
|
|
942
944
|
});
|
|
943
|
-
return this.currentState === d.POUR_STARTING &&
|
|
945
|
+
return this.currentState === d.POUR_STARTING && O(() => {
|
|
944
946
|
this.currentState = d.POURING;
|
|
945
947
|
}), a == null ? void 0 : a.data;
|
|
946
948
|
} else
|
|
947
949
|
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
948
950
|
} catch (a) {
|
|
949
|
-
throw
|
|
951
|
+
throw m.error(a), this.currentState = d.IDLE, a;
|
|
950
952
|
}
|
|
951
953
|
}
|
|
952
954
|
// -------------------ENTITY----------------------------
|
|
953
955
|
};
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
],
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
],
|
|
960
|
-
const
|
|
956
|
+
nt([
|
|
957
|
+
ge()
|
|
958
|
+
], le.prototype, "performIntent", 1);
|
|
959
|
+
le = nt([
|
|
960
|
+
y(J)
|
|
961
|
+
], le);
|
|
962
|
+
const ot = {
|
|
961
963
|
registration: {
|
|
962
|
-
[
|
|
963
|
-
class:
|
|
964
|
+
[J]: {
|
|
965
|
+
class: le,
|
|
964
966
|
singleton: !1
|
|
965
967
|
}
|
|
966
968
|
},
|
|
967
|
-
type:
|
|
968
|
-
predicate: b(
|
|
969
|
-
factory: v.Factory.create(
|
|
970
|
-
},
|
|
969
|
+
type: J,
|
|
970
|
+
predicate: b(J),
|
|
971
|
+
factory: v.Factory.create(J)
|
|
972
|
+
}, Ue = m.createLogger({ name: "pump-utils" }), $r = (e, t) => {
|
|
971
973
|
const r = (t.pumps ?? []).length > 1, a = {
|
|
972
974
|
boardPath: t.boardPath,
|
|
973
975
|
holderPath: t.holderPath,
|
|
@@ -979,32 +981,37 @@ const rt = {
|
|
|
979
981
|
path: t.path,
|
|
980
982
|
type: t.type,
|
|
981
983
|
nozzlePath: e,
|
|
982
|
-
prevIngredientId: t.prevIngredientId
|
|
983
|
-
|
|
984
|
+
prevIngredientId: t.prevIngredientId,
|
|
985
|
+
state: t.state
|
|
986
|
+
}, i = ot.factory(t.path)(a);
|
|
984
987
|
return i.updateModel(a), i;
|
|
985
|
-
},
|
|
986
|
-
var
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
988
|
+
}, dt = (e) => (t) => (r) => (a) => {
|
|
989
|
+
var i;
|
|
990
|
+
try {
|
|
991
|
+
Ue.debug(`adding pump ${a.name}`);
|
|
992
|
+
const s = $r(r.path, a);
|
|
993
|
+
e.addModel(s);
|
|
994
|
+
const n = s.holderPath, l = t.holders.getModel(n);
|
|
995
|
+
l == null || l.pumps.addModel(s), l != null && l.nozzlePaths.includes(r.path) || l == null || l.nozzlePaths.push(r.path), (i = a == null ? void 0 : a.pumps) == null || i.forEach((c) => {
|
|
996
|
+
const p = s.holderPath, u = {
|
|
997
|
+
...c,
|
|
998
|
+
childPump: !0,
|
|
999
|
+
holderPath: p,
|
|
1000
|
+
ingredientId: s.ingredientId
|
|
1001
|
+
};
|
|
1002
|
+
dt(e)(t)(r)(u);
|
|
1003
|
+
});
|
|
1004
|
+
} catch (s) {
|
|
1005
|
+
throw Ue.error(`Error mapping assembly pump: ${s}`), s;
|
|
1006
|
+
}
|
|
1000
1007
|
};
|
|
1001
|
-
var
|
|
1002
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
1008
|
+
var Nr = Object.defineProperty, Dr = Object.getOwnPropertyDescriptor, ie = (e, t, r, a) => {
|
|
1009
|
+
for (var i = a > 1 ? void 0 : a ? Dr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1003
1010
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
1004
|
-
return a && i &&
|
|
1011
|
+
return a && i && Nr(t, r, i), i;
|
|
1005
1012
|
};
|
|
1006
|
-
const
|
|
1007
|
-
let
|
|
1013
|
+
const q = "assembly-model", Sr = "assembly-data", Tr = "assembly-raw-data";
|
|
1014
|
+
let N = class {
|
|
1008
1015
|
constructor(e, t, r) {
|
|
1009
1016
|
o(this, "id");
|
|
1010
1017
|
o(this, "_nozzlePaths", /* @__PURE__ */ new Set());
|
|
@@ -1013,7 +1020,7 @@ let w = class {
|
|
|
1013
1020
|
o(this, "boardContainer");
|
|
1014
1021
|
o(this, "pumpContainer");
|
|
1015
1022
|
o(this, "logger");
|
|
1016
|
-
this.id = e, this.holderContainer =
|
|
1023
|
+
this.id = e, this.holderContainer = st.factory({}), this.boardContainer = it.factory({}), this.pumpContainer = Re.factory({}), this.logger = r.logger;
|
|
1017
1024
|
}
|
|
1018
1025
|
updateModel(e) {
|
|
1019
1026
|
}
|
|
@@ -1056,93 +1063,97 @@ let w = class {
|
|
|
1056
1063
|
}
|
|
1057
1064
|
async ready() {
|
|
1058
1065
|
var e;
|
|
1059
|
-
(e = this.troubleContainer) == null || e.troubles.increment(),
|
|
1060
|
-
|
|
1066
|
+
(e = this.troubleContainer) == null || e.troubles.increment(), P[mt].execute(
|
|
1067
|
+
g.AssemblyFeatureFlags,
|
|
1061
1068
|
this
|
|
1062
1069
|
);
|
|
1063
1070
|
}
|
|
1064
1071
|
async load(e) {
|
|
1065
1072
|
this.logger.debug(`loading assembly ${this.id}`);
|
|
1066
|
-
const t = await
|
|
1073
|
+
const t = await qe();
|
|
1067
1074
|
if ((t == null ? void 0 : t.status) === 200) {
|
|
1068
|
-
const r = await
|
|
1069
|
-
extension:
|
|
1075
|
+
const r = await U.executeDataMapperExtension({
|
|
1076
|
+
extension: g.AssemblyMapper,
|
|
1070
1077
|
data: t.data,
|
|
1071
1078
|
contextData: {}
|
|
1072
1079
|
});
|
|
1073
|
-
e.set(
|
|
1074
|
-
|
|
1075
|
-
}), e.set(
|
|
1080
|
+
e.set(Sr, r), Object.assign(this, r), Object.entries(r).forEach(([a, i]) => {
|
|
1081
|
+
ft(i) && (this.logger.debug(`adding child model ${a} from extension data`), this[vt][a] = !0);
|
|
1082
|
+
}), e.set(Tr, t.data);
|
|
1076
1083
|
for await (const a of t.data.assemblies) {
|
|
1077
1084
|
const {
|
|
1078
1085
|
boards: i = [],
|
|
1079
1086
|
holders: s = {},
|
|
1080
1087
|
nozzles: n = [],
|
|
1081
|
-
core:
|
|
1082
|
-
name:
|
|
1088
|
+
core: l,
|
|
1089
|
+
name: c,
|
|
1083
1090
|
path: p,
|
|
1084
|
-
...
|
|
1091
|
+
...u
|
|
1085
1092
|
} = a;
|
|
1086
|
-
this.logger.debug(`adding assembly ${
|
|
1087
|
-
|
|
1093
|
+
this.logger.debug(`adding assembly ${c}`), this.logger.warn(`Assembly rest keys: ${Object.keys(u).join(", ")}`), Object.keys(u).forEach((h) => {
|
|
1094
|
+
var M;
|
|
1095
|
+
if (this.logger.warn(`Enabling feature flag: ${h}`), bt.enableFeature(h), e.set(`assembly-feature-${h}`, u[h]), ((M = u[h].state) == null ? void 0 : M.path) !== void 0) {
|
|
1096
|
+
const C = u[h].state.path;
|
|
1097
|
+
this.logger.warn(`Feature flag ${h} state path: ${C}`), e.set(`assembly-state-path-${h}`, C);
|
|
1098
|
+
}
|
|
1088
1099
|
});
|
|
1089
|
-
for await (const
|
|
1090
|
-
this.logger.debug(`adding board ${
|
|
1091
|
-
for await (const [
|
|
1100
|
+
for await (const h of i)
|
|
1101
|
+
this.logger.debug(`adding board ${h.name}`), await Or(this.boardContainer)(h);
|
|
1102
|
+
for await (const [h, M] of Object.entries(
|
|
1092
1103
|
s ?? {}
|
|
1093
1104
|
))
|
|
1094
|
-
for await (const
|
|
1095
|
-
this.logger.debug(`adding holder ${
|
|
1096
|
-
const
|
|
1097
|
-
this.holderContainer.holders.addModel(
|
|
1105
|
+
for await (const C of M) {
|
|
1106
|
+
this.logger.debug(`adding holder ${C.name}`);
|
|
1107
|
+
const De = await Qt(h, C);
|
|
1108
|
+
this.holderContainer.holders.addModel(De);
|
|
1098
1109
|
}
|
|
1099
|
-
const
|
|
1110
|
+
const F = dt(this.pumpContainer)(
|
|
1100
1111
|
this.holderContainer
|
|
1101
1112
|
);
|
|
1102
|
-
n.forEach((
|
|
1103
|
-
this._nozzlePaths.add(
|
|
1104
|
-
const
|
|
1105
|
-
|
|
1113
|
+
n.forEach((h) => {
|
|
1114
|
+
this._nozzlePaths.add(h.path);
|
|
1115
|
+
const M = F(h);
|
|
1116
|
+
h.pumps.forEach(M);
|
|
1106
1117
|
});
|
|
1107
1118
|
}
|
|
1108
1119
|
}
|
|
1109
1120
|
}
|
|
1110
1121
|
};
|
|
1111
|
-
|
|
1112
|
-
|
|
1122
|
+
ie([
|
|
1123
|
+
Be({
|
|
1113
1124
|
modelType: "trouble-container-model"
|
|
1114
1125
|
})
|
|
1115
|
-
],
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
],
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
],
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
],
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
],
|
|
1128
|
-
const
|
|
1126
|
+
], N.prototype, "troubleContainer", 2);
|
|
1127
|
+
ie([
|
|
1128
|
+
_
|
|
1129
|
+
], N.prototype, "holderContainer", 2);
|
|
1130
|
+
ie([
|
|
1131
|
+
_
|
|
1132
|
+
], N.prototype, "boardContainer", 2);
|
|
1133
|
+
ie([
|
|
1134
|
+
_
|
|
1135
|
+
], N.prototype, "pumpContainer", 2);
|
|
1136
|
+
N = ie([
|
|
1137
|
+
y(q)
|
|
1138
|
+
], N);
|
|
1139
|
+
const lt = {
|
|
1129
1140
|
registration: {
|
|
1130
|
-
[
|
|
1131
|
-
class:
|
|
1141
|
+
[q]: {
|
|
1142
|
+
class: N,
|
|
1132
1143
|
singleton: !0
|
|
1133
1144
|
}
|
|
1134
1145
|
},
|
|
1135
|
-
type:
|
|
1136
|
-
predicate: b(
|
|
1137
|
-
factory: v.Singleton.create(
|
|
1146
|
+
type: q,
|
|
1147
|
+
predicate: b(q),
|
|
1148
|
+
factory: v.Singleton.create(q)
|
|
1138
1149
|
};
|
|
1139
|
-
var
|
|
1140
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
1150
|
+
var Lr = Object.getOwnPropertyDescriptor, Ar = (e, t, r, a) => {
|
|
1151
|
+
for (var i = a > 1 ? void 0 : a ? Lr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1141
1152
|
(n = e[s]) && (i = n(i) || i);
|
|
1142
1153
|
return i;
|
|
1143
1154
|
};
|
|
1144
|
-
const
|
|
1145
|
-
let
|
|
1155
|
+
const W = L.Availability;
|
|
1156
|
+
let _e = class {
|
|
1146
1157
|
constructor(e, t, r) {
|
|
1147
1158
|
o(this, "id");
|
|
1148
1159
|
o(this, "data");
|
|
@@ -1168,80 +1179,78 @@ let Pe = class {
|
|
|
1168
1179
|
// -------------------LIFECYCLE----------------------------
|
|
1169
1180
|
// -------------------ENTITY----------------------------
|
|
1170
1181
|
};
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
],
|
|
1175
|
-
const
|
|
1182
|
+
_e = Ar([
|
|
1183
|
+
Ot(),
|
|
1184
|
+
y(W)
|
|
1185
|
+
], _e);
|
|
1186
|
+
const Ee = {
|
|
1176
1187
|
registration: {
|
|
1177
|
-
[
|
|
1178
|
-
class:
|
|
1188
|
+
[W]: {
|
|
1189
|
+
class: _e,
|
|
1179
1190
|
singleton: !1
|
|
1180
1191
|
}
|
|
1181
1192
|
},
|
|
1182
|
-
type:
|
|
1183
|
-
predicate: b(
|
|
1193
|
+
type: W,
|
|
1194
|
+
predicate: b(W),
|
|
1184
1195
|
factory: v.Factory.create(
|
|
1185
|
-
|
|
1196
|
+
W
|
|
1186
1197
|
)
|
|
1187
|
-
}, { URL:
|
|
1188
|
-
basePath: `${
|
|
1198
|
+
}, { URL: j } = D("NOZZLE_SERVICE"), { postModel: $e, deleteModel: Ur, getOne: zr } = S.build({
|
|
1199
|
+
basePath: `${j}/api/nozzle`
|
|
1189
1200
|
}), xr = async (e, t) => {
|
|
1190
|
-
const r = await
|
|
1201
|
+
const r = await $e({
|
|
1191
1202
|
model: {},
|
|
1192
|
-
urlOverride: `${
|
|
1203
|
+
urlOverride: `${j}/api/ext/dispense/nozzle/${e}/pipeline/beverage/pour`,
|
|
1193
1204
|
ordered: !0,
|
|
1194
1205
|
tracker: t
|
|
1195
1206
|
});
|
|
1196
|
-
return r != null && r.data &&
|
|
1197
|
-
},
|
|
1198
|
-
const a = await
|
|
1207
|
+
return r != null && r.data && he.initiateFuture(r.data), r;
|
|
1208
|
+
}, Br = async (e, t, r) => {
|
|
1209
|
+
const a = await $e({
|
|
1199
1210
|
model: {},
|
|
1200
|
-
urlOverride: `${
|
|
1211
|
+
urlOverride: `${j}/api/ext/dispense/nozzle/${t}/pipeline/beverage/fixed/${e}`,
|
|
1201
1212
|
ordered: !0,
|
|
1202
1213
|
tracker: r
|
|
1203
1214
|
});
|
|
1204
|
-
return a != null && a.data &&
|
|
1205
|
-
},
|
|
1206
|
-
urlOverride: `${
|
|
1207
|
-
}),
|
|
1215
|
+
return a != null && a.data && he.initiateFuture(a.data), a;
|
|
1216
|
+
}, Gr = async (e) => await zr({
|
|
1217
|
+
urlOverride: `${j}${e}/pipeline/beverage/availability`
|
|
1218
|
+
}), jr = async (e, t) => await $e({
|
|
1208
1219
|
model: t,
|
|
1209
|
-
urlOverride: `${
|
|
1210
|
-
}),
|
|
1220
|
+
urlOverride: `${j}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
|
|
1221
|
+
}), Fr = async (e) => await Ur({
|
|
1211
1222
|
id: e,
|
|
1212
|
-
urlOverride: `${
|
|
1223
|
+
urlOverride: `${j}/api/ext/dispense/nozzle/${e}/pipeline/beverage/select`
|
|
1213
1224
|
});
|
|
1214
|
-
var
|
|
1215
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
1225
|
+
var Hr = Object.defineProperty, Vr = Object.getOwnPropertyDescriptor, E = (e, t, r, a) => {
|
|
1226
|
+
for (var i = a > 1 ? void 0 : a ? Vr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1216
1227
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
1217
|
-
return a && i &&
|
|
1228
|
+
return a && i && Hr(t, r, i), i;
|
|
1218
1229
|
};
|
|
1219
|
-
const
|
|
1230
|
+
const Q = L.Nozzle, Kr = _t(
|
|
1220
1231
|
"beverageTopicPrefix"
|
|
1221
|
-
),
|
|
1222
|
-
let
|
|
1223
|
-
constructor(e, t
|
|
1232
|
+
), fe = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0, ze = "/kos/nozzle/pour/started", kr = "/kos/nozzle/pour/progress", Yr = "/kos/nozzle/pour/cancel";
|
|
1233
|
+
let I = class {
|
|
1234
|
+
constructor(e, t) {
|
|
1224
1235
|
/** the unique identifier for this nozzle.*/
|
|
1225
1236
|
o(this, "id");
|
|
1226
1237
|
o(this, "path");
|
|
1227
|
-
o(this, "logger");
|
|
1228
1238
|
o(this, "name");
|
|
1229
1239
|
o(this, "_selectedBeverage");
|
|
1230
1240
|
o(this, "_selectedBrand");
|
|
1231
1241
|
o(this, "_additionalItems");
|
|
1232
1242
|
o(this, "_availabilityItems");
|
|
1233
1243
|
o(this, "futureHandler");
|
|
1234
|
-
o(this, "currentState", d.IDLE);
|
|
1235
1244
|
o(this, "beverageTopicPrefix");
|
|
1236
1245
|
o(this, "topicPrefix");
|
|
1237
1246
|
o(this, "urlPrefix");
|
|
1238
|
-
this.id = e, this.path = t.path, this.name = t.name, this.beverageTopicPrefix = t.beverageTopicPrefix, this.topicPrefix = t.topicPrefix, this.urlPrefix = t.urlPrefix, this._selectedBeverage = void 0, this._selectedBrand = void 0, this._additionalItems = [], this.futureHandler = new
|
|
1247
|
+
this.id = e, this.path = t.path, this.name = t.name, this.beverageTopicPrefix = t.beverageTopicPrefix, this.topicPrefix = t.topicPrefix, this.urlPrefix = t.urlPrefix, this._selectedBeverage = void 0, this._selectedBrand = void 0, this._additionalItems = [], this.futureHandler = new Et(this), this._availabilityItems = new T({
|
|
1239
1248
|
indexMap: {
|
|
1240
1249
|
byGroup: "groupId",
|
|
1241
1250
|
byParent: "parentId"
|
|
1242
1251
|
},
|
|
1243
1252
|
parentId: e
|
|
1244
|
-
})
|
|
1253
|
+
});
|
|
1245
1254
|
}
|
|
1246
1255
|
/**
|
|
1247
1256
|
* The availability nodes that can be dispensed from this nozzle.
|
|
@@ -1327,19 +1336,19 @@ let $ = class {
|
|
|
1327
1336
|
context: r
|
|
1328
1337
|
}) {
|
|
1329
1338
|
if (!e) {
|
|
1330
|
-
const
|
|
1331
|
-
if ((
|
|
1339
|
+
const l = await Fr(this.name);
|
|
1340
|
+
if ((l == null ? void 0 : l.status) !== 200)
|
|
1332
1341
|
throw new Error("Failed to clear pourable");
|
|
1333
1342
|
this._selectedBeverage = void 0;
|
|
1334
1343
|
return;
|
|
1335
1344
|
}
|
|
1336
|
-
if (e === this._selectedBeverage &&
|
|
1345
|
+
if (e === this._selectedBeverage && Mt(this._additionalItems, t)) {
|
|
1337
1346
|
this.logger.info("No change in selected pourable");
|
|
1338
1347
|
return;
|
|
1339
1348
|
}
|
|
1340
1349
|
this._selectedBeverage = e, this._additionalItems = t;
|
|
1341
|
-
let a = await
|
|
1342
|
-
|
|
1350
|
+
let a = await P.dataMapper.executeMapper(
|
|
1351
|
+
g.SelectedPourableMapper,
|
|
1343
1352
|
{
|
|
1344
1353
|
beverage: e,
|
|
1345
1354
|
additional: t,
|
|
@@ -1352,7 +1361,7 @@ let $ = class {
|
|
|
1352
1361
|
(!a || Object.keys(a).length === 0) && (this.logger.info(
|
|
1353
1362
|
`No selected pourable mapper defined, using the default payload ${i}`
|
|
1354
1363
|
), a = i);
|
|
1355
|
-
const s = a ?? i, n = await
|
|
1364
|
+
const s = a ?? i, n = await jr(this.name, s);
|
|
1356
1365
|
if ((n == null ? void 0 : n.status) !== 200)
|
|
1357
1366
|
throw new Error("Failed to select pourable");
|
|
1358
1367
|
}
|
|
@@ -1386,14 +1395,34 @@ let $ = class {
|
|
|
1386
1395
|
e
|
|
1387
1396
|
);
|
|
1388
1397
|
}
|
|
1389
|
-
|
|
1390
|
-
this.
|
|
1391
|
-
|
|
1398
|
+
handlePouringStart() {
|
|
1399
|
+
this.logger.info("Pour started"), z(this).forEach((e) => {
|
|
1400
|
+
var t;
|
|
1401
|
+
fe(e) && ((t = e.onPourStart) == null || t.call(e));
|
|
1392
1402
|
});
|
|
1393
1403
|
}
|
|
1404
|
+
handlePouringEnd() {
|
|
1405
|
+
this.logger.info("Pour ended");
|
|
1406
|
+
}
|
|
1407
|
+
handleCancelStart() {
|
|
1408
|
+
this.logger.info("Pour canceling");
|
|
1409
|
+
}
|
|
1410
|
+
handleCanceled() {
|
|
1411
|
+
this.logger.info("Pour canceled"), z(this).forEach((t) => {
|
|
1412
|
+
var r;
|
|
1413
|
+
fe(t) && ((r = t.onPourCancel) == null || r.call(t));
|
|
1414
|
+
});
|
|
1415
|
+
const e = {
|
|
1416
|
+
nozzleId: this.id
|
|
1417
|
+
};
|
|
1418
|
+
$.publish(Yr, e);
|
|
1419
|
+
}
|
|
1420
|
+
// ============================================================================
|
|
1421
|
+
// Future Lifecycle Handler
|
|
1422
|
+
// ============================================================================
|
|
1394
1423
|
onFutureUpdate(e) {
|
|
1395
|
-
|
|
1396
|
-
|
|
1424
|
+
z(this).forEach((a) => {
|
|
1425
|
+
fe(a) && a.onPourProgress(e);
|
|
1397
1426
|
});
|
|
1398
1427
|
const r = {
|
|
1399
1428
|
nozzleId: this.id,
|
|
@@ -1406,88 +1435,48 @@ let $ = class {
|
|
|
1406
1435
|
reason: e.reason,
|
|
1407
1436
|
timeRemaining: e.timeRemaining
|
|
1408
1437
|
};
|
|
1409
|
-
|
|
1410
|
-
this.currentState
|
|
1438
|
+
$.publish(kr, r), e.endState && O(() => {
|
|
1439
|
+
this.currentState === d.POURING && this.transition("POUR_COMPLETED");
|
|
1411
1440
|
});
|
|
1412
1441
|
}
|
|
1442
|
+
// Inherits throwOnInvalid: false from class
|
|
1413
1443
|
async pour(e) {
|
|
1414
1444
|
var t;
|
|
1415
1445
|
try {
|
|
1416
|
-
if (this.
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
nozzleId: this.id,
|
|
1426
|
-
type: "free"
|
|
1427
|
-
};
|
|
1428
|
-
if (_.publish(Ne, a), (t = r == null ? void 0 : r.data) != null && t.endState) {
|
|
1429
|
-
this.updateIfCurrent(d.POURING, d.IDLE);
|
|
1430
|
-
const i = {
|
|
1431
|
-
nozzleId: this.id
|
|
1432
|
-
};
|
|
1433
|
-
_.publish(ye, i);
|
|
1434
|
-
}
|
|
1435
|
-
return r;
|
|
1436
|
-
} else
|
|
1437
|
-
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
1446
|
+
if (this.transition("START_POUR"), !e)
|
|
1447
|
+
throw new Error("No tracker provided");
|
|
1448
|
+
const r = await xr(this.name, e);
|
|
1449
|
+
this.transition("POUR_ACTIVE");
|
|
1450
|
+
const a = {
|
|
1451
|
+
nozzleId: this.id,
|
|
1452
|
+
type: "free"
|
|
1453
|
+
};
|
|
1454
|
+
return $.publish(ze, a), (t = r == null ? void 0 : r.data) != null && t.endState && this.transition("POUR_COMPLETED"), r;
|
|
1438
1455
|
} catch (r) {
|
|
1439
|
-
throw this.logger.error(r), this.currentState
|
|
1456
|
+
throw this.logger.error(r), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), r;
|
|
1440
1457
|
}
|
|
1441
1458
|
}
|
|
1459
|
+
// Inherits throwOnInvalid: false from class
|
|
1442
1460
|
async fixedPour(e, t) {
|
|
1443
1461
|
var r;
|
|
1444
1462
|
try {
|
|
1445
|
-
if (this.
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
});
|
|
1455
|
-
const i = {
|
|
1456
|
-
nozzleId: this.id,
|
|
1457
|
-
type: "fixed"
|
|
1458
|
-
};
|
|
1459
|
-
if (_.publish(Ne, i), (r = a == null ? void 0 : a.data) != null && r.endState) {
|
|
1460
|
-
this.updateIfCurrent(d.POURING, d.IDLE);
|
|
1461
|
-
const s = {
|
|
1462
|
-
nozzleId: this.id
|
|
1463
|
-
};
|
|
1464
|
-
_.publish(ye, s);
|
|
1465
|
-
}
|
|
1466
|
-
return a;
|
|
1467
|
-
} else
|
|
1468
|
-
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
1463
|
+
if (this.transition("START_POUR"), !t)
|
|
1464
|
+
throw new Error("No tracker provided");
|
|
1465
|
+
const a = await Br(e, this.name, t);
|
|
1466
|
+
this.transition("POUR_ACTIVE");
|
|
1467
|
+
const i = {
|
|
1468
|
+
nozzleId: this.id,
|
|
1469
|
+
type: "fixed"
|
|
1470
|
+
};
|
|
1471
|
+
return $.publish(ze, i), (r = a == null ? void 0 : a.data) != null && r.endState && this.transition("POUR_COMPLETED"), a;
|
|
1469
1472
|
} catch (a) {
|
|
1470
|
-
throw this.logger.error(a), this.currentState
|
|
1473
|
+
throw this.logger.error(a), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), a;
|
|
1471
1474
|
}
|
|
1472
1475
|
}
|
|
1473
|
-
|
|
1474
|
-
* An action that will cancel a pour for this nozzle.
|
|
1475
|
-
* */
|
|
1476
|
+
// Inherits throwOnInvalid: false - silently ignore if already idle
|
|
1476
1477
|
async cancelPour() {
|
|
1477
1478
|
var e;
|
|
1478
|
-
|
|
1479
|
-
this.currentState = d.POUR_CANCELING, await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), g(() => {
|
|
1480
|
-
this.currentState = d.IDLE;
|
|
1481
|
-
}), E(this).forEach((r) => {
|
|
1482
|
-
var a;
|
|
1483
|
-
re(r) && ((a = r.onPourCancel) == null || a.call(r));
|
|
1484
|
-
});
|
|
1485
|
-
const t = {
|
|
1486
|
-
nozzleId: this.id
|
|
1487
|
-
};
|
|
1488
|
-
_.publish(ye, t);
|
|
1489
|
-
} else
|
|
1490
|
-
this.logger.warn(`Cannot cancel pour in state ${this.currentState}`);
|
|
1479
|
+
this.transition("CANCEL_POUR"), await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), this.transition("POUR_CANCELED");
|
|
1491
1480
|
}
|
|
1492
1481
|
updateGroupMembers() {
|
|
1493
1482
|
this._availabilityItems.data.forEach((e) => {
|
|
@@ -1503,37 +1492,37 @@ let $ = class {
|
|
|
1503
1492
|
async load(e) {
|
|
1504
1493
|
var a, i;
|
|
1505
1494
|
this.logger.debug(`loading nozzle ${this.id}`);
|
|
1506
|
-
const t = await
|
|
1495
|
+
const t = await Gr(this.urlPrefix);
|
|
1507
1496
|
if ((t == null ? void 0 : t.status) !== 200)
|
|
1508
1497
|
throw new Error("Failed to load nozzle availability");
|
|
1509
|
-
const r = await
|
|
1510
|
-
|
|
1498
|
+
const r = await P.loader.executeLoader(
|
|
1499
|
+
g.AvailabilityLoader,
|
|
1511
1500
|
{}
|
|
1512
1501
|
);
|
|
1513
|
-
e == null || e.set(
|
|
1502
|
+
e == null || e.set(g.AvailabilityLoader, r), e == null || e.set(Ne.type, this);
|
|
1514
1503
|
for (const s of Object.keys((a = t.data) == null ? void 0 : a.groups) || [])
|
|
1515
1504
|
for (const n of ((i = t.data) == null ? void 0 : i.groups[s]) || []) {
|
|
1516
|
-
const
|
|
1517
|
-
|
|
1505
|
+
const l = await P.dataMapper.executeMapper(
|
|
1506
|
+
g.AvailabilityMapper,
|
|
1518
1507
|
{ ...n, groupId: s },
|
|
1519
1508
|
r
|
|
1520
|
-
),
|
|
1509
|
+
), c = {
|
|
1521
1510
|
...n,
|
|
1522
1511
|
note: n.note ?? void 0,
|
|
1523
1512
|
kosParentId: this.id,
|
|
1524
1513
|
rawId: n.id,
|
|
1525
1514
|
groupId: s,
|
|
1526
|
-
data:
|
|
1515
|
+
data: l,
|
|
1527
1516
|
properties: n.properties || {}
|
|
1528
|
-
}, p =
|
|
1517
|
+
}, p = Ee.factory(
|
|
1529
1518
|
`${this.id}-${s}-${n.id}`
|
|
1530
|
-
)(
|
|
1519
|
+
)(c);
|
|
1531
1520
|
this._availabilityItems.addModel(p);
|
|
1532
1521
|
}
|
|
1533
1522
|
this.updateGroupMembers();
|
|
1534
1523
|
}
|
|
1535
1524
|
async updateAvailability(e) {
|
|
1536
|
-
const t =
|
|
1525
|
+
const t = wt.getContext(this.id), r = (t == null ? void 0 : t.get(g.AvailabilityLoader)) || {};
|
|
1537
1526
|
if (e.rebuild)
|
|
1538
1527
|
for (const a of Object.keys(e == null ? void 0 : e.groups) || []) {
|
|
1539
1528
|
this._availabilityItems.getIndexByKey("group", a).filter(
|
|
@@ -1541,14 +1530,14 @@ let $ = class {
|
|
|
1541
1530
|
(n) => `${this.id}-${a}-${n.id}` === s.id
|
|
1542
1531
|
)
|
|
1543
1532
|
).forEach((s) => {
|
|
1544
|
-
this._availabilityItems.removeModel(s.id),
|
|
1533
|
+
this._availabilityItems.removeModel(s.id), Rt(s);
|
|
1545
1534
|
});
|
|
1546
1535
|
for (const s of (e == null ? void 0 : e.groups[a]) || []) {
|
|
1547
|
-
const n = await
|
|
1548
|
-
|
|
1536
|
+
const n = await P.dataMapper.executeMapper(
|
|
1537
|
+
g.AvailabilityMapper,
|
|
1549
1538
|
{ ...s, groupId: a },
|
|
1550
1539
|
r
|
|
1551
|
-
),
|
|
1540
|
+
), l = {
|
|
1552
1541
|
...s,
|
|
1553
1542
|
note: s.note ?? void 0,
|
|
1554
1543
|
kosParentId: this.id,
|
|
@@ -1557,15 +1546,15 @@ let $ = class {
|
|
|
1557
1546
|
data: n,
|
|
1558
1547
|
taggedIds: s.taggedIds,
|
|
1559
1548
|
properties: s.properties || {}
|
|
1560
|
-
},
|
|
1549
|
+
}, c = this._availabilityItems.getModel(
|
|
1561
1550
|
`${this.id}-${a}-${s.id}`
|
|
1562
1551
|
);
|
|
1563
|
-
if (
|
|
1564
|
-
|
|
1552
|
+
if (c)
|
|
1553
|
+
c.updateModel(l);
|
|
1565
1554
|
else {
|
|
1566
|
-
const p =
|
|
1555
|
+
const p = Ee.factory(
|
|
1567
1556
|
`${this.id}-${a}-${s.id}`
|
|
1568
|
-
)(
|
|
1557
|
+
)(l);
|
|
1569
1558
|
this._availabilityItems.addModel(p);
|
|
1570
1559
|
}
|
|
1571
1560
|
}
|
|
@@ -1573,8 +1562,8 @@ let $ = class {
|
|
|
1573
1562
|
else
|
|
1574
1563
|
for (const a of Object.keys(e == null ? void 0 : e.groups) || [])
|
|
1575
1564
|
for (const i of (e == null ? void 0 : e.groups[a]) || []) {
|
|
1576
|
-
const s = await
|
|
1577
|
-
|
|
1565
|
+
const s = await P.dataMapper.executeMapper(
|
|
1566
|
+
g.AvailabilityMapper,
|
|
1578
1567
|
{ ...i, groupId: a },
|
|
1579
1568
|
r
|
|
1580
1569
|
), n = {
|
|
@@ -1587,56 +1576,112 @@ let $ = class {
|
|
|
1587
1576
|
type: i.type,
|
|
1588
1577
|
taggedIds: i.taggedIds,
|
|
1589
1578
|
properties: i.properties || {}
|
|
1590
|
-
},
|
|
1579
|
+
}, l = this._availabilityItems.getModel(
|
|
1591
1580
|
`${this.id}-${a}-${i.id}`
|
|
1592
1581
|
);
|
|
1593
|
-
|
|
1582
|
+
l && l.updateModel(n);
|
|
1594
1583
|
}
|
|
1595
1584
|
this.updateGroupMembers();
|
|
1596
1585
|
}
|
|
1597
1586
|
// -------------------ENTITY----------------------------
|
|
1598
1587
|
};
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
],
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
],
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
],
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1588
|
+
E([
|
|
1589
|
+
_
|
|
1590
|
+
], I.prototype, "_availabilityItems", 2);
|
|
1591
|
+
E([
|
|
1592
|
+
ue(d.POURING)
|
|
1593
|
+
], I.prototype, "handlePouringStart", 1);
|
|
1594
|
+
E([
|
|
1595
|
+
Pe(d.POURING)
|
|
1596
|
+
], I.prototype, "handlePouringEnd", 1);
|
|
1597
|
+
E([
|
|
1598
|
+
ue(d.POUR_CANCELING)
|
|
1599
|
+
], I.prototype, "handleCancelStart", 1);
|
|
1600
|
+
E([
|
|
1601
|
+
Pe(d.POUR_CANCELING)
|
|
1602
|
+
], I.prototype, "handleCanceled", 1);
|
|
1603
|
+
E([
|
|
1604
|
+
ge(),
|
|
1605
|
+
ae({ allowedStates: [d.IDLE] })
|
|
1606
|
+
], I.prototype, "pour", 1);
|
|
1607
|
+
E([
|
|
1608
|
+
ge(),
|
|
1609
|
+
ae({ allowedStates: [d.IDLE] })
|
|
1610
|
+
], I.prototype, "fixedPour", 1);
|
|
1611
|
+
E([
|
|
1612
|
+
ae({
|
|
1613
|
+
allowedStates: [d.POUR_STARTING, d.POURING]
|
|
1614
|
+
})
|
|
1615
|
+
], I.prototype, "cancelPour", 1);
|
|
1616
|
+
E([
|
|
1617
|
+
re({
|
|
1618
|
+
topic: `${Kr}/availability`,
|
|
1611
1619
|
websocket: !0
|
|
1612
1620
|
})
|
|
1613
|
-
],
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1621
|
+
], I.prototype, "updateAvailability", 1);
|
|
1622
|
+
I = E([
|
|
1623
|
+
y(Q),
|
|
1624
|
+
Fe(),
|
|
1625
|
+
He(
|
|
1626
|
+
{
|
|
1627
|
+
initial: d.IDLE,
|
|
1628
|
+
initializeAt: pe.READY,
|
|
1629
|
+
states: {
|
|
1630
|
+
[d.IDLE]: {
|
|
1631
|
+
on: {
|
|
1632
|
+
START_POUR: d.POUR_STARTING
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
[d.POUR_STARTING]: {
|
|
1636
|
+
on: {
|
|
1637
|
+
POUR_ACTIVE: d.POURING,
|
|
1638
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1639
|
+
POUR_COMPLETED: d.IDLE
|
|
1640
|
+
}
|
|
1641
|
+
},
|
|
1642
|
+
[d.POURING]: {
|
|
1643
|
+
on: {
|
|
1644
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1645
|
+
POUR_COMPLETED: d.IDLE
|
|
1646
|
+
}
|
|
1647
|
+
},
|
|
1648
|
+
[d.POUR_CANCELING]: {
|
|
1649
|
+
on: {
|
|
1650
|
+
POUR_CANCELED: d.IDLE
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
trackHistory: !1,
|
|
1657
|
+
throwOnInvalid: !1
|
|
1658
|
+
// Gracefully ignore invalid state calls (expected runtime scenarios)
|
|
1659
|
+
}
|
|
1660
|
+
)
|
|
1661
|
+
], I);
|
|
1662
|
+
const Ne = {
|
|
1618
1663
|
registration: {
|
|
1619
|
-
[
|
|
1620
|
-
class:
|
|
1664
|
+
[Q]: {
|
|
1665
|
+
class: I,
|
|
1621
1666
|
singleton: !1
|
|
1622
1667
|
}
|
|
1623
1668
|
},
|
|
1624
|
-
type:
|
|
1625
|
-
predicate: b(
|
|
1626
|
-
factory: v.Factory.create(
|
|
1669
|
+
type: Q,
|
|
1670
|
+
predicate: b(Q),
|
|
1671
|
+
factory: v.Factory.create(Q)
|
|
1627
1672
|
};
|
|
1628
|
-
var
|
|
1629
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
1673
|
+
var Zr = Object.defineProperty, Xr = Object.getOwnPropertyDescriptor, ct = (e, t, r, a) => {
|
|
1674
|
+
for (var i = a > 1 ? void 0 : a ? Xr(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1630
1675
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
1631
|
-
return a && i &&
|
|
1676
|
+
return a && i && Zr(t, r, i), i;
|
|
1632
1677
|
};
|
|
1633
|
-
const
|
|
1634
|
-
let
|
|
1678
|
+
const pt = "device-assembly-model";
|
|
1679
|
+
let ce = class {
|
|
1635
1680
|
constructor(e, t, r) {
|
|
1636
1681
|
o(this, "id");
|
|
1637
1682
|
o(this, "deviceNozzles");
|
|
1638
1683
|
o(this, "logger");
|
|
1639
|
-
this.id = e, this.logger = r.logger, this.deviceNozzles = new
|
|
1684
|
+
this.id = e, this.logger = r.logger, this.deviceNozzles = new T();
|
|
1640
1685
|
}
|
|
1641
1686
|
// -------------------LIFECYCLE----------------------------
|
|
1642
1687
|
async init() {
|
|
@@ -1650,10 +1695,10 @@ let de = class {
|
|
|
1650
1695
|
}
|
|
1651
1696
|
async load() {
|
|
1652
1697
|
this.logger.debug(`loading device-assembly ${this.id}`);
|
|
1653
|
-
const e = await
|
|
1698
|
+
const e = await qe();
|
|
1654
1699
|
(e == null ? void 0 : e.status) === 200 && e.data.assemblies.map((r) => r.nozzles ?? []).flat().forEach((r) => {
|
|
1655
1700
|
var n;
|
|
1656
|
-
const a = r.path, i = ((n = r.pipelines.find((
|
|
1701
|
+
const a = r.path, i = ((n = r.pipelines.find((l) => l.name === "beverage")) == null ? void 0 : n.topicPrefix) || "", s = Ne.factory(a)({
|
|
1657
1702
|
path: r.path,
|
|
1658
1703
|
name: r.name,
|
|
1659
1704
|
urlPrefix: r.urlPrefix,
|
|
@@ -1664,41 +1709,40 @@ let de = class {
|
|
|
1664
1709
|
});
|
|
1665
1710
|
}
|
|
1666
1711
|
};
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
],
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
],
|
|
1673
|
-
const
|
|
1674
|
-
class:
|
|
1675
|
-
type:
|
|
1676
|
-
}), { URL:
|
|
1677
|
-
basePath: `${
|
|
1678
|
-
}),
|
|
1679
|
-
const r = await
|
|
1712
|
+
ct([
|
|
1713
|
+
_
|
|
1714
|
+
], ce.prototype, "deviceNozzles", 2);
|
|
1715
|
+
ce = ct([
|
|
1716
|
+
y(pt)
|
|
1717
|
+
], ce);
|
|
1718
|
+
const Jr = new Ct({
|
|
1719
|
+
class: ce,
|
|
1720
|
+
type: pt
|
|
1721
|
+
}), { URL: ht } = D("GENERIC_POUR_SERVICE"), { postModel: qr } = S.build({
|
|
1722
|
+
basePath: `${ht}/api/nozzle`
|
|
1723
|
+
}), Wr = async (e, t) => {
|
|
1724
|
+
const r = await qr({
|
|
1680
1725
|
model: {},
|
|
1681
|
-
urlOverride: `${
|
|
1726
|
+
urlOverride: `${ht}${e}`,
|
|
1682
1727
|
ordered: !0,
|
|
1683
1728
|
tracker: t
|
|
1684
1729
|
});
|
|
1685
|
-
return r != null && r.data &&
|
|
1730
|
+
return r != null && r.data && he.initiateFuture(r.data), r;
|
|
1686
1731
|
};
|
|
1687
|
-
var
|
|
1688
|
-
for (var i = a > 1 ? void 0 : a ?
|
|
1732
|
+
var Qr = Object.defineProperty, ea = Object.getOwnPropertyDescriptor, A = (e, t, r, a) => {
|
|
1733
|
+
for (var i = a > 1 ? void 0 : a ? ea(t, r) : t, s = e.length - 1, n; s >= 0; s--)
|
|
1689
1734
|
(n = e[s]) && (i = (a ? n(t, r, i) : n(i)) || i);
|
|
1690
|
-
return a && i &&
|
|
1735
|
+
return a && i && Qr(t, r, i), i;
|
|
1691
1736
|
};
|
|
1692
|
-
const
|
|
1693
|
-
let
|
|
1737
|
+
const gt = "generic-pour-model", ta = "/kos/generic/pour/started", ra = "/kos/generic/pour/progress", aa = "/kos/generic/pour/cancel", ve = (e) => e.onPourStart !== void 0 && e.onPourCancel !== void 0 && e.onPourProgress !== void 0;
|
|
1738
|
+
let w = class {
|
|
1694
1739
|
constructor(e, t) {
|
|
1695
1740
|
o(this, "id");
|
|
1696
|
-
o(this, "currentState", d.IDLE);
|
|
1697
1741
|
o(this, "servicePathFactory");
|
|
1698
1742
|
o(this, "pourType");
|
|
1699
1743
|
o(this, "selectedId");
|
|
1700
1744
|
o(this, "state");
|
|
1701
|
-
this.id = e, this.futureHandler = new
|
|
1745
|
+
this.id = e, this.futureHandler = new je(this), this.servicePathFactory = t.servicePathFactory, this.pourType = t.pourType || "free", this.selectedId = t.selectedId, this.state = Te();
|
|
1702
1746
|
}
|
|
1703
1747
|
get servicePath() {
|
|
1704
1748
|
return this.selectedId ? this.servicePathFactory(this.selectedId, this.state) : "";
|
|
@@ -1710,58 +1754,55 @@ let le = class {
|
|
|
1710
1754
|
delete this.state[e];
|
|
1711
1755
|
}
|
|
1712
1756
|
clearContextData() {
|
|
1713
|
-
this.state =
|
|
1757
|
+
this.state = Te();
|
|
1758
|
+
}
|
|
1759
|
+
handlePouringStart() {
|
|
1760
|
+
this.logger.info("Pour started"), z(this).forEach((t) => {
|
|
1761
|
+
var r;
|
|
1762
|
+
ve(t) && ((r = t.onPourStart) == null || r.call(t));
|
|
1763
|
+
});
|
|
1764
|
+
const e = {
|
|
1765
|
+
pourTarget: this.id,
|
|
1766
|
+
type: this.pourType
|
|
1767
|
+
};
|
|
1768
|
+
$.publish(ta, e);
|
|
1769
|
+
}
|
|
1770
|
+
handlePouringEnd() {
|
|
1771
|
+
this.logger.info("Pour ended");
|
|
1772
|
+
}
|
|
1773
|
+
handleCancelStart() {
|
|
1774
|
+
this.logger.info("Pour canceling");
|
|
1714
1775
|
}
|
|
1776
|
+
handleCanceled() {
|
|
1777
|
+
this.logger.info("Pour canceled"), z(this).forEach((t) => {
|
|
1778
|
+
var r;
|
|
1779
|
+
ve(t) && ((r = t.onPourCancel) == null || r.call(t));
|
|
1780
|
+
});
|
|
1781
|
+
const e = {
|
|
1782
|
+
pourTarget: this.id
|
|
1783
|
+
};
|
|
1784
|
+
$.publish(aa, e);
|
|
1785
|
+
}
|
|
1786
|
+
// Inherits throwOnInvalid: false from class
|
|
1715
1787
|
async pour(e) {
|
|
1716
1788
|
var t;
|
|
1717
1789
|
try {
|
|
1718
|
-
if (this.
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
this.updateIfCurrent(d.POUR_STARTING, d.POURING), E(this).forEach((i) => {
|
|
1723
|
-
var s;
|
|
1724
|
-
Ie(i) && ((s = i.onPourStart) == null || s.call(i));
|
|
1725
|
-
});
|
|
1726
|
-
const a = {
|
|
1727
|
-
pourTarget: this.id,
|
|
1728
|
-
type: this.pourType
|
|
1729
|
-
};
|
|
1730
|
-
if (_.publish(Wr, a), (t = r == null ? void 0 : r.data) != null && t.endState) {
|
|
1731
|
-
this.updateIfCurrent(d.POURING, d.IDLE);
|
|
1732
|
-
const i = {
|
|
1733
|
-
pourTarget: this.id
|
|
1734
|
-
};
|
|
1735
|
-
_.publish(Te, i);
|
|
1736
|
-
}
|
|
1737
|
-
return r;
|
|
1738
|
-
} else
|
|
1739
|
-
throw new Error(`Cannot pour in state ${this.currentState}`);
|
|
1790
|
+
if (this.transition("START_POUR"), !e)
|
|
1791
|
+
throw new Error("No tracker provided");
|
|
1792
|
+
const r = await Wr(this.servicePath, e);
|
|
1793
|
+
return this.transition("POUR_ACTIVE"), (t = r == null ? void 0 : r.data) != null && t.endState && this.transition("POUR_COMPLETED"), r;
|
|
1740
1794
|
} catch (r) {
|
|
1741
|
-
throw this.logger.error(r), this.currentState
|
|
1795
|
+
throw this.logger.error(r), this.currentState !== d.IDLE && this.transition("POUR_COMPLETED"), r;
|
|
1742
1796
|
}
|
|
1743
1797
|
}
|
|
1798
|
+
// Inherits throwOnInvalid: false - silently ignore if already idle
|
|
1744
1799
|
async cancelPour() {
|
|
1745
1800
|
var e;
|
|
1746
|
-
|
|
1747
|
-
this.currentState = d.POUR_CANCELING, await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), g(() => {
|
|
1748
|
-
this.currentState = d.IDLE;
|
|
1749
|
-
}), E(this).forEach((r) => {
|
|
1750
|
-
var a;
|
|
1751
|
-
Ie(r) && ((a = r.onPourCancel) == null || a.call(r));
|
|
1752
|
-
});
|
|
1753
|
-
const t = {
|
|
1754
|
-
pourTarget: this.id
|
|
1755
|
-
};
|
|
1756
|
-
_.publish(Te, t);
|
|
1757
|
-
}
|
|
1758
|
-
this.currentState === d.IDLE ? this.logger.info("Pour already idle, nothing to cancel.") : this.logger.warn(`Cannot cancel pour in state ${this.currentState}`);
|
|
1759
|
-
}
|
|
1760
|
-
updateIfCurrent(e, t) {
|
|
1761
|
-
this.currentState === e && g(() => {
|
|
1762
|
-
this.currentState = t;
|
|
1763
|
-
});
|
|
1801
|
+
this.transition("CANCEL_POUR"), await ((e = this.futureHandler.getFuture()) == null ? void 0 : e.cancelFuture()), this.transition("POUR_CANCELED");
|
|
1764
1802
|
}
|
|
1803
|
+
// ============================================================================
|
|
1804
|
+
// Computed Properties
|
|
1805
|
+
// ============================================================================
|
|
1765
1806
|
/**
|
|
1766
1807
|
* A derived value that indicates if the nozzle is currently pouring a beverage.
|
|
1767
1808
|
* @readonly
|
|
@@ -1773,7 +1814,8 @@ let le = class {
|
|
|
1773
1814
|
/**
|
|
1774
1815
|
* A derived value that indicates if the pour target is currently available to pour a beverage.
|
|
1775
1816
|
*
|
|
1776
|
-
* Generally this means that the pour target is currently idle and not in the process of pouring,
|
|
1817
|
+
* Generally this means that the pour target is currently idle and not in the process of pouring,
|
|
1818
|
+
* initiating a pour, or canceling a pour.
|
|
1777
1819
|
* The value is observable and will change when the selected pourable changes or the pour target
|
|
1778
1820
|
* starts or stops pouring.
|
|
1779
1821
|
* @readonly
|
|
@@ -1784,9 +1826,12 @@ let le = class {
|
|
|
1784
1826
|
get pourProgress() {
|
|
1785
1827
|
return this.progress ?? 0;
|
|
1786
1828
|
}
|
|
1829
|
+
// ============================================================================
|
|
1830
|
+
// Future Lifecycle Handler
|
|
1831
|
+
// ============================================================================
|
|
1787
1832
|
onFutureUpdate(e) {
|
|
1788
|
-
|
|
1789
|
-
|
|
1833
|
+
z(this).forEach((r) => {
|
|
1834
|
+
ve(r) && r.onPourProgress(e);
|
|
1790
1835
|
});
|
|
1791
1836
|
const t = {
|
|
1792
1837
|
pourTarget: this.id,
|
|
@@ -1799,48 +1844,102 @@ let le = class {
|
|
|
1799
1844
|
reason: e.reason,
|
|
1800
1845
|
timeRemaining: e.timeRemaining
|
|
1801
1846
|
};
|
|
1802
|
-
|
|
1803
|
-
this.currentState
|
|
1847
|
+
$.publish(ra, t), e.endState && O(() => {
|
|
1848
|
+
this.currentState === d.POURING && this.transition("POUR_COMPLETED");
|
|
1804
1849
|
});
|
|
1805
1850
|
}
|
|
1806
1851
|
};
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
],
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1852
|
+
A([
|
|
1853
|
+
ue(d.POURING)
|
|
1854
|
+
], w.prototype, "handlePouringStart", 1);
|
|
1855
|
+
A([
|
|
1856
|
+
Pe(d.POURING)
|
|
1857
|
+
], w.prototype, "handlePouringEnd", 1);
|
|
1858
|
+
A([
|
|
1859
|
+
ue(d.POUR_CANCELING)
|
|
1860
|
+
], w.prototype, "handleCancelStart", 1);
|
|
1861
|
+
A([
|
|
1862
|
+
Pe(d.POUR_CANCELING)
|
|
1863
|
+
], w.prototype, "handleCanceled", 1);
|
|
1864
|
+
A([
|
|
1865
|
+
ge(),
|
|
1866
|
+
ae({ allowedStates: [d.IDLE] })
|
|
1867
|
+
], w.prototype, "pour", 1);
|
|
1868
|
+
A([
|
|
1869
|
+
ae({
|
|
1870
|
+
allowedStates: [d.POUR_STARTING, d.POURING]
|
|
1871
|
+
})
|
|
1872
|
+
], w.prototype, "cancelPour", 1);
|
|
1873
|
+
w = A([
|
|
1874
|
+
y(gt),
|
|
1875
|
+
Fe(),
|
|
1876
|
+
$t(),
|
|
1877
|
+
He(
|
|
1878
|
+
{
|
|
1879
|
+
initial: d.IDLE,
|
|
1880
|
+
initializeAt: pe.READY,
|
|
1881
|
+
states: {
|
|
1882
|
+
[d.IDLE]: {
|
|
1883
|
+
on: {
|
|
1884
|
+
START_POUR: d.POUR_STARTING
|
|
1885
|
+
}
|
|
1886
|
+
},
|
|
1887
|
+
[d.POUR_STARTING]: {
|
|
1888
|
+
on: {
|
|
1889
|
+
POUR_ACTIVE: d.POURING,
|
|
1890
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1891
|
+
POUR_COMPLETED: d.IDLE
|
|
1892
|
+
}
|
|
1893
|
+
},
|
|
1894
|
+
[d.POURING]: {
|
|
1895
|
+
on: {
|
|
1896
|
+
CANCEL_POUR: d.POUR_CANCELING,
|
|
1897
|
+
POUR_COMPLETED: d.IDLE
|
|
1898
|
+
}
|
|
1899
|
+
},
|
|
1900
|
+
[d.POUR_CANCELING]: {
|
|
1901
|
+
on: {
|
|
1902
|
+
POUR_CANCELED: d.IDLE
|
|
1903
|
+
}
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
},
|
|
1907
|
+
{
|
|
1908
|
+
trackHistory: !1,
|
|
1909
|
+
throwOnInvalid: !1
|
|
1910
|
+
// Gracefully ignore invalid state calls (expected runtime scenarios)
|
|
1911
|
+
}
|
|
1912
|
+
)
|
|
1913
|
+
], w);
|
|
1914
|
+
const ha = new Nt({
|
|
1915
|
+
class: w,
|
|
1916
|
+
type: gt
|
|
1917
|
+
}), xe = {
|
|
1918
|
+
...Ye.registration,
|
|
1919
|
+
...Ve.registration,
|
|
1920
|
+
...st.registration,
|
|
1921
|
+
...Je.registration,
|
|
1922
|
+
...Ne.registration,
|
|
1923
|
+
...ot.registration,
|
|
1924
|
+
...Re.registration,
|
|
1925
|
+
...Ee.registration,
|
|
1926
|
+
...lt.registration,
|
|
1927
|
+
...it.registration
|
|
1928
|
+
}, ia = (e) => () => (St(e)(), Jr.register(), Object.keys(xe).forEach((t) => {
|
|
1929
|
+
const r = xe[t];
|
|
1930
|
+
Tt(e)(t, r);
|
|
1931
|
+
}), P[te].register(
|
|
1833
1932
|
"FirmwareUpdateInProgressTrouble",
|
|
1834
1933
|
async (t) => {
|
|
1835
1934
|
var r;
|
|
1836
1935
|
if ((r = t.data) != null && r.deviceId) {
|
|
1837
|
-
const { model: a } =
|
|
1838
|
-
|
|
1936
|
+
const { model: a } = x(
|
|
1937
|
+
lt.type
|
|
1839
1938
|
);
|
|
1840
1939
|
if (a) {
|
|
1841
1940
|
const i = a.boards.find(
|
|
1842
1941
|
(s) => s.id === t.data.deviceId
|
|
1843
|
-
) ?
|
|
1942
|
+
) ? x(t.data.deviceId).model : void 0;
|
|
1844
1943
|
return {
|
|
1845
1944
|
devices: i ? i.name : ""
|
|
1846
1945
|
};
|
|
@@ -1849,64 +1948,64 @@ const di = new $t({
|
|
|
1849
1948
|
return {};
|
|
1850
1949
|
}
|
|
1851
1950
|
), {
|
|
1852
|
-
preload:
|
|
1853
|
-
model:
|
|
1854
|
-
companion:
|
|
1855
|
-
legacy:
|
|
1856
|
-
}),
|
|
1857
|
-
...
|
|
1951
|
+
preload: R.model.preloadModel(e),
|
|
1952
|
+
model: R.model.register(e),
|
|
1953
|
+
companion: R.companion.register(e),
|
|
1954
|
+
legacy: R.model.registerLegacyModel(e)
|
|
1955
|
+
}), f = {
|
|
1956
|
+
...Dt
|
|
1858
1957
|
};
|
|
1859
|
-
|
|
1860
|
-
models:
|
|
1958
|
+
f.dispense = {
|
|
1959
|
+
models: ia(f)
|
|
1861
1960
|
};
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
const
|
|
1961
|
+
f.preload = R.model.preloadModel(f);
|
|
1962
|
+
f.model = R.model.register(f);
|
|
1963
|
+
f.companion = R.companion.register(f);
|
|
1964
|
+
f.legacy = R.model.registerLegacyModel(f);
|
|
1965
|
+
const ga = f;
|
|
1867
1966
|
export {
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
D,
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1967
|
+
lt as A,
|
|
1968
|
+
B,
|
|
1969
|
+
Sr as C,
|
|
1970
|
+
L as D,
|
|
1971
|
+
g as E,
|
|
1972
|
+
Gr as F,
|
|
1973
|
+
ha as G,
|
|
1974
|
+
Je as H,
|
|
1975
|
+
Ve as I,
|
|
1976
|
+
Br as J,
|
|
1977
|
+
ga as K,
|
|
1879
1978
|
xr as L,
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
|
|
1884
|
-
|
|
1885
|
-
|
|
1886
|
-
|
|
1887
|
-
|
|
1888
|
-
|
|
1889
|
-
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1979
|
+
jr as M,
|
|
1980
|
+
Ne as N,
|
|
1981
|
+
Wr as O,
|
|
1982
|
+
ot as P,
|
|
1983
|
+
We as T,
|
|
1984
|
+
Tr as a,
|
|
1985
|
+
Ee as b,
|
|
1986
|
+
Qe as c,
|
|
1987
|
+
it as d,
|
|
1988
|
+
at as e,
|
|
1989
|
+
Jr as f,
|
|
1990
|
+
st as g,
|
|
1991
|
+
Ye as h,
|
|
1992
|
+
Re as i,
|
|
1993
|
+
tt as j,
|
|
1895
1994
|
d as k,
|
|
1896
|
-
|
|
1995
|
+
xe as l,
|
|
1897
1996
|
zt as m,
|
|
1898
|
-
|
|
1899
|
-
|
|
1900
|
-
|
|
1901
|
-
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1997
|
+
ca as n,
|
|
1998
|
+
Vt as o,
|
|
1999
|
+
pa as p,
|
|
2000
|
+
la as q,
|
|
2001
|
+
ia as r,
|
|
2002
|
+
da as s,
|
|
2003
|
+
kt as t,
|
|
2004
|
+
Xt as u,
|
|
2005
|
+
Kt as v,
|
|
2006
|
+
qe as w,
|
|
2007
|
+
wr as x,
|
|
2008
|
+
Mr as y,
|
|
2009
|
+
Fr as z
|
|
1911
2010
|
};
|
|
1912
|
-
//# sourceMappingURL=dispense-registration-manager-
|
|
2011
|
+
//# sourceMappingURL=dispense-registration-manager-DgMTZL-g.js.map
|