@gengage/assistant-fe 0.6.26 → 0.6.28

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.
Files changed (42) hide show
  1. package/dist/agent-ui-steps-Dc4ByfZo.js +3161 -0
  2. package/dist/agentic/context/context-store.d.ts +25 -0
  3. package/dist/agentic/debug/activity-collector.d.ts +1 -0
  4. package/dist/agentic/index.d.ts +15 -1
  5. package/dist/agentic/index.js +415 -380
  6. package/dist/agentic/types.d.ts +34 -3
  7. package/dist/agentic/worker/agent-ui-steps.d.ts +43 -0
  8. package/dist/agentic/worker/agent-ui.d.ts +44 -0
  9. package/dist/agentic/worker/be-client.d.ts +16 -4
  10. package/dist/agentic/worker/coalesce.d.ts +25 -0
  11. package/dist/agentic/worker/compaction.d.ts +12 -0
  12. package/dist/agentic/worker/pdp-hydrate.d.ts +30 -0
  13. package/dist/agentic/worker/tool-schema.d.ts +19 -0
  14. package/dist/agentic/worker.d.ts +15 -1
  15. package/dist/agentic/worker.js +292 -264
  16. package/dist/agentic.iife.js +10 -9
  17. package/dist/{api-paths-CmFRzaMd.js → api-paths-PFiXYIey.js} +1 -1
  18. package/dist/chat-runtime.js +1 -1
  19. package/dist/chat.iife.js +1 -1
  20. package/dist/chat.js +1 -1
  21. package/dist/{common-uHKZ-s5H.js → common-DyAcz33-.js} +1 -1
  22. package/dist/common.js +5 -5
  23. package/dist/{connection-warning-xRmq7uJ3.js → connection-warning-nWEUv5bp.js} +1 -1
  24. package/dist/{fastIntent-B3qZhCis.js → fastIntent-BiHAWBIa.js} +1 -1
  25. package/dist/index.js +10 -10
  26. package/dist/native.iife.js +1 -1
  27. package/dist/qna-runtime.js +1 -1
  28. package/dist/qna.iife.js +1 -1
  29. package/dist/qna.js +1 -1
  30. package/dist/{runtime-Cpi9hXiL.js → runtime-BIA5sGno.js} +3 -3
  31. package/dist/{runtime-C1mVW5y1.js → runtime-BuzZUB0i.js} +3 -3
  32. package/dist/{runtime-DhhnaNUQ.js → runtime-PHarcyNZ.js} +3 -3
  33. package/dist/{simbut-csGdfd9_.js → simbut-CiPq-niE.js} +1 -1
  34. package/dist/simbut.iife.js +1 -1
  35. package/dist/simbut.js +1 -1
  36. package/dist/{simrel-B1VHfhBf.js → simrel-XWtKe-OG.js} +1 -1
  37. package/dist/simrel-runtime.js +1 -1
  38. package/dist/simrel.iife.js +1 -1
  39. package/dist/simrel.js +2 -2
  40. package/dist/{widget-base-DNT8SYtf.js → widget-base-DSl6thOx.js} +1 -1
  41. package/package.json +1 -1
  42. package/dist/route-params-UDemctx_.js +0 -2471
@@ -1,155 +1,169 @@
1
- import { buildPhotoSimilarityProfile as V, buildProductSimilarityProfile as W, buildSimilarityQueries as G, normalizeSimilarityText as X, rankSimilarProducts as Y, rankSimilarProductsAsync as Z, scoreSimilarityCandidate as ee, tokenizeSimilarityText as te } from "./algos/similarity.js";
2
- import { $ as ae, A as oe, B as v, C as ne, D as S, E as ce, F as se, G as b, H as ie, I as ue, J as le, K as de, L as pe, M as ye, N as me, O as A, P as fe, Q as _e, R as ke, S as Pe, T, U as ge, V as I, W as he, X as we, Y as xe, Z as U, _ as ve, a as Se, at as C, b as be, ct as Ae, d as Te, dt as Ie, et as Ue, f as Ce, ft as Be, g as Re, gt as Ke, h as Me, ht as Fe, i as Le, it as je, j as ze, k as B, lt as R, m as Ee, n as Oe, nt as K, o as Je, ot as qe, p as Ne, pt as M, q as $e, r as De, rt as He, s as Qe, st as F, t as Ve, tt as We, u as Ge, ut as Xe, v as Ye, w as L, x as j, y as Ze, z } from "../route-params-UDemctx_.js";
3
- function et(e) {
4
- const t = self, r = /* @__PURE__ */ new Map(), a = M(t), l = z(a);
5
- let s = null, y = null, p = null, f = "";
6
- t.addEventListener("message", (o) => {
7
- const i = o.data;
8
- if (i) {
9
- if (i.type === "abort") {
10
- typeof i.id == "number" && (r.get(i.id)?.abort(), r.delete(i.id));
1
+ import { buildPhotoSimilarityProfile as G, buildProductSimilarityProfile as X, buildSimilarityQueries as Y, normalizeSimilarityText as Z, rankSimilarProducts as tt, rankSimilarProductsAsync as et, scoreSimilarityCandidate as rt, tokenizeSimilarityText as at } from "./algos/similarity.js";
2
+ import { $ as A, A as nt, At as st, B as b, C as ct, Ct as T, D as it, Dt as C, E as lt, Et as ut, F as dt, G as pt, H as U, I as yt, J as mt, K as ft, L as I, M as _t, N as gt, O as ht, P as R, Q as B, R as F, St as Pt, T as kt, Tt as wt, U as vt, V as M, W as St, X as xt, Y as At, Z as bt, _ as Tt, _t as Ct, a as Ut, at as K, b as It, bt as Rt, c as Bt, ct as Ft, d as Mt, dt as S, et as Kt, f as Lt, ft as L, g as jt, gt as j, h as Et, ht as zt, i as Ot, it as qt, j as Jt, k as Nt, kt as $t, l as Dt, lt as Ht, m as Wt, mt as Qt, n as Vt, nt as Gt, o as Xt, ot as Yt, p as Zt, pt as te, q as ee, r as re, rt as ae, s as oe, st as ne, t as se, tt as E, u as ce, ut as ie, v as le, vt as ue, w as de, wt as pe, xt as z, y as ye, yt as O, z as me } from "../agent-ui-steps-Dc4ByfZo.js";
3
+ function fe(t) {
4
+ const e = self, r = /* @__PURE__ */ new Map(), a = C(e), u = B(a);
5
+ let s = null, y = null, p = null, g = "", f = "idle";
6
+ e.addEventListener("message", (n) => {
7
+ const o = n.data;
8
+ if (o) {
9
+ if (o.type === "abort") {
10
+ typeof o.id == "number" && (r.get(o.id)?.abort(), r.delete(o.id));
11
11
  return;
12
12
  }
13
- i.type === "invoke" && k(i);
13
+ o.type === "invoke" && _(o);
14
14
  }
15
15
  });
16
- async function k(o) {
17
- s = {
18
- accountId: String(o.accountId || e.accountId || ""),
19
- beUrl: o.beUrl || "",
20
- ...o.devJwtSecret ? { devJwtSecret: o.devJwtSecret } : {},
21
- ...o.tokenBrokerUrl ? { tokenBrokerUrl: o.tokenBrokerUrl } : {},
22
- ...o.tokenBrokerAudience ? { tokenBrokerAudience: o.tokenBrokerAudience } : {},
23
- locale: o.defaultLocale || e.defaultLocale || "en-GB",
24
- parentUrl: o.parentUrl || ""
16
+ async function _(n) {
17
+ if (f !== "idle") {
18
+ const l = (k) => {
19
+ e.postMessage({
20
+ id: n.id,
21
+ type: "event",
22
+ event: k
23
+ });
24
+ };
25
+ l(L("agent_busy", "Another shopper turn is already in flight; please try again in a moment.")), l(S()), e.postMessage({
26
+ id: n.id,
27
+ type: "end"
28
+ });
29
+ return;
30
+ }
31
+ f = "in_turn", s = {
32
+ accountId: String(n.accountId || t.accountId || ""),
33
+ beUrl: n.beUrl || "",
34
+ ...n.devJwtSecret ? { devJwtSecret: n.devJwtSecret } : {},
35
+ ...n.tokenBrokerUrl ? { tokenBrokerUrl: n.tokenBrokerUrl } : {},
36
+ ...n.tokenBrokerAudience ? { tokenBrokerAudience: n.tokenBrokerAudience } : {},
37
+ locale: n.defaultLocale || t.defaultLocale || "en-GB",
38
+ parentUrl: n.parentUrl || ""
25
39
  };
26
- const i = [
40
+ const o = [
27
41
  s.accountId,
28
42
  s.devJwtSecret || "",
29
43
  s.tokenBrokerUrl || "",
30
44
  s.tokenBrokerAudience || ""
31
45
  ].join(`
32
46
  `);
33
- (!p || f !== i) && (p = F(s), f = i), y ||= new R({
47
+ (!p || g !== o) && (p = z(s), g = o), y ||= new T({
34
48
  accountId: s.accountId,
35
49
  locale: s.locale,
36
50
  parentUrl: s.parentUrl,
37
51
  rpc: a,
38
- persistentPanelKeys: e.contextPersistence?.panelKeys,
39
- panelKeyLimits: e.contextPersistence?.panelKeyLimits,
40
- messageLimit: e.contextPersistence?.messageLimit,
41
- maxThreads: e.contextPersistence?.maxThreads,
42
- threadTtlMs: e.contextPersistence?.threadTtlMs
52
+ persistentPanelKeys: t.contextPersistence?.panelKeys,
53
+ panelKeyLimits: t.contextPersistence?.panelKeyLimits,
54
+ messageLimit: t.contextPersistence?.messageLimit,
55
+ maxThreads: t.contextPersistence?.maxThreads,
56
+ threadTtlMs: t.contextPersistence?.threadTtlMs
43
57
  });
44
- const n = new AbortController();
45
- r.set(o.id, n);
46
- const u = (c) => {
47
- t.postMessage({
48
- id: o.id,
58
+ const c = new AbortController();
59
+ r.set(n.id, c);
60
+ const i = (l) => {
61
+ e.postMessage({
62
+ id: n.id,
49
63
  type: "event",
50
- event: c
64
+ event: l
51
65
  });
52
- }, d = (c) => {
53
- o.debugActivity === !0 && t.postMessage({
54
- id: o.id,
66
+ }, d = (l) => {
67
+ n.debugActivity === !0 && e.postMessage({
68
+ id: n.id,
55
69
  type: "activity",
56
- entry: c
70
+ entry: l
57
71
  });
58
72
  };
59
73
  try {
60
- const c = s, P = p;
61
- await v({
62
- request: o.request || {},
74
+ const l = s, k = p;
75
+ await A({
76
+ request: n.request || {},
63
77
  accountModule: {
64
- ...e,
65
- accountId: c.accountId,
66
- trace: async (w) => {
78
+ ...t,
79
+ accountId: l.accountId,
80
+ trace: async (v) => {
67
81
  d({
68
82
  kind: "flow/trace",
69
- event: w
70
- }), await e.trace?.(w);
83
+ event: v
84
+ }), await t.trace?.(v);
71
85
  }
72
86
  },
73
87
  contextStore: y,
74
- beClient: E({
75
- config: c,
76
- jwtProvider: P,
88
+ beClient: q({
89
+ config: l,
90
+ jwtProvider: k,
77
91
  postActivity: d
78
92
  }),
79
- toolBridge: l,
80
- emit: u,
93
+ toolBridge: u,
94
+ emit: i,
81
95
  rpc: a,
82
- signal: n.signal
83
- }), t.postMessage({
84
- id: o.id,
96
+ signal: c.signal
97
+ }), e.postMessage({
98
+ id: n.id,
85
99
  type: "end"
86
100
  });
87
- } catch (c) {
88
- n.signal.aborted || (u(C(c)), u(U()), t.postMessage({
89
- id: o.id,
101
+ } catch (l) {
102
+ c.signal.aborted || (i(O(l)), i(S()), e.postMessage({
103
+ id: n.id,
90
104
  type: "end"
91
105
  }));
92
106
  } finally {
93
- r.delete(o.id);
107
+ r.delete(n.id), f = "idle";
94
108
  }
95
109
  }
96
110
  }
97
- function E({ config: e, jwtProvider: t, postActivity: r }) {
98
- return { async invoke({ op: a, input: l, signal: s, cacheTtlS: y, cacheKey: p, browserCache: f }) {
99
- const k = performance.now(), o = e.accountId.replace(/-agentic$/u, ""), i = `${String(e.beUrl).replace(/\/+$/u, "")}/v1/execute`;
111
+ function q({ config: t, jwtProvider: e, postActivity: r }) {
112
+ return { async invoke({ op: a, input: u, signal: s, cacheTtlS: y, cacheKey: p, browserCache: g }) {
113
+ const f = performance.now(), _ = t.accountId.replace(/-agentic$/u, ""), n = `${String(t.beUrl).replace(/\/+$/u, "")}/v1/execute`;
100
114
  r({
101
115
  kind: "be/request",
102
116
  source: "worker-fetch",
103
- url: i,
117
+ url: n,
104
118
  op: a,
105
- opDomain: o,
106
- params: l || {},
119
+ opDomain: _,
120
+ params: u || {},
107
121
  rawBody: {
108
- op_domain: o,
122
+ op_domain: _,
109
123
  op_name: a,
110
- op_payload: l,
124
+ op_payload: u,
111
125
  ...y !== void 0 ? { cache_ttl_s: y } : {},
112
126
  ...p !== void 0 ? { cache_key: p } : {}
113
127
  }
114
128
  });
115
129
  try {
116
- const n = await K({
117
- beUrl: e.beUrl,
118
- accountId: e.accountId,
119
- jwtProvider: t,
120
- parentUrl: e.parentUrl,
130
+ const o = await j({
131
+ beUrl: t.beUrl,
132
+ accountId: t.accountId,
133
+ jwtProvider: e,
134
+ parentUrl: t.parentUrl,
121
135
  op: a,
122
- input: l,
136
+ input: u,
123
137
  cacheTtlS: y,
124
138
  cacheKey: p,
125
- browserCache: f,
139
+ browserCache: g,
126
140
  ...s ? { signal: s } : {}
127
141
  });
128
142
  return r({
129
143
  kind: "be/response",
130
144
  source: "worker-fetch",
131
- url: i,
145
+ url: n,
132
146
  status: 200,
133
147
  op: a,
134
- opDomain: o,
135
- latencyMs: Math.max(0, Math.round(performance.now() - k)),
136
- result: n
137
- }), n;
138
- } catch (n) {
148
+ opDomain: _,
149
+ latencyMs: Math.max(0, Math.round(performance.now() - f)),
150
+ result: o
151
+ }), o;
152
+ } catch (o) {
139
153
  throw r({
140
154
  kind: "be/response",
141
155
  source: "worker-fetch",
142
- url: i,
156
+ url: n,
143
157
  op: a,
144
- opDomain: o,
145
- latencyMs: Math.max(0, Math.round(performance.now() - k)),
146
- error: n instanceof Error ? n.message : String(n)
147
- }), n;
158
+ opDomain: _,
159
+ latencyMs: Math.max(0, Math.round(performance.now() - f)),
160
+ error: o instanceof Error ? o.message : String(o)
161
+ }), o;
148
162
  }
149
163
  } };
150
164
  }
151
- var h = { patterns: [
152
- ...S,
165
+ var w = { patterns: [
166
+ ...b,
153
167
  {
154
168
  pattern: /(?:adresim|adres|address)\s*[:=]?\s*[^.;\n]{0,160}/giu,
155
169
  replacement: "[address]"
@@ -158,80 +172,80 @@ var h = { patterns: [
158
172
  pattern: /[^\s,.;]{2,}\s+(?:mahallesi|mah\.|sokak|sk\.|cadde|cad\.)\s+[^.;\n]{0,120}/giu,
159
173
  replacement: "[address]"
160
174
  }
161
- ] }, O = "llm-flow-routing-v1";
162
- function J(e) {
163
- return String(e?.payload?.text || e?.payload?.query || e?.action?.payload?.text || "");
175
+ ] }, J = "llm-flow-routing-v1";
176
+ function N(t) {
177
+ return String(t?.payload?.text || t?.payload?.query || t?.action?.payload?.text || "");
164
178
  }
165
- function tt(e, t = {}) {
166
- return t[e?.type || e?.action?.type] || "";
179
+ function _e(t, e = {}) {
180
+ return e[t?.type || t?.action?.type] || "";
167
181
  }
168
- function rt({ accountId: e, cacheTtlS: t = 3600, browserCacheTtlMs: r, promptVersion: a = O, cacheable: l = !0, piiPatternPack: s = h, utterance: y, compactPageContext: p = N, compactStructuredContext: f = $, extraInput: k, cacheKeyParts: o, onError: i = [] } = {}) {
182
+ function ge({ accountId: t, cacheTtlS: e = 3600, browserCacheTtlMs: r, promptVersion: a = J, cacheable: u = !0, piiPatternPack: s = w, utterance: y, compactPageContext: p = D, compactStructuredContext: g = H, extraInput: f, cacheKeyParts: _, onError: n = [] } = {}) {
169
183
  return {
170
184
  kind: "be_op",
171
185
  op: "intent",
172
- input: (n) => {
173
- const { request: u, context: d, bag: c, accountConfig: P } = n;
174
- return L(_({
175
- utterance: x(u, {
176
- request: u,
177
- context: d,
178
- bag: c,
179
- accountConfig: P
186
+ input: (o) => {
187
+ const { request: c, context: i, bag: d, accountConfig: l } = o;
188
+ return I(h({
189
+ utterance: x(c, {
190
+ request: c,
191
+ context: i,
192
+ bag: d,
193
+ accountConfig: l
180
194
  }, y, s),
181
- page_context: m(p, c.page, n),
182
- structured_context: m(f, d, n),
183
- locale: d.meta.locale,
184
- ..._(m(k, n))
185
- }), P, "intent");
195
+ page_context: m(p, d.page, o),
196
+ structured_context: m(g, i, o),
197
+ locale: i.meta.locale,
198
+ ...h(m(f, o))
199
+ }), l, "intent");
186
200
  },
187
201
  out: "route",
188
- cache: (n) => m(l, n) ? j({
189
- ttlS: t,
202
+ cache: (o) => m(u, o) ? R({
203
+ ttlS: e,
190
204
  promptVersion: a
191
205
  }) : void 0,
192
206
  ...r ? { browserCache: { ttlMs: r } } : {},
193
- cacheKey: ({ request: n, context: u, bag: d, accountConfig: c }) => {
194
- if (m(l, {
195
- request: n,
196
- context: u,
197
- bag: d,
198
- accountConfig: c
207
+ cacheKey: ({ request: o, context: c, bag: i, accountConfig: d }) => {
208
+ if (m(u, {
209
+ request: o,
210
+ context: c,
211
+ bag: i,
212
+ accountConfig: d
199
213
  }))
200
- return I("intent", {
201
- account: e,
214
+ return E("intent", {
215
+ account: t,
202
216
  prompt: a,
203
- locale: u.meta.locale,
204
- utterance: b(x(n, {
205
- request: n,
206
- context: u,
207
- bag: d,
208
- accountConfig: c
209
- }, y, s), u.meta.locale),
210
- page: m(p, d.page, {
211
- request: n,
212
- context: u,
213
- bag: d,
214
- accountConfig: c
217
+ locale: c.meta.locale,
218
+ utterance: K(x(o, {
219
+ request: o,
220
+ context: c,
221
+ bag: i,
222
+ accountConfig: d
223
+ }, y, s), c.meta.locale),
224
+ page: m(p, i.page, {
225
+ request: o,
226
+ context: c,
227
+ bag: i,
228
+ accountConfig: d
215
229
  }),
216
- panel: m(f, u, {
217
- request: n,
218
- context: u,
219
- bag: d,
220
- accountConfig: c
230
+ panel: m(g, c, {
231
+ request: o,
232
+ context: c,
233
+ bag: i,
234
+ accountConfig: d
221
235
  }),
222
- ..._(m(o, {
223
- request: n,
224
- context: u,
225
- bag: d,
226
- accountConfig: c
236
+ ...h(m(_, {
237
+ request: o,
238
+ context: c,
239
+ bag: i,
240
+ accountConfig: d
227
241
  }))
228
242
  });
229
243
  },
230
- onError: i
244
+ onError: n
231
245
  };
232
246
  }
233
- function at(e, t = "product") {
234
- const r = String(e?.intent?.kind || e?.kind || "").trim();
247
+ function he(t, e = "product") {
248
+ const r = String(t?.intent?.kind || t?.kind || "").trim();
235
249
  return {
236
250
  product_search: "search",
237
251
  add_to_cart: "cart",
@@ -245,16 +259,16 @@ function at(e, t = "product") {
245
259
  consulting_redirect: "consulting",
246
260
  handoff_shopping: "consulting",
247
261
  handOffShopping: "consulting"
248
- }[r] || r || t;
262
+ }[r] || r || e;
249
263
  }
250
- function ot(e, t) {
251
- return q(e, t).query || "";
264
+ function Pe(t, e) {
265
+ return $(t, e).query || "";
252
266
  }
253
- function q(e, t) {
254
- const r = t.route?.search_params || t.route?.searchParams || {}, a = e?.payload || {}, l = r.query || a.query;
255
- return _({
267
+ function $(t, e) {
268
+ const r = e.route?.search_params || e.route?.searchParams || {}, a = t?.payload || {}, u = r.query || a.query;
269
+ return h({
256
270
  ...r,
257
- query: l,
271
+ query: u,
258
272
  text: r.text || a.text,
259
273
  facetParams: r.facetParams || r.facet_params || a.facetParams || a.facet_params,
260
274
  facets: r.facets || a.facets,
@@ -265,135 +279,149 @@ function q(e, t) {
265
279
  maxPrice: r.maxPrice || a.maxPrice
266
280
  });
267
281
  }
268
- function nt(e) {
269
- return (e.route?.flow_params && typeof e.route.flow_params == "object" ? e.route.flow_params : null) || (e.route?.flowParams && typeof e.route.flowParams == "object" ? e.route.flowParams : null) || {};
282
+ function ke(t) {
283
+ return (t.route?.flow_params && typeof t.route.flow_params == "object" ? t.route.flow_params : null) || (t.route?.flowParams && typeof t.route.flowParams == "object" ? t.route.flowParams : null) || {};
270
284
  }
271
- function N(e = {}) {
272
- const t = e?.product && typeof e.product == "object" ? e.product : null;
273
- return _({
274
- pageType: e?.pageType || e?.type || "other",
275
- sku: e?.sku || t?.sku,
276
- product_name: t?.name || t?.title,
277
- category_names: Array.isArray(t?.category_names) ? t.category_names.slice(0, 5) : void 0
285
+ function D(t = {}) {
286
+ const e = t?.product && typeof t.product == "object" ? t.product : null;
287
+ return h({
288
+ pageType: t?.pageType || t?.type || "other",
289
+ sku: t?.sku || e?.sku,
290
+ product_name: e?.name || e?.title,
291
+ category_names: Array.isArray(e?.category_names) ? e.category_names.slice(0, 5) : void 0
278
292
  });
279
293
  }
280
- function $(e = {}) {
281
- const t = e.panel || {};
282
- return _({
283
- screen_type: t.screen_type,
284
- screen_sku_list: Array.isArray(t.screen_sku_list) ? t.screen_sku_list.slice(0, 24) : void 0,
285
- chat_mentioned_skus: Array.isArray(t.chat_mentioned_skus) ? t.chat_mentioned_skus.slice(0, 12) : void 0,
286
- last_search: D(t.last_search),
287
- current_panel_product_count: Array.isArray(t.last_search_products) ? t.last_search_products.length : 0
294
+ function H(t = {}) {
295
+ const e = t.panel || {};
296
+ return h({
297
+ screen_type: e.screen_type,
298
+ screen_sku_list: Array.isArray(e.screen_sku_list) ? e.screen_sku_list.slice(0, 24) : void 0,
299
+ chat_mentioned_skus: Array.isArray(e.chat_mentioned_skus) ? e.chat_mentioned_skus.slice(0, 12) : void 0,
300
+ last_search: W(e.last_search),
301
+ current_panel_product_count: Array.isArray(e.last_search_products) ? e.last_search_products.length : 0
288
302
  });
289
303
  }
290
- function D(e) {
291
- return !e || typeof e != "object" ? null : _({
292
- query: g(e.query),
293
- source: e.source,
294
- count: e.count,
295
- category: g(e.category),
296
- goal: g(e.goal)
304
+ function W(t) {
305
+ return !t || typeof t != "object" ? null : h({
306
+ query: P(t.query),
307
+ source: t.source,
308
+ count: t.count,
309
+ category: P(t.category),
310
+ goal: P(t.goal)
297
311
  });
298
312
  }
299
- function H(e, t = h) {
300
- return T(e, t) || g(B(e) || J(e), t);
313
+ function Q(t, e = w) {
314
+ return F(t, e) || P(U(t) || N(t), e);
301
315
  }
302
- function x(e, t, r, a) {
303
- const l = m(r, e, t);
304
- return l ? String(l) : H(e, a);
316
+ function x(t, e, r, a) {
317
+ const u = m(r, t, e);
318
+ return u ? String(u) : Q(t, a);
305
319
  }
306
- function g(e, t = h) {
307
- return A(String(e || ""), t);
320
+ function P(t, e = w) {
321
+ return M(String(t || ""), e);
308
322
  }
309
- function m(e, t, r) {
310
- return typeof e == "function" ? e(t, r) : e;
323
+ function m(t, e, r) {
324
+ return typeof t == "function" ? t(e, r) : t;
311
325
  }
312
- function _(e) {
313
- return Object.fromEntries(Object.entries(e || {}).filter(([, t]) => t != null && t !== "" && (!Array.isArray(t) || t.length)));
326
+ function h(t) {
327
+ return Object.fromEntries(Object.entries(t || {}).filter(([, e]) => e != null && e !== "" && (!Array.isArray(e) || e.length)));
314
328
  }
315
329
  export {
316
- He as AgentError,
317
- R as ContextStore,
318
- ve as FALLBACK_STATUS,
319
- we as action,
320
- ze as actionButtonsUiSpec,
321
- se as alignProductsToTable,
322
- T as anonymousRequestText,
323
- je as beErrorToAgentError,
324
- V as buildPhotoSimilarityProfile,
325
- W as buildProductSimilarityProfile,
326
- G as buildSimilarityQueries,
327
- C as caughtToStreamError,
328
- ne as compactAccountConfig,
329
- ke as compactContextProducts,
330
- Me as compactObject,
331
- Qe as compactProductSurfaceForLlm,
332
- ue as comparisonResultForUi,
333
- ye as comparisonUiSpec,
334
- oe as createFlow,
335
- F as createJwtProvider,
336
- Ce as createPrivacyHelpers,
337
- Re as createReadPageStep,
338
- z as createToolBridge,
339
- M as createWorkerRpc,
340
- be as declarativeBeOpCache,
341
- ce as defaultPiiPatternPack,
342
- S as defaultPiiPatterns,
343
- U as done,
344
- Ie as elapsedMs,
345
- _e as error,
346
- tt as explicitRoute,
347
- Ye as fallbackStatus,
348
- Ve as firstArrayValue,
349
- nt as flowParamsFromRoute,
350
- Fe as handleMainRpc,
351
- Ee as homePanelReset,
352
- qe as httpErrorToAgentError,
353
- j as inputHashCachePolicy,
354
- K as invokeBeOp,
355
- Ze as isFallbackStatus,
356
- I as llmCacheKey,
357
- rt as llmIntentStep,
358
- Ge as mergeProductSurfaceEvidence,
359
- ae as metadata,
360
- Ae as mintDevJwt,
361
- pe as normalizeComparisonTable,
362
- de as normalizeProduct,
363
- X as normalizeSimilarityText,
364
- Be as nowIso,
365
- Ne as plainMessageContent,
366
- me as productDetailsUiSpec,
367
- ie as productFactsKey,
368
- ge as productSkuKey,
369
- Te as productSurfaceReviewText,
370
- fe as productsUiSpec,
371
- Y as rankSimilarProducts,
372
- Z as rankSimilarProductsAsync,
373
- A as redactPii,
374
- B as requestText,
375
- xe as resolveFlow,
376
- Le as retailAnonymizeMessages,
377
- Se as retailAnonymousRequestText,
378
- Je as retailRedactPii,
379
- Oe as routeFlowParams,
380
- at as routeKind,
381
- De as routeSkuList,
382
- J as routeText,
383
- Ke as runMainRpc,
384
- v as runTurn,
385
- ee as scoreSimilarityCandidate,
386
- q as searchInputFromRoute,
387
- ot as searchQueryFromRoute,
388
- he as stableKey,
389
- et as startWorker,
390
- Xe as stickyContextKey,
391
- Ue as textChunk,
392
- b as textKey,
393
- te as tokenizeSimilarityText,
394
- $e as trimProductFactsCore,
395
- le as trimProductFactsListCore,
396
- We as uiSpec,
397
- L as withAccountConfig,
398
- Pe as withDeclarativeBeOpCache
330
+ Ct as AgentError,
331
+ T as ContextStore,
332
+ nt as FALLBACK_STATUS,
333
+ Mt as __resetAllCartCoalescersForTesting,
334
+ Dt as __resetAllPdpHydratorsForTesting,
335
+ ie as action,
336
+ St as actionButtonsUiSpec,
337
+ mt as alignProductsToTable,
338
+ F as anonymousRequestText,
339
+ re as applyCompactionResult,
340
+ ue as beErrorToAgentError,
341
+ Ot as buildCompactionRequest,
342
+ se as buildPdpFollowupSteps,
343
+ G as buildPhotoSimilarityProfile,
344
+ X as buildProductSimilarityProfile,
345
+ Y as buildSimilarityQueries,
346
+ Vt as buildToolUiSteps,
347
+ O as caughtToStreamError,
348
+ Lt as coalesceAddToCart,
349
+ yt as compactAccountConfig,
350
+ bt as compactContextProducts,
351
+ ht as compactObject,
352
+ It as compactProductSurfaceForLlm,
353
+ At as comparisonResultForUi,
354
+ pt as comparisonUiSpec,
355
+ vt as createFlow,
356
+ z as createJwtProvider,
357
+ kt as createPrivacyHelpers,
358
+ Nt as createReadPageStep,
359
+ B as createToolBridge,
360
+ C as createWorkerRpc,
361
+ gt as declarativeBeOpCache,
362
+ me as defaultPiiPatternPack,
363
+ b as defaultPiiPatterns,
364
+ S as done,
365
+ wt as elapsedMs,
366
+ L as error,
367
+ _e as explicitRoute,
368
+ Jt as fallbackStatus,
369
+ Wt as firstArrayValue,
370
+ ke as flowParamsFromRoute,
371
+ $t as handleMainRpc,
372
+ it as homePanelReset,
373
+ Rt as httpErrorToAgentError,
374
+ R as inputHashCachePolicy,
375
+ j as invokeBeOp,
376
+ _t as isFallbackStatus,
377
+ E as llmCacheKey,
378
+ ge as llmIntentStep,
379
+ ct as mergeProductSurfaceEvidence,
380
+ Xt as mergeRoundProducts,
381
+ te as metadata,
382
+ Pt as mintDevJwt,
383
+ xt as normalizeComparisonTable,
384
+ Yt as normalizeProduct,
385
+ Z as normalizeSimilarityText,
386
+ ut as nowIso,
387
+ lt as plainMessageContent,
388
+ ft as productDetailsUiSpec,
389
+ Gt as productFactsKey,
390
+ ae as productSkuKey,
391
+ de as productSurfaceReviewText,
392
+ ee as productsUiSpec,
393
+ tt as rankSimilarProducts,
394
+ et as rankSimilarProductsAsync,
395
+ M as redactPii,
396
+ U as requestText,
397
+ Ht as resolveFlow,
398
+ Tt as retailAnonymizeMessages,
399
+ le as retailAnonymousRequestText,
400
+ ye as retailRedactPii,
401
+ Et as routeFlowParams,
402
+ he as routeKind,
403
+ jt as routeSkuList,
404
+ N as routeText,
405
+ st as runMainRpc,
406
+ A as runTurn,
407
+ rt as scoreSimilarityCandidate,
408
+ oe as searchFollowUpPills,
409
+ $ as searchInputFromRoute,
410
+ Pe as searchQueryFromRoute,
411
+ Ut as shouldCompact,
412
+ Zt as singleFlight,
413
+ qt as stableKey,
414
+ fe as startWorker,
415
+ pe as stickyContextKey,
416
+ Qt as textChunk,
417
+ K as textKey,
418
+ at as tokenizeSimilarityText,
419
+ ne as trimProductFactsCore,
420
+ Ft as trimProductFactsListCore,
421
+ zt as uiSpec,
422
+ Kt as validateToolArgs,
423
+ I as withAccountConfig,
424
+ dt as withDeclarativeBeOpCache,
425
+ Bt as withSimilarsAppend,
426
+ ce as wrapResolveProductsWithPdpHydration
399
427
  };