@gengage/assistant-fe 0.1.0 → 0.1.1

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 (148) hide show
  1. package/LICENSE +2 -2
  2. package/README.md +2 -2
  3. package/dist/assistant-fe.css +1 -1
  4. package/dist/chat/api.d.ts +12 -2
  5. package/dist/chat/api.d.ts.map +1 -1
  6. package/dist/chat/catalog.d.ts +246 -896
  7. package/dist/chat/catalog.d.ts.map +1 -1
  8. package/dist/chat/components/AIGroupingCards.d.ts.map +1 -1
  9. package/dist/chat/components/AISuggestedSearchCards.d.ts.map +1 -1
  10. package/dist/chat/components/AITopPicks.d.ts.map +1 -1
  11. package/dist/chat/components/CategoriesContainer.d.ts.map +1 -1
  12. package/dist/chat/components/ChatDrawer.d.ts +11 -2
  13. package/dist/chat/components/ChatDrawer.d.ts.map +1 -1
  14. package/dist/chat/components/ComparisonTable.d.ts +9 -0
  15. package/dist/chat/components/ComparisonTable.d.ts.map +1 -1
  16. package/dist/chat/components/GroundingReviewCard.d.ts.map +1 -1
  17. package/dist/chat/components/HandoffNotice.d.ts +5 -0
  18. package/dist/chat/components/HandoffNotice.d.ts.map +1 -0
  19. package/dist/chat/components/KvkkBanner.d.ts +1 -0
  20. package/dist/chat/components/KvkkBanner.d.ts.map +1 -1
  21. package/dist/chat/components/ProactivePopup.d.ts +2 -0
  22. package/dist/chat/components/ProactivePopup.d.ts.map +1 -1
  23. package/dist/chat/components/ProductSummaryCard.d.ts +4 -0
  24. package/dist/chat/components/ProductSummaryCard.d.ts.map +1 -0
  25. package/dist/chat/components/ReviewHighlights.d.ts +3 -1
  26. package/dist/chat/components/ReviewHighlights.d.ts.map +1 -1
  27. package/dist/chat/components/ThumbnailsColumn.d.ts.map +1 -1
  28. package/dist/chat/components/renderUISpec.d.ts +4 -3
  29. package/dist/chat/components/renderUISpec.d.ts.map +1 -1
  30. package/dist/chat/heartbeat.d.ts +71 -0
  31. package/dist/chat/heartbeat.d.ts.map +1 -0
  32. package/dist/chat/index.d.ts +33 -78
  33. package/dist/chat/index.d.ts.map +1 -1
  34. package/dist/chat/kvkk.d.ts +21 -0
  35. package/dist/chat/kvkk.d.ts.map +1 -0
  36. package/dist/chat/locales/en.d.ts.map +1 -1
  37. package/dist/chat/locales/tr.d.ts.map +1 -1
  38. package/dist/chat/panel-manager.d.ts +81 -0
  39. package/dist/chat/panel-manager.d.ts.map +1 -0
  40. package/dist/chat/session-persistence.d.ts +52 -0
  41. package/dist/chat/session-persistence.d.ts.map +1 -0
  42. package/dist/chat/types.d.ts +33 -1
  43. package/dist/chat/types.d.ts.map +1 -1
  44. package/dist/chat.cjs +1 -1
  45. package/dist/chat.iife.js +48 -10
  46. package/dist/chat.iife.js.map +1 -1
  47. package/dist/chat.js +9 -8
  48. package/dist/chat.js.map +1 -1
  49. package/dist/common/analytics-events.d.ts +2 -0
  50. package/dist/common/analytics-events.d.ts.map +1 -1
  51. package/dist/common/analytics.d.ts.map +1 -1
  52. package/dist/common/api-paths.d.ts +5 -0
  53. package/dist/common/api-paths.d.ts.map +1 -1
  54. package/dist/common/client.d.ts +4 -1
  55. package/dist/common/client.d.ts.map +1 -1
  56. package/dist/common/communication-bridge.d.ts.map +1 -1
  57. package/dist/common/config-schema.d.ts +33 -195
  58. package/dist/common/config-schema.d.ts.map +1 -1
  59. package/dist/common/ga-datalayer.d.ts +62 -0
  60. package/dist/common/ga-datalayer.d.ts.map +1 -0
  61. package/dist/common/index.d.ts +7 -0
  62. package/dist/common/index.d.ts.map +1 -1
  63. package/dist/common/indexed-db.d.ts +1 -1
  64. package/dist/common/indexed-db.d.ts.map +1 -1
  65. package/dist/common/merchant-configs.d.ts +22 -0
  66. package/dist/common/merchant-configs.d.ts.map +1 -0
  67. package/dist/common/overlay.d.ts +5 -0
  68. package/dist/common/overlay.d.ts.map +1 -1
  69. package/dist/common/page-detect.d.ts +31 -0
  70. package/dist/common/page-detect.d.ts.map +1 -0
  71. package/dist/common/preflight.d.ts +3 -1
  72. package/dist/common/preflight.d.ts.map +1 -1
  73. package/dist/common/price-formatter.d.ts +33 -0
  74. package/dist/common/price-formatter.d.ts.map +1 -0
  75. package/dist/common/product-utils.d.ts +26 -0
  76. package/dist/common/product-utils.d.ts.map +1 -0
  77. package/dist/common/quantity-stepper.d.ts +22 -0
  78. package/dist/common/quantity-stepper.d.ts.map +1 -0
  79. package/dist/common/safe-html.d.ts +10 -6
  80. package/dist/common/safe-html.d.ts.map +1 -1
  81. package/dist/common/streaming.d.ts.map +1 -1
  82. package/dist/common/tts-player.d.ts +12 -0
  83. package/dist/common/tts-player.d.ts.map +1 -0
  84. package/dist/common/types.d.ts +51 -0
  85. package/dist/common/types.d.ts.map +1 -1
  86. package/dist/common/v1-protocol-adapter.d.ts +9 -0
  87. package/dist/common/v1-protocol-adapter.d.ts.map +1 -1
  88. package/dist/common/voice-input.d.ts +74 -0
  89. package/dist/common/voice-input.d.ts.map +1 -0
  90. package/dist/common/widget-base.d.ts +17 -1
  91. package/dist/common/widget-base.d.ts.map +1 -1
  92. package/dist/common.cjs +1 -1
  93. package/dist/common.cjs.map +1 -1
  94. package/dist/common.js +564 -244
  95. package/dist/common.js.map +1 -1
  96. package/dist/index-CmlYMq-h.js +4218 -0
  97. package/dist/index-CmlYMq-h.js.map +1 -0
  98. package/dist/index-DK4lqi85.cjs +13 -0
  99. package/dist/index-DK4lqi85.cjs.map +1 -0
  100. package/dist/index.cjs +1 -1
  101. package/dist/index.d.ts +2 -2
  102. package/dist/index.d.ts.map +1 -1
  103. package/dist/index.js +61 -53
  104. package/dist/qna/catalog.d.ts +30 -96
  105. package/dist/qna/catalog.d.ts.map +1 -1
  106. package/dist/qna/components/TextInput.d.ts.map +1 -1
  107. package/dist/qna/index.d.ts +2 -0
  108. package/dist/qna/index.d.ts.map +1 -1
  109. package/dist/qna.cjs +1 -1
  110. package/dist/qna.cjs.map +1 -1
  111. package/dist/qna.iife.js +46 -8
  112. package/dist/qna.iife.js.map +1 -1
  113. package/dist/qna.js +90 -83
  114. package/dist/qna.js.map +1 -1
  115. package/dist/quantity-stepper-B8kX8GbN.js +209 -0
  116. package/dist/quantity-stepper-B8kX8GbN.js.map +1 -0
  117. package/dist/quantity-stepper-UbAp53Ow.cjs +2 -0
  118. package/dist/quantity-stepper-UbAp53Ow.cjs.map +1 -0
  119. package/dist/schemas-DbbfBnZe.cjs +86 -0
  120. package/dist/schemas-DbbfBnZe.cjs.map +1 -0
  121. package/dist/schemas-SGuXpngy.js +4558 -0
  122. package/dist/schemas-SGuXpngy.js.map +1 -0
  123. package/dist/simrel/api.d.ts.map +1 -1
  124. package/dist/simrel/catalog.d.ts +32 -240
  125. package/dist/simrel/catalog.d.ts.map +1 -1
  126. package/dist/simrel/components/GroupTabs.d.ts.map +1 -1
  127. package/dist/simrel/components/ProductCard.d.ts +2 -0
  128. package/dist/simrel/components/ProductCard.d.ts.map +1 -1
  129. package/dist/simrel/components/renderUISpec.d.ts.map +1 -1
  130. package/dist/simrel/index.d.ts.map +1 -1
  131. package/dist/simrel/types.d.ts +5 -0
  132. package/dist/simrel/types.d.ts.map +1 -1
  133. package/dist/simrel.cjs +1 -1
  134. package/dist/simrel.cjs.map +1 -1
  135. package/dist/simrel.css +1 -1
  136. package/dist/simrel.iife.js +46 -8
  137. package/dist/simrel.iife.js.map +1 -1
  138. package/dist/simrel.js +319 -279
  139. package/dist/simrel.js.map +1 -1
  140. package/package.json +26 -7
  141. package/dist/index-CFA70IGF.js +0 -3626
  142. package/dist/index-CFA70IGF.js.map +0 -1
  143. package/dist/index-Dfl89zpe.cjs +0 -13
  144. package/dist/index-Dfl89zpe.cjs.map +0 -1
  145. package/dist/types-CeON7iBO.cjs +0 -48
  146. package/dist/types-CeON7iBO.cjs.map +0 -1
  147. package/dist/types-yxW8WA7u.js +0 -4132
  148. package/dist/types-yxW8WA7u.js.map +0 -1
package/dist/common.js CHANGED
@@ -1,48 +1,49 @@
1
- import { o as l, s as d, D as k, f as v, e as c, q as p, E as I, F as x, G as E } from "./types-yxW8WA7u.js";
2
- import { B as be, H as Ce, a as ke, t as Ie, I as xe, b as Ee, y as Se, J as Ae, K as qe, c as Ue, L as Me, M as Re, j as Pe, k as Fe, N as Oe, O as Ne, z as De, m as Le, x as Be, P as We, p as $e, n as He, Q as ze, R as Ge, r as Ke, S as Qe, C as je, i as Ye, l as Ve, T as Je, h as Xe, A as Ze, U as et, w as tt, V as it, W as nt } from "./types-yxW8WA7u.js";
3
- import { G as S } from "./index-CFA70IGF.js";
4
- import { r as ot, s as at } from "./index-CFA70IGF.js";
5
- import { GengageQNA as A } from "./qna.js";
6
- import { GengageSimRel as q } from "./simrel.js";
7
- const g = l({
8
- enabled: c().default(!0)
9
- }), U = l({
1
+ import { o as u, s as d, U as A, _ as v, d as f, v as y, V as S, W as x, A as E } from "./schemas-SGuXpngy.js";
2
+ import { B as Pe, X as Ue, a as Re, z as qe, Y as Fe, b as Me, N as Be, Z as Le, $ as ze, c as De, a0 as Ne, a1 as Oe, j as We, k as $e, a2 as He, a3 as Ge, P as Ke, m as Qe, M as Ye, a4 as je, q as Ve, p as Xe, a5 as Ze, a6 as Je, r as et, a7 as tt, T as ot, h as it, l as nt, a8 as at, g as rt, Q as st, a9 as lt, w as dt, aa as ct, ab as ut, ac as ft } from "./schemas-SGuXpngy.js";
3
+ import { G as P } from "./index-CmlYMq-h.js";
4
+ import { V as gt, i as mt, r as pt } from "./index-CmlYMq-h.js";
5
+ import { s as wt } from "./quantity-stepper-B8kX8GbN.js";
6
+ import { GengageQNA as U } from "./qna.js";
7
+ import { GengageSimRel as R } from "./simrel.js";
8
+ const m = u({
9
+ enabled: f().default(!0)
10
+ }), q = u({
10
11
  chat: d().optional(),
11
12
  qna: d().optional(),
12
13
  simrel: d().optional()
13
- }), M = l({}), R = v(["none", "x-api-key-header", "bearer-header", "body-api-key"]), P = l({
14
- mode: R.default("none"),
14
+ }), F = u({}), M = v(["none", "x-api-key-header", "bearer-header", "body-api-key"]), B = u({
15
+ mode: M.default("none"),
15
16
  key: d().optional(),
16
17
  headerName: d().optional(),
17
18
  bodyField: d().default("api_key")
18
- }), F = l({
19
- enabled: c().default(!0),
19
+ }), L = u({
20
+ enabled: f().default(!0),
20
21
  endpoint: d().default("/analytics"),
21
- auth: P.default({ mode: "none", bodyField: "api_key" }),
22
- fireAndForget: c().default(!0),
23
- useBeacon: c().default(!0),
24
- keepaliveFetch: c().default(!0),
25
- timeoutMs: p().int().positive().default(4e3),
26
- maxRetries: p().int().min(0).max(5).default(1)
27
- }), w = "__gengageWidgetsInit", O = l({
28
- idempotencyKey: d().default(w),
29
- requireDomReady: c().default(!0)
30
- }), N = v(["log-and-ignore", "throw", "delegate"]), D = l({
31
- unknownActionPolicy: N.default("log-and-ignore"),
32
- allowScriptCall: c().default(!0)
33
- }), _ = l({
34
- version: k("1"),
22
+ auth: B.default({ mode: "none", bodyField: "api_key" }),
23
+ fireAndForget: f().default(!0),
24
+ useBeacon: f().default(!0),
25
+ keepaliveFetch: f().default(!0),
26
+ timeoutMs: y().int().positive().default(4e3),
27
+ maxRetries: y().int().min(0).max(5).default(1)
28
+ }), _ = "__gengageWidgetsInit", z = u({
29
+ idempotencyKey: d().default(_),
30
+ requireDomReady: f().default(!0)
31
+ }), D = v(["log-and-ignore", "throw", "delegate"]), N = u({
32
+ unknownActionPolicy: D.default("log-and-ignore"),
33
+ allowScriptCall: f().default(!1)
34
+ }), C = u({
35
+ version: A("1"),
35
36
  accountId: d().min(1),
36
37
  middlewareUrl: d().url(),
37
38
  locale: d().optional(),
38
- widgets: l({
39
- chat: g.default({ enabled: !0 }),
40
- qna: g.default({ enabled: !0 }),
41
- simrel: g.default({ enabled: !0 })
39
+ widgets: u({
40
+ chat: m.default({ enabled: !0 }),
41
+ qna: m.default({ enabled: !0 }),
42
+ simrel: m.default({ enabled: !0 })
42
43
  }),
43
- mounts: U.default({}),
44
- transport: M.default({}),
45
- analytics: F.default({
44
+ mounts: q.default({}),
45
+ transport: F.default({}),
46
+ analytics: L.default({
46
47
  enabled: !0,
47
48
  endpoint: "/analytics",
48
49
  auth: { mode: "none", bodyField: "api_key" },
@@ -52,23 +53,23 @@ const g = l({
52
53
  timeoutMs: 4e3,
53
54
  maxRetries: 1
54
55
  }),
55
- gtm: O.default({
56
+ gtm: z.default({
56
57
  idempotencyKey: "__gengageWidgetsInit",
57
58
  requireDomReady: !0
58
59
  }),
59
- actionHandling: D.default({
60
+ actionHandling: N.default({
60
61
  unknownActionPolicy: "log-and-ignore",
61
- allowScriptCall: !0
62
+ allowScriptCall: !1
62
63
  })
63
64
  });
64
- function L(e) {
65
- return _.parse(e);
65
+ function O(e) {
66
+ return C.parse(e);
66
67
  }
67
- function B(e) {
68
- return _.safeParse(e);
68
+ function W(e) {
69
+ return C.safeParse(e);
69
70
  }
70
- function le(e) {
71
- return L({
71
+ function ge(e) {
72
+ return O({
72
73
  version: "1",
73
74
  accountId: e.accountId,
74
75
  middlewareUrl: e.middlewareUrl,
@@ -80,37 +81,37 @@ function le(e) {
80
81
  }
81
82
  });
82
83
  }
83
- const T = `${w}_overlay_`, W = "#gengage-qna", $ = "#gengage-simrel";
84
- function f() {
84
+ const b = `${_}_overlay_`, $ = "#gengage-qna", H = "#gengage-simrel";
85
+ function p() {
85
86
  const e = window;
86
87
  return e.__gengageOverlayRegistry || (e.__gengageOverlayRegistry = {
87
88
  instances: {},
88
89
  pending: {}
89
90
  }), e.__gengageOverlayRegistry;
90
91
  }
91
- function H(e) {
92
+ function G(e) {
92
93
  const t = {
93
94
  pageType: e.pageContext?.pageType ?? (e.sku !== void 0 ? "pdp" : "other")
94
- }, i = e.pageContext;
95
- return i?.sku !== void 0 && (t.sku = i.sku), i?.price !== void 0 && (t.price = i.price), i?.categoryTree !== void 0 && (t.categoryTree = i.categoryTree), i?.url !== void 0 && (t.url = i.url), i?.extra !== void 0 && (t.extra = i.extra), e.sku !== void 0 && (t.sku = e.sku), t;
95
+ }, o = e.pageContext;
96
+ return o?.sku !== void 0 && (t.sku = o.sku), o?.price !== void 0 && (t.price = o.price), o?.categoryTree !== void 0 && (t.categoryTree = o.categoryTree), o?.url !== void 0 && (t.url = o.url), o?.extra !== void 0 && (t.extra = o.extra), e.sku !== void 0 && (t.sku = e.sku), t;
96
97
  }
97
- function z(e, t) {
98
- const i = {
98
+ function K(e, t) {
99
+ const o = {
99
100
  ...e,
100
101
  ...t,
101
102
  pageType: t.pageType ?? e.pageType
102
103
  };
103
- return t.sku === void 0 && e.sku !== void 0 && (i.sku = e.sku), i;
104
+ return t.sku === void 0 && e.sku !== void 0 && (o.sku = e.sku), o;
104
105
  }
105
- function y(e) {
106
+ function w(e) {
106
107
  return e instanceof HTMLElement || document.querySelector(e) ? e : null;
107
108
  }
108
- function b(e) {
109
- return e.idempotencyKey ?? `${T}${e.accountId}`;
109
+ function T(e) {
110
+ return e.idempotencyKey ?? `${b}${e.accountId}`;
110
111
  }
111
- class G {
112
- constructor(t, i) {
113
- this.options = t, this.onDestroy = i, this._chat = null, this._qna = null, this._simrel = null, this._destroyed = !1, this._queue = Promise.resolve(), this._warnedQnaMountMissing = !1, this._warnedSimRelMountMissing = !1, this.idempotencyKey = b(t), this.session = I(t.session), this._pageContext = H(t);
112
+ class Q {
113
+ constructor(t, o) {
114
+ this.options = t, this.onDestroy = o, this._chat = null, this._qna = null, this._simrel = null, this._analyticsClient = null, this._destroyed = !1, this._queue = Promise.resolve(), this._warnedQnaMountMissing = !1, this._warnedSimRelMountMissing = !1, this.idempotencyKey = T(t), this.session = S(t.session), this._pageContext = G(t);
114
115
  }
115
116
  get chat() {
116
117
  return this._chat;
@@ -121,6 +122,9 @@ class G {
121
122
  get simrel() {
122
123
  return this._simrel;
123
124
  }
125
+ get analyticsClient() {
126
+ return this._analyticsClient;
127
+ }
124
128
  async init() {
125
129
  window.gengage || (window.gengage = {}), window.gengage.sessionId = this.session.sessionId, window.gengage.pageContext = this._pageContext, await this._initChat(), await this._syncPdpWidgets(), this.options.wireQnaToChat !== !1 && x(), window.gengage.overlay = this;
126
130
  }
@@ -132,25 +136,25 @@ class G {
132
136
  }
133
137
  async updateContext(t) {
134
138
  this._destroyed || await this._enqueue(async () => {
135
- this._pageContext = z(this._pageContext, t), window.gengage || (window.gengage = {}), window.gengage.pageContext = this._pageContext, this._chat?.update(t), this._qna?.update(t), this._simrel?.update(t), await this._syncPdpWidgets();
139
+ this._pageContext = K(this._pageContext, t), window.gengage || (window.gengage = {}), window.gengage.pageContext = this._pageContext, this._chat?.update(t), this._qna?.update(t), this._simrel?.update(t), await this._syncPdpWidgets();
136
140
  });
137
141
  }
138
- async updateSku(t, i = "pdp") {
139
- await this.updateContext({ sku: t, pageType: i });
142
+ async updateSku(t, o = "pdp") {
143
+ await this.updateContext({ sku: t, pageType: o });
140
144
  }
141
145
  destroy() {
142
146
  this._destroyed || (this._destroyed = !0, this._chat?.destroy(), this._qna?.destroy(), this._simrel?.destroy(), this._chat = null, this._qna = null, this._simrel = null, window.gengage?.overlay === this && delete window.gengage.overlay, this.onDestroy());
143
147
  }
144
148
  async _initChat() {
145
149
  if (this.options.chat?.enabled === !1) return;
146
- const t = this.options.middlewareUrl, i = {
150
+ const t = this.options.middlewareUrl, o = {
147
151
  accountId: this.options.accountId,
148
152
  middlewareUrl: t,
149
153
  session: this.session,
150
154
  pageContext: this._pageContext,
151
155
  variant: this.options.chat?.variant ?? "floating"
152
156
  };
153
- this.options.theme !== void 0 && (i.theme = this.options.theme), this.options.locale !== void 0 && (i.locale = this.options.locale), this.options.chat?.mountTarget !== void 0 && (i.mountTarget = this.options.chat.mountTarget), this.options.chat?.launcherSvg !== void 0 && (i.launcherSvg = this.options.chat.launcherSvg), this.options.chat?.hideMobileLauncher !== void 0 && (i.hideMobileLauncher = this.options.chat.hideMobileLauncher), this.options.chat?.mobileBreakpoint !== void 0 && (i.mobileBreakpoint = this.options.chat.mobileBreakpoint), this.options.chat?.mobileInitialState !== void 0 && (i.mobileInitialState = this.options.chat.mobileInitialState), this.options.chat?.i18n !== void 0 && (i.i18n = this.options.chat.i18n), this.options.chat?.actionHandling !== void 0 && (i.actionHandling = this.options.chat.actionHandling), this._chat = new S(), await this._chat.init(i);
157
+ this.options.theme !== void 0 && (o.theme = this.options.theme), this.options.locale !== void 0 && (o.locale = this.options.locale), this.options.pricing !== void 0 && (o.pricing = this.options.pricing), this.options.chat?.mountTarget !== void 0 && (o.mountTarget = this.options.chat.mountTarget), this.options.chat?.launcherSvg !== void 0 && (o.launcherSvg = this.options.chat.launcherSvg), this.options.chat?.hideMobileLauncher !== void 0 && (o.hideMobileLauncher = this.options.chat.hideMobileLauncher), this.options.chat?.mobileBreakpoint !== void 0 && (o.mobileBreakpoint = this.options.chat.mobileBreakpoint), this.options.chat?.mobileInitialState !== void 0 && (o.mobileInitialState = this.options.chat.mobileInitialState), this.options.chat?.i18n !== void 0 && (o.i18n = this.options.chat.i18n), this.options.chat?.actionHandling !== void 0 && (o.actionHandling = this.options.chat.actionHandling), this.options.onScriptCall !== void 0 && (o.onScriptCall = this.options.onScriptCall), this._chat = new P(), await this._chat.init(o);
154
158
  }
155
159
  async _syncPdpWidgets() {
156
160
  if (this._destroyed) return;
@@ -159,45 +163,45 @@ class G {
159
163
  this._destroyPdpWidgets();
160
164
  return;
161
165
  }
162
- const n = this.options.middlewareUrl;
166
+ const i = this.options.middlewareUrl;
163
167
  if (this.options.qna?.enabled !== !1) {
164
- const a = this.options.qna?.mountTarget ?? W, s = y(a);
165
- if (s)
168
+ const a = this.options.qna?.mountTarget ?? $, r = w(a);
169
+ if (r)
166
170
  if (this._warnedQnaMountMissing = !1, this._qna)
167
171
  this._qna.show(), this._qna.update({ pageType: "pdp", sku: t });
168
172
  else {
169
- const r = new A(), o = {
173
+ const s = new U(), n = {
170
174
  accountId: this.options.accountId,
171
- middlewareUrl: n,
175
+ middlewareUrl: i,
172
176
  session: this.session,
173
177
  pageContext: {
174
178
  pageType: "pdp",
175
179
  sku: t
176
180
  },
177
- mountTarget: s
181
+ mountTarget: r
178
182
  };
179
- this.options.theme !== void 0 && (o.theme = this.options.theme), this.options.qna?.ctaText !== void 0 && (o.ctaText = this.options.qna.ctaText), this.options.qna?.inputPlaceholder !== void 0 && (o.inputPlaceholder = this.options.qna.inputPlaceholder), await r.init(o), this._qna = r;
183
+ this.options.theme !== void 0 && (n.theme = this.options.theme), this.options.qna?.ctaText !== void 0 && (n.ctaText = this.options.qna.ctaText), this.options.qna?.inputPlaceholder !== void 0 && (n.inputPlaceholder = this.options.qna.inputPlaceholder), await s.init(n), this._qna = s;
180
184
  }
181
185
  else
182
186
  this._qna?.destroy(), this._qna = null, this._warnedQnaMountMissing || (console.warn(`[gengage] QNA mount target not found: ${a}`), this._warnedQnaMountMissing = !0);
183
187
  } else
184
188
  this._qna?.destroy(), this._qna = null;
185
189
  if (this.options.simrel?.enabled !== !1) {
186
- const a = this.options.simrel?.mountTarget ?? $, s = y(a);
187
- if (s)
190
+ const a = this.options.simrel?.mountTarget ?? H, r = w(a);
191
+ if (r)
188
192
  if (this._warnedSimRelMountMissing = !1, this._simrel)
189
193
  this._simrel.show(), this._simrel.update({ pageType: "pdp", sku: t });
190
194
  else {
191
- const r = new q(), o = {
195
+ const s = new R(), n = {
192
196
  accountId: this.options.accountId,
193
- middlewareUrl: n,
197
+ middlewareUrl: i,
194
198
  session: this.session,
195
199
  sku: t,
196
- mountTarget: s
200
+ mountTarget: r
197
201
  };
198
- this.options.theme !== void 0 && (o.theme = this.options.theme), this.options.simrel?.discountType !== void 0 && (o.discountType = this.options.simrel.discountType), this.options.onAddToCart !== void 0 && (o.onAddToCart = this.options.onAddToCart), this.options.onProductNavigate !== void 0 ? o.onProductNavigate = this.options.onProductNavigate : o.onProductNavigate = (h, u, m) => {
199
- this._chat?.saveSession(m ?? this.session.sessionId, u), window.location.href = h;
200
- }, await r.init(o), this._simrel = r;
202
+ this.options.theme !== void 0 && (n.theme = this.options.theme), this.options.pricing !== void 0 && (n.pricing = this.options.pricing), this.options.simrel?.discountType !== void 0 && (n.discountType = this.options.simrel.discountType), this.options.onAddToCart !== void 0 && (n.onAddToCart = this.options.onAddToCart), this.options.onProductNavigate !== void 0 ? n.onProductNavigate = this.options.onProductNavigate : n.onProductNavigate = (c, h, g) => {
203
+ this._chat?.saveSession(g ?? this.session.sessionId, h), window.location.href = c;
204
+ }, await s.init(n), this._simrel = s;
201
205
  }
202
206
  else
203
207
  this._simrel?.destroy(), this._simrel = null, this._warnedSimRelMountMissing || (console.warn(`[gengage] SimRel mount target not found: ${a}`), this._warnedSimRelMountMissing = !0);
@@ -208,34 +212,34 @@ class G {
208
212
  this._qna?.destroy(), this._simrel?.destroy(), this._qna = null, this._simrel = null;
209
213
  }
210
214
  _enqueue(t) {
211
- const i = this._queue.then(t);
212
- return this._queue = i.catch(() => {
213
- }), i;
215
+ const o = this._queue.then(t);
216
+ return this._queue = o.catch((i) => {
217
+ }), o;
214
218
  }
215
219
  }
216
- async function K(e) {
217
- const t = b(e), i = f(), n = i.instances[t];
218
- if (n) return n;
219
- const a = i.pending[t];
220
+ async function Y(e) {
221
+ const t = T(e), o = p(), i = o.instances[t];
222
+ if (i) return i;
223
+ const a = o.pending[t];
220
224
  if (a) return a;
221
- const s = new G(e, () => {
222
- const o = f();
223
- delete o.instances[t], delete o.pending[t];
224
- }), r = s.init().then(() => (i.instances[t] = s, delete i.pending[t], s)).catch((o) => {
225
- throw delete i.pending[t], o;
225
+ const r = new Q(e, () => {
226
+ const n = p();
227
+ delete n.instances[t], delete n.pending[t];
228
+ }), s = r.init().then(() => (o.instances[t] = r, delete o.pending[t], r)).catch((n) => {
229
+ throw delete o.pending[t], n;
226
230
  });
227
- return i.pending[t] = r, r;
231
+ return o.pending[t] = s, s;
228
232
  }
229
- function Q(e) {
230
- return f().instances[e] ?? null;
233
+ function j(e) {
234
+ return p().instances[e] ?? null;
231
235
  }
232
- function ce(e) {
233
- Q(e)?.destroy();
236
+ function me(e) {
237
+ j(e)?.destroy();
234
238
  }
235
- function ue(e) {
236
- return `${T}${e}`;
239
+ function pe(e) {
240
+ return `${b}${e}`;
237
241
  }
238
- const j = {
242
+ const V = {
239
243
  enabled: !0,
240
244
  endpoint: "/analytics",
241
245
  fireAndForget: !0,
@@ -245,19 +249,19 @@ const j = {
245
249
  maxRetries: 1,
246
250
  batchSize: 10,
247
251
  flushIntervalMs: 250
248
- }, Y = {
252
+ }, X = {
249
253
  mode: "none",
250
254
  key: "",
251
255
  headerName: "X-API-Key",
252
256
  bodyField: "api_key"
253
257
  };
254
- class V {
258
+ class Z {
255
259
  constructor(t) {
256
260
  this.queue = [], this.flushTimer = null, this.config = {
257
- ...j,
261
+ ...V,
258
262
  ...t,
259
263
  auth: {
260
- ...Y,
264
+ ...X,
261
265
  ...t.auth ?? {}
262
266
  }
263
267
  }, this.onPageHideBound = () => {
@@ -266,8 +270,8 @@ class V {
266
270
  }
267
271
  track(t) {
268
272
  if (!this.config.enabled) return;
269
- const i = J(t);
270
- if (this.queue.push(i), this.queue.length >= this.config.batchSize) {
273
+ const o = J(t);
274
+ if (this.queue.push(o), this.queue.length >= this.config.batchSize) {
271
275
  this.scheduleImmediateFlush();
272
276
  return;
273
277
  }
@@ -275,8 +279,8 @@ class V {
275
279
  }
276
280
  async flush(t = {}) {
277
281
  if (!this.config.enabled || this.queue.length === 0) return;
278
- const i = this.queue.splice(0, this.config.batchSize), n = this.buildTransportBody(i), a = X(this.config.endpoint, this.config.middlewareUrl), s = t.preferBeacon ?? this.config.useBeacon;
279
- await this.sendWithRetry(a, n, s);
282
+ const o = this.queue.splice(0, this.config.batchSize), i = this.buildTransportBody(o), a = ee(this.config.endpoint, this.config.middlewareUrl), r = t.preferBeacon ?? this.config.useBeacon;
283
+ await this.sendWithRetry(a, i, r);
280
284
  }
281
285
  /** Drain the entire queue, flushing in batch-sized chunks. */
282
286
  async flushAll(t = {}) {
@@ -284,7 +288,7 @@ class V {
284
288
  await this.flush(t);
285
289
  }
286
290
  destroy() {
287
- this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), typeof window < "u" && window.removeEventListener("pagehide", this.onPageHideBound);
291
+ this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.queue.length > 0 && this.flushAll({ preferBeacon: !0 }), typeof window < "u" && window.removeEventListener("pagehide", this.onPageHideBound);
288
292
  }
289
293
  scheduleFlush() {
290
294
  this.flushTimer || (this.flushTimer = setTimeout(() => {
@@ -295,44 +299,47 @@ class V {
295
299
  this.flushTimer && (clearTimeout(this.flushTimer), this.flushTimer = null), this.flush();
296
300
  }
297
301
  buildTransportBody(t) {
298
- const i = { events: t };
299
- return this.config.auth.mode === "body-api-key" && this.config.auth.key && (i[this.config.auth.bodyField] = this.config.auth.key), i;
302
+ const o = { events: t };
303
+ return this.config.auth.mode === "body-api-key" && this.config.auth.key && (o[this.config.auth.bodyField] = this.config.auth.key), o;
300
304
  }
301
- async sendWithRetry(t, i, n) {
305
+ async sendWithRetry(t, o, i) {
302
306
  let a = 0;
303
307
  for (; a <= this.config.maxRetries; ) {
304
308
  a += 1;
305
309
  try {
306
- if (await this.send(t, i, n)) return;
310
+ if (await this.send(t, o, i)) return;
307
311
  } catch {
308
312
  }
313
+ a <= this.config.maxRetries && await new Promise((r) => setTimeout(r, Math.min(1e3, 100 * Math.pow(2, a - 1))));
309
314
  }
310
315
  }
311
- async send(t, i, n) {
312
- const a = JSON.stringify(i);
313
- if (n && this.config.useBeacon && this.config.auth.mode !== "x-api-key-header" && this.config.auth.mode !== "bearer-header" && Z() && navigator.sendBeacon(t, a))
314
- return !0;
316
+ async send(t, o, i) {
317
+ const a = JSON.stringify(o);
318
+ if (i && this.config.useBeacon && this.config.auth.mode !== "x-api-key-header" && this.config.auth.mode !== "bearer-header" && te()) {
319
+ const h = new Blob([a], { type: "application/json" });
320
+ if (navigator.sendBeacon(t, h)) return !0;
321
+ }
315
322
  if (typeof fetch > "u") return !1;
316
- const r = {
323
+ const s = {
317
324
  "Content-Type": "application/json"
318
325
  };
319
- this.config.auth.mode === "x-api-key-header" && this.config.auth.key && (r[this.config.auth.headerName] = this.config.auth.key), this.config.auth.mode === "bearer-header" && this.config.auth.key && (r.Authorization = `Bearer ${this.config.auth.key}`);
320
- const o = typeof AbortController < "u" ? new AbortController() : null, h = o ? setTimeout(() => o.abort(), this.config.timeoutMs) : null;
326
+ this.config.auth.mode === "x-api-key-header" && this.config.auth.key && (s[this.config.auth.headerName] = this.config.auth.key), this.config.auth.mode === "bearer-header" && this.config.auth.key && (s.Authorization = `Bearer ${this.config.auth.key}`);
327
+ const n = typeof AbortController < "u" ? new AbortController() : null, c = n ? setTimeout(() => n.abort(), this.config.timeoutMs) : null;
321
328
  try {
322
- const u = {
329
+ const h = {
323
330
  method: "POST",
324
- headers: r,
331
+ headers: s,
325
332
  body: a,
326
333
  keepalive: this.config.keepaliveFetch && this.config.fireAndForget
327
334
  };
328
- return o && (u.signal = o.signal), (await fetch(t, u)).ok;
335
+ return n && (h.signal = n.signal), (await fetch(t, h)).ok;
329
336
  } finally {
330
- h && clearTimeout(h);
337
+ c && clearTimeout(c);
331
338
  }
332
339
  }
333
340
  }
334
- function he(e) {
335
- return new V(e);
341
+ function ye(e) {
342
+ return new Z(e);
336
343
  }
337
344
  function J(e) {
338
345
  const t = {
@@ -346,15 +353,15 @@ function J(e) {
346
353
  };
347
354
  return e.view_id !== void 0 && (t.view_id = e.view_id), e.user_id !== void 0 && (t.user_id = e.user_id), e.widget !== void 0 && (t.widget = e.widget), e.page_type !== void 0 && (t.page_type = e.page_type), e.sku !== void 0 && (t.sku = e.sku), t;
348
355
  }
349
- function X(e, t) {
356
+ function ee(e, t) {
350
357
  if (/^https?:\/\//i.test(e)) return e;
351
- const i = E(t), n = e.startsWith("/") ? e : `/${e}`;
352
- return `${i}${n}`;
358
+ const o = E(t), i = e.startsWith("/") ? e : `/${e}`;
359
+ return `${o}${i}`;
353
360
  }
354
- function Z() {
361
+ function te() {
355
362
  return typeof navigator < "u" && typeof navigator.sendBeacon == "function";
356
363
  }
357
- const ee = {
364
+ const oe = {
358
365
  primaryColor: "#000000",
359
366
  primaryForeground: "#ffffff",
360
367
  backgroundColor: "#ffffff",
@@ -379,30 +386,30 @@ const ee = {
379
386
  "--gengage-qna-input-radius": "14px",
380
387
  "--gengage-simrel-card-radius": "14px"
381
388
  };
382
- function ge(e) {
383
- return { ...ee, ...e };
389
+ function we(e) {
390
+ return { ...oe, ...e };
384
391
  }
385
- const C = "tr";
386
- function fe(e) {
392
+ const k = "tr";
393
+ function ve(e) {
387
394
  return {
388
395
  ACCOUNT_ID: e.accountId,
389
396
  MIDDLEWARE_URL: e.middlewareUrl,
390
- LOCALE: e.locale ?? C
397
+ LOCALE: e.locale ?? k
391
398
  };
392
399
  }
393
- function me(e, t = {}) {
394
- const i = {
400
+ function _e(e, t = {}) {
401
+ const o = {
395
402
  accountId: e.accountId,
396
403
  middlewareUrl: e.middlewareUrl,
397
404
  session: { sessionId: e.sessionId },
398
405
  variant: "floating",
399
- locale: e.locale ?? C,
406
+ locale: e.locale ?? k,
400
407
  ...t
401
408
  };
402
- return e.theme !== void 0 && (i.theme = e.theme), i;
409
+ return e.theme !== void 0 && (o.theme = e.theme), o;
403
410
  }
404
- function pe(e, t = {}) {
405
- const i = {
411
+ function Ce(e, t = {}) {
412
+ const o = {
406
413
  accountId: e.accountId,
407
414
  middlewareUrl: e.middlewareUrl,
408
415
  session: { sessionId: e.sessionId },
@@ -410,10 +417,10 @@ function pe(e, t = {}) {
410
417
  mountTarget: e.mountTarget,
411
418
  ...t
412
419
  };
413
- return e.theme !== void 0 && (i.theme = e.theme), i;
420
+ return e.theme !== void 0 && (o.theme = e.theme), o;
414
421
  }
415
- function ye(e, t = {}) {
416
- const i = {
422
+ function be(e, t = {}) {
423
+ const o = {
417
424
  accountId: e.accountId,
418
425
  middlewareUrl: e.middlewareUrl,
419
426
  session: { sessionId: e.sessionId },
@@ -421,9 +428,9 @@ function ye(e, t = {}) {
421
428
  mountTarget: e.mountTarget,
422
429
  ...t
423
430
  };
424
- return e.theme !== void 0 && (i.theme = e.theme), i;
431
+ return e.theme !== void 0 && (o.theme = e.theme), o;
425
432
  }
426
- function ve(e, t = {}) {
433
+ function Te(e, t = {}) {
427
434
  return {
428
435
  enabled: !0,
429
436
  middlewareUrl: e,
@@ -433,152 +440,465 @@ function ve(e, t = {}) {
433
440
  ...t
434
441
  };
435
442
  }
436
- function te(e) {
443
+ function ie(e) {
437
444
  try {
438
445
  return document.querySelector(e), !0;
439
446
  } catch {
440
447
  return !1;
441
448
  }
442
449
  }
443
- function ie(e) {
444
- const t = [], i = e.mounts, n = [
450
+ function ne(e, t) {
451
+ const o = [], i = e.mounts, a = [
445
452
  ["qna", i.qna],
446
453
  ["simrel", i.simrel],
447
454
  ["chat", i.chat]
448
455
  ];
449
- for (const [s, r] of n)
450
- if (r !== void 0) {
451
- if (!te(r)) {
452
- t.push({
456
+ for (const [s, n] of a)
457
+ if (n !== void 0) {
458
+ if (!ie(n)) {
459
+ o.push({
453
460
  code: "INVALID_SELECTOR",
454
- message: `[gengage preflight] ${s} mount selector is invalid CSS: "${r}"`,
461
+ message: `[gengage preflight] ${s} mount selector is invalid CSS: "${n}"`,
455
462
  severity: "error"
456
463
  });
457
464
  continue;
458
465
  }
459
- document.querySelector(r) || t.push({
466
+ document.querySelector(n) || o.push({
460
467
  code: "MOUNT_NOT_FOUND",
461
- message: `[gengage preflight] ${s} mount target not found: "${r}" — widget will skip or wait for DOM`,
468
+ message: `[gengage preflight] ${s} mount target not found: "${n}" — widget will skip or wait for DOM`,
462
469
  severity: "warn"
463
470
  });
464
471
  }
465
- const a = e.gtm.idempotencyKey;
466
- window[a] !== void 0 && t.push({
472
+ const r = e.gtm.idempotencyKey;
473
+ if (window[r] !== void 0 && o.push({
467
474
  code: "DUPLICATE_IDEMPOTENCY",
468
- message: `[gengage preflight] window["${a}"] already exists — widgets may have already initialized`,
475
+ message: `[gengage preflight] window["${r}"] already exists — widgets may have already initialized`,
469
476
  severity: "warn"
470
- });
471
- for (const s of t)
477
+ }), !t?.skipCspCheck) {
478
+ let s = !1;
479
+ const n = (c) => {
480
+ c.blockedURI && e.middlewareUrl.startsWith(c.blockedURI) && (s = !0);
481
+ };
482
+ document.addEventListener("securitypolicyviolation", n);
483
+ try {
484
+ fetch(e.middlewareUrl, { method: "HEAD", mode: "no-cors" }).catch(() => {
485
+ });
486
+ } catch {
487
+ s = !0;
488
+ }
489
+ document.removeEventListener("securitypolicyviolation", n), s && o.push({
490
+ code: "CSP_BLOCKED",
491
+ message: `[gengage preflight] middleware URL may be blocked by Content-Security-Policy: "${e.middlewareUrl}". Add it to connect-src.`,
492
+ severity: "warn"
493
+ });
494
+ }
495
+ for (const s of o)
472
496
  s.severity === "error" ? console.error(s.message) : console.warn(s.message);
473
497
  return {
474
- ok: t.every((s) => s.severity !== "error"),
475
- warnings: t
498
+ ok: o.every((s) => s.severity !== "error"),
499
+ warnings: o
476
500
  };
477
501
  }
478
- function ne(e) {
479
- const t = B(e);
502
+ function ae(e) {
503
+ const t = W(e);
480
504
  if (!t.success) {
481
- const i = t.error.issues.map((n) => `${n.path.join(".")}: ${n.message}`).join("; ");
482
- throw new Error(`[gengage] Invalid runtime config: ${i}`);
505
+ const o = t.error.issues.map((i) => `${i.path.join(".")}: ${i.message}`).join("; ");
506
+ throw new Error(`[gengage] Invalid runtime config: ${o}`);
483
507
  }
484
508
  return t.data;
485
509
  }
486
- function se(e, t, i) {
487
- const n = {
510
+ function re(e, t, o) {
511
+ const i = {
488
512
  accountId: e.accountId,
489
513
  middlewareUrl: e.middlewareUrl,
490
514
  idempotencyKey: e.gtm.idempotencyKey
491
515
  };
492
- return e.locale !== void 0 && (n.locale = e.locale), i !== void 0 && (n.pageContext = i, i.sku !== void 0 && (n.sku = i.sku)), n.chat = {
516
+ return e.locale !== void 0 && (i.locale = e.locale), o !== void 0 && (i.pageContext = o, o.sku !== void 0 && (i.sku = o.sku)), i.chat = {
493
517
  enabled: e.widgets.chat.enabled
494
- }, e.mounts.chat !== void 0 && (n.chat.mountTarget = e.mounts.chat), n.qna = {
518
+ }, e.mounts.chat !== void 0 && (i.chat.mountTarget = e.mounts.chat), i.qna = {
495
519
  enabled: e.widgets.qna.enabled
496
- }, e.mounts.qna !== void 0 && (n.qna.mountTarget = e.mounts.qna), n.simrel = {
520
+ }, e.mounts.qna !== void 0 && (i.qna.mountTarget = e.mounts.qna), i.simrel = {
497
521
  enabled: e.widgets.simrel.enabled
498
- }, e.mounts.simrel !== void 0 && (n.simrel.mountTarget = e.mounts.simrel), t?.onAddToCart !== void 0 && (n.onAddToCart = t.onAddToCart), t?.onProductNavigate !== void 0 && (n.onProductNavigate = t.onProductNavigate), n;
522
+ }, e.mounts.simrel !== void 0 && (i.simrel.mountTarget = e.mounts.simrel), t?.onAddToCart !== void 0 && (i.onAddToCart = t.onAddToCart), t?.onProductNavigate !== void 0 && (i.onProductNavigate = t.onProductNavigate), t?.onScriptCall !== void 0 && (i.onScriptCall = t.onScriptCall), i;
499
523
  }
500
- async function we(e) {
501
- const t = ne(e.runtimeConfig);
524
+ async function ke(e) {
525
+ const t = ae(e.runtimeConfig);
502
526
  if (e.preflight !== !1) {
503
- const s = ie(t);
504
- if (!s.ok) {
505
- const r = s.warnings.filter((o) => o.severity === "error");
506
- throw new Error(`[gengage] Preflight failed: ${r.map((o) => o.message).join("; ")}`);
527
+ const r = ne(t);
528
+ if (!r.ok) {
529
+ const s = r.warnings.filter((n) => n.severity === "error");
530
+ throw new Error(`[gengage] Preflight failed: ${s.map((n) => n.message).join("; ")}`);
507
531
  }
508
532
  }
509
- const i = e.contextResolver?.(), n = se(t, e.hostActions, i), a = await K(n);
533
+ const o = e.contextResolver?.(), i = re(t, e.hostActions, o), a = await Y(i);
510
534
  if (e.contextResolver !== void 0) {
511
- const s = e.contextResolver;
512
- window.addEventListener("gengage:context:update", () => {
513
- const r = s();
514
- a.updateContext(r);
515
- });
535
+ const r = e.contextResolver, s = () => {
536
+ const c = r();
537
+ a.updateContext(c);
538
+ };
539
+ window.addEventListener("gengage:context:update", s);
540
+ const n = a.destroy.bind(a);
541
+ a.destroy = () => {
542
+ window.removeEventListener("gengage:context:update", s), n();
543
+ };
516
544
  }
517
545
  return a;
518
546
  }
547
+ const se = [
548
+ {
549
+ pageType: "home",
550
+ urlPatterns: ["^/$", "^/index\\.html?$", "^/anasayfa$"]
551
+ },
552
+ {
553
+ pageType: "search",
554
+ urlPatterns: ["/arama", "/search", "/ara\\?"],
555
+ queryParam: "q"
556
+ },
557
+ {
558
+ pageType: "cart",
559
+ urlPatterns: ["/sepet", "/cart", "/basket", "/sepetim"]
560
+ },
561
+ {
562
+ pageType: "plp",
563
+ urlPatterns: ["/kategori/", "/category/", "/c/", "/koleksiyon/", "/collection/"]
564
+ },
565
+ {
566
+ pageType: "pdp",
567
+ urlPatterns: ["/urun/", "/product/", "/p/", "/-p-", "/-pm-"]
568
+ }
569
+ ];
570
+ function le(e, t) {
571
+ const o = t ?? (typeof window < "u" ? new URL(window.location.href) : null);
572
+ if (!o) return "other";
573
+ const i = e ?? se, a = o.pathname;
574
+ for (const r of i)
575
+ if (!(r.urlPatterns && !r.urlPatterns.some((n) => {
576
+ try {
577
+ return new RegExp(n, "i").test(a);
578
+ } catch {
579
+ return !1;
580
+ }
581
+ })) && !(r.queryParam && !o.searchParams.has(r.queryParam)) && !(r.selector && typeof document < "u" && !document.querySelector(r.selector)))
582
+ return r.pageType;
583
+ return "other";
584
+ }
585
+ function de(e) {
586
+ const t = e ?? (typeof window < "u" ? new URL(window.location.href) : null);
587
+ if (!t) return;
588
+ const o = t.pathname, i = o.match(/\/(?:p|urun|product)\/([^/?#]+)/i);
589
+ if (i?.[1]) return i[1];
590
+ const a = o.match(/-p-(\d+)/i);
591
+ if (a?.[1]) return a[1];
592
+ }
593
+ function Ie(e) {
594
+ const t = le(e), o = { pageType: t };
595
+ if (t === "pdp") {
596
+ const i = de();
597
+ i && (o.sku = i);
598
+ }
599
+ return typeof window < "u" && (o.url = window.location.href), o;
600
+ }
601
+ const l = "https://chatbe-dev.gengage.ai", I = {
602
+ koctascomtr: {
603
+ accountId: "koctascomtr",
604
+ locale: "tr",
605
+ middlewareUrl: l,
606
+ theme: {
607
+ primaryColor: "#ec6e00",
608
+ primaryForeground: "#ffffff",
609
+ backgroundColor: "#ffffff",
610
+ foregroundColor: "#222222",
611
+ borderRadius: "8px",
612
+ fontFamily: '"Source Sans Pro", "Helvetica Neue", Arial, sans-serif',
613
+ fontSize: "14px"
614
+ },
615
+ chatI18n: {
616
+ inputPlaceholder: "Ürün ara, soru sor",
617
+ poweredBy: "Koçtaş AI Asistan"
618
+ }
619
+ },
620
+ n11com: {
621
+ accountId: "n11com",
622
+ locale: "tr",
623
+ middlewareUrl: l,
624
+ theme: {
625
+ primaryColor: "#ff44ef",
626
+ primaryForeground: "#ffffff",
627
+ backgroundColor: "#ffffff",
628
+ foregroundColor: "#222222",
629
+ borderRadius: "8px",
630
+ fontFamily: "Arial, Helvetica, sans-serif",
631
+ fontSize: "14px"
632
+ },
633
+ chatI18n: {
634
+ inputPlaceholder: "Ne aramıştınız?",
635
+ poweredBy: "n11 AI Asistan"
636
+ }
637
+ },
638
+ hepsiburadacom: {
639
+ accountId: "hepsiburadacom",
640
+ locale: "tr",
641
+ middlewareUrl: l,
642
+ theme: {
643
+ primaryColor: "#ff6000",
644
+ primaryForeground: "#ffffff",
645
+ backgroundColor: "#ffffff",
646
+ foregroundColor: "#333333",
647
+ borderRadius: "8px",
648
+ fontFamily: '"Open Sans", Arial, sans-serif',
649
+ fontSize: "14px"
650
+ },
651
+ chatI18n: {
652
+ inputPlaceholder: "Ürün ara veya soru sor",
653
+ poweredBy: "Hepsiburada AI Asistan"
654
+ }
655
+ },
656
+ arcelikcomtr: {
657
+ accountId: "arcelikcomtr",
658
+ locale: "tr",
659
+ middlewareUrl: l,
660
+ theme: {
661
+ primaryColor: "#e4002b",
662
+ primaryForeground: "#ffffff",
663
+ backgroundColor: "#ffffff",
664
+ foregroundColor: "#222222",
665
+ borderRadius: "8px",
666
+ fontFamily: '"Arcelik Sans", "Helvetica Neue", Arial, sans-serif',
667
+ fontSize: "14px"
668
+ },
669
+ chatI18n: {
670
+ inputPlaceholder: "Size nasıl yardımcı olabilirim?",
671
+ poweredBy: "Arçelik AI Asistan"
672
+ }
673
+ },
674
+ yatasbeddingcomtr: {
675
+ accountId: "yatasbeddingcomtr",
676
+ locale: "tr",
677
+ middlewareUrl: l,
678
+ theme: {
679
+ primaryColor: "#c8102e",
680
+ primaryForeground: "#ffffff",
681
+ backgroundColor: "#ffffff",
682
+ foregroundColor: "#333333",
683
+ borderRadius: "8px",
684
+ fontFamily: '"Nunito Sans", Arial, sans-serif',
685
+ fontSize: "14px"
686
+ },
687
+ chatI18n: {
688
+ inputPlaceholder: "Yatak, baza veya ürün arayın",
689
+ poweredBy: "Yataş AI Asistan"
690
+ }
691
+ },
692
+ trendyolcom: {
693
+ accountId: "trendyolcom",
694
+ locale: "tr",
695
+ middlewareUrl: l,
696
+ theme: {
697
+ primaryColor: "#f27a1a",
698
+ primaryForeground: "#ffffff",
699
+ backgroundColor: "#ffffff",
700
+ foregroundColor: "#333333",
701
+ borderRadius: "6px",
702
+ fontFamily: '"Source Sans Pro", Arial, sans-serif',
703
+ fontSize: "14px"
704
+ },
705
+ chatI18n: {
706
+ inputPlaceholder: "Ne aramıştınız?",
707
+ poweredBy: "Trendyol AI Asistan"
708
+ }
709
+ },
710
+ boynercomtr: {
711
+ accountId: "boynercomtr",
712
+ locale: "tr",
713
+ middlewareUrl: l,
714
+ theme: {
715
+ primaryColor: "#000000",
716
+ primaryForeground: "#ffffff",
717
+ backgroundColor: "#ffffff",
718
+ foregroundColor: "#333333",
719
+ borderRadius: "4px",
720
+ fontFamily: '"Montserrat", Arial, sans-serif',
721
+ fontSize: "14px"
722
+ },
723
+ chatI18n: {
724
+ inputPlaceholder: "Moda, kozmetik veya ev ürünleri arayın",
725
+ poweredBy: "Boyner AI Asistan"
726
+ }
727
+ },
728
+ evideacom: {
729
+ accountId: "evideacom",
730
+ locale: "tr",
731
+ middlewareUrl: l,
732
+ theme: {
733
+ primaryColor: "#e84393",
734
+ primaryForeground: "#ffffff",
735
+ backgroundColor: "#ffffff",
736
+ foregroundColor: "#2d3436",
737
+ borderRadius: "8px",
738
+ fontFamily: '"Poppins", Arial, sans-serif',
739
+ fontSize: "14px"
740
+ },
741
+ chatI18n: {
742
+ inputPlaceholder: "Ev dekorasyon ürünleri arayın",
743
+ poweredBy: "Evidea AI Asistan"
744
+ }
745
+ },
746
+ aygazcomtr: {
747
+ accountId: "aygazcomtr",
748
+ locale: "tr",
749
+ middlewareUrl: l,
750
+ theme: {
751
+ primaryColor: "#e30613",
752
+ primaryForeground: "#ffffff",
753
+ backgroundColor: "#ffffff",
754
+ foregroundColor: "#333333",
755
+ borderRadius: "8px",
756
+ fontFamily: "Arial, Helvetica, sans-serif",
757
+ fontSize: "14px"
758
+ },
759
+ chatI18n: {
760
+ inputPlaceholder: "Aygaz ürünleri hakkında sorun",
761
+ poweredBy: "Aygaz AI Asistan"
762
+ }
763
+ },
764
+ otokoccomtr: {
765
+ accountId: "otokoccomtr",
766
+ locale: "tr",
767
+ middlewareUrl: l,
768
+ theme: {
769
+ primaryColor: "#003087",
770
+ primaryForeground: "#ffffff",
771
+ backgroundColor: "#ffffff",
772
+ foregroundColor: "#333333",
773
+ borderRadius: "8px",
774
+ fontFamily: '"Roboto", Arial, sans-serif',
775
+ fontSize: "14px"
776
+ },
777
+ chatI18n: {
778
+ inputPlaceholder: "Araç veya hizmet arayın",
779
+ poweredBy: "Otokoç AI Asistan"
780
+ }
781
+ },
782
+ divanpastanelericomtr: {
783
+ accountId: "divanpastanelericomtr",
784
+ locale: "tr",
785
+ middlewareUrl: l,
786
+ theme: {
787
+ primaryColor: "#8b1a2d",
788
+ primaryForeground: "#ffffff",
789
+ backgroundColor: "#faf8f5",
790
+ foregroundColor: "#3d2c2e",
791
+ borderRadius: "8px",
792
+ fontFamily: '"Georgia", serif',
793
+ fontSize: "14px"
794
+ },
795
+ chatI18n: {
796
+ inputPlaceholder: "Ürün veya mağaza arayın",
797
+ poweredBy: "Divan AI Asistan"
798
+ }
799
+ },
800
+ screwfixcom: {
801
+ accountId: "screwfixcom",
802
+ locale: "en",
803
+ middlewareUrl: l,
804
+ theme: {
805
+ primaryColor: "#f6a623",
806
+ primaryForeground: "#1a1a1a",
807
+ backgroundColor: "#ffffff",
808
+ foregroundColor: "#333333",
809
+ borderRadius: "4px",
810
+ fontFamily: '"Arial", Helvetica, sans-serif',
811
+ fontSize: "14px"
812
+ },
813
+ pricing: {
814
+ currencySymbol: "£",
815
+ currencyPosition: "prefix",
816
+ thousandsSeparator: ",",
817
+ decimalSeparator: "."
818
+ },
819
+ chatI18n: {
820
+ inputPlaceholder: "Search products or ask a question",
821
+ poweredBy: "Screwfix AI Assistant"
822
+ }
823
+ }
824
+ };
825
+ function Ae(e) {
826
+ return I[e];
827
+ }
828
+ function Se() {
829
+ return Object.keys(I);
830
+ }
519
831
  export {
520
- _ as AccountRuntimeConfigSchema,
521
- R as AnalyticsAuthModeSchema,
522
- V as AnalyticsClient,
523
- ee as BASE_WIDGET_THEME,
524
- be as BaseWidget,
525
- C as DEFAULT_CUSTOMIZATION_LOCALE,
526
- Ce as DEFAULT_WIDGET_THEME_TOKENS,
527
- N as UnknownActionPolicySchema,
528
- ke as adaptV1Event,
529
- Ie as basketAddEvent,
530
- xe as bootstrapSession,
531
- Ee as buildChatEndpointUrl,
532
- ue as buildOverlayIdempotencyKey,
533
- Se as chatHistorySnapshotEvent,
534
- Ae as checkoutCompleteEvent,
535
- qe as checkoutStartEvent,
536
- Ue as consumeStream,
537
- fe as createAccountIdentity,
538
- he as createAnalyticsClient,
539
- le as createDefaultAccountRuntimeConfig,
540
- ve as createDefaultAnalyticsConfig,
541
- me as createFloatingChatConfig,
542
- pe as createPdpQnaConfig,
543
- ye as createPdpSimRelConfig,
544
- Me as defaultUnknownUISpecRenderer,
545
- ce as destroyOverlayWidgets,
546
- Re as dismissGlobalErrorToast,
547
- Pe as dispatch,
548
- Fe as getGlobalErrorMessage,
549
- Q as getOverlayWidgets,
550
- Oe as getWindowPageContext,
551
- we as initGengageClient,
552
- K as initOverlayWidgets,
553
- Ne as listen,
554
- De as llmUsageEvent,
555
- Le as mergeUISpecRegistry,
556
- Be as meteringIncrementEvent,
557
- We as meteringSummaryEvent,
832
+ C as AccountRuntimeConfigSchema,
833
+ M as AnalyticsAuthModeSchema,
834
+ Z as AnalyticsClient,
835
+ oe as BASE_WIDGET_THEME,
836
+ Pe as BaseWidget,
837
+ k as DEFAULT_CUSTOMIZATION_LOCALE,
838
+ Ue as DEFAULT_WIDGET_THEME_TOKENS,
839
+ D as UnknownActionPolicySchema,
840
+ gt as VoiceInput,
841
+ Re as adaptV1Event,
842
+ Ie as autoDetectPageContext,
843
+ qe as basketAddEvent,
844
+ Fe as bootstrapSession,
845
+ Me as buildChatEndpointUrl,
846
+ pe as buildOverlayIdempotencyKey,
847
+ Be as chatHistorySnapshotEvent,
848
+ Le as checkoutCompleteEvent,
849
+ ze as checkoutStartEvent,
850
+ De as consumeStream,
851
+ ve as createAccountIdentity,
852
+ ye as createAnalyticsClient,
853
+ ge as createDefaultAccountRuntimeConfig,
854
+ Te as createDefaultAnalyticsConfig,
855
+ _e as createFloatingChatConfig,
856
+ Ce as createPdpQnaConfig,
857
+ be as createPdpSimRelConfig,
858
+ Ne as defaultUnknownUISpecRenderer,
859
+ me as destroyOverlayWidgets,
860
+ le as detectPageType,
861
+ Oe as dismissGlobalErrorToast,
862
+ We as dispatch,
863
+ de as extractSkuFromUrl,
864
+ $e as getGlobalErrorMessage,
865
+ Ae as getMerchantConfig,
866
+ Se as getMerchantIds,
867
+ j as getOverlayWidgets,
868
+ He as getWindowPageContext,
869
+ ke as initGengageClient,
870
+ Y as initOverlayWidgets,
871
+ mt as isVoiceInputSupported,
872
+ Ge as listen,
873
+ Ke as llmUsageEvent,
874
+ Qe as mergeUISpecRegistry,
875
+ Ye as meteringIncrementEvent,
876
+ je as meteringSummaryEvent,
558
877
  E as normalizeMiddlewareUrl,
559
- $e as normalizeProductGroupingsResponse,
560
- He as normalizeSimilarProductsResponse,
561
- L as parseAccountRuntimeConfig,
562
- ie as preflightDiagnostics,
563
- ze as productToNormalized,
564
- Ge as registerGlobalErrorToastListener,
565
- Ke as renderUISpecWithRegistry,
566
- I as resolveSession,
567
- ot as routeStreamAction,
568
- B as safeParseAccountRuntimeConfig,
569
- at as sanitizeHtml,
570
- Qe as showGlobalErrorToast,
571
- je as streamChunkEvent,
572
- Ye as streamDoneEvent,
573
- Ve as streamErrorEvent,
574
- Je as streamPost,
575
- Xe as streamStartEvent,
576
- Ze as streamUiSpecEvent,
577
- et as updatePageContext,
578
- tt as widgetHistorySnapshotEvent,
878
+ Ve as normalizeProductGroupingsResponse,
879
+ Xe as normalizeSimilarProductsResponse,
880
+ O as parseAccountRuntimeConfig,
881
+ ne as preflightDiagnostics,
882
+ Ze as productToNormalized,
883
+ Je as registerGlobalErrorToastListener,
884
+ et as renderUISpecWithRegistry,
885
+ S as resolveSession,
886
+ pt as routeStreamAction,
887
+ W as safeParseAccountRuntimeConfig,
888
+ wt as sanitizeHtml,
889
+ tt as showGlobalErrorToast,
890
+ ot as streamChunkEvent,
891
+ it as streamDoneEvent,
892
+ nt as streamErrorEvent,
893
+ at as streamPost,
894
+ rt as streamStartEvent,
895
+ st as streamUiSpecEvent,
896
+ lt as updatePageContext,
897
+ dt as widgetHistorySnapshotEvent,
898
+ ct as wireGADataLayer,
579
899
  x as wireQNAToChat,
580
- it as wireSimilarToChat,
581
- ge as withBaseTheme,
582
- nt as withDefaultWidgetTheme
900
+ ut as wireSimilarToChat,
901
+ we as withBaseTheme,
902
+ ft as withDefaultWidgetTheme
583
903
  };
584
904
  //# sourceMappingURL=common.js.map