@kosdev-code/kos-dispense-sdk 2.0.40 → 2.0.41
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-DFEU9oXa.cjs +2 -0
- package/{dispense-registration-manager-BZeOXyYn.cjs.map → dispense-registration-manager-DFEU9oXa.cjs.map} +1 -1
- package/{dispense-registration-manager-eOOE05xT.js → dispense-registration-manager-DZWwSdsc.js} +248 -248
- package/{dispense-registration-manager-eOOE05xT.js.map → dispense-registration-manager-DZWwSdsc.js.map} +1 -1
- package/{extension-utils-B9gziKDQ.js → extension-utils-C-QjbNHU.js} +2 -2
- package/{extension-utils-B9gziKDQ.js.map → extension-utils-C-QjbNHU.js.map} +1 -1
- package/{extension-utils-DcOOx69a.cjs → extension-utils-CKGiF5Qr.cjs} +2 -2
- package/{extension-utils-DcOOx69a.cjs.map → extension-utils-CKGiF5Qr.cjs.map} +1 -1
- package/index.cjs +1 -1
- package/index.js +3 -3
- package/models.cjs +1 -1
- package/models.js +2 -2
- package/package.json +3 -3
- package/pump-provider-B7qOq1di.cjs +2 -0
- package/pump-provider-B7qOq1di.cjs.map +1 -0
- package/{pump-provider--hQGuh_w.js → pump-provider-BO5BamvM.js} +276 -277
- package/pump-provider-BO5BamvM.js.map +1 -0
- package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts +1 -0
- package/ui/hooks/nozzle-pour/use-nozzle-pour.d.ts.map +1 -1
- package/ui.cjs +1 -1
- package/ui.js +2 -2
- package/dispense-registration-manager-BZeOXyYn.cjs +0 -2
- package/pump-provider--hQGuh_w.js.map +0 -1
- package/pump-provider-5w04Zi8j.cjs +0 -2
- package/pump-provider-5w04Zi8j.cjs.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var J = (e, t, r) => (
|
|
1
|
+
var it = Object.defineProperty;
|
|
2
|
+
var at = (e, t, r) => t in e ? it(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var J = (e, t, r) => (at(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
4
|
import { jsx as m } from "@emotion/react/jsx-runtime";
|
|
5
|
-
import { A as Ie, b as Ae, e as
|
|
6
|
-
import { useKosModel as
|
|
7
|
-
import
|
|
5
|
+
import { A as Ie, b as Ae, e as ot, d as xe, N as ct, f as ke, H as dt, g as Ee, I as Se, h as Ne, G as ut, P as He } from "./dispense-registration-manager-DZWwSdsc.js";
|
|
6
|
+
import { useKosModel as N, getKosCompanionModel as be, kosAutoEffect as Re, KosLog as P, usePressGesture as ve, EventBus as g, TimerManager as Be } from "@kosdev-code/kos-ui-sdk";
|
|
7
|
+
import lt, { createContext as L, useMemo as A, useContext as H, useState as S, useCallback as o, useEffect as Y, useRef as Ce } from "react";
|
|
8
8
|
const ye = () => {
|
|
9
9
|
const e = Ie.type;
|
|
10
|
-
return
|
|
10
|
+
return N({
|
|
11
11
|
modelId: e,
|
|
12
12
|
modelType: Ie.type,
|
|
13
13
|
options: {}
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
|
-
function
|
|
16
|
+
function yt(e) {
|
|
17
17
|
return (t) => {
|
|
18
18
|
const { model: r, status: n, KosModelLoader: s } = ye();
|
|
19
19
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, assembly: r }) });
|
|
@@ -21,24 +21,24 @@ function Dt(e) {
|
|
|
21
21
|
}
|
|
22
22
|
const De = () => {
|
|
23
23
|
const e = Ae.type;
|
|
24
|
-
return
|
|
24
|
+
return N({
|
|
25
25
|
modelId: e,
|
|
26
26
|
modelType: Ae.type,
|
|
27
27
|
options: {}
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
-
function
|
|
30
|
+
function Dt(e) {
|
|
31
31
|
return (t) => {
|
|
32
32
|
const { model: r, status: n, KosModelLoader: s } = De();
|
|
33
33
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, beverage: r }) });
|
|
34
34
|
};
|
|
35
35
|
}
|
|
36
|
-
const Me = (e) =>
|
|
36
|
+
const Me = (e) => N({
|
|
37
37
|
modelId: e,
|
|
38
|
-
modelType:
|
|
38
|
+
modelType: ot.type,
|
|
39
39
|
options: {}
|
|
40
40
|
});
|
|
41
|
-
function
|
|
41
|
+
function Mt(e) {
|
|
42
42
|
return (t) => (r) => {
|
|
43
43
|
const { model: n, status: s, KosModelLoader: i } = Me(t);
|
|
44
44
|
return /* @__PURE__ */ m(i, { ...s, children: /* @__PURE__ */ m(e, { ...r, board: n }) });
|
|
@@ -46,39 +46,39 @@ function Ot(e) {
|
|
|
46
46
|
}
|
|
47
47
|
const Oe = () => {
|
|
48
48
|
const e = xe.type;
|
|
49
|
-
return
|
|
49
|
+
return N({
|
|
50
50
|
modelId: e,
|
|
51
51
|
modelType: xe.type,
|
|
52
52
|
options: {}
|
|
53
53
|
});
|
|
54
54
|
};
|
|
55
|
-
function
|
|
55
|
+
function Ot(e) {
|
|
56
56
|
return (t) => {
|
|
57
57
|
const { model: r, status: n, KosModelLoader: s } = Oe();
|
|
58
58
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, boardContainer: r }) });
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
|
-
const Ye = (e) =>
|
|
61
|
+
const Ye = (e) => N({
|
|
62
62
|
modelId: e,
|
|
63
|
-
modelType:
|
|
63
|
+
modelType: ct.type,
|
|
64
64
|
options: {
|
|
65
65
|
path: e
|
|
66
66
|
}
|
|
67
|
-
}), _e = L(void 0),
|
|
67
|
+
}), _e = L(void 0), mt = ({ children: e, path: t }) => {
|
|
68
68
|
const { model: r, ready: n } = Ye(t), s = A(() => n && r ? { model: r } : {}, [n, r]);
|
|
69
69
|
return /* @__PURE__ */ m(_e.Provider, { value: s, children: e });
|
|
70
70
|
}, D = () => {
|
|
71
|
-
const e =
|
|
71
|
+
const e = H(_e);
|
|
72
72
|
if (!e)
|
|
73
73
|
throw new Error("useNozzleContext must be used within a NozzleProvider");
|
|
74
74
|
return e;
|
|
75
|
-
},
|
|
75
|
+
}, pt = ({
|
|
76
76
|
onBeverageSelected: e,
|
|
77
77
|
onClearBeverage: t,
|
|
78
78
|
companionType: r
|
|
79
79
|
}) => {
|
|
80
|
-
const { model: n } = D(), [s, i] =
|
|
81
|
-
(d) =>
|
|
80
|
+
const { model: n } = D(), [s, i] = S([]), [u, l] = S(null), f = A(() => r ? s.map(
|
|
81
|
+
(d) => be(d, r)
|
|
82
82
|
) : [], [s, r]), h = o(
|
|
83
83
|
async (d) => {
|
|
84
84
|
l(d), await (n == null ? void 0 : n.setSelectedPourable({ beverage: d })), e == null || e(d);
|
|
@@ -87,7 +87,7 @@ const Ye = (e) => H({
|
|
|
87
87
|
), c = o(async () => {
|
|
88
88
|
l(null), await (n == null ? void 0 : n.setSelectedPourable({ beverage: void 0 })), t == null || t();
|
|
89
89
|
}, [n, t]);
|
|
90
|
-
return
|
|
90
|
+
return Y(() => {
|
|
91
91
|
const d = Re(() => {
|
|
92
92
|
if (!n)
|
|
93
93
|
return;
|
|
@@ -110,12 +110,12 @@ const Ye = (e) => H({
|
|
|
110
110
|
selectedBeverage: u,
|
|
111
111
|
clearBeverage: c
|
|
112
112
|
};
|
|
113
|
-
},
|
|
113
|
+
}, ht = ({
|
|
114
114
|
onBrandSelected: e,
|
|
115
115
|
onBrandCleared: t,
|
|
116
116
|
companionType: r
|
|
117
117
|
}) => {
|
|
118
|
-
const { model: n } = D(), [s, i] =
|
|
118
|
+
const { model: n } = D(), [s, i] = S(null), [u, l] = S([]), f = A(() => r ? u.map((d) => be(d, r)) : [], [u, r]), h = o(
|
|
119
119
|
async (d) => {
|
|
120
120
|
i(d), n == null || n.setSelectedBrand(d), e == null || e(d);
|
|
121
121
|
},
|
|
@@ -123,7 +123,7 @@ const Ye = (e) => H({
|
|
|
123
123
|
), c = o(() => {
|
|
124
124
|
i(null), n == null || n.setSelectedBrand(void 0), t == null || t();
|
|
125
125
|
}, [n, t]);
|
|
126
|
-
return
|
|
126
|
+
return Y(() => {
|
|
127
127
|
const d = Re(() => {
|
|
128
128
|
n && l(n.visibleBrands);
|
|
129
129
|
});
|
|
@@ -137,14 +137,14 @@ const Ye = (e) => H({
|
|
|
137
137
|
selectBrand: h,
|
|
138
138
|
clearBrand: c
|
|
139
139
|
};
|
|
140
|
-
},
|
|
140
|
+
}, ft = P.createLogger({
|
|
141
141
|
name: "HoldToPourStrategy",
|
|
142
142
|
group: "kos-hooks"
|
|
143
143
|
}), Ge = {
|
|
144
144
|
name: "HoldToPourStrategy",
|
|
145
145
|
async initiate(e) {
|
|
146
146
|
if (!(e != null && e.canPour)) {
|
|
147
|
-
|
|
147
|
+
ft.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
|
|
148
148
|
return;
|
|
149
149
|
}
|
|
150
150
|
await (e == null ? void 0 : e.pour());
|
|
@@ -155,7 +155,7 @@ const Ye = (e) => H({
|
|
|
155
155
|
}, re = P.createLogger({
|
|
156
156
|
name: "useNozzlePour",
|
|
157
157
|
group: "kos-hooks"
|
|
158
|
-
}),
|
|
158
|
+
}), bt = ({
|
|
159
159
|
onPour: e,
|
|
160
160
|
onPourCancel: t,
|
|
161
161
|
onBeforePour: r,
|
|
@@ -177,14 +177,14 @@ const Ye = (e) => H({
|
|
|
177
177
|
re.debug(`Force cancelling pour for nozzle ${i == null ? void 0 : i.id}.`), i == null || i.cancelPour(), t == null || t();
|
|
178
178
|
}, [t, i]);
|
|
179
179
|
return {
|
|
180
|
-
handlers:
|
|
180
|
+
handlers: ve({
|
|
181
181
|
onPressed: u,
|
|
182
182
|
onRelease: l
|
|
183
183
|
}).dom,
|
|
184
184
|
cancel: f,
|
|
185
185
|
status: i
|
|
186
186
|
};
|
|
187
|
-
},
|
|
187
|
+
}, vt = ({
|
|
188
188
|
onFlavorSelected: e,
|
|
189
189
|
onFlavorCleared: t,
|
|
190
190
|
companionType: r
|
|
@@ -193,8 +193,8 @@ const Ye = (e) => H({
|
|
|
193
193
|
() => (n == null ? void 0 : n.getGroupAvailabilityItems("flavors").filter((c) => c.visible)) ?? [],
|
|
194
194
|
[n]
|
|
195
195
|
), i = A(() => r ? s.map(
|
|
196
|
-
(c) =>
|
|
197
|
-
) : [], [s, r]), [u, l] =
|
|
196
|
+
(c) => be(c, r)
|
|
197
|
+
) : [], [s, r]), [u, l] = S([]), f = o(
|
|
198
198
|
async (c) => {
|
|
199
199
|
if (l(
|
|
200
200
|
(d) => d != null && d.includes(c) ? [...d.filter(($) => $ !== c)] : [...d ?? [], c]
|
|
@@ -221,12 +221,12 @@ const Ye = (e) => H({
|
|
|
221
221
|
selectedFlavors: u,
|
|
222
222
|
clearFlavors: h
|
|
223
223
|
};
|
|
224
|
-
}, Q = "brands", ne = "beverages", X = "flavors",
|
|
224
|
+
}, Q = "brands", ne = "beverages", X = "flavors", O = P.createLogger({ name: "use-cui-kit" }), $t = ({
|
|
225
225
|
initialGroup: e = Q,
|
|
226
226
|
options: t = {}
|
|
227
227
|
}) => {
|
|
228
228
|
var ee, te, se;
|
|
229
|
-
const [r, n] =
|
|
229
|
+
const [r, n] = S(e), { model: s } = D(), i = Ce([]), u = o(
|
|
230
230
|
(p) => {
|
|
231
231
|
n(X);
|
|
232
232
|
const C = `/kos/dispense/${s == null ? void 0 : s.path}/brand/selected/`;
|
|
@@ -260,14 +260,14 @@ const Ye = (e) => H({
|
|
|
260
260
|
g.publish(p, {});
|
|
261
261
|
}, [s == null ? void 0 : s.path]), x = o(async () => {
|
|
262
262
|
const p = `/kos/dispense/${s == null ? void 0 : s.path}/pre/pour/`;
|
|
263
|
-
return g.publish(p, {}), await (
|
|
263
|
+
return g.publish(p, {}), await (M == null ? void 0 : M()) || !0;
|
|
264
264
|
}, [s == null ? void 0 : s.path]), b = o(async () => {
|
|
265
265
|
const p = `/kos/dispense/${s == null ? void 0 : s.path}/pre/pour/rejected/`;
|
|
266
266
|
g.publish(p, {});
|
|
267
267
|
}, [s == null ? void 0 : s.path]), v = o(() => {
|
|
268
268
|
const p = `/kos/dispense/${s == null ? void 0 : s.path}/pour/cancel/`;
|
|
269
269
|
g.publish(p, {});
|
|
270
|
-
}, [s == null ? void 0 : s.path]), { brands: a, selectBrand:
|
|
270
|
+
}, [s == null ? void 0 : s.path]), { brands: a, selectBrand: F, selectedBrand: R, clearBrand: w, brandCompanions: W } = ht({
|
|
271
271
|
companionType: (ee = t.companionTypes) == null ? void 0 : ee.brand,
|
|
272
272
|
onBrandSelected: u,
|
|
273
273
|
onBrandCleared: l
|
|
@@ -277,29 +277,29 @@ const Ye = (e) => H({
|
|
|
277
277
|
selectedBeverage: ce,
|
|
278
278
|
clearBeverage: T,
|
|
279
279
|
beverageCompanions: B
|
|
280
|
-
} =
|
|
280
|
+
} = pt({
|
|
281
281
|
companionType: (te = t.companionTypes) == null ? void 0 : te.beverage,
|
|
282
282
|
onBeverageSelected: f,
|
|
283
283
|
onClearBeverage: h
|
|
284
284
|
}), {
|
|
285
|
-
clearFlavors:
|
|
286
|
-
flavors:
|
|
287
|
-
selectFlavor:
|
|
288
|
-
selectedFlavors:
|
|
289
|
-
flavorCompanions:
|
|
290
|
-
} =
|
|
285
|
+
clearFlavors: q,
|
|
286
|
+
flavors: de,
|
|
287
|
+
selectFlavor: U,
|
|
288
|
+
selectedFlavors: I,
|
|
289
|
+
flavorCompanions: K
|
|
290
|
+
} = vt({
|
|
291
291
|
companionType: (se = t.companionTypes) == null ? void 0 : se.flavor,
|
|
292
292
|
onFlavorSelected: c,
|
|
293
293
|
onFlavorCleared: d
|
|
294
|
-
}), [
|
|
295
|
-
|
|
296
|
-
}, []),
|
|
294
|
+
}), [M, k] = S(), _ = o((p) => {
|
|
295
|
+
k(() => p);
|
|
296
|
+
}, []), j = bt({
|
|
297
297
|
onPour: $,
|
|
298
298
|
onPourCancel: v,
|
|
299
299
|
onBeforePour: x,
|
|
300
300
|
onBeforePourRejected: b
|
|
301
|
-
}),
|
|
302
|
-
switch (
|
|
301
|
+
}), V = o(() => {
|
|
302
|
+
switch (O.debug(`Navigating back from group: ${r}`), r) {
|
|
303
303
|
case Q:
|
|
304
304
|
T(), w();
|
|
305
305
|
break;
|
|
@@ -308,24 +308,24 @@ const Ye = (e) => H({
|
|
|
308
308
|
n(e), T(), w();
|
|
309
309
|
break;
|
|
310
310
|
}
|
|
311
|
-
}, [T, w, r, e]),
|
|
311
|
+
}, [T, w, r, e]), ue = o(() => {
|
|
312
312
|
const p = `/kos/dispense/${s == null ? void 0 : s.path}/home/`;
|
|
313
313
|
g.publish(p, {}), n(e), e === Q && (T(), w()), e === ne && T();
|
|
314
|
-
}, [T, w, e]),
|
|
314
|
+
}, [T, w, e]), le = o(() => {
|
|
315
315
|
if (i.current.length === 0) {
|
|
316
|
-
|
|
316
|
+
O.debug("No timers to pause.");
|
|
317
317
|
return;
|
|
318
318
|
}
|
|
319
|
-
|
|
320
|
-
|
|
319
|
+
O.debug(`Pausing ${i.current.length} timers.`), i.current.forEach((p) => {
|
|
320
|
+
O.debug(`Pausing timer with id ${p.id}.`), p.pause();
|
|
321
321
|
});
|
|
322
|
-
}, []),
|
|
322
|
+
}, []), me = o(() => {
|
|
323
323
|
if (i.current.length === 0) {
|
|
324
|
-
|
|
324
|
+
O.debug("No timers to restart.");
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
|
-
|
|
328
|
-
|
|
327
|
+
O.debug(`Restarting ${i.current.length} timers.`), i.current.forEach((p) => {
|
|
328
|
+
O.debug(`Restarting timer with id ${p.id}.`), p.restart();
|
|
329
329
|
});
|
|
330
330
|
}, []);
|
|
331
331
|
return {
|
|
@@ -333,33 +333,33 @@ const Ye = (e) => H({
|
|
|
333
333
|
add: o((p) => {
|
|
334
334
|
if (p) {
|
|
335
335
|
if (i.current.some((C) => C.id === p.id)) {
|
|
336
|
-
|
|
336
|
+
O.debug(`Timer with id ${p.id} already exists.`);
|
|
337
337
|
return;
|
|
338
338
|
}
|
|
339
339
|
i.current.push(p);
|
|
340
340
|
}
|
|
341
341
|
}, []),
|
|
342
|
-
pause:
|
|
343
|
-
restart:
|
|
342
|
+
pause: le,
|
|
343
|
+
restart: me
|
|
344
344
|
},
|
|
345
345
|
nav: {
|
|
346
346
|
currentGroup: r,
|
|
347
|
-
back:
|
|
348
|
-
home:
|
|
347
|
+
back: V,
|
|
348
|
+
home: ue
|
|
349
349
|
},
|
|
350
|
-
pour:
|
|
351
|
-
updateOnBeforePour:
|
|
350
|
+
pour: j,
|
|
351
|
+
updateOnBeforePour: _,
|
|
352
352
|
selections: {
|
|
353
353
|
[Q]: R,
|
|
354
354
|
[ne]: ce,
|
|
355
|
-
[X]:
|
|
355
|
+
[X]: I
|
|
356
356
|
},
|
|
357
357
|
[Q]: {
|
|
358
358
|
models: a,
|
|
359
359
|
companions: W,
|
|
360
360
|
clear: w,
|
|
361
361
|
handlers: {
|
|
362
|
-
onSelected:
|
|
362
|
+
onSelected: F
|
|
363
363
|
}
|
|
364
364
|
},
|
|
365
365
|
[ne]: {
|
|
@@ -371,16 +371,16 @@ const Ye = (e) => H({
|
|
|
371
371
|
}
|
|
372
372
|
},
|
|
373
373
|
[X]: {
|
|
374
|
-
models:
|
|
375
|
-
companions:
|
|
376
|
-
clear:
|
|
374
|
+
models: de,
|
|
375
|
+
companions: K,
|
|
376
|
+
clear: q,
|
|
377
377
|
handlers: {
|
|
378
|
-
onSelected:
|
|
378
|
+
onSelected: U
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
381
|
};
|
|
382
|
-
},
|
|
383
|
-
const { model: t } = D(), [r, n] =
|
|
382
|
+
}, gt = (e) => {
|
|
383
|
+
const { model: t } = D(), [r, n] = S(null), {
|
|
384
384
|
onAmbientTimer: s,
|
|
385
385
|
onAttractTimer: i,
|
|
386
386
|
onResetAttractTimer: u,
|
|
@@ -398,7 +398,7 @@ const Ye = (e) => H({
|
|
|
398
398
|
}, [r, u]), b = o(() => {
|
|
399
399
|
r && (r.pause(), l == null || l());
|
|
400
400
|
}, [r, l]);
|
|
401
|
-
return
|
|
401
|
+
return Y(() => {
|
|
402
402
|
if (t && f) {
|
|
403
403
|
P.info("Nozzle is available. Creating timers");
|
|
404
404
|
const v = Be.createTimer(
|
|
@@ -432,10 +432,10 @@ const Ye = (e) => H({
|
|
|
432
432
|
pause: x,
|
|
433
433
|
resume: b
|
|
434
434
|
};
|
|
435
|
-
},
|
|
435
|
+
}, wt = (e, t) => {
|
|
436
436
|
if (t)
|
|
437
437
|
return g.subscribe(e, t).unsubscribe;
|
|
438
|
-
},
|
|
438
|
+
}, Tt = ({
|
|
439
439
|
onInit: e,
|
|
440
440
|
onBrandSelected: t,
|
|
441
441
|
onBrandCleared: r,
|
|
@@ -454,7 +454,7 @@ const Ye = (e) => H({
|
|
|
454
454
|
onAreYouThereTimeout: v
|
|
455
455
|
}) => {
|
|
456
456
|
const { model: a } = D();
|
|
457
|
-
|
|
457
|
+
Y(() => {
|
|
458
458
|
const R = [
|
|
459
459
|
{
|
|
460
460
|
topic: `/kos/dispense/${a == null ? void 0 : a.path}/brand/selected/`,
|
|
@@ -518,7 +518,7 @@ const Ye = (e) => H({
|
|
|
518
518
|
callback: l
|
|
519
519
|
}
|
|
520
520
|
].map(
|
|
521
|
-
({ topic: w, callback: W }) =>
|
|
521
|
+
({ topic: w, callback: W }) => wt(w, W)
|
|
522
522
|
);
|
|
523
523
|
return () => {
|
|
524
524
|
R.forEach((w) => w == null ? void 0 : w());
|
|
@@ -542,7 +542,7 @@ const Ye = (e) => H({
|
|
|
542
542
|
l
|
|
543
543
|
]);
|
|
544
544
|
}, y = P.createLogger({ name: "useCuiKitTimers" }), Ke = (e) => {
|
|
545
|
-
const { model: t } = D(), [r, n] =
|
|
545
|
+
const { model: t } = D(), [r, n] = S(null), {
|
|
546
546
|
onAreYouThereTimer: s,
|
|
547
547
|
onIdleTimer: i,
|
|
548
548
|
onResetIdleTimer: u,
|
|
@@ -560,7 +560,7 @@ const Ye = (e) => H({
|
|
|
560
560
|
}, [r, u, e.prefix]), x = o(() => {
|
|
561
561
|
y.debug(`TIMER PAUSE/RESET called for ${e.prefix ?? ""}timer`), r && (r.reset(), h.current = !1, u == null || u());
|
|
562
562
|
}, [r, u, e.prefix]);
|
|
563
|
-
return
|
|
563
|
+
return Y(() => {
|
|
564
564
|
if (y.debug(
|
|
565
565
|
`useCuiKitTimers effect triggered - nozzle: ${!!t}, path: ${t == null ? void 0 : t.path}, callbacks: handleIdle=${!!d}, handleAreYouThere=${!!c}`
|
|
566
566
|
), t) {
|
|
@@ -599,7 +599,7 @@ const Ye = (e) => H({
|
|
|
599
599
|
restart: $,
|
|
600
600
|
pause: x
|
|
601
601
|
};
|
|
602
|
-
},
|
|
602
|
+
}, G = P.createLogger({ name: "useDefaultCuiKitLifecycle" }), Yt = ({
|
|
603
603
|
kit: e,
|
|
604
604
|
inactivity: t,
|
|
605
605
|
pour: r,
|
|
@@ -608,60 +608,59 @@ const Ye = (e) => H({
|
|
|
608
608
|
areYouThereRejectionPolicy: i = "pause"
|
|
609
609
|
}) => {
|
|
610
610
|
var ge, we, Te, Pe;
|
|
611
|
-
const [u, l] =
|
|
612
|
-
if (
|
|
613
|
-
const
|
|
614
|
-
g.publish(
|
|
611
|
+
const [u, l] = S(!1), [f, h] = S(!1), { model: c } = D(), [d, $] = S(!1), x = (t == null ? void 0 : t.idleTimeout) ?? 15, b = (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 10, v = (r == null ? void 0 : r.idleTimeout) ?? (t == null ? void 0 : t.idleTimeout) ?? 10, a = (r == null ? void 0 : r.areYouThereTimeoutOffset) ?? (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 5, F = n == null ? void 0 : n.ambientTimeoutOffset, R = n == null ? void 0 : n.attractTimeout, w = o(() => {
|
|
612
|
+
if (G.info("handleIdleTimeout called - navigating home and publishing event"), U(!1), e == null || e.nav.home(), c) {
|
|
613
|
+
const E = `/kos/dispense/${c.path}/idle/timeout/`;
|
|
614
|
+
g.publish(E, {});
|
|
615
615
|
}
|
|
616
616
|
}, [(ge = e == null ? void 0 : e.nav) == null ? void 0 : ge.home, c]), W = o(() => {
|
|
617
|
-
|
|
617
|
+
G.info("handleResetIdleTimer called - resetting idle timer"), U(!1);
|
|
618
618
|
}, []), ae = o(() => {
|
|
619
|
-
if (
|
|
620
|
-
const
|
|
621
|
-
g.publish(
|
|
619
|
+
if (F && (l(!0), h(!1), c)) {
|
|
620
|
+
const E = `/kos/dispense/${c.path}/ambient/start/`;
|
|
621
|
+
g.publish(E, {});
|
|
622
622
|
}
|
|
623
|
-
}, [
|
|
623
|
+
}, [F, c]), oe = o(() => {
|
|
624
624
|
if (R && (h(!0), l(!1), c)) {
|
|
625
|
-
const
|
|
626
|
-
g.publish(
|
|
625
|
+
const E = `/kos/dispense/${c.path}/attract/start/`;
|
|
626
|
+
g.publish(E, {});
|
|
627
627
|
}
|
|
628
628
|
}, [R, c]), ce = o(() => {
|
|
629
629
|
if (R && (h(!1), l(!1), e == null || e.nav.home(), c)) {
|
|
630
|
-
const
|
|
631
|
-
g.publish(
|
|
630
|
+
const E = `/kos/dispense/${c.path}/attract/resume/`;
|
|
631
|
+
g.publish(E, {});
|
|
632
632
|
}
|
|
633
633
|
}, [e == null ? void 0 : e.nav, R, c]), {
|
|
634
634
|
pause: T,
|
|
635
635
|
restart: B,
|
|
636
|
-
resume: ve,
|
|
637
636
|
attractTimer: q
|
|
638
|
-
} =
|
|
639
|
-
defaultAmbientTime:
|
|
637
|
+
} = gt({
|
|
638
|
+
defaultAmbientTime: F,
|
|
640
639
|
defaultAttractTime: R,
|
|
641
640
|
onAmbientTimer: ae,
|
|
642
641
|
onAttractTimer: oe,
|
|
643
642
|
onResumeAttractTimer: ce
|
|
644
643
|
});
|
|
645
644
|
(we = e == null ? void 0 : e.timers) == null || we.add(q);
|
|
646
|
-
const [de,
|
|
647
|
-
|
|
645
|
+
const [de, U] = S(!1);
|
|
646
|
+
G.info(
|
|
648
647
|
"Creating idle timer with timeout:",
|
|
649
648
|
x,
|
|
650
649
|
"seconds and callback:",
|
|
651
650
|
!!w
|
|
652
651
|
);
|
|
653
|
-
const { pause: I, restart:
|
|
652
|
+
const { pause: I, restart: K, idleTimer: M } = Ke({
|
|
654
653
|
defaultAreYouThereTime: b,
|
|
655
654
|
defaultIdleTime: x,
|
|
656
655
|
onIdleTimer: w,
|
|
657
656
|
onResetIdleTimer: W
|
|
658
657
|
});
|
|
659
|
-
|
|
658
|
+
G.info(
|
|
660
659
|
`Creating pour timer with timeout: ${v} seconds and callback: ${!!w}`
|
|
661
660
|
);
|
|
662
661
|
const {
|
|
663
|
-
pause:
|
|
664
|
-
restart:
|
|
662
|
+
pause: k,
|
|
663
|
+
restart: _,
|
|
665
664
|
idleTimer: j
|
|
666
665
|
} = Ke({
|
|
667
666
|
defaultAreYouThereTime: a,
|
|
@@ -669,87 +668,87 @@ const Ye = (e) => H({
|
|
|
669
668
|
onIdleTimer: w,
|
|
670
669
|
prefix: "pour-"
|
|
671
670
|
}), V = o(async () => {
|
|
672
|
-
let
|
|
671
|
+
let E = !0;
|
|
673
672
|
if (s)
|
|
674
673
|
try {
|
|
675
|
-
|
|
676
|
-
} catch (
|
|
677
|
-
|
|
674
|
+
E = await s();
|
|
675
|
+
} catch (pe) {
|
|
676
|
+
G.error(`onBeforeAreYouThereTimer callback failed: ${pe}`), E = !1;
|
|
678
677
|
}
|
|
679
|
-
if (
|
|
678
|
+
if (E) {
|
|
680
679
|
if (c) {
|
|
681
|
-
const
|
|
682
|
-
g.publish(
|
|
680
|
+
const pe = `/kos/dispense/${c.path}/are-you-there/timeout/`;
|
|
681
|
+
g.publish(pe, {});
|
|
683
682
|
}
|
|
684
|
-
|
|
683
|
+
U(!0), d ? k() : I();
|
|
685
684
|
} else
|
|
686
685
|
switch (i) {
|
|
687
686
|
case "pause":
|
|
688
|
-
d ?
|
|
687
|
+
d ? k() : I();
|
|
689
688
|
break;
|
|
690
689
|
case "restart":
|
|
691
|
-
d ?
|
|
690
|
+
d ? _() : K();
|
|
692
691
|
break;
|
|
693
692
|
}
|
|
694
693
|
}, [s, c, i, d]), ue = o(() => {
|
|
695
|
-
|
|
696
|
-
}, [d, I,
|
|
697
|
-
|
|
698
|
-
|
|
694
|
+
U(!1), T(), d ? (_(), I()) : (K(), k());
|
|
695
|
+
}, [d, I, k, K, _]);
|
|
696
|
+
Y(() => {
|
|
697
|
+
M && M.addTimeoutAction({
|
|
699
698
|
name: "are-you-there-timer",
|
|
700
699
|
remainingTime: b,
|
|
701
700
|
action: V
|
|
702
701
|
});
|
|
703
|
-
}, [
|
|
702
|
+
}, [M, b, V]), Y(() => {
|
|
704
703
|
j && j.addTimeoutAction({
|
|
705
704
|
name: "pour-are-you-there-timer",
|
|
706
705
|
remainingTime: a,
|
|
707
706
|
action: V
|
|
708
707
|
});
|
|
709
|
-
}, [j, a, V]), (Te = e == null ? void 0 : e.timers) == null || Te.add(
|
|
708
|
+
}, [j, a, V]), (Te = e == null ? void 0 : e.timers) == null || Te.add(M), (Pe = e == null ? void 0 : e.timers) == null || Pe.add(j);
|
|
710
709
|
const le = o(() => {
|
|
711
|
-
$(!1),
|
|
712
|
-
}, [I,
|
|
713
|
-
$(!0),
|
|
714
|
-
}, [I,
|
|
715
|
-
$(!1),
|
|
716
|
-
}, []),
|
|
717
|
-
T(), h(!1), l(!1),
|
|
718
|
-
}, [T,
|
|
719
|
-
h(!1), l(!1), $(!1),
|
|
720
|
-
}, [B,
|
|
721
|
-
h(!1), l(!1), $(!1), T(),
|
|
722
|
-
}, [T,
|
|
723
|
-
h(!1), l(!1), $(!1), B(), I(),
|
|
724
|
-
}, [B, I,
|
|
710
|
+
$(!1), k(), I(), T();
|
|
711
|
+
}, [I, k]), me = o(() => {
|
|
712
|
+
$(!0), G.info("restarting pour timer"), _(), T(), I();
|
|
713
|
+
}, [I, _]), $e = o(() => {
|
|
714
|
+
$(!1), G.info("restarting pour timer on before pour rejected"), k(), K();
|
|
715
|
+
}, []), ee = o(() => {
|
|
716
|
+
T(), h(!1), l(!1), K();
|
|
717
|
+
}, [T, K]), te = o(() => {
|
|
718
|
+
h(!1), l(!1), $(!1), k(), B();
|
|
719
|
+
}, [B, k]), se = o(() => {
|
|
720
|
+
h(!1), l(!1), $(!1), T(), K();
|
|
721
|
+
}, [T, K]), p = o(() => {
|
|
722
|
+
h(!1), l(!1), $(!1), B(), I(), k();
|
|
723
|
+
}, [B, I, k]), C = o(() => {
|
|
725
724
|
h(!1), l(!1), B(), I();
|
|
726
725
|
}, [B, I]);
|
|
727
|
-
|
|
728
|
-
onBrandSelected:
|
|
729
|
-
onBrandCleared:
|
|
730
|
-
onBeverageSelected:
|
|
731
|
-
onBeverageCleared:
|
|
726
|
+
Tt({
|
|
727
|
+
onBrandSelected: ee,
|
|
728
|
+
onBrandCleared: te,
|
|
729
|
+
onBeverageSelected: se,
|
|
730
|
+
onBeverageCleared: p,
|
|
732
731
|
onPour: le,
|
|
733
|
-
onPourCancel:
|
|
734
|
-
onBeforePourRejected:
|
|
735
|
-
onInit:
|
|
732
|
+
onPourCancel: me,
|
|
733
|
+
onBeforePourRejected: $e,
|
|
734
|
+
onInit: C
|
|
736
735
|
// Note: Timer-related handlers (onIdleTimeout, onAmbientTimer, onAttractTimer,
|
|
737
736
|
// onResumeAttractTimer, onAreYouThereTimeout) are NOT included here since this
|
|
738
737
|
// component's own timer hooks call those handlers directly. Including them would
|
|
739
738
|
// create circular event loops.
|
|
740
739
|
});
|
|
741
|
-
const
|
|
742
|
-
return
|
|
740
|
+
const nt = d ? a : b;
|
|
741
|
+
return Y(() => {
|
|
743
742
|
if (c && q) {
|
|
744
|
-
const
|
|
745
|
-
g.publish(
|
|
743
|
+
const E = `/kos/dispense/${c == null ? void 0 : c.path}/init/`;
|
|
744
|
+
g.publish(E, {});
|
|
746
745
|
}
|
|
747
746
|
}, [c, q]), {
|
|
748
747
|
showAreYouThere: de,
|
|
749
748
|
clearAreYouThere: ue,
|
|
750
749
|
pauseIdleTimer: I,
|
|
751
|
-
restartIdleTimer:
|
|
752
|
-
areYouThereCountdown:
|
|
750
|
+
restartIdleTimer: K,
|
|
751
|
+
areYouThereCountdown: nt,
|
|
753
752
|
showAmbientScreen: u,
|
|
754
753
|
showAttractScreen: f,
|
|
755
754
|
pauseScreenTimer: T,
|
|
@@ -757,24 +756,24 @@ const Ye = (e) => H({
|
|
|
757
756
|
};
|
|
758
757
|
}, Fe = () => {
|
|
759
758
|
const e = ke.type;
|
|
760
|
-
return
|
|
759
|
+
return N({
|
|
761
760
|
modelId: e,
|
|
762
761
|
modelType: ke.type,
|
|
763
762
|
options: {}
|
|
764
763
|
});
|
|
765
764
|
};
|
|
766
|
-
function
|
|
765
|
+
function _t(e) {
|
|
767
766
|
return (t) => {
|
|
768
767
|
const { model: r, status: n, KosModelLoader: s } = Fe();
|
|
769
768
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, deviceAssembly: r }) });
|
|
770
769
|
};
|
|
771
770
|
}
|
|
772
|
-
const Ue = (e) =>
|
|
771
|
+
const Ue = (e) => N({
|
|
773
772
|
modelId: e,
|
|
774
|
-
modelType:
|
|
773
|
+
modelType: dt.type,
|
|
775
774
|
options: {}
|
|
776
775
|
});
|
|
777
|
-
function
|
|
776
|
+
function Gt(e, t) {
|
|
778
777
|
return (r) => {
|
|
779
778
|
const { model: n, status: s, KosModelLoader: i } = Ue(e);
|
|
780
779
|
return /* @__PURE__ */ m(i, { ...s, children: /* @__PURE__ */ m(t, { ...r, holder: n }) });
|
|
@@ -782,13 +781,13 @@ function Ft(e, t) {
|
|
|
782
781
|
}
|
|
783
782
|
const je = () => {
|
|
784
783
|
const e = Ee.type;
|
|
785
|
-
return
|
|
784
|
+
return N({
|
|
786
785
|
modelId: e,
|
|
787
786
|
modelType: Ee.type,
|
|
788
787
|
options: {}
|
|
789
788
|
});
|
|
790
789
|
};
|
|
791
|
-
function
|
|
790
|
+
function Ft(e) {
|
|
792
791
|
return (t) => {
|
|
793
792
|
const { model: r, status: n, KosModelLoader: s } = je();
|
|
794
793
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, holderContainer: r }) });
|
|
@@ -796,49 +795,49 @@ function Ut(e) {
|
|
|
796
795
|
}
|
|
797
796
|
const Ve = () => {
|
|
798
797
|
const e = Se.type;
|
|
799
|
-
return
|
|
798
|
+
return N({
|
|
800
799
|
modelId: e,
|
|
801
800
|
modelType: Se.type,
|
|
802
801
|
options: {}
|
|
803
802
|
});
|
|
804
|
-
},
|
|
803
|
+
}, he = P.createLogger({
|
|
805
804
|
name: "HoldToPourIntentStrategy",
|
|
806
805
|
group: "kos-hooks"
|
|
807
|
-
}),
|
|
806
|
+
}), Pt = {
|
|
808
807
|
name: "HoldToPourIntentStrategy",
|
|
809
808
|
async initiate(e, t) {
|
|
810
809
|
if (!(e != null && e.canPour)) {
|
|
811
|
-
|
|
810
|
+
he.debug(`${e == null ? void 0 : e.id} cannot pour. Returning early.`);
|
|
812
811
|
return;
|
|
813
812
|
}
|
|
814
|
-
t ? (
|
|
813
|
+
t ? (he.debug(`performing intent: ${t}`), await (e == null ? void 0 : e.performIntent(t))) : he.debug("no intent provided. Returning early.");
|
|
815
814
|
},
|
|
816
815
|
async initiateEnded(e) {
|
|
817
816
|
await (e == null ? void 0 : e.cancelPour());
|
|
818
817
|
}
|
|
819
|
-
},
|
|
818
|
+
}, fe = P.createLogger({
|
|
820
819
|
name: "useNozzlePour",
|
|
821
820
|
group: "kos-hooks"
|
|
822
|
-
}),
|
|
821
|
+
}), Ut = ({
|
|
823
822
|
onPour: e,
|
|
824
823
|
onPourCancel: t,
|
|
825
824
|
intentContainer: r,
|
|
826
|
-
strategy: n =
|
|
825
|
+
strategy: n = Pt
|
|
827
826
|
}) => {
|
|
828
827
|
const s = o(() => {
|
|
829
|
-
|
|
828
|
+
fe.debug(
|
|
830
829
|
`[${n == null ? void 0 : n.name}] - Pour initiated for model ${r == null ? void 0 : r.id}.`
|
|
831
830
|
), n == null || n.initiate(r), e == null || e();
|
|
832
831
|
}, [e, r, n]), i = o(() => {
|
|
833
832
|
var f;
|
|
834
|
-
|
|
833
|
+
fe.debug(
|
|
835
834
|
`[${n == null ? void 0 : n.name}] - Pour initiate ended called for nozzle ${r == null ? void 0 : r.id}.`
|
|
836
835
|
), (f = n == null ? void 0 : n.initiateEnded) == null || f.call(n, r), t == null || t();
|
|
837
836
|
}, [t, r, n]), u = o(() => {
|
|
838
|
-
|
|
837
|
+
fe.debug(`Force cancelling pour for nozzle ${r == null ? void 0 : r.id}.`), r == null || r.cancelPour(), t == null || t();
|
|
839
838
|
}, [t, r]);
|
|
840
839
|
return {
|
|
841
|
-
handlers:
|
|
840
|
+
handlers: ve({
|
|
842
841
|
onPressed: s,
|
|
843
842
|
onRelease: i
|
|
844
843
|
}).dom,
|
|
@@ -846,7 +845,7 @@ const Ve = () => {
|
|
|
846
845
|
status: r
|
|
847
846
|
};
|
|
848
847
|
};
|
|
849
|
-
function
|
|
848
|
+
function jt(e) {
|
|
850
849
|
return (t) => {
|
|
851
850
|
const { model: r, status: n, KosModelLoader: s } = Ve();
|
|
852
851
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, ingredient: r }) });
|
|
@@ -854,19 +853,19 @@ function Vt(e) {
|
|
|
854
853
|
}
|
|
855
854
|
const We = () => {
|
|
856
855
|
const e = Ne.type;
|
|
857
|
-
return
|
|
856
|
+
return N({
|
|
858
857
|
modelId: e,
|
|
859
858
|
modelType: Ne.type,
|
|
860
859
|
options: {}
|
|
861
860
|
});
|
|
862
861
|
};
|
|
863
|
-
function
|
|
862
|
+
function Vt(e) {
|
|
864
863
|
return (t) => {
|
|
865
864
|
const { model: r, status: n, KosModelLoader: s } = We();
|
|
866
865
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, ingredientContainer: r }) });
|
|
867
866
|
};
|
|
868
867
|
}
|
|
869
|
-
function
|
|
868
|
+
function Wt(e, t) {
|
|
870
869
|
return (r) => {
|
|
871
870
|
const { model: n, status: s, KosModelLoader: i } = Ye(e);
|
|
872
871
|
return /* @__PURE__ */ m(i, { ...s, children: /* @__PURE__ */ m(t, { ...r, nozzle: n }) });
|
|
@@ -875,7 +874,7 @@ function qt(e, t) {
|
|
|
875
874
|
const Z = P.createLogger({
|
|
876
875
|
name: "usePour",
|
|
877
876
|
group: "kos-hooks"
|
|
878
|
-
}),
|
|
877
|
+
}), qt = ({
|
|
879
878
|
onBeforePour: e,
|
|
880
879
|
onPour: t,
|
|
881
880
|
onPourCancel: r,
|
|
@@ -900,7 +899,7 @@ const Z = P.createLogger({
|
|
|
900
899
|
Z.debug(`Force cancelling pour for pour target ${s == null ? void 0 : s.id}.`), await (s == null ? void 0 : s.cancelPour()), r == null || r();
|
|
901
900
|
}, [r, s]);
|
|
902
901
|
return {
|
|
903
|
-
handlers:
|
|
902
|
+
handlers: ve({
|
|
904
903
|
onPressed: u,
|
|
905
904
|
onRelease: l
|
|
906
905
|
}).dom,
|
|
@@ -911,7 +910,7 @@ const Z = P.createLogger({
|
|
|
911
910
|
name: "TapOrHoldIntentStrategy",
|
|
912
911
|
group: "kos-hooks"
|
|
913
912
|
});
|
|
914
|
-
class
|
|
913
|
+
class Jt {
|
|
915
914
|
constructor(t) {
|
|
916
915
|
J(this, "intent");
|
|
917
916
|
J(this, "name", "TapOrHoldIntentStrategy");
|
|
@@ -939,7 +938,7 @@ class Qt {
|
|
|
939
938
|
const ie = P.createLogger({
|
|
940
939
|
name: "TapToPourIntentStrategy",
|
|
941
940
|
group: "kos-hooks"
|
|
942
|
-
}),
|
|
941
|
+
}), Qt = {
|
|
943
942
|
name: "TapToPourIntentStrategy",
|
|
944
943
|
async initiate(e, t) {
|
|
945
944
|
if (e != null && e.isPouring) {
|
|
@@ -958,7 +957,7 @@ const ie = P.createLogger({
|
|
|
958
957
|
}, Le = P.createLogger({
|
|
959
958
|
name: "HoldToPourStrategy",
|
|
960
959
|
group: "kos-hooks"
|
|
961
|
-
}),
|
|
960
|
+
}), Xt = {
|
|
962
961
|
name: "TapToPourStrategy",
|
|
963
962
|
async initiate(e) {
|
|
964
963
|
if (e != null && e.isPouring) {
|
|
@@ -974,17 +973,17 @@ const ie = P.createLogger({
|
|
|
974
973
|
async initiateEnded(e) {
|
|
975
974
|
return !0;
|
|
976
975
|
}
|
|
977
|
-
},
|
|
976
|
+
}, It = (e, t, r) => N({
|
|
978
977
|
modelId: e,
|
|
979
|
-
modelType:
|
|
978
|
+
modelType: ut.type,
|
|
980
979
|
options: {
|
|
981
980
|
servicePathFactory: t,
|
|
982
981
|
selectedId: r
|
|
983
982
|
}
|
|
984
983
|
});
|
|
985
|
-
function
|
|
984
|
+
function Zt(e) {
|
|
986
985
|
return (t) => {
|
|
987
|
-
const { model: r, status: n, KosModelLoader: s } =
|
|
986
|
+
const { model: r, status: n, KosModelLoader: s } = It(
|
|
988
987
|
t.id,
|
|
989
988
|
t.servicePathFactory,
|
|
990
989
|
t.itemId
|
|
@@ -992,11 +991,11 @@ function zt(e) {
|
|
|
992
991
|
return /* @__PURE__ */ m(s, { ...n, children: /* @__PURE__ */ m(e, { ...t, genericPour: r }) });
|
|
993
992
|
};
|
|
994
993
|
}
|
|
995
|
-
const qe = L(void 0),
|
|
994
|
+
const qe = L(void 0), zt = ({ children: e }) => {
|
|
996
995
|
const { model: t, ready: r } = ye(), n = A(() => r && t ? { model: t } : {}, [r, t]);
|
|
997
996
|
return /* @__PURE__ */ m(qe.Provider, { value: n, children: e });
|
|
998
|
-
},
|
|
999
|
-
const e =
|
|
997
|
+
}, es = () => {
|
|
998
|
+
const e = H(
|
|
1000
999
|
qe
|
|
1001
1000
|
);
|
|
1002
1001
|
if (!e)
|
|
@@ -1004,29 +1003,29 @@ const qe = L(void 0), es = ({ children: e }) => {
|
|
|
1004
1003
|
"useAssemblyContext must be used within a AssemblyProvider"
|
|
1005
1004
|
);
|
|
1006
1005
|
return e;
|
|
1007
|
-
}, Je = L(void 0),
|
|
1006
|
+
}, Je = L(void 0), ts = ({ children: e }) => {
|
|
1008
1007
|
const { model: t, ready: r } = De(), n = A(() => r && t ? { model: t } : {}, [r, t]);
|
|
1009
1008
|
return /* @__PURE__ */ m(Je.Provider, { value: n, children: e });
|
|
1010
|
-
},
|
|
1011
|
-
const e =
|
|
1009
|
+
}, ss = () => {
|
|
1010
|
+
const e = H(Je);
|
|
1012
1011
|
if (!e)
|
|
1013
1012
|
throw new Error(
|
|
1014
1013
|
"useAvailabilityContext must be used within a AvailabilityProvider"
|
|
1015
1014
|
);
|
|
1016
1015
|
return e;
|
|
1017
|
-
}, Qe = L(void 0),
|
|
1016
|
+
}, Qe = L(void 0), rs = ({ children: e, id: t }) => {
|
|
1018
1017
|
const { model: r, ready: n } = Me(t), s = A(() => n && r ? { model: r } : {}, [n, r]);
|
|
1019
1018
|
return /* @__PURE__ */ m(Qe.Provider, { value: s, children: e });
|
|
1020
|
-
},
|
|
1021
|
-
const e =
|
|
1019
|
+
}, ns = () => {
|
|
1020
|
+
const e = H(Qe);
|
|
1022
1021
|
if (!e)
|
|
1023
1022
|
throw new Error("useBoardContext must be used within a BoardProvider");
|
|
1024
1023
|
return e;
|
|
1025
|
-
}, Xe = L(void 0),
|
|
1024
|
+
}, Xe = L(void 0), is = ({ children: e }) => {
|
|
1026
1025
|
const { model: t, ready: r } = Oe(), n = A(() => r && t ? { model: t } : {}, [r, t]);
|
|
1027
1026
|
return /* @__PURE__ */ m(Xe.Provider, { value: n, children: e });
|
|
1028
|
-
},
|
|
1029
|
-
const e =
|
|
1027
|
+
}, as = () => {
|
|
1028
|
+
const e = H(Xe);
|
|
1030
1029
|
if (!e)
|
|
1031
1030
|
throw new Error(
|
|
1032
1031
|
"useBoardContainerContext must be used within a BoardContainerProvider"
|
|
@@ -1034,7 +1033,7 @@ const qe = L(void 0), es = ({ children: e }) => {
|
|
|
1034
1033
|
return e;
|
|
1035
1034
|
}, Ze = L(
|
|
1036
1035
|
void 0
|
|
1037
|
-
),
|
|
1036
|
+
), At = ({ children: e }) => {
|
|
1038
1037
|
const { model: t, ready: r } = Fe(), n = A(() => {
|
|
1039
1038
|
if (r && t) {
|
|
1040
1039
|
const i = t.nozzlePaths;
|
|
@@ -1043,40 +1042,40 @@ const qe = L(void 0), es = ({ children: e }) => {
|
|
|
1043
1042
|
return {};
|
|
1044
1043
|
}, [r, t]), s = r && t ? e : null;
|
|
1045
1044
|
return /* @__PURE__ */ m(Ze.Provider, { value: n, children: s });
|
|
1046
|
-
},
|
|
1047
|
-
const e =
|
|
1045
|
+
}, xt = () => {
|
|
1046
|
+
const e = H(Ze);
|
|
1048
1047
|
if (!e)
|
|
1049
1048
|
throw new Error(
|
|
1050
1049
|
"useDeviceAssemblyContext must be used within a DeviceAssemblyProvider"
|
|
1051
1050
|
);
|
|
1052
1051
|
return e;
|
|
1053
1052
|
};
|
|
1054
|
-
function
|
|
1055
|
-
const e =
|
|
1053
|
+
function kt() {
|
|
1054
|
+
const e = lt.createContext(null);
|
|
1056
1055
|
return [() => {
|
|
1057
|
-
const r =
|
|
1056
|
+
const r = H(e);
|
|
1058
1057
|
if (r === void 0)
|
|
1059
1058
|
throw new Error("useDispenseKitContext must be used within a Provider");
|
|
1060
1059
|
return r;
|
|
1061
1060
|
}, e.Provider];
|
|
1062
1061
|
}
|
|
1063
|
-
function
|
|
1062
|
+
function Et({
|
|
1064
1063
|
children: e,
|
|
1065
1064
|
provider: t,
|
|
1066
1065
|
props: r,
|
|
1067
1066
|
nozzleProps: n
|
|
1068
1067
|
}) {
|
|
1069
|
-
const s =
|
|
1068
|
+
const s = $t(r);
|
|
1070
1069
|
return /* @__PURE__ */ m(t, { value: s, children: e(n || {}) });
|
|
1071
1070
|
}
|
|
1072
|
-
function
|
|
1071
|
+
function St({
|
|
1073
1072
|
children: e,
|
|
1074
1073
|
provider: t,
|
|
1075
1074
|
props: r
|
|
1076
1075
|
}) {
|
|
1077
|
-
const { nozzlePaths: n } =
|
|
1078
|
-
return (n == null ? void 0 : n.map((u, l) => /* @__PURE__ */ m(
|
|
1079
|
-
|
|
1076
|
+
const { nozzlePaths: n } = xt(), s = (n == null ? void 0 : n.length) || 0;
|
|
1077
|
+
return (n == null ? void 0 : n.map((u, l) => /* @__PURE__ */ m(mt, { path: u, children: /* @__PURE__ */ m(
|
|
1078
|
+
Et,
|
|
1080
1079
|
{
|
|
1081
1080
|
provider: t,
|
|
1082
1081
|
props: r,
|
|
@@ -1091,12 +1090,12 @@ function Nt({
|
|
|
1091
1090
|
}
|
|
1092
1091
|
) }, u))) || [];
|
|
1093
1092
|
}
|
|
1094
|
-
function
|
|
1093
|
+
function Nt({
|
|
1095
1094
|
provider: e,
|
|
1096
1095
|
props: t
|
|
1097
1096
|
}) {
|
|
1098
|
-
return ({ children: r }) => e ? /* @__PURE__ */ m(
|
|
1099
|
-
|
|
1097
|
+
return ({ children: r }) => e ? /* @__PURE__ */ m(At, { children: /* @__PURE__ */ m(
|
|
1098
|
+
St,
|
|
1100
1099
|
{
|
|
1101
1100
|
provider: e,
|
|
1102
1101
|
props: t,
|
|
@@ -1104,38 +1103,38 @@ function Ht({
|
|
|
1104
1103
|
}
|
|
1105
1104
|
) }) : null;
|
|
1106
1105
|
}
|
|
1107
|
-
function
|
|
1108
|
-
const [t, r] =
|
|
1106
|
+
function os(e) {
|
|
1107
|
+
const [t, r] = kt();
|
|
1109
1108
|
return [
|
|
1110
1109
|
t,
|
|
1111
|
-
|
|
1110
|
+
Nt({ provider: r, props: e })
|
|
1112
1111
|
];
|
|
1113
1112
|
}
|
|
1114
|
-
const ze = L(void 0),
|
|
1113
|
+
const ze = L(void 0), cs = ({ children: e, id: t }) => {
|
|
1115
1114
|
const { model: r, ready: n } = Ue(t || ""), s = A(() => n && r ? { model: r } : {}, [n, r]);
|
|
1116
1115
|
return /* @__PURE__ */ m(ze.Provider, { value: s, children: e });
|
|
1117
|
-
},
|
|
1118
|
-
const e =
|
|
1116
|
+
}, ds = () => {
|
|
1117
|
+
const e = H(ze);
|
|
1119
1118
|
if (!e)
|
|
1120
1119
|
throw new Error("useHolderContext must be used within a HolderProvider");
|
|
1121
1120
|
return e;
|
|
1122
1121
|
}, et = L(
|
|
1123
1122
|
void 0
|
|
1124
|
-
),
|
|
1123
|
+
), us = ({ children: e }) => {
|
|
1125
1124
|
const { model: t, ready: r } = je(), n = A(() => r && t ? { model: t } : {}, [r, t]);
|
|
1126
1125
|
return /* @__PURE__ */ m(et.Provider, { value: n, children: e });
|
|
1127
|
-
},
|
|
1128
|
-
const e =
|
|
1126
|
+
}, ls = () => {
|
|
1127
|
+
const e = H(et);
|
|
1129
1128
|
if (!e)
|
|
1130
1129
|
throw new Error(
|
|
1131
1130
|
"useHolderContainerContext must be used within a HolderContainerProvider"
|
|
1132
1131
|
);
|
|
1133
1132
|
return e;
|
|
1134
|
-
}, tt = L(void 0),
|
|
1133
|
+
}, tt = L(void 0), ms = ({ children: e }) => {
|
|
1135
1134
|
const { model: t, ready: r } = Ve(), n = A(() => r && t ? { model: t } : {}, [r, t]);
|
|
1136
1135
|
return /* @__PURE__ */ m(tt.Provider, { value: n, children: e });
|
|
1137
|
-
},
|
|
1138
|
-
const e =
|
|
1136
|
+
}, ps = () => {
|
|
1137
|
+
const e = H(tt);
|
|
1139
1138
|
if (!e)
|
|
1140
1139
|
throw new Error(
|
|
1141
1140
|
"useIngredientContext must be used within a IngredientProvider"
|
|
@@ -1143,97 +1142,97 @@ const ze = L(void 0), ds = ({ children: e, id: t }) => {
|
|
|
1143
1142
|
return e;
|
|
1144
1143
|
}, st = L(
|
|
1145
1144
|
void 0
|
|
1146
|
-
),
|
|
1145
|
+
), hs = ({ children: e }) => {
|
|
1147
1146
|
const { model: t, ready: r } = We(), n = A(() => r && t ? { model: t } : {}, [r, t]);
|
|
1148
1147
|
return /* @__PURE__ */ m(st.Provider, { value: n, children: e });
|
|
1149
|
-
},
|
|
1150
|
-
const e =
|
|
1148
|
+
}, fs = () => {
|
|
1149
|
+
const e = H(st);
|
|
1151
1150
|
if (!e)
|
|
1152
1151
|
throw new Error(
|
|
1153
1152
|
"useIngredientContainerContext must be used within a IngredientContainerProvider"
|
|
1154
1153
|
);
|
|
1155
1154
|
return e;
|
|
1156
|
-
},
|
|
1155
|
+
}, Ht = () => {
|
|
1157
1156
|
const e = He.type;
|
|
1158
|
-
return
|
|
1157
|
+
return N({
|
|
1159
1158
|
modelId: e,
|
|
1160
1159
|
modelType: He.type,
|
|
1161
1160
|
options: {}
|
|
1162
1161
|
});
|
|
1163
|
-
}, rt = L(void 0),
|
|
1164
|
-
const { model: t, ready: r } =
|
|
1162
|
+
}, rt = L(void 0), bs = ({ children: e }) => {
|
|
1163
|
+
const { model: t, ready: r } = Ht(), n = A(() => r && t ? { model: t } : {}, [r, t]);
|
|
1165
1164
|
return /* @__PURE__ */ m(rt.Provider, { value: n, children: e });
|
|
1166
|
-
},
|
|
1167
|
-
const e =
|
|
1165
|
+
}, vs = () => {
|
|
1166
|
+
const e = H(rt);
|
|
1168
1167
|
if (!e)
|
|
1169
1168
|
throw new Error("usePumpContext must be used within a PumpProvider");
|
|
1170
1169
|
return e;
|
|
1171
1170
|
};
|
|
1172
1171
|
export {
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1172
|
+
Vt as $,
|
|
1173
|
+
zt as A,
|
|
1174
|
+
rs as B,
|
|
1175
|
+
Et as C,
|
|
1176
|
+
At as D,
|
|
1177
|
+
ht as E,
|
|
1179
1178
|
Q as F,
|
|
1180
1179
|
ne as G,
|
|
1181
|
-
|
|
1182
|
-
|
|
1180
|
+
cs as H,
|
|
1181
|
+
ms as I,
|
|
1183
1182
|
X as J,
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1183
|
+
$t as K,
|
|
1184
|
+
Yt as L,
|
|
1185
|
+
Tt as M,
|
|
1186
|
+
mt as N,
|
|
1188
1187
|
Ke as O,
|
|
1189
|
-
|
|
1190
|
-
|
|
1188
|
+
bs as P,
|
|
1189
|
+
vt as Q,
|
|
1191
1190
|
Fe as R,
|
|
1192
|
-
|
|
1191
|
+
_t as S,
|
|
1193
1192
|
Ue as T,
|
|
1194
|
-
|
|
1193
|
+
Gt as U,
|
|
1195
1194
|
je as V,
|
|
1196
|
-
|
|
1195
|
+
Ft as W,
|
|
1197
1196
|
Ve as X,
|
|
1198
|
-
|
|
1199
|
-
|
|
1197
|
+
Ut as Y,
|
|
1198
|
+
jt as Z,
|
|
1200
1199
|
We as _,
|
|
1201
|
-
|
|
1200
|
+
ts as a,
|
|
1202
1201
|
Ye as a0,
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1202
|
+
Wt as a1,
|
|
1203
|
+
bt as a2,
|
|
1204
|
+
qt as a3,
|
|
1205
|
+
Pt as a4,
|
|
1207
1206
|
Ge as a5,
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1207
|
+
Jt as a6,
|
|
1208
|
+
Qt as a7,
|
|
1209
|
+
Xt as a8,
|
|
1210
|
+
It as a9,
|
|
1211
|
+
Zt as aa,
|
|
1212
|
+
ss as b,
|
|
1213
|
+
ns as c,
|
|
1214
|
+
is as d,
|
|
1215
|
+
as as e,
|
|
1216
|
+
Nt as f,
|
|
1217
|
+
xt as g,
|
|
1218
|
+
ds as h,
|
|
1219
|
+
os as i,
|
|
1220
|
+
us as j,
|
|
1221
|
+
ls as k,
|
|
1222
|
+
ps as l,
|
|
1223
|
+
hs as m,
|
|
1224
|
+
fs as n,
|
|
1226
1225
|
D as o,
|
|
1227
|
-
|
|
1226
|
+
vs as p,
|
|
1228
1227
|
ye as q,
|
|
1229
1228
|
De as r,
|
|
1230
|
-
|
|
1229
|
+
Dt as s,
|
|
1231
1230
|
Me as t,
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1231
|
+
es as u,
|
|
1232
|
+
Mt as v,
|
|
1233
|
+
yt as w,
|
|
1235
1234
|
Oe as x,
|
|
1236
|
-
|
|
1237
|
-
|
|
1235
|
+
Ot as y,
|
|
1236
|
+
pt as z
|
|
1238
1237
|
};
|
|
1239
|
-
//# sourceMappingURL=pump-provider
|
|
1238
|
+
//# sourceMappingURL=pump-provider-BO5BamvM.js.map
|