@gengage/assistant-fe 0.6.19 → 0.6.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{api-paths-lIioK7-S.js → api-paths-DcKsQqb6.js} +1 -1
- package/dist/chat/history-storage.d.ts +1 -0
- package/dist/chat/runtime.d.ts +1 -1
- package/dist/chat/types.d.ts +1 -0
- package/dist/chat-runtime.js +1 -1
- package/dist/chat.iife.js +10 -10
- package/dist/chat.js +1 -1
- package/dist/{common-8WOyaL9-.js → common-MpBmMLVk.js} +2 -2
- package/dist/common.js +8 -8
- package/dist/{connection-warning-CBR0CWsY.js → connection-warning-ClrMLgmZ.js} +1 -1
- package/dist/{context-heG8hv5l.js → context-UTzCGyR9.js} +19 -8
- package/dist/{fastIntent-Dw79pmRK.js → fastIntent-Bl4xN0qL.js} +2 -2
- package/dist/index.js +13 -13
- package/dist/{native-webview-NWc9LrJh.js → native-webview-BcwGKkDe.js} +1 -1
- package/dist/native.iife.js +6 -6
- package/dist/native.js +1 -1
- package/dist/{overlay-COzFFq0-.js → overlay-cF2SjxYU.js} +1 -1
- package/dist/overlay.js +2 -2
- package/dist/qna-runtime.js +1 -1
- package/dist/qna.iife.js +1 -1
- package/dist/qna.js +1 -1
- package/dist/{runtime-D5Sj-_tA.js → runtime-BlU1rKqc.js} +4 -4
- package/dist/{runtime-BsnZ6gt2.js → runtime-CS4mg3ra.js} +4 -4
- package/dist/{runtime-w0f2VkzL.js → runtime-_koZbJK_.js} +51 -48
- package/dist/{simbut-BvdJtzCu.js → simbut-BtL7zYIJ.js} +2 -2
- package/dist/simbut.iife.js +1 -1
- package/dist/simbut.js +1 -1
- package/dist/{simrel-DU6a27g9.js → simrel-ekf3kUb_.js} +2 -2
- package/dist/simrel-runtime.js +1 -1
- package/dist/simrel.iife.js +2 -2
- package/dist/simrel.js +2 -2
- package/dist/{widget-base-BeWuIxD6.js → widget-base-p1EKDuiI.js} +2 -2
- package/package.json +1 -1
package/dist/chat.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as e, c as t, d as r, f as s, i as n, l as c, n as i, o as l, r as o, s as h, t as C, u as d } from "./runtime-
|
|
1
|
+
import { a as e, c as t, d as r, f as s, i as n, l as c, n as i, o as l, r as o, s as h, t as C, u as d } from "./runtime-_koZbJK_.js";
|
|
2
2
|
import { t as S } from "./chat-rvSffJXw.js";
|
|
3
3
|
export {
|
|
4
4
|
d as CHAT_SCROLL_ELEMENT_ID,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { i as g } from "./widget-base-
|
|
1
|
+
import { i as g } from "./widget-base-p1EKDuiI.js";
|
|
2
2
|
import { c as l, i as p, o as u, r as c, t as y } from "./schemas-BnYUhYSy.js";
|
|
3
|
-
import { a as w, i as v } from "./overlay-
|
|
3
|
+
import { a as w, i as v } from "./overlay-cF2SjxYU.js";
|
|
4
4
|
var d = u({ enabled: c().default(!0) }), h = u({
|
|
5
5
|
chat: l().optional(),
|
|
6
6
|
qna: l().optional(),
|
package/dist/common.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { a, d as t, f as s, h as r, i, l as o, m as n, n as c, o as l, p as m, r as g, t as d, u as p } from "./api-paths-
|
|
2
|
-
import { N as f, a as E, c as S, i as C, k as T, n as h, o as y, r as A, s as G, t as I } from "./context-
|
|
3
|
-
import { a as R, c as W, d as v, f as N, l as P, n as U, o as O, p as D, r as _, t as L, u as b } from "./widget-base-
|
|
4
|
-
import { a as x, c as B, f as F, i as z, l as M, n as V, o as K, r as H, s as Q, t as q } from "./fastIntent-
|
|
5
|
-
import { n as j, t as J } from "./connection-warning-
|
|
6
|
-
import { i as Y, n as $, r as ee, t as ae } from "./overlay-
|
|
7
|
-
import { a as se, i as re, n as ie, r as oe } from "./native-webview-
|
|
8
|
-
import { a as ce, c as le, i as me, l as ge, n as de, o as pe, r as ue, s as fe, t as Ee, u as Se } from "./common-
|
|
1
|
+
import { a, d as t, f as s, h as r, i, l as o, m as n, n as c, o as l, p as m, r as g, t as d, u as p } from "./api-paths-DcKsQqb6.js";
|
|
2
|
+
import { N as f, a as E, c as S, i as C, k as T, n as h, o as y, r as A, s as G, t as I } from "./context-UTzCGyR9.js";
|
|
3
|
+
import { a as R, c as W, d as v, f as N, l as P, n as U, o as O, p as D, r as _, t as L, u as b } from "./widget-base-p1EKDuiI.js";
|
|
4
|
+
import { a as x, c as B, f as F, i as z, l as M, n as V, o as K, r as H, s as Q, t as q } from "./fastIntent-Bl4xN0qL.js";
|
|
5
|
+
import { n as j, t as J } from "./connection-warning-ClrMLgmZ.js";
|
|
6
|
+
import { i as Y, n as $, r as ee, t as ae } from "./overlay-cF2SjxYU.js";
|
|
7
|
+
import { a as se, i as re, n as ie, r as oe } from "./native-webview-BcwGKkDe.js";
|
|
8
|
+
import { a as ce, c as le, i as me, l as ge, n as de, o as pe, r as ue, s as fe, t as Ee, u as Se } from "./common-MpBmMLVk.js";
|
|
9
9
|
export {
|
|
10
10
|
pe as AccountRuntimeConfigSchema,
|
|
11
11
|
b as BASE_WIDGET_THEME,
|
|
@@ -30,7 +30,8 @@ var T = /* @__PURE__ */ new Set([
|
|
|
30
30
|
"blockquote",
|
|
31
31
|
"img",
|
|
32
32
|
"sup",
|
|
33
|
-
"sub"
|
|
33
|
+
"sub",
|
|
34
|
+
"button"
|
|
34
35
|
]), E = /* @__PURE__ */ new Set([
|
|
35
36
|
"script",
|
|
36
37
|
"iframe",
|
|
@@ -40,7 +41,6 @@ var T = /* @__PURE__ */ new Set([
|
|
|
40
41
|
"input",
|
|
41
42
|
"textarea",
|
|
42
43
|
"select",
|
|
43
|
-
"button",
|
|
44
44
|
"style",
|
|
45
45
|
"link",
|
|
46
46
|
"meta",
|
|
@@ -59,6 +59,13 @@ var T = /* @__PURE__ */ new Set([
|
|
|
59
59
|
"width",
|
|
60
60
|
"height"
|
|
61
61
|
]),
|
|
62
|
+
button: /* @__PURE__ */ new Set([
|
|
63
|
+
"type",
|
|
64
|
+
"disabled",
|
|
65
|
+
"aria-label",
|
|
66
|
+
"aria-hidden",
|
|
67
|
+
"title"
|
|
68
|
+
]),
|
|
62
69
|
div: /* @__PURE__ */ new Set(["style"]),
|
|
63
70
|
span: /* @__PURE__ */ new Set(["style"]),
|
|
64
71
|
p: /* @__PURE__ */ new Set(["style"])
|
|
@@ -181,6 +188,10 @@ function w(e, t) {
|
|
|
181
188
|
const o = n.getAttribute("src");
|
|
182
189
|
o !== null && (o.trim().toLowerCase().startsWith("https://") || n.removeAttribute("src"));
|
|
183
190
|
}
|
|
191
|
+
if (i === "button") {
|
|
192
|
+
const o = n.getAttribute("type")?.trim().toLowerCase();
|
|
193
|
+
(!o || o !== "button") && n.setAttribute("type", "button");
|
|
194
|
+
}
|
|
184
195
|
const p = Array.from(n.childNodes);
|
|
185
196
|
for (const o of p) w(o, n);
|
|
186
197
|
}
|
|
@@ -195,7 +206,7 @@ function J(e) {
|
|
|
195
206
|
return !1;
|
|
196
207
|
}
|
|
197
208
|
}
|
|
198
|
-
function
|
|
209
|
+
function A(e) {
|
|
199
210
|
if (e.startsWith("/") && !e.startsWith("//")) return !0;
|
|
200
211
|
try {
|
|
201
212
|
const t = new URL(e);
|
|
@@ -205,7 +216,7 @@ function S(e) {
|
|
|
205
216
|
}
|
|
206
217
|
}
|
|
207
218
|
function X(e, t, n) {
|
|
208
|
-
(t === "href" || t === "src") && !
|
|
219
|
+
(t === "href" || t === "src") && !A(n) || e.setAttribute(t, n);
|
|
209
220
|
}
|
|
210
221
|
function K(e) {
|
|
211
222
|
if (!e) return "";
|
|
@@ -434,7 +445,7 @@ function fe(e) {
|
|
|
434
445
|
function m() {
|
|
435
446
|
a !== null && (window.clearInterval(a), a = null);
|
|
436
447
|
}
|
|
437
|
-
function
|
|
448
|
+
function S() {
|
|
438
449
|
const g = o();
|
|
439
450
|
if (!g) return !1;
|
|
440
451
|
if (i > 0 && (g.open?.(), i = 0), n.length > 0) {
|
|
@@ -445,7 +456,7 @@ function fe(e) {
|
|
|
445
456
|
}
|
|
446
457
|
function y() {
|
|
447
458
|
a === null && (s = 0, a = window.setInterval(() => {
|
|
448
|
-
|
|
459
|
+
S() || (s += 1, s >= p && ((n.length > 0 || i > 0) && q({
|
|
449
460
|
reason: "chat_unavailable_after_poll",
|
|
450
461
|
attempts: p
|
|
451
462
|
}), n.length = 0, i = 0, m()));
|
|
@@ -472,7 +483,7 @@ function fe(e) {
|
|
|
472
483
|
}
|
|
473
484
|
function pe() {
|
|
474
485
|
return _("gengage:similar:product-click", ({ sku: e, url: t, sessionId: n }) => {
|
|
475
|
-
n && window.gengage?.chat?.saveSession(n, e),
|
|
486
|
+
n && window.gengage?.chat?.saveSession(n, e), A(t) && (window.location.href = t);
|
|
476
487
|
});
|
|
477
488
|
}
|
|
478
489
|
function B() {
|
|
@@ -514,7 +525,7 @@ export {
|
|
|
514
525
|
le as g,
|
|
515
526
|
$ as h,
|
|
516
527
|
me as i,
|
|
517
|
-
|
|
528
|
+
A as j,
|
|
518
529
|
ue as k,
|
|
519
530
|
G as l,
|
|
520
531
|
te as m,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { j as S } from "./context-
|
|
2
|
-
import { i as E } from "./widget-base-
|
|
1
|
+
import { j as S } from "./context-UTzCGyR9.js";
|
|
2
|
+
import { i as E } from "./widget-base-p1EKDuiI.js";
|
|
3
3
|
function $(t, r) {
|
|
4
4
|
if (typeof window > "u" || !S(t)) return !1;
|
|
5
5
|
const e = new CustomEvent("gengage:navigate", {
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { d as a, f as t, h as r, m as i, n as s, t as n } from "./api-paths-
|
|
2
|
-
import { a as c, c as m, i as p, k as d, o as g, s as l, t as f } from "./context-
|
|
3
|
-
import { d as S, f as U, n as C, p as I, r as R, u as h } from "./widget-base-
|
|
4
|
-
import { c as E, l as y, n as G, s as T, t as W } from "./runtime-
|
|
5
|
-
import { a as w, c as N, f as O, i as v, l as _, n as P, o as k, r as L, s as Q } from "./fastIntent-
|
|
6
|
-
import { t as F } from "./connection-warning-
|
|
7
|
-
import { a as b, i as x, n as M, r as H, t as K } from "./runtime-
|
|
8
|
-
import { a as Z, i as j, n as q, r as J, t as X } from "./runtime-
|
|
9
|
-
import { n as $ } from "./simrel-
|
|
10
|
-
import { n as ae, t as te } from "./simbut-
|
|
11
|
-
import { i as ie, n as se, r as ne, t as oe } from "./overlay-
|
|
12
|
-
import { a as me, i as pe, n as de, r as ge } from "./native-webview-
|
|
13
|
-
import { a as fe, c as ue, i as Se, l as Ue, n as Ce, o as Ie, r as Re, s as he, t as Ae, u as Ee } from "./common-
|
|
1
|
+
import { d as a, f as t, h as r, m as i, n as s, t as n } from "./api-paths-DcKsQqb6.js";
|
|
2
|
+
import { a as c, c as m, i as p, k as d, o as g, s as l, t as f } from "./context-UTzCGyR9.js";
|
|
3
|
+
import { d as S, f as U, n as C, p as I, r as R, u as h } from "./widget-base-p1EKDuiI.js";
|
|
4
|
+
import { c as E, l as y, n as G, s as T, t as W } from "./runtime-_koZbJK_.js";
|
|
5
|
+
import { a as w, c as N, f as O, i as v, l as _, n as P, o as k, r as L, s as Q } from "./fastIntent-Bl4xN0qL.js";
|
|
6
|
+
import { t as F } from "./connection-warning-ClrMLgmZ.js";
|
|
7
|
+
import { a as b, i as x, n as M, r as H, t as K } from "./runtime-BlU1rKqc.js";
|
|
8
|
+
import { a as Z, i as j, n as q, r as J, t as X } from "./runtime-CS4mg3ra.js";
|
|
9
|
+
import { n as $ } from "./simrel-ekf3kUb_.js";
|
|
10
|
+
import { n as ae, t as te } from "./simbut-BtL7zYIJ.js";
|
|
11
|
+
import { i as ie, n as se, r as ne, t as oe } from "./overlay-cF2SjxYU.js";
|
|
12
|
+
import { a as me, i as pe, n as de, r as ge } from "./native-webview-BcwGKkDe.js";
|
|
13
|
+
import { a as fe, c as ue, i as Se, l as Ue, n as Ce, o as Ie, r as Re, s as he, t as Ae, u as Ee } from "./common-MpBmMLVk.js";
|
|
14
14
|
export {
|
|
15
15
|
Ie as AccountRuntimeConfigSchema,
|
|
16
16
|
h as BASE_WIDGET_THEME,
|