@kosdev-code/kos-dispense-sdk 2.0.19 → 2.0.20

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.
@@ -1,74 +1,74 @@
1
1
  var Ve = Object.defineProperty;
2
2
  var je = (e, t, s) => t in e ? Ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[t] = s;
3
- var M = (e, t, s) => (je(e, typeof t != "symbol" ? t + "" : t, s), s);
3
+ var C = (e, t, s) => (je(e, typeof t != "symbol" ? t + "" : t, s), s);
4
4
  import { jsx as u } from "@emotion/react/jsx-runtime";
5
- import { useKosModel as T, getKosCompanionModel as re, kosAutoEffect as We, KosLog as w, usePressGesture as ne, EventBus as H, TimerManager as be } from "@kosdev-code/kos-ui-sdk";
6
- import qe, { createContext as k, useMemo as P, useContext as A, useState as g, useCallback as a, useEffect as F } from "react";
7
- import { A as ie, a as ae, d as Je, c as ce, N as Qe, e as de, H as Xe, f as ue, I as le, g as me, G as Ze, P as fe } from "./dispense-registration-manager-BX9C7jzd.js";
8
- const ve = () => {
9
- const e = ie.type;
10
- return T({
5
+ import { useKosModel as A, getKosCompanionModel as ie, kosAutoEffect as We, KosLog as w, usePressGesture as ae, EventBus as H, TimerManager as $e } from "@kosdev-code/kos-ui-sdk";
6
+ import qe, { createContext as k, useMemo as $, useContext as x, useState as T, useCallback as a, useEffect as F } from "react";
7
+ import { A as de, a as ue, d as Je, c as le, N as Qe, e as me, H as Xe, f as fe, I as he, g as pe, G as Ze, P as be } from "./dispense-registration-manager-BX9C7jzd.js";
8
+ const Pe = () => {
9
+ const e = de.type;
10
+ return A({
11
11
  modelId: e,
12
- modelType: ie.type,
12
+ modelType: de.type,
13
13
  options: {}
14
14
  });
15
15
  };
16
16
  function At(e) {
17
17
  return (t) => {
18
- const { model: s, status: r, KosModelLoader: n } = ve();
18
+ const { model: s, status: r, KosModelLoader: n } = Pe();
19
19
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, assembly: s }) });
20
20
  };
21
21
  }
22
- const we = () => {
23
- const e = ae.type;
24
- return T({
22
+ const Ie = () => {
23
+ const e = ue.type;
24
+ return A({
25
25
  modelId: e,
26
- modelType: ae.type,
26
+ modelType: ue.type,
27
27
  options: {}
28
28
  });
29
29
  };
30
30
  function xt(e) {
31
31
  return (t) => {
32
- const { model: s, status: r, KosModelLoader: n } = we();
32
+ const { model: s, status: r, KosModelLoader: n } = Ie();
33
33
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, beverage: s }) });
34
34
  };
35
35
  }
36
- const Pe = (e) => T({
36
+ const Te = (e) => A({
37
37
  modelId: e,
38
38
  modelType: Je.type,
39
39
  options: {}
40
40
  });
41
41
  function gt(e) {
42
42
  return (t) => (s) => {
43
- const { model: r, status: n, KosModelLoader: o } = Pe(t);
43
+ const { model: r, status: n, KosModelLoader: o } = Te(t);
44
44
  return /* @__PURE__ */ u(o, { ...n, children: /* @__PURE__ */ u(e, { ...s, board: r }) });
45
45
  };
46
46
  }
47
- const $e = () => {
48
- const e = ce.type;
49
- return T({
47
+ const Ae = () => {
48
+ const e = le.type;
49
+ return A({
50
50
  modelId: e,
51
- modelType: ce.type,
51
+ modelType: le.type,
52
52
  options: {}
53
53
  });
54
54
  };
55
55
  function kt(e) {
56
56
  return (t) => {
57
- const { model: s, status: r, KosModelLoader: n } = $e();
57
+ const { model: s, status: r, KosModelLoader: n } = Ae();
58
58
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, boardContainer: s }) });
59
59
  };
60
60
  }
61
- const Ie = (e) => T({
61
+ const xe = (e) => A({
62
62
  modelId: e,
63
63
  modelType: Qe.type,
64
64
  options: {
65
65
  path: e
66
66
  }
67
- }), Te = k(void 0), ze = ({ children: e, path: t }) => {
68
- const { model: s, ready: r } = Ie(t), n = P(() => r && s ? { model: s } : {}, [r, s]);
69
- return /* @__PURE__ */ u(Te.Provider, { value: n, children: e });
70
- }, B = () => {
71
- const e = A(Te);
67
+ }), ge = k(void 0), ze = ({ children: e, path: t }) => {
68
+ const { model: s, ready: r } = xe(t), n = $(() => r && s ? { model: s } : {}, [r, s]);
69
+ return /* @__PURE__ */ u(ge.Provider, { value: n, children: e });
70
+ }, K = () => {
71
+ const e = x(ge);
72
72
  if (!e)
73
73
  throw new Error("useNozzleContext must be used within a NozzleProvider");
74
74
  return e;
@@ -77,9 +77,9 @@ const Ie = (e) => T({
77
77
  onClearBeverage: t,
78
78
  companionType: s
79
79
  }) => {
80
- const { model: r } = B(), [n, o] = g([]), [c, l] = g(null), f = P(() => s ? n.map(
81
- (m) => re(m, s)
82
- ) : [], [n, s]), h = a(
80
+ const { model: r } = K(), [n, o] = T([]), [c, l] = T(null), h = $(() => s ? n.map(
81
+ (m) => ie(m, s)
82
+ ) : [], [n, s]), f = a(
83
83
  async (m) => {
84
84
  l(m), await (r == null ? void 0 : r.setSelectedPourable({ beverage: m })), e == null || e(m);
85
85
  },
@@ -93,11 +93,11 @@ const Ie = (e) => T({
93
93
  return;
94
94
  const i = r.selectedBrand;
95
95
  if (!i) {
96
- const $ = r.getGroupAvailabilityItems("beverages").filter((p) => p.visible);
97
- o($ ?? []);
96
+ const P = r.getGroupAvailabilityItems("beverages").filter((p) => p.visible);
97
+ o(P ?? []);
98
98
  return;
99
99
  }
100
- const b = r.getAvailabilityByParent(i.id).filter(($) => $.visible);
100
+ const b = r.getAvailabilityByParent(i.id).filter((P) => P.visible);
101
101
  o(b ?? []);
102
102
  });
103
103
  return () => {
@@ -105,8 +105,8 @@ const Ie = (e) => T({
105
105
  };
106
106
  }, [r]), {
107
107
  beverages: n,
108
- beverageCompanions: f,
109
- selectBeverage: h,
108
+ beverageCompanions: h,
109
+ selectBeverage: f,
110
110
  selectedBeverage: c,
111
111
  clearBeverage: d
112
112
  };
@@ -115,28 +115,28 @@ const Ie = (e) => T({
115
115
  onBrandCleared: t,
116
116
  companionType: s
117
117
  }) => {
118
- const { model: r } = B(), [n, o] = g(null), c = P(
118
+ const { model: r } = K(), [n, o] = T(null), c = $(
119
119
  () => (r == null ? void 0 : r.getGroupAvailabilityItems("brands").filter((d) => d.visible)) ?? [],
120
120
  [r]
121
- ), l = P(() => s ? c.map((d) => re(d, s)) : [], [c, s]), f = a(
121
+ ), l = $(() => s ? c.map((d) => ie(d, s)) : [], [c, s]), h = a(
122
122
  async (d) => {
123
123
  o(d), r == null || r.setSelectedBrand(d), e == null || e(d);
124
124
  },
125
125
  [r, e]
126
- ), h = a(() => {
126
+ ), f = a(() => {
127
127
  o(null), r == null || r.setSelectedBrand(void 0), t == null || t();
128
128
  }, [r, t]);
129
129
  return {
130
130
  brands: c,
131
131
  brandCompanions: l,
132
132
  selectedBrand: n,
133
- selectBrand: f,
134
- clearBrand: h
133
+ selectBrand: h,
134
+ clearBrand: f
135
135
  };
136
136
  }, st = w.createLogger({
137
137
  name: "HoldToPourStrategy",
138
138
  group: "kos-hooks"
139
- }), Ae = {
139
+ }), ke = {
140
140
  name: "HoldToPourStrategy",
141
141
  async initiate(e) {
142
142
  if (!(e != null && e.canPour)) {
@@ -148,45 +148,48 @@ const Ie = (e) => T({
148
148
  async initiateEnded(e) {
149
149
  await (e == null ? void 0 : e.cancelPour());
150
150
  }
151
- }, ee = w.createLogger({
151
+ }, Q = w.createLogger({
152
152
  name: "useNozzlePour",
153
153
  group: "kos-hooks"
154
154
  }), rt = ({
155
155
  onPour: e,
156
156
  onPourCancel: t,
157
- strategy: s = Ae
157
+ onBeforePour: s,
158
+ strategy: r = ke
158
159
  }) => {
159
- const { model: r } = B(), n = a(() => {
160
- ee.debug(
161
- `[${s == null ? void 0 : s.name}] - Pour initiated for nozzle ${r == null ? void 0 : r.id}.`
162
- ), s == null || s.initiate(r), e == null || e();
163
- }, [e, r, s]), o = a(() => {
160
+ const { model: n } = K(), o = a(async () => {
161
+ (s ? await (s == null ? void 0 : s()) : !0) ? (Q.debug(
162
+ `[${r == null ? void 0 : r.name}] - Pour initiated for nozzle ${n == null ? void 0 : n.id}.`
163
+ ), r == null || r.initiate(n), e == null || e()) : (Q.debug(
164
+ `[${r == null ? void 0 : r.name}] - Pour cancelled for nozzle ${n == null ? void 0 : n.id}.`
165
+ ), t == null || t());
166
+ }, [e, n, r, s, t]), c = a(() => {
164
167
  var f;
165
- ee.debug(
166
- `[${s == null ? void 0 : s.name}] - Pour initiate ended called for nozzle ${r == null ? void 0 : r.id}.`
167
- ), (f = s == null ? void 0 : s.initiateEnded) == null || f.call(s, r), t == null || t();
168
- }, [t, r, s]), c = a(() => {
169
- ee.debug(`Force cancelling pour for nozzle ${r == null ? void 0 : r.id}.`), r == null || r.cancelPour(), t == null || t();
170
- }, [t, r]);
168
+ Q.debug(
169
+ `[${r == null ? void 0 : r.name}] - Pour initiate ended called for nozzle ${n == null ? void 0 : n.id}.`
170
+ ), (f = r == null ? void 0 : r.initiateEnded) == null || f.call(r, n), t == null || t();
171
+ }, [t, n, r]), l = a(() => {
172
+ Q.debug(`Force cancelling pour for nozzle ${n == null ? void 0 : n.id}.`), n == null || n.cancelPour(), t == null || t();
173
+ }, [t, n]);
171
174
  return {
172
- handlers: ne({
173
- onPressed: n,
174
- onRelease: o
175
+ handlers: ae({
176
+ onPressed: o,
177
+ onRelease: c
175
178
  }).dom,
176
- cancel: c,
177
- status: r
179
+ cancel: l,
180
+ status: n
178
181
  };
179
182
  }, nt = ({
180
183
  onFlavorSelected: e,
181
184
  onFlavorCleared: t,
182
185
  companionType: s
183
186
  }) => {
184
- const { model: r } = B(), n = P(
187
+ const { model: r } = K(), n = $(
185
188
  () => (r == null ? void 0 : r.getGroupAvailabilityItems("flavors").filter((d) => d.visible)) ?? [],
186
189
  [r]
187
- ), o = P(() => s ? n.map(
188
- (d) => re(d, s)
189
- ) : [], [n, s]), [c, l] = g([]), f = a(
190
+ ), o = $(() => s ? n.map(
191
+ (d) => ie(d, s)
192
+ ) : [], [n, s]), [c, l] = T([]), h = a(
190
193
  async (d) => {
191
194
  if (l(
192
195
  (m) => m != null && m.includes(d) ? [...m.filter((i) => i !== d)] : [...m ?? [], d]
@@ -200,7 +203,7 @@ const Ie = (e) => T({
200
203
  e == null || e(d, c ?? []);
201
204
  },
202
205
  [r, e, c]
203
- ), h = a(async () => {
206
+ ), f = a(async () => {
204
207
  if (l([]), r != null && r.selectedPourable) {
205
208
  const { beverage: d } = r.selectedPourable;
206
209
  r.setSelectedPourable({ beverage: d }), t == null || t();
@@ -209,16 +212,16 @@ const Ie = (e) => T({
209
212
  return {
210
213
  flavors: n,
211
214
  flavorCompanions: o,
212
- selectFlavor: f,
215
+ selectFlavor: h,
213
216
  selectedFlavors: c,
214
- clearFlavors: h
217
+ clearFlavors: f
215
218
  };
216
- }, Y = "brands", J = "beverages", O = "flavors", ot = ({
217
- initialGroup: e = Y,
219
+ }, y = "brands", X = "beverages", O = "flavors", ot = ({
220
+ initialGroup: e = y,
218
221
  options: t = {}
219
222
  }) => {
220
- var C, W, q;
221
- const [s, r] = g(e), { model: n } = B(), o = a(
223
+ var W, q, J;
224
+ const [s, r] = T(e), { model: n } = K(), o = a(
222
225
  (v) => {
223
226
  r(O);
224
227
  const D = `/kos/dispense/${n == null ? void 0 : n.path}/brand/selected/`;
@@ -235,10 +238,10 @@ const Ie = (e) => T({
235
238
  H.publish(D, v);
236
239
  },
237
240
  [n == null ? void 0 : n.path]
238
- ), f = a(() => {
241
+ ), h = a(() => {
239
242
  const v = `/kos/dispense/${n == null ? void 0 : n.path}/beverage/cleared/`;
240
243
  H.publish(v, {});
241
- }, [n == null ? void 0 : n.path]), h = a(
244
+ }, [n == null ? void 0 : n.path]), f = a(
242
245
  (v) => {
243
246
  const D = `/kos/dispense/${n == null ? void 0 : n.path}/flavor/selected/`;
244
247
  H.publish(D, v);
@@ -253,8 +256,8 @@ const Ie = (e) => T({
253
256
  }, [n == null ? void 0 : n.path]), i = a(() => {
254
257
  const v = `/kos/dispense/${n == null ? void 0 : n.path}/pour/cancel/`;
255
258
  H.publish(v, {});
256
- }, [n == null ? void 0 : n.path]), { brands: b, selectBrand: $, selectedBrand: p, clearBrand: x, brandCompanions: R } = tt({
257
- companionType: (C = t.companionTypes) == null ? void 0 : C.brand,
259
+ }, [n == null ? void 0 : n.path]), { brands: b, selectBrand: P, selectedBrand: p, clearBrand: g, brandCompanions: Y } = tt({
260
+ companionType: (W = t.companionTypes) == null ? void 0 : W.brand,
258
261
  onBrandSelected: o,
259
262
  onBrandCleared: c
260
263
  }), {
@@ -262,82 +265,86 @@ const Ie = (e) => T({
262
265
  selectBeverage: U,
263
266
  selectedBeverage: V,
264
267
  clearBeverage: S,
265
- beverageCompanions: X
268
+ beverageCompanions: z
266
269
  } = et({
267
- companionType: (W = t.companionTypes) == null ? void 0 : W.beverage,
270
+ companionType: (q = t.companionTypes) == null ? void 0 : q.beverage,
268
271
  onBeverageSelected: l,
269
- onClearBeverage: f
272
+ onClearBeverage: h
270
273
  }), {
271
- clearFlavors: Z,
272
- flavors: y,
273
- selectFlavor: K,
274
- selectedFlavors: z,
274
+ clearFlavors: ee,
275
+ flavors: R,
276
+ selectFlavor: N,
277
+ selectedFlavors: te,
275
278
  flavorCompanions: j
276
279
  } = nt({
277
- companionType: (q = t.companionTypes) == null ? void 0 : q.flavor,
278
- onFlavorSelected: h,
280
+ companionType: (J = t.companionTypes) == null ? void 0 : J.flavor,
281
+ onFlavorSelected: f,
279
282
  onFlavorCleared: d
280
- }), I = rt({
283
+ }), [I, B] = T(), E = a((v) => {
284
+ B(() => v);
285
+ }, []), M = rt({
281
286
  onPour: m,
282
- onPourCancel: i
283
- }), N = a(() => {
287
+ onPourCancel: i,
288
+ onBeforePour: I
289
+ }), se = a(() => {
284
290
  switch (s) {
285
- case Y:
286
- S(), x();
291
+ case y:
292
+ S(), g();
287
293
  break;
288
- case J:
294
+ case X:
289
295
  case O:
290
- r(e), S(), x();
296
+ r(e), S(), g();
291
297
  break;
292
298
  }
293
- }, [S, x, s, e]), E = a(() => {
294
- r(e), e === Y && (S(), x()), e === J && S();
295
- }, [S, x, e]);
299
+ }, [S, g, s, e]), re = a(() => {
300
+ r(e), e === y && (S(), g()), e === X && S();
301
+ }, [S, g, e]);
296
302
  return {
297
303
  nav: {
298
304
  currentGroup: s,
299
- back: N,
300
- home: E
305
+ back: se,
306
+ home: re
301
307
  },
302
- pour: I,
308
+ pour: M,
309
+ updateOnBeforePour: E,
303
310
  selections: {
304
- [Y]: p,
305
- [J]: V,
306
- [O]: z
311
+ [y]: p,
312
+ [X]: V,
313
+ [O]: te
307
314
  },
308
- [Y]: {
315
+ [y]: {
309
316
  models: b,
310
- companions: R,
311
- clear: x,
317
+ companions: Y,
318
+ clear: g,
312
319
  handlers: {
313
- onSelected: $
320
+ onSelected: P
314
321
  }
315
322
  },
316
- [J]: {
323
+ [X]: {
317
324
  models: L,
318
- companions: X,
325
+ companions: z,
319
326
  clear: S,
320
327
  handlers: {
321
328
  onSelected: U
322
329
  }
323
330
  },
324
331
  [O]: {
325
- models: y,
332
+ models: R,
326
333
  companions: j,
327
- clear: Z,
334
+ clear: ee,
328
335
  handlers: {
329
- onSelected: K
336
+ onSelected: N
330
337
  }
331
338
  }
332
339
  };
333
340
  }, it = (e) => {
334
- const { model: t } = B(), [s, r] = g(null), {
341
+ const { model: t } = K(), [s, r] = T(null), {
335
342
  onAmbientTimer: n,
336
343
  onAttractTimer: o,
337
344
  onResetAttractTimer: c,
338
345
  onResumeAttractTimer: l,
339
- defaultAttractTime: f,
340
- defaultAmbientTime: h
346
+ defaultAttractTime: h,
347
+ defaultAmbientTime: f
341
348
  } = e, d = a(() => {
342
349
  n && (w.info("Ambient timer expired. Calling callback"), n == null || n());
343
350
  }, [n]), m = a(() => {
@@ -346,25 +353,25 @@ const Ie = (e) => T({
346
353
  s && (s.restart(), c == null || c());
347
354
  }, [s, c]), b = a(() => {
348
355
  s && (s.reset(), c == null || c());
349
- }, [s, c]), $ = a(() => {
356
+ }, [s, c]), P = a(() => {
350
357
  s && (s.pause(), l == null || l());
351
358
  }, [s, l]);
352
359
  return F(() => {
353
- if (t && f) {
360
+ if (t && h) {
354
361
  w.info("Nozzle is available. Creating timers");
355
- const p = be.createTimer(
362
+ const p = $e.createTimer(
356
363
  "attract-timer-" + t.path,
357
- f
364
+ h
358
365
  );
359
- return f && (p == null || p.addTimeoutAction({
366
+ return h && (p == null || p.addTimeoutAction({
360
367
  name: "attract-timer",
361
368
  remainingTime: 0,
362
369
  action: m
363
- })), h && (p == null || p.addTimeoutAction({
370
+ })), f && (p == null || p.addTimeoutAction({
364
371
  name: "ambient-timer",
365
- remainingTime: h,
372
+ remainingTime: f,
366
373
  action: d
367
- })), f && (p == null || p.start()), r(p ?? null), () => {
374
+ })), h && (p == null || p.start()), r(p ?? null), () => {
368
375
  p == null || p.reset(), r(null);
369
376
  };
370
377
  }
@@ -372,8 +379,8 @@ const Ie = (e) => T({
372
379
  w.info("Nozzle is not available. No timers to clear");
373
380
  };
374
381
  }, [
375
- h,
376
382
  f,
383
+ h,
377
384
  d,
378
385
  m,
379
386
  t
@@ -381,7 +388,7 @@ const Ie = (e) => T({
381
388
  attractTimer: s,
382
389
  restart: i,
383
390
  pause: b,
384
- resume: $
391
+ resume: P
385
392
  };
386
393
  }, at = (e, t) => {
387
394
  if (t)
@@ -395,14 +402,14 @@ const Ie = (e) => T({
395
402
  onFlavorCleared: o,
396
403
  onFlavorSelected: c,
397
404
  onPour: l,
398
- onPourCancel: f,
399
- onAmbientTimer: h,
405
+ onPourCancel: h,
406
+ onAmbientTimer: f,
400
407
  onAttractTimer: d,
401
408
  onResumeAttractTimer: m
402
409
  }) => {
403
- const { model: i } = B();
410
+ const { model: i } = K();
404
411
  F(() => {
405
- const $ = [
412
+ const P = [
406
413
  {
407
414
  topic: `/kos/dispense/${i == null ? void 0 : i.path}/brand/selected/`,
408
415
  callback: t
@@ -430,11 +437,11 @@ const Ie = (e) => T({
430
437
  { topic: `/kos/dispense/${i == null ? void 0 : i.path}/pour/`, callback: l },
431
438
  {
432
439
  topic: `/kos/dispense/${i == null ? void 0 : i.path}/pour/cancel/`,
433
- callback: f
440
+ callback: h
434
441
  },
435
442
  {
436
443
  topic: `/kos/dispense/${i == null ? void 0 : i.path}/ambient/start/`,
437
- callback: h
444
+ callback: f
438
445
  },
439
446
  {
440
447
  topic: `/kos/dispense/${i == null ? void 0 : i.path}/attract/start/`,
@@ -449,14 +456,14 @@ const Ie = (e) => T({
449
456
  callback: e
450
457
  }
451
458
  ].map(
452
- ({ topic: p, callback: x }) => at(p, x)
459
+ ({ topic: p, callback: g }) => at(p, g)
453
460
  );
454
461
  return () => {
455
- $.forEach((p) => p == null ? void 0 : p());
462
+ P.forEach((p) => p == null ? void 0 : p());
456
463
  };
457
464
  }, [
458
465
  i == null ? void 0 : i.path,
459
- h,
466
+ f,
460
467
  d,
461
468
  r,
462
469
  n,
@@ -465,18 +472,18 @@ const Ie = (e) => T({
465
472
  o,
466
473
  c,
467
474
  l,
468
- f,
475
+ h,
469
476
  m,
470
477
  e
471
478
  ]);
472
- }, he = (e) => {
473
- const { model: t } = B(), [s, r] = g(null), {
479
+ }, ve = (e) => {
480
+ const { model: t } = K(), [s, r] = T(null), {
474
481
  onAreYouThereTimer: n,
475
482
  onIdleTimer: o,
476
483
  onResetIdleTimer: c,
477
484
  defaultAreYouThereTime: l = 10,
478
- defaultIdleTime: f = 20
479
- } = e, h = a(() => {
485
+ defaultIdleTime: h = 20
486
+ } = e, f = a(() => {
480
487
  n && (w.info("Are you there timer expired. Calling callback"), n == null || n());
481
488
  }, [n]), d = a(() => {
482
489
  o && (w.info("Idle timer expired. Calling callback"), o == null || o());
@@ -488,9 +495,9 @@ const Ie = (e) => T({
488
495
  return F(() => {
489
496
  if (t) {
490
497
  w.info("Nozzle is available. Creating timers");
491
- const b = be.createTimer(
498
+ const b = $e.createTimer(
492
499
  `${e.prefix ?? ""}idle-timer-${t.path}`,
493
- f
500
+ h
494
501
  );
495
502
  return b == null || b.addTimeoutAction({
496
503
  name: "idle-timer",
@@ -499,7 +506,7 @@ const Ie = (e) => T({
499
506
  }), b == null || b.addTimeoutAction({
500
507
  name: "are-you-there-timer",
501
508
  remainingTime: l,
502
- action: h
509
+ action: f
503
510
  }), r(b ?? null), () => {
504
511
  b == null || b.reset(), r(null);
505
512
  };
@@ -509,8 +516,8 @@ const Ie = (e) => T({
509
516
  };
510
517
  }, [
511
518
  l,
512
- f,
513
519
  h,
520
+ f,
514
521
  d,
515
522
  t,
516
523
  e.prefix
@@ -525,66 +532,66 @@ const Ie = (e) => T({
525
532
  pour: s,
526
533
  screens: r
527
534
  }) => {
528
- var oe;
529
- const [n, o] = g(!1), [c, l] = g(!1), [f, h] = g(!1), { model: d } = B(), [m, i] = g(!1), b = (t == null ? void 0 : t.idleTimeout) ?? 15, $ = (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 10, p = (s == null ? void 0 : s.idleTimeout) ?? (t == null ? void 0 : t.idleTimeout) ?? 10, x = (s == null ? void 0 : s.areYouThereTimeoutOffset) ?? (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 5, R = r == null ? void 0 : r.ambientTimeoutOffset, L = r == null ? void 0 : r.attractTimeout, U = a(() => {
535
+ var ce;
536
+ const [n, o] = T(!1), [c, l] = T(!1), [h, f] = T(!1), { model: d } = K(), [m, i] = T(!1), b = (t == null ? void 0 : t.idleTimeout) ?? 15, P = (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 10, p = (s == null ? void 0 : s.idleTimeout) ?? (t == null ? void 0 : t.idleTimeout) ?? 10, g = (s == null ? void 0 : s.areYouThereTimeoutOffset) ?? (t == null ? void 0 : t.areYouThereTimeoutOffset) ?? 5, Y = r == null ? void 0 : r.ambientTimeoutOffset, L = r == null ? void 0 : r.attractTimeout, U = a(() => {
530
537
  o(!0);
531
538
  }, []), V = a(() => {
532
539
  o(!1), e == null || e.nav.home();
533
- }, [(oe = e == null ? void 0 : e.nav) == null ? void 0 : oe.home]), S = a(() => {
534
- R && (l(!0), h(!1));
535
- }, [R]), X = a(() => {
536
- L && (h(!0), l(!1));
537
- }, [L]), Z = a(() => {
538
- L && (h(!1), l(!1), e == null || e.nav.home());
540
+ }, [(ce = e == null ? void 0 : e.nav) == null ? void 0 : ce.home]), S = a(() => {
541
+ Y && (l(!0), f(!1));
542
+ }, [Y]), z = a(() => {
543
+ L && (f(!0), l(!1));
544
+ }, [L]), ee = a(() => {
545
+ L && (f(!1), l(!1), e == null || e.nav.home());
539
546
  }, [e == null ? void 0 : e.nav, L]), {
540
- pause: y,
541
- restart: K,
542
- resume: z,
547
+ pause: R,
548
+ restart: N,
549
+ resume: te,
543
550
  attractTimer: j
544
551
  } = it({
545
- defaultAmbientTime: R,
552
+ defaultAmbientTime: Y,
546
553
  defaultAttractTime: L,
547
554
  onAmbientTimer: S,
548
- onAttractTimer: X,
549
- onResumeAttractTimer: Z
550
- }), { pause: I, restart: N } = he({
551
- defaultAreYouThereTime: $,
555
+ onAttractTimer: z,
556
+ onResumeAttractTimer: ee
557
+ }), { pause: I, restart: B } = ve({
558
+ defaultAreYouThereTime: P,
552
559
  defaultIdleTime: b,
553
560
  onAreYouThereTimer: U,
554
561
  onIdleTimer: V
555
- }), { pause: E, restart: C } = he({
556
- defaultAreYouThereTime: x,
562
+ }), { pause: E, restart: M } = ve({
563
+ defaultAreYouThereTime: g,
557
564
  defaultIdleTime: p,
558
565
  onAreYouThereTimer: U,
559
566
  onIdleTimer: V,
560
567
  prefix: "pour-"
561
- }), W = a(() => {
568
+ }), se = a(() => {
562
569
  i(!1), E(), I();
563
- }, [I, E]), q = a(() => {
564
- i(!0), console.log("restarting pour timer"), C(), I();
565
- }, [I, C]), v = a(() => {
566
- o(!1), m ? (C(), I()) : (N(), E());
567
- }, [m, I, E, N, C]), D = a(() => {
568
- y(), h(!1), l(!1), N();
569
- }, [y, N]), Ye = a(() => {
570
- h(!1), l(!1), i(!1), E(), K();
571
- }, [K, E]), Oe = a(() => {
572
- h(!1), l(!1), i(!1), y(), N();
573
- }, [y, N]), Ge = a(() => {
574
- h(!1), l(!1), i(!1), K(), I(), E();
575
- }, [K, I, E]), _e = a(() => {
576
- h(!1), l(!1), K(), I();
577
- }, [K, I]);
570
+ }, [I, E]), re = a(() => {
571
+ i(!0), console.log("restarting pour timer"), M(), I();
572
+ }, [I, M]), W = a(() => {
573
+ o(!1), m ? (M(), I()) : (B(), E());
574
+ }, [m, I, E, B, M]), q = a(() => {
575
+ R(), f(!1), l(!1), B();
576
+ }, [R, B]), J = a(() => {
577
+ f(!1), l(!1), i(!1), E(), N();
578
+ }, [N, E]), v = a(() => {
579
+ f(!1), l(!1), i(!1), R(), B();
580
+ }, [R, B]), D = a(() => {
581
+ f(!1), l(!1), i(!1), N(), I(), E();
582
+ }, [N, I, E]), _e = a(() => {
583
+ f(!1), l(!1), N(), I();
584
+ }, [N, I]);
578
585
  ct({
579
- onBrandSelected: D,
580
- onBrandCleared: Ye,
581
- onBeverageSelected: Oe,
582
- onBeverageCleared: Ge,
583
- onPour: W,
584
- onPourCancel: q,
586
+ onBrandSelected: q,
587
+ onBrandCleared: J,
588
+ onBeverageSelected: v,
589
+ onBeverageCleared: D,
590
+ onPour: se,
591
+ onPourCancel: re,
585
592
  onInit: _e
586
593
  });
587
- const Fe = m ? x : $;
594
+ const Fe = m ? g : P;
588
595
  return F(() => {
589
596
  if (d && j) {
590
597
  const Ue = `/kos/dispense/${d == null ? void 0 : d.path}/init/`;
@@ -592,96 +599,96 @@ const Ie = (e) => T({
592
599
  }
593
600
  }, [d, j]), {
594
601
  showAreYouThere: n,
595
- clearAreYouThere: v,
602
+ clearAreYouThere: W,
596
603
  areYouThereCountdown: Fe,
597
604
  showAmbientScreen: c,
598
- showAttractScreen: f,
599
- pauseScreenTimer: z
605
+ showAttractScreen: h,
606
+ pauseScreenTimer: te
600
607
  };
601
- }, xe = () => {
602
- const e = de.type;
603
- return T({
608
+ }, Ee = () => {
609
+ const e = me.type;
610
+ return A({
604
611
  modelId: e,
605
- modelType: de.type,
612
+ modelType: me.type,
606
613
  options: {}
607
614
  });
608
615
  };
609
616
  function Ht(e) {
610
617
  return (t) => {
611
- const { model: s, status: r, KosModelLoader: n } = xe();
618
+ const { model: s, status: r, KosModelLoader: n } = Ee();
612
619
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, deviceAssembly: s }) });
613
620
  };
614
621
  }
615
- const ge = (e) => T({
622
+ const He = (e) => A({
616
623
  modelId: e,
617
624
  modelType: Xe.type,
618
625
  options: {}
619
626
  });
620
627
  function St(e, t) {
621
628
  return (s) => {
622
- const { model: r, status: n, KosModelLoader: o } = ge(e);
629
+ const { model: r, status: n, KosModelLoader: o } = He(e);
623
630
  return /* @__PURE__ */ u(o, { ...n, children: /* @__PURE__ */ u(t, { ...s, holder: r }) });
624
631
  };
625
632
  }
626
- const ke = () => {
627
- const e = ue.type;
628
- return T({
633
+ const Se = () => {
634
+ const e = fe.type;
635
+ return A({
629
636
  modelId: e,
630
- modelType: ue.type,
637
+ modelType: fe.type,
631
638
  options: {}
632
639
  });
633
640
  };
634
- function Bt(e) {
641
+ function Kt(e) {
635
642
  return (t) => {
636
- const { model: s, status: r, KosModelLoader: n } = ke();
643
+ const { model: s, status: r, KosModelLoader: n } = Se();
637
644
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, holderContainer: s }) });
638
645
  };
639
646
  }
640
- const Ee = () => {
641
- const e = le.type;
642
- return T({
647
+ const Ke = () => {
648
+ const e = he.type;
649
+ return A({
643
650
  modelId: e,
644
- modelType: le.type,
651
+ modelType: he.type,
645
652
  options: {}
646
653
  });
647
- }, te = w.createLogger({
654
+ }, ne = w.createLogger({
648
655
  name: "HoldToPourIntentStrategy",
649
656
  group: "kos-hooks"
650
657
  }), dt = {
651
658
  name: "HoldToPourIntentStrategy",
652
659
  async initiate(e, t) {
653
660
  if (!(e != null && e.canPour)) {
654
- te.debug(`${e == null ? void 0 : e.id} cannot pour. Returning early.`);
661
+ ne.debug(`${e == null ? void 0 : e.id} cannot pour. Returning early.`);
655
662
  return;
656
663
  }
657
- t ? (te.debug(`performing intent: ${t}`), await (e == null ? void 0 : e.performIntent(t))) : te.debug("no intent provided. Returning early.");
664
+ t ? (ne.debug(`performing intent: ${t}`), await (e == null ? void 0 : e.performIntent(t))) : ne.debug("no intent provided. Returning early.");
658
665
  },
659
666
  async initiateEnded(e) {
660
667
  await (e == null ? void 0 : e.cancelPour());
661
668
  }
662
- }, se = w.createLogger({
669
+ }, oe = w.createLogger({
663
670
  name: "useNozzlePour",
664
671
  group: "kos-hooks"
665
- }), Kt = ({
672
+ }), Nt = ({
666
673
  onPour: e,
667
674
  onPourCancel: t,
668
675
  intentContainer: s,
669
676
  strategy: r = dt
670
677
  }) => {
671
678
  const n = a(() => {
672
- se.debug(
679
+ oe.debug(
673
680
  `[${r == null ? void 0 : r.name}] - Pour initiated for model ${s == null ? void 0 : s.id}.`
674
681
  ), r == null || r.initiate(s), e == null || e();
675
682
  }, [e, s, r]), o = a(() => {
676
- var f;
677
- se.debug(
683
+ var h;
684
+ oe.debug(
678
685
  `[${r == null ? void 0 : r.name}] - Pour initiate ended called for nozzle ${s == null ? void 0 : s.id}.`
679
- ), (f = r == null ? void 0 : r.initiateEnded) == null || f.call(r, s), t == null || t();
686
+ ), (h = r == null ? void 0 : r.initiateEnded) == null || h.call(r, s), t == null || t();
680
687
  }, [t, s, r]), c = a(() => {
681
- se.debug(`Force cancelling pour for nozzle ${s == null ? void 0 : s.id}.`), s == null || s.cancelPour(), t == null || t();
688
+ oe.debug(`Force cancelling pour for nozzle ${s == null ? void 0 : s.id}.`), s == null || s.cancelPour(), t == null || t();
682
689
  }, [t, s]);
683
690
  return {
684
- handlers: ne({
691
+ handlers: ae({
685
692
  onPressed: n,
686
693
  onRelease: o
687
694
  }).dom,
@@ -689,42 +696,42 @@ const Ee = () => {
689
696
  status: s
690
697
  };
691
698
  };
692
- function Nt(e) {
699
+ function Bt(e) {
693
700
  return (t) => {
694
- const { model: s, status: r, KosModelLoader: n } = Ee();
701
+ const { model: s, status: r, KosModelLoader: n } = Ke();
695
702
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, ingredient: s }) });
696
703
  };
697
704
  }
698
- const He = () => {
699
- const e = me.type;
700
- return T({
705
+ const Ne = () => {
706
+ const e = pe.type;
707
+ return A({
701
708
  modelId: e,
702
- modelType: me.type,
709
+ modelType: pe.type,
703
710
  options: {}
704
711
  });
705
712
  };
706
713
  function Lt(e) {
707
714
  return (t) => {
708
- const { model: s, status: r, KosModelLoader: n } = He();
715
+ const { model: s, status: r, KosModelLoader: n } = Ne();
709
716
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, ingredientContainer: s }) });
710
717
  };
711
718
  }
712
- function Ct(e, t) {
719
+ function Dt(e, t) {
713
720
  return (s) => {
714
- const { model: r, status: n, KosModelLoader: o } = Ie(e);
721
+ const { model: r, status: n, KosModelLoader: o } = xe(e);
715
722
  return /* @__PURE__ */ u(o, { ...n, children: /* @__PURE__ */ u(t, { ...s, nozzle: r }) });
716
723
  };
717
724
  }
718
725
  const G = w.createLogger({
719
726
  name: "usePour",
720
727
  group: "kos-hooks"
721
- }), Dt = ({
728
+ }), Rt = ({
722
729
  onBeforePour: e,
723
730
  onPour: t,
724
731
  onPourCancel: s,
725
732
  onPourAbort: r,
726
733
  pourTarget: n,
727
- strategy: o = Ae
734
+ strategy: o = ke
728
735
  }) => {
729
736
  const c = a(async () => {
730
737
  G.debug(
@@ -739,27 +746,27 @@ const G = w.createLogger({
739
746
  G.debug(
740
747
  `[${o == null ? void 0 : o.name}] - Pour initiate ended called for pour target ${n == null ? void 0 : n.id}.`
741
748
  ), await ((m = o == null ? void 0 : o.initiateEnded) == null ? void 0 : m.call(o, n)) || s == null || s();
742
- }, [s, n, o]), f = a(async () => {
749
+ }, [s, n, o]), h = a(async () => {
743
750
  G.debug(`Force cancelling pour for pour target ${n == null ? void 0 : n.id}.`), await (n == null ? void 0 : n.cancelPour()), s == null || s();
744
751
  }, [s, n]);
745
752
  return {
746
- handlers: ne({
753
+ handlers: ae({
747
754
  onPressed: c,
748
755
  onRelease: l
749
756
  }).dom,
750
- cancel: f,
757
+ cancel: h,
751
758
  status: n
752
759
  };
753
760
  }, _ = w.createLogger({
754
761
  name: "TapOrHoldIntentStrategy",
755
762
  group: "kos-hooks"
756
763
  });
757
- class yt {
764
+ class Mt {
758
765
  constructor(t) {
759
- M(this, "intent");
760
- M(this, "name", "TapOrHoldIntentStrategy");
761
- M(this, "isHold", !1);
762
- M(this, "disposer", null);
766
+ C(this, "intent");
767
+ C(this, "name", "TapOrHoldIntentStrategy");
768
+ C(this, "isHold", !1);
769
+ C(this, "disposer", null);
763
770
  this.intent = t;
764
771
  }
765
772
  async initiate(t, s) {
@@ -779,37 +786,37 @@ class yt {
779
786
  return this.disposer && clearTimeout(this.disposer), this.disposer = null, this.isHold ? (await (t == null ? void 0 : t.cancelPour()), !1) : (_.debug("Tap detected. don't cancel and return."), !0);
780
787
  }
781
788
  }
782
- const Q = w.createLogger({
789
+ const Z = w.createLogger({
783
790
  name: "TapToPourIntentStrategy",
784
791
  group: "kos-hooks"
785
- }), Rt = {
792
+ }), Yt = {
786
793
  name: "TapToPourIntentStrategy",
787
794
  async initiate(e, t) {
788
795
  if (e != null && e.isPouring) {
789
- Q.debug(`Nozzle ${e == null ? void 0 : e.id} is already pouring. cancelling pour`), await e.cancelPour();
796
+ Z.debug(`Nozzle ${e == null ? void 0 : e.id} is already pouring. cancelling pour`), await e.cancelPour();
790
797
  return;
791
798
  }
792
799
  if (!(e != null && e.canPour)) {
793
- Q.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
800
+ Z.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
794
801
  return;
795
802
  }
796
- t ? (Q.debug(`performing intent: ${t}`), await (e == null ? void 0 : e.performIntent(t))) : Q.debug("no intent provided. Returning early.");
803
+ t ? (Z.debug(`performing intent: ${t}`), await (e == null ? void 0 : e.performIntent(t))) : Z.debug("no intent provided. Returning early.");
797
804
  },
798
805
  async initiateEnded(e) {
799
806
  return !0;
800
807
  }
801
- }, pe = w.createLogger({
808
+ }, we = w.createLogger({
802
809
  name: "HoldToPourStrategy",
803
810
  group: "kos-hooks"
804
- }), Mt = {
811
+ }), Ct = {
805
812
  name: "TapToPourStrategy",
806
813
  async initiate(e) {
807
814
  if (e != null && e.isPouring) {
808
- pe.debug(`Nozzle ${e == null ? void 0 : e.id} is already pouring. cancelling pour`), await e.cancelPour();
815
+ we.debug(`Nozzle ${e == null ? void 0 : e.id} is already pouring. cancelling pour`), await e.cancelPour();
809
816
  return;
810
817
  }
811
818
  if (!(e != null && e.canPour)) {
812
- pe.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
819
+ we.debug(`Nozzle ${e == null ? void 0 : e.id} cannot pour. Returning early.`);
813
820
  return;
814
821
  }
815
822
  await (e == null ? void 0 : e.pour());
@@ -817,7 +824,7 @@ const Q = w.createLogger({
817
824
  async initiateEnded(e) {
818
825
  return !0;
819
826
  }
820
- }, ut = (e, t, s) => T({
827
+ }, ut = (e, t, s) => A({
821
828
  modelId: e,
822
829
  modelType: Ze.type,
823
830
  options: {
@@ -825,7 +832,7 @@ const Q = w.createLogger({
825
832
  selectedId: s
826
833
  }
827
834
  });
828
- function Yt(e) {
835
+ function yt(e) {
829
836
  return (t) => {
830
837
  const { model: s, status: r, KosModelLoader: n } = ut(
831
838
  t.id,
@@ -835,59 +842,59 @@ function Yt(e) {
835
842
  return /* @__PURE__ */ u(n, { ...r, children: /* @__PURE__ */ u(e, { ...t, genericPour: s }) });
836
843
  };
837
844
  }
838
- const Se = k(void 0), Ot = ({ children: e }) => {
839
- const { model: t, ready: s } = ve(), r = P(() => s && t ? { model: t } : {}, [s, t]);
840
- return /* @__PURE__ */ u(Se.Provider, { value: r, children: e });
845
+ const Be = k(void 0), Ot = ({ children: e }) => {
846
+ const { model: t, ready: s } = Pe(), r = $(() => s && t ? { model: t } : {}, [s, t]);
847
+ return /* @__PURE__ */ u(Be.Provider, { value: r, children: e });
841
848
  }, Gt = () => {
842
- const e = A(
843
- Se
849
+ const e = x(
850
+ Be
844
851
  );
845
852
  if (!e)
846
853
  throw new Error(
847
854
  "useAssemblyContext must be used within a AssemblyProvider"
848
855
  );
849
856
  return e;
850
- }, Be = k(void 0), _t = ({ children: e }) => {
851
- const { model: t, ready: s } = we(), r = P(() => s && t ? { model: t } : {}, [s, t]);
852
- return /* @__PURE__ */ u(Be.Provider, { value: r, children: e });
857
+ }, Le = k(void 0), _t = ({ children: e }) => {
858
+ const { model: t, ready: s } = Ie(), r = $(() => s && t ? { model: t } : {}, [s, t]);
859
+ return /* @__PURE__ */ u(Le.Provider, { value: r, children: e });
853
860
  }, Ft = () => {
854
- const e = A(Be);
861
+ const e = x(Le);
855
862
  if (!e)
856
863
  throw new Error(
857
864
  "useAvailabilityContext must be used within a AvailabilityProvider"
858
865
  );
859
866
  return e;
860
- }, Ke = k(void 0), Ut = ({ children: e, id: t }) => {
861
- const { model: s, ready: r } = Pe(t), n = P(() => r && s ? { model: s } : {}, [r, s]);
862
- return /* @__PURE__ */ u(Ke.Provider, { value: n, children: e });
867
+ }, De = k(void 0), Ut = ({ children: e, id: t }) => {
868
+ const { model: s, ready: r } = Te(t), n = $(() => r && s ? { model: s } : {}, [r, s]);
869
+ return /* @__PURE__ */ u(De.Provider, { value: n, children: e });
863
870
  }, Vt = () => {
864
- const e = A(Ke);
871
+ const e = x(De);
865
872
  if (!e)
866
873
  throw new Error("useBoardContext must be used within a BoardProvider");
867
874
  return e;
868
- }, Ne = k(void 0), jt = ({ children: e }) => {
869
- const { model: t, ready: s } = $e(), r = P(() => s && t ? { model: t } : {}, [s, t]);
870
- return /* @__PURE__ */ u(Ne.Provider, { value: r, children: e });
875
+ }, Re = k(void 0), jt = ({ children: e }) => {
876
+ const { model: t, ready: s } = Ae(), r = $(() => s && t ? { model: t } : {}, [s, t]);
877
+ return /* @__PURE__ */ u(Re.Provider, { value: r, children: e });
871
878
  }, Wt = () => {
872
- const e = A(Ne);
879
+ const e = x(Re);
873
880
  if (!e)
874
881
  throw new Error(
875
882
  "useBoardContainerContext must be used within a BoardContainerProvider"
876
883
  );
877
884
  return e;
878
- }, Le = k(
885
+ }, Me = k(
879
886
  void 0
880
887
  ), lt = ({ children: e }) => {
881
- const { model: t, ready: s } = xe(), r = P(() => {
888
+ const { model: t, ready: s } = Ee(), r = $(() => {
882
889
  if (s && t) {
883
890
  const o = t.nozzlePaths;
884
891
  return { model: t, nozzlePaths: o };
885
892
  }
886
893
  return {};
887
894
  }, [s, t]), n = s && t ? e : null;
888
- return /* @__PURE__ */ u(Le.Provider, { value: r, children: n });
895
+ return /* @__PURE__ */ u(Me.Provider, { value: r, children: n });
889
896
  }, mt = () => {
890
- const e = A(Le);
897
+ const e = x(Me);
891
898
  if (!e)
892
899
  throw new Error(
893
900
  "useDeviceAssemblyContext must be used within a DeviceAssemblyProvider"
@@ -897,7 +904,7 @@ const Se = k(void 0), Ot = ({ children: e }) => {
897
904
  function ft() {
898
905
  const e = qe.createContext(null);
899
906
  return [() => {
900
- const s = A(e);
907
+ const s = x(e);
901
908
  if (s === void 0)
902
909
  throw new Error("useDispenseKitContext must be used within a Provider");
903
910
  return s;
@@ -942,60 +949,60 @@ function qt(e) {
942
949
  bt({ provider: s, props: e })
943
950
  ];
944
951
  }
945
- const Ce = k(void 0), Jt = ({ children: e, id: t }) => {
946
- const { model: s, ready: r } = ge(t || ""), n = P(() => r && s ? { model: s } : {}, [r, s]);
947
- return /* @__PURE__ */ u(Ce.Provider, { value: n, children: e });
952
+ const Ye = k(void 0), Jt = ({ children: e, id: t }) => {
953
+ const { model: s, ready: r } = He(t || ""), n = $(() => r && s ? { model: s } : {}, [r, s]);
954
+ return /* @__PURE__ */ u(Ye.Provider, { value: n, children: e });
948
955
  }, Qt = () => {
949
- const e = A(Ce);
956
+ const e = x(Ye);
950
957
  if (!e)
951
958
  throw new Error("useHolderContext must be used within a HolderProvider");
952
959
  return e;
953
- }, De = k(
960
+ }, Ce = k(
954
961
  void 0
955
962
  ), Xt = ({ children: e }) => {
956
- const { model: t, ready: s } = ke(), r = P(() => s && t ? { model: t } : {}, [s, t]);
957
- return /* @__PURE__ */ u(De.Provider, { value: r, children: e });
963
+ const { model: t, ready: s } = Se(), r = $(() => s && t ? { model: t } : {}, [s, t]);
964
+ return /* @__PURE__ */ u(Ce.Provider, { value: r, children: e });
958
965
  }, Zt = () => {
959
- const e = A(De);
966
+ const e = x(Ce);
960
967
  if (!e)
961
968
  throw new Error(
962
969
  "useHolderContainerContext must be used within a HolderContainerProvider"
963
970
  );
964
971
  return e;
965
972
  }, ye = k(void 0), zt = ({ children: e }) => {
966
- const { model: t, ready: s } = Ee(), r = P(() => s && t ? { model: t } : {}, [s, t]);
973
+ const { model: t, ready: s } = Ke(), r = $(() => s && t ? { model: t } : {}, [s, t]);
967
974
  return /* @__PURE__ */ u(ye.Provider, { value: r, children: e });
968
975
  }, es = () => {
969
- const e = A(ye);
976
+ const e = x(ye);
970
977
  if (!e)
971
978
  throw new Error(
972
979
  "useIngredientContext must be used within a IngredientProvider"
973
980
  );
974
981
  return e;
975
- }, Re = k(
982
+ }, Oe = k(
976
983
  void 0
977
984
  ), ts = ({ children: e }) => {
978
- const { model: t, ready: s } = He(), r = P(() => s && t ? { model: t } : {}, [s, t]);
979
- return /* @__PURE__ */ u(Re.Provider, { value: r, children: e });
985
+ const { model: t, ready: s } = Ne(), r = $(() => s && t ? { model: t } : {}, [s, t]);
986
+ return /* @__PURE__ */ u(Oe.Provider, { value: r, children: e });
980
987
  }, ss = () => {
981
- const e = A(Re);
988
+ const e = x(Oe);
982
989
  if (!e)
983
990
  throw new Error(
984
991
  "useIngredientContainerContext must be used within a IngredientContainerProvider"
985
992
  );
986
993
  return e;
987
994
  }, vt = () => {
988
- const e = fe.type;
989
- return T({
995
+ const e = be.type;
996
+ return A({
990
997
  modelId: e,
991
- modelType: fe.type,
998
+ modelType: be.type,
992
999
  options: {}
993
1000
  });
994
- }, Me = k(void 0), rs = ({ children: e }) => {
995
- const { model: t, ready: s } = vt(), r = P(() => s && t ? { model: t } : {}, [s, t]);
996
- return /* @__PURE__ */ u(Me.Provider, { value: r, children: e });
1001
+ }, Ge = k(void 0), rs = ({ children: e }) => {
1002
+ const { model: t, ready: s } = vt(), r = $(() => s && t ? { model: t } : {}, [s, t]);
1003
+ return /* @__PURE__ */ u(Ge.Provider, { value: r, children: e });
997
1004
  }, ns = () => {
998
- const e = A(Me);
1005
+ const e = x(Ge);
999
1006
  if (!e)
1000
1007
  throw new Error("usePumpContext must be used within a PumpProvider");
1001
1008
  return e;
@@ -1007,8 +1014,8 @@ export {
1007
1014
  ht as C,
1008
1015
  lt as D,
1009
1016
  tt as E,
1010
- Y as F,
1011
- J as G,
1017
+ y as F,
1018
+ X as G,
1012
1019
  Jt as H,
1013
1020
  zt as I,
1014
1021
  O as J,
@@ -1016,31 +1023,31 @@ export {
1016
1023
  Et as L,
1017
1024
  ct as M,
1018
1025
  ze as N,
1019
- he as O,
1026
+ ve as O,
1020
1027
  rs as P,
1021
1028
  nt as Q,
1022
- xe as R,
1029
+ Ee as R,
1023
1030
  Ht as S,
1024
- ge as T,
1031
+ He as T,
1025
1032
  St as U,
1026
- ke as V,
1027
- Bt as W,
1028
- Ee as X,
1029
- Kt as Y,
1030
- Nt as Z,
1031
- He as _,
1033
+ Se as V,
1034
+ Kt as W,
1035
+ Ke as X,
1036
+ Nt as Y,
1037
+ Bt as Z,
1038
+ Ne as _,
1032
1039
  _t as a,
1033
- Ie as a0,
1034
- Ct as a1,
1040
+ xe as a0,
1041
+ Dt as a1,
1035
1042
  rt as a2,
1036
- Dt as a3,
1043
+ Rt as a3,
1037
1044
  dt as a4,
1038
- Ae as a5,
1039
- yt as a6,
1040
- Rt as a7,
1041
- Mt as a8,
1045
+ ke as a5,
1046
+ Mt as a6,
1047
+ Yt as a7,
1048
+ Ct as a8,
1042
1049
  ut as a9,
1043
- Yt as aa,
1050
+ yt as aa,
1044
1051
  Ft as b,
1045
1052
  Vt as c,
1046
1053
  jt as d,
@@ -1054,17 +1061,17 @@ export {
1054
1061
  es as l,
1055
1062
  ts as m,
1056
1063
  ss as n,
1057
- B as o,
1064
+ K as o,
1058
1065
  ns as p,
1059
- ve as q,
1060
- we as r,
1066
+ Pe as q,
1067
+ Ie as r,
1061
1068
  xt as s,
1062
- Pe as t,
1069
+ Te as t,
1063
1070
  Gt as u,
1064
1071
  gt as v,
1065
1072
  At as w,
1066
- $e as x,
1073
+ Ae as x,
1067
1074
  kt as y,
1068
1075
  et as z
1069
1076
  };
1070
- //# sourceMappingURL=pump-provider-D7OslYhd.js.map
1077
+ //# sourceMappingURL=pump-provider-35ZRKNvH.js.map