@kosdev-code/kos-dispense-sdk 2.0.35 → 2.0.36

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